From 8d1c422ac5ab63bac5a7ba09747b3f31351bc628 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 19 Aug 2014 10:28:24 +0800 Subject: [PATCH 01/74] merge extension EditBox to ui module --- build/cocos2d_libs.xcodeproj/project.pbxproj | 72 ++ build/cocos2d_tests.xcodeproj/project.pbxproj | 8 + cocos/platform/ios/CCEAGLView.mm | 3 +- cocos/ui/Android.mk | 4 +- cocos/ui/CocosGUI.h | 2 +- cocos/ui/UIEditBox/UIEditBox.cpp | 460 ++++++++++++ cocos/ui/UIEditBox/UIEditBox.h | 462 ++++++++++++ cocos/ui/UIEditBox/UIEditBoxImpl.h | 103 +++ cocos/ui/UIEditBox/UIEditBoxImplAndroid.cpp | 319 ++++++++ cocos/ui/UIEditBox/UIEditBoxImplAndroid.h | 112 +++ cocos/ui/UIEditBox/UIEditBoxImplIOS.h | 147 ++++ cocos/ui/UIEditBox/UIEditBoxImplIOS.mm | 678 ++++++++++++++++++ cocos/ui/UIEditBox/UIEditBoxImplMac.h | 136 ++++ cocos/ui/UIEditBox/UIEditBoxImplMac.mm | 524 ++++++++++++++ cocos/ui/UIEditBox/UIEditBoxImplNone.cpp | 18 + cocos/ui/UIEditBox/UIEditBoxImplWin.cpp | 302 ++++++++ cocos/ui/UIEditBox/UIEditBoxImplWin.h | 118 +++ cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp | 307 ++++++++ cocos/ui/UIEditBox/UIEditBoxImplWp8.h | 88 +++ cocos/ui/proj.win32/Win32InputBox.cpp | 383 ++++++++++ cocos/ui/proj.win32/Win32InputBox.h | 106 +++ cocos/ui/proj.win32/libui.vcxproj | 7 + cocos/ui/proj.win32/libui.vcxproj.filters | 24 + cocos/ui/proj.wp8/libGUI.vcxproj | 5 + cocos/ui/proj.wp8/libGUI.vcxproj.filters | 15 + tests/cpp-tests/Android.mk | 1 + .../CocoStudioGUITest/CocosGUIScene.cpp | 13 +- .../CocoStudioGUITest/UIEditBoxTest.cpp | 137 ++++ .../UITest/CocoStudioGUITest/UIEditBoxTest.h | 52 ++ .../UITest/CocoStudioGUITest/UIScene.h | 2 +- .../CocoStudioGUITest/UISceneManager.cpp | 4 + .../UITest/CocoStudioGUITest/UISceneManager.h | 1 + tests/cpp-tests/proj.win32/cpp-tests.vcxproj | 2 + .../proj.win32/cpp-tests.vcxproj.filters | 6 + .../cpp-testsComponent.vcxproj | 2 + .../cpp-testsComponent.vcxproj.filters | 6 + 36 files changed, 4623 insertions(+), 6 deletions(-) create mode 100644 cocos/ui/UIEditBox/UIEditBox.cpp create mode 100644 cocos/ui/UIEditBox/UIEditBox.h create mode 100644 cocos/ui/UIEditBox/UIEditBoxImpl.h create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplAndroid.cpp create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplAndroid.h create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplIOS.h create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplIOS.mm create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplMac.h create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplMac.mm create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplNone.cpp create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplWin.cpp create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplWin.h create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp create mode 100644 cocos/ui/UIEditBox/UIEditBoxImplWp8.h create mode 100644 cocos/ui/proj.win32/Win32InputBox.cpp create mode 100644 cocos/ui/proj.win32/Win32InputBox.h create mode 100644 tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp create mode 100644 tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.h diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 497aa3862f..0225d99ce9 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -638,6 +638,24 @@ 1AD71EF5180E27CF00808F54 /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */; }; 1AD71EF6180E27CF00808F54 /* CCPhysicsSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */; }; 1AD71EF7180E27CF00808F54 /* CCPhysicsSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */; }; + 292CEFF619A18DF200E8E6A0 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292CEFE819A18DF200E8E6A0 /* UIEditBox.cpp */; }; + 292CEFF719A18DF200E8E6A0 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292CEFE819A18DF200E8E6A0 /* UIEditBox.cpp */; }; + 292CEFF819A18DF200E8E6A0 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFE919A18DF200E8E6A0 /* UIEditBox.h */; }; + 292CEFF919A18DF200E8E6A0 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFE919A18DF200E8E6A0 /* UIEditBox.h */; }; + 292CEFFA19A18DF200E8E6A0 /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFEA19A18DF200E8E6A0 /* UIEditBoxImpl.h */; }; + 292CEFFB19A18DF200E8E6A0 /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFEA19A18DF200E8E6A0 /* UIEditBoxImpl.h */; }; + 292CEFFE19A18DF200E8E6A0 /* UIEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFEC19A18DF200E8E6A0 /* UIEditBoxImplAndroid.h */; }; + 292CEFFF19A18DF200E8E6A0 /* UIEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFEC19A18DF200E8E6A0 /* UIEditBoxImplAndroid.h */; }; + 292CF00019A18DF200E8E6A0 /* UIEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFED19A18DF200E8E6A0 /* UIEditBoxImplIOS.h */; }; + 292CF00119A18DF200E8E6A0 /* UIEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFED19A18DF200E8E6A0 /* UIEditBoxImplIOS.h */; }; + 292CF00319A18DF200E8E6A0 /* UIEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292CEFEE19A18DF200E8E6A0 /* UIEditBoxImplIOS.mm */; }; + 292CF00419A18DF200E8E6A0 /* UIEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFEF19A18DF200E8E6A0 /* UIEditBoxImplMac.h */; }; + 292CF00519A18DF200E8E6A0 /* UIEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFEF19A18DF200E8E6A0 /* UIEditBoxImplMac.h */; }; + 292CF00619A18DF200E8E6A0 /* UIEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292CEFF019A18DF200E8E6A0 /* UIEditBoxImplMac.mm */; }; + 292CF00C19A18DF200E8E6A0 /* UIEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFF319A18DF200E8E6A0 /* UIEditBoxImplWin.h */; }; + 292CF00D19A18DF200E8E6A0 /* UIEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFF319A18DF200E8E6A0 /* UIEditBoxImplWin.h */; }; + 292CF01019A18DF200E8E6A0 /* UIEditBoxImplWp8.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFF519A18DF200E8E6A0 /* UIEditBoxImplWp8.h */; }; + 292CF01119A18DF200E8E6A0 /* UIEditBoxImplWp8.h in Headers */ = {isa = PBXBuildFile; fileRef = 292CEFF519A18DF200E8E6A0 /* UIEditBoxImplWp8.h */; }; 2958244B19873D8E00F9746D /* UIScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */; }; 2958244C19873D8E00F9746D /* UIScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */; }; 2958244D19873D8E00F9746D /* UIScale9Sprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 2958244A19873D8E00F9746D /* UIScale9Sprite.h */; }; @@ -2488,6 +2506,20 @@ 2905FA1318CF08D100240AA3 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = ""; }; 2905FA1418CF08D100240AA3 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = ""; }; 29080DEB191B82CE0066F8DF /* UIDeprecated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIDeprecated.h; sourceTree = ""; }; + 292CEFE819A18DF200E8E6A0 /* UIEditBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBox.cpp; sourceTree = ""; }; + 292CEFE919A18DF200E8E6A0 /* UIEditBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBox.h; sourceTree = ""; }; + 292CEFEA19A18DF200E8E6A0 /* UIEditBoxImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImpl.h; sourceTree = ""; }; + 292CEFEB19A18DF200E8E6A0 /* UIEditBoxImplAndroid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplAndroid.cpp; sourceTree = ""; }; + 292CEFEC19A18DF200E8E6A0 /* UIEditBoxImplAndroid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplAndroid.h; sourceTree = ""; }; + 292CEFED19A18DF200E8E6A0 /* UIEditBoxImplIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplIOS.h; sourceTree = ""; }; + 292CEFEE19A18DF200E8E6A0 /* UIEditBoxImplIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIEditBoxImplIOS.mm; sourceTree = ""; }; + 292CEFEF19A18DF200E8E6A0 /* UIEditBoxImplMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplMac.h; sourceTree = ""; }; + 292CEFF019A18DF200E8E6A0 /* UIEditBoxImplMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIEditBoxImplMac.mm; sourceTree = ""; }; + 292CEFF119A18DF200E8E6A0 /* UIEditBoxImplNone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplNone.cpp; sourceTree = ""; }; + 292CEFF219A18DF200E8E6A0 /* UIEditBoxImplWin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplWin.cpp; sourceTree = ""; }; + 292CEFF319A18DF200E8E6A0 /* UIEditBoxImplWin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplWin.h; sourceTree = ""; }; + 292CEFF419A18DF200E8E6A0 /* UIEditBoxImplWp8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplWp8.cpp; sourceTree = ""; }; + 292CEFF519A18DF200E8E6A0 /* UIEditBoxImplWp8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplWp8.h; sourceTree = ""; }; 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9Sprite.cpp; sourceTree = ""; }; 2958244A19873D8E00F9746D /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = ""; }; 2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = ""; }; @@ -4371,6 +4403,7 @@ 2905F9E618CF08D000240AA3 /* ui */ = { isa = PBXGroup; children = ( + 292CEFE719A18DF200E8E6A0 /* UIEditBox */, 29CB8F531929D67D00C841D6 /* widgets */, 29CB8F521929D65500C841D6 /* experimental */, 29CB8F511929D64500C841D6 /* base */, @@ -4382,6 +4415,27 @@ path = ../cocos/ui; sourceTree = ""; }; + 292CEFE719A18DF200E8E6A0 /* UIEditBox */ = { + isa = PBXGroup; + children = ( + 292CEFE819A18DF200E8E6A0 /* UIEditBox.cpp */, + 292CEFE919A18DF200E8E6A0 /* UIEditBox.h */, + 292CEFEA19A18DF200E8E6A0 /* UIEditBoxImpl.h */, + 292CEFEB19A18DF200E8E6A0 /* UIEditBoxImplAndroid.cpp */, + 292CEFEC19A18DF200E8E6A0 /* UIEditBoxImplAndroid.h */, + 292CEFED19A18DF200E8E6A0 /* UIEditBoxImplIOS.h */, + 292CEFEE19A18DF200E8E6A0 /* UIEditBoxImplIOS.mm */, + 292CEFEF19A18DF200E8E6A0 /* UIEditBoxImplMac.h */, + 292CEFF019A18DF200E8E6A0 /* UIEditBoxImplMac.mm */, + 292CEFF119A18DF200E8E6A0 /* UIEditBoxImplNone.cpp */, + 292CEFF219A18DF200E8E6A0 /* UIEditBoxImplWin.cpp */, + 292CEFF319A18DF200E8E6A0 /* UIEditBoxImplWin.h */, + 292CEFF419A18DF200E8E6A0 /* UIEditBoxImplWp8.cpp */, + 292CEFF519A18DF200E8E6A0 /* UIEditBoxImplWp8.h */, + ); + path = UIEditBox; + sourceTree = ""; + }; 29CB8F501929D63600C841D6 /* layout */ = { isa = PBXGroup; children = ( @@ -6120,18 +6174,24 @@ files = ( B2DB4778197665BF00411E16 /* UIHelper.h in Headers */, B2DB478A1976664400411E16 /* UISlider.h in Headers */, + 292CF00019A18DF200E8E6A0 /* UIEditBoxImplIOS.h in Headers */, + 292CEFFA19A18DF200E8E6A0 /* UIEditBoxImpl.h in Headers */, B2DB47841976661A00411E16 /* UIImageView.h in Headers */, B2DB47881976663A00411E16 /* UIRichText.h in Headers */, B2DB47801976660200411E16 /* UIButton.h in Headers */, B2DB47821976660C00411E16 /* UICheckBox.h in Headers */, B2DB47861976662D00411E16 /* UILoadingBar.h in Headers */, + 292CEFF819A18DF200E8E6A0 /* UIEditBox.h in Headers */, B2DB47681976650A00411E16 /* UIWidget.h in Headers */, 2958244D19873D8E00F9746D /* UIScale9Sprite.h in Headers */, B2DB47691976651E00411E16 /* UIHBox.h in Headers */, + 292CF01019A18DF200E8E6A0 /* UIEditBoxImplWp8.h in Headers */, + 292CF00C19A18DF200E8E6A0 /* UIEditBoxImplWin.h in Headers */, B2DB478F1976666100411E16 /* UIText.h in Headers */, B2DB47901976666100411E16 /* UITextAtlas.h in Headers */, B2DB47911976666100411E16 /* UITextBMFont.h in Headers */, B2DB47921976666100411E16 /* UITextField.h in Headers */, + 292CEFFE19A18DF200E8E6A0 /* UIEditBoxImplAndroid.h in Headers */, B2DB476A1976653000411E16 /* UILayout.h in Headers */, B2DB477A197665D000411E16 /* UIListView.h in Headers */, B2DB477C197665DB00411E16 /* UIPageView.h in Headers */, @@ -6140,6 +6200,7 @@ B2DB476E1976655C00411E16 /* UILayoutParameter.h in Headers */, B2DB47701976657000411E16 /* UIRelativeBox.h in Headers */, B2DB47721976658000411E16 /* UIVBox.h in Headers */, + 292CF00419A18DF200E8E6A0 /* UIEditBoxImplMac.h in Headers */, B2DB47741976659800411E16 /* CocosGUI.h in Headers */, B2DB4776197665AA00411E16 /* UIDeprecated.h in Headers */, ); @@ -6152,14 +6213,18 @@ B2C59A3419777EB600B452DF /* UIListView.h in Headers */, B2C59A3519777EB600B452DF /* UILoadingBar.h in Headers */, B2C59A3619777EB600B452DF /* UIPageView.h in Headers */, + 292CF00119A18DF200E8E6A0 /* UIEditBoxImplIOS.h in Headers */, B2C59A3719777EB600B452DF /* UIRichText.h in Headers */, B2C59A3819777EB600B452DF /* UIScrollView.h in Headers */, B2C59A3919777EB600B452DF /* UISlider.h in Headers */, B2C59A3A19777EB600B452DF /* UIText.h in Headers */, + 292CF00519A18DF200E8E6A0 /* UIEditBoxImplMac.h in Headers */, B2C59A3B19777EB600B452DF /* UITextAtlas.h in Headers */, B2C59A3C19777EB600B452DF /* UITextBMFont.h in Headers */, + 292CEFFB19A18DF200E8E6A0 /* UIEditBoxImpl.h in Headers */, B2C59A3D19777EB600B452DF /* UITextField.h in Headers */, B2C59A3E19777EB600B452DF /* UIButton.h in Headers */, + 292CF01119A18DF200E8E6A0 /* UIEditBoxImplWp8.h in Headers */, B2C59A3F19777EB600B452DF /* UICheckBox.h in Headers */, B2C59A4019777EB600B452DF /* UIImageView.h in Headers */, B2C59A4119777EBC00B452DF /* UIVideoPlayer.h in Headers */, @@ -6167,10 +6232,13 @@ B2C59A4319777EC700B452DF /* UIWidget.h in Headers */, B2C59A4519777EC700B452DF /* UIHelper.h in Headers */, B2C59A4619777EC700B452DF /* GUIDefine.h in Headers */, + 292CEFF919A18DF200E8E6A0 /* UIEditBox.h in Headers */, B2C59A4719777ECF00B452DF /* UIHBox.h in Headers */, B2C59A4819777ECF00B452DF /* UIRelativeBox.h in Headers */, + 292CF00D19A18DF200E8E6A0 /* UIEditBoxImplWin.h in Headers */, B2C59A4919777ECF00B452DF /* UIVBox.h in Headers */, 2958244E19873D8E00F9746D /* UIScale9Sprite.h in Headers */, + 292CEFFF19A18DF200E8E6A0 /* UIEditBoxImplAndroid.h in Headers */, B2C59A4A19777ECF00B452DF /* UILayout.h in Headers */, B2C59A4B19777ECF00B452DF /* UILayoutParameter.h in Headers */, B2C59A4C19777ECF00B452DF /* UILayoutManager.h in Headers */, @@ -7598,10 +7666,12 @@ B2DB476F1976656D00411E16 /* UIRelativeBox.cpp in Sources */, B2DB47711976657A00411E16 /* UIVBox.cpp in Sources */, B2DB47731976658E00411E16 /* CocosGUI.cpp in Sources */, + 292CF00619A18DF200E8E6A0 /* UIEditBoxImplMac.mm in Sources */, B2DB4775197665A500411E16 /* UIDeprecated.cpp in Sources */, 2958244B19873D8E00F9746D /* UIScale9Sprite.cpp in Sources */, B2DB47891976664200411E16 /* UISlider.cpp in Sources */, B2DB4779197665CD00411E16 /* UIListView.cpp in Sources */, + 292CEFF619A18DF200E8E6A0 /* UIEditBox.cpp in Sources */, B2DB47851976662B00411E16 /* UILoadingBar.cpp in Sources */, B2DB478B1976665700411E16 /* UIText.cpp in Sources */, B2DB478C1976665700411E16 /* UITextAtlas.cpp in Sources */, @@ -7631,6 +7701,7 @@ B2C59A2419777E7500B452DF /* UITextBMFont.cpp in Sources */, B2C59A2519777E7500B452DF /* UITextField.cpp in Sources */, B2C59A2619777E7500B452DF /* UIButton.cpp in Sources */, + 292CF00319A18DF200E8E6A0 /* UIEditBoxImplIOS.mm in Sources */, B2C59ACB197782FF00B452DF /* UIVideoPlayerIOS.mm in Sources */, B2C59A2719777E7500B452DF /* UICheckBox.cpp in Sources */, B2C59A2819777E7500B452DF /* UIImageView.cpp in Sources */, @@ -7638,6 +7709,7 @@ B2C59A2B19777E8300B452DF /* UIWidget.cpp in Sources */, B2C59A2D19777E8300B452DF /* UIHelper.cpp in Sources */, B2C59A2E19777E8C00B452DF /* UIHBox.cpp in Sources */, + 292CEFF719A18DF200E8E6A0 /* UIEditBox.cpp in Sources */, B2C59A2F19777E8C00B452DF /* UIRelativeBox.cpp in Sources */, B2C59A3019777E8C00B452DF /* UIVBox.cpp in Sources */, B2C59A3119777E8C00B452DF /* UILayout.cpp in Sources */, diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index b75a2a309f..596da6fe3b 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -913,6 +913,8 @@ 29080DE6191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D8B191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp */; }; 290E94B5196FC16900694919 /* CocostudioParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 290E94B3196FC16900694919 /* CocostudioParserTest.cpp */; }; 290E94B6196FC16900694919 /* CocostudioParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 290E94B3196FC16900694919 /* CocostudioParserTest.cpp */; }; + 292CF01419A1965E00E8E6A0 /* UIEditBoxTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292CF01219A1965E00E8E6A0 /* UIEditBoxTest.cpp */; }; + 292CF01519A1965E00E8E6A0 /* UIEditBoxTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292CF01219A1965E00E8E6A0 /* UIEditBoxTest.cpp */; }; 295824591987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; }; 2958245A1987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; }; 29FBBBFE196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; }; @@ -3677,6 +3679,8 @@ 29080D8C191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidgetAddNodeTest_Editor.h; sourceTree = ""; }; 290E94B3196FC16900694919 /* CocostudioParserTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CocostudioParserTest.cpp; path = ../CocostudioParserTest.cpp; sourceTree = ""; }; 290E94B4196FC16900694919 /* CocostudioParserTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CocostudioParserTest.h; path = ../CocostudioParserTest.h; sourceTree = ""; }; + 292CF01219A1965E00E8E6A0 /* UIEditBoxTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxTest.cpp; sourceTree = ""; }; + 292CF01319A1965E00E8E6A0 /* UIEditBoxTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxTest.h; sourceTree = ""; }; 295824571987415900F9746D /* UIScale9SpriteTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9SpriteTest.cpp; sourceTree = ""; }; 295824581987415900F9746D /* UIScale9SpriteTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9SpriteTest.h; sourceTree = ""; }; 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocostudioParserJsonTest.cpp; sourceTree = ""; }; @@ -7864,6 +7868,8 @@ children = ( 295824571987415900F9746D /* UIScale9SpriteTest.cpp */, 295824581987415900F9746D /* UIScale9SpriteTest.h */, + 292CF01219A1965E00E8E6A0 /* UIEditBoxTest.cpp */, + 292CF01319A1965E00E8E6A0 /* UIEditBoxTest.h */, 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */, 29080D20191B595E0066F8DF /* CocosGUIScene.h */, 29080D37191B595E0066F8DF /* GUIEditorTest.cpp */, @@ -9237,6 +9243,7 @@ 1AC35B7D18CECF0C00F37B72 /* PlayerController.cpp in Sources */, 29080D9F191B595E0066F8DF /* CustomReader.cpp in Sources */, 1AC35BE718CECF0C00F37B72 /* CCControlScene.cpp in Sources */, + 292CF01419A1965E00E8E6A0 /* UIEditBoxTest.cpp in Sources */, 29080DBF191B595E0066F8DF /* UIPageViewTest_Editor.cpp in Sources */, 1AC35B5F18CECF0C00F37B72 /* DataVisitorTest.cpp in Sources */, 1AC35B5D18CECF0C00F37B72 /* CurrentLanguageTest.cpp in Sources */, @@ -9418,6 +9425,7 @@ 1AC35C0618CECF0C00F37B72 /* FontTest.cpp in Sources */, 1AC35C3818CECF0C00F37B72 /* PerformanceTest.cpp in Sources */, 1F33635018E37E840074764D /* RefPtrTest.cpp in Sources */, + 292CF01519A1965E00E8E6A0 /* UIEditBoxTest.cpp in Sources */, 1AC35B2818CECF0C00F37B72 /* ActionsTest.cpp in Sources */, 1AC35C4A18CECF0C00F37B72 /* ShaderTest.cpp in Sources */, 1AC35BFE18CECF0C00F37B72 /* Scale9SpriteTest.cpp in Sources */, diff --git a/cocos/platform/ios/CCEAGLView.mm b/cocos/platform/ios/CCEAGLView.mm index 3c5c1c7b37..87a02a566c 100644 --- a/cocos/platform/ios/CCEAGLView.mm +++ b/cocos/platform/ios/CCEAGLView.mm @@ -374,7 +374,8 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. for(UIView* view in subviews) { - if([view isKindOfClass:NSClassFromString(@"CCCustomUITextField")]) + if([view isKindOfClass:NSClassFromString(@"CCCustomUITextField")] || + [view isKindOfClass:NSClassFromString(@"UICustomUITextField")]) { if ([view isFirstResponder]) { diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index 40f4cb6a31..e63516d5a1 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -31,6 +31,8 @@ UIRelativeBox.cpp \ UIVideoPlayerAndroid.cpp \ UIDeprecated.cpp \ UIScale9Sprite.cpp \ +UIEditBox/UIEditBox.cpp \ +UIEditBox/UIEditBoxImplAndroid.cpp \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/../editor-support @@ -43,9 +45,7 @@ $(LOCAL_PATH)/../editor-support LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static -LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static include $(BUILD_STATIC_LIBRARY) -$(call import-module,extensions) $(call import-module,.) diff --git a/cocos/ui/CocosGUI.h b/cocos/ui/CocosGUI.h index 5fc08abefc..eea8bdfa4c 100644 --- a/cocos/ui/CocosGUI.h +++ b/cocos/ui/CocosGUI.h @@ -51,7 +51,7 @@ THE SOFTWARE. #include "ui/UIDeprecated.h" #include "ui/GUIExport.h" #include "ui/UIScale9Sprite.h" - +#include "ui/UIEditBox/UIEditBox.h" NS_CC_BEGIN namespace ui { diff --git a/cocos/ui/UIEditBox/UIEditBox.cpp b/cocos/ui/UIEditBox/UIEditBox.cpp new file mode 100644 index 0000000000..12723cdb6e --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBox.cpp @@ -0,0 +1,460 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2012 James Chen + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "UIEditBox.h" +#include "UIEditBoxImpl.h" + +NS_CC_BEGIN + +namespace ui { + +static const float CHECK_EDITBOX_POSITION_INTERVAL = 0.1f; + +EditBox::EditBox(void) +: _editBoxImpl(nullptr) +, _delegate(nullptr) +, _editBoxInputMode(EditBox::InputMode::SINGLE_LINE) +, _editBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS) +, _keyboardReturnType(KeyboardReturnType::DEFAULT) +, _fontSize(-1) +, _placeholderFontSize(-1) +, _colText(Color3B::WHITE) +, _colPlaceHolder(Color3B::GRAY) +, _maxLength(0) +, _adjustHeight(0.0f) +, _backgroundSprite(nullptr) +#if CC_ENABLE_SCRIPT_BINDING +, _scriptEditBoxHandler(0) +#endif +{ +} + +EditBox::~EditBox(void) +{ + CC_SAFE_DELETE(_editBoxImpl); +#if CC_ENABLE_SCRIPT_BINDING + unregisterScriptEditBoxHandler(); +#endif +} + + +void EditBox::touchDownAction(Ref *sender, TouchEventType controlEvent) +{ + if (controlEvent == Widget::TouchEventType::ENDED) { + _editBoxImpl->openKeyboard(); + } +} + +EditBox* EditBox::create(const Size& size, + const std::string& pNormal9SpriteBg, + TextureResType texType /*= TextureResType::LOCAL*/) +{ + EditBox* pRet = new EditBox(); + + if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, pNormal9SpriteBg, texType)) + { + pRet->autorelease(); + } + else + { + CC_SAFE_DELETE(pRet); + } + + return pRet; +} + +bool EditBox::initWithSizeAndBackgroundSprite(const Size& size, + const std::string& pNormal9SpriteBg, + TextureResType texType) +{ + if (Widget::init()) + { + _editBoxImpl = __createSystemEditBox(this); + _editBoxImpl->initWithSize(size); + _editBoxImpl->setInputMode(EditBox::InputMode::ANY); + + if (texType == Widget::TextureResType::LOCAL) + { + _backgroundSprite = Scale9Sprite::create(pNormal9SpriteBg); + } + else + { + _backgroundSprite = Scale9Sprite::createWithSpriteFrameName(pNormal9SpriteBg); + } + this->setContentSize(size); + this->setPosition(Vec2(0, 0)); + + _backgroundSprite->setPosition(Vec2(_contentSize.width/2, _contentSize.height/2)); + _backgroundSprite->setContentSize(size); + this->addProtectedChild(_backgroundSprite); + + this->setTouchEnabled(true); + + this->addTouchEventListener(CC_CALLBACK_2(EditBox::touchDownAction, this)); + + return true; + } + return false; +} + +void EditBox::setDelegate(EditBoxDelegate* pDelegate) +{ + _delegate = pDelegate; + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setDelegate(pDelegate); + } +} + +EditBoxDelegate* EditBox::getDelegate() +{ + return _delegate; +} + +void EditBox::setText(const char* pText) +{ + if (pText != nullptr) + { + _text = pText; + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setText(pText); + } + } +} + +const char* EditBox::getText(void) +{ + if (_editBoxImpl != nullptr) + { + const char* pText = _editBoxImpl->getText(); + if(pText != nullptr) + return pText; + } + + return ""; +} + +void EditBox::setFont(const char* pFontName, int fontSize) +{ + _fontName = pFontName; + _fontSize = fontSize; + if (pFontName != nullptr) + { + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setFont(pFontName, fontSize); + } + } +} + +void EditBox::setFontName(const char* pFontName) +{ + _fontName = pFontName; + if (_editBoxImpl != nullptr && _fontSize != -1) + { + _editBoxImpl->setFont(pFontName, _fontSize); + } +} + +void EditBox::setFontSize(int fontSize) +{ + _fontSize = fontSize; + if (_editBoxImpl != nullptr && _fontName.length() > 0) + { + _editBoxImpl->setFont(_fontName.c_str(), _fontSize); + } +} + +void EditBox::setFontColor(const Color3B& color) +{ + _colText = color; + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setFontColor(color); + } +} + +void EditBox::setPlaceholderFont(const char* pFontName, int fontSize) +{ + _placeholderFontName = pFontName; + _placeholderFontSize = fontSize; + if (pFontName != nullptr) + { + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setPlaceholderFont(pFontName, fontSize); + } + } +} + +void EditBox::setPlaceholderFontName(const char* pFontName) +{ + _placeholderFontName = pFontName; + if (_editBoxImpl != nullptr && _placeholderFontSize != -1) + { + _editBoxImpl->setPlaceholderFont(pFontName, _fontSize); + } +} + +void EditBox::setPlaceholderFontSize(int fontSize) +{ + _placeholderFontSize = fontSize; + if (_editBoxImpl != nullptr && _placeholderFontName.length() > 0) + { + _editBoxImpl->setPlaceholderFont(_placeholderFontName.c_str(), _fontSize); + } +} + +void EditBox::setPlaceholderFontColor(const Color3B& color) +{ + _colText = color; + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setPlaceholderFontColor(color); + } +} + +void EditBox::setPlaceHolder(const char* pText) +{ + if (pText != nullptr) + { + _placeHolder = pText; + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setPlaceHolder(pText); + } + } +} + +const char* EditBox::getPlaceHolder(void) +{ + return _placeHolder.c_str(); +} + +void EditBox::setInputMode(EditBox::InputMode inputMode) +{ + _editBoxInputMode = inputMode; + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setInputMode(inputMode); + } +} + +void EditBox::setMaxLength(int maxLength) +{ + _maxLength = maxLength; + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setMaxLength(maxLength); + } +} + + +int EditBox::getMaxLength() +{ + return _maxLength; +} + +void EditBox::setInputFlag(EditBox::InputFlag inputFlag) +{ + _editBoxInputFlag = inputFlag; + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setInputFlag(inputFlag); + } +} + +void EditBox::setReturnType(EditBox::KeyboardReturnType returnType) +{ + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setReturnType(returnType); + } +} + +/* override function */ +void EditBox::setPosition(const Vec2& pos) +{ + Widget::setPosition(pos); + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setPosition(pos); + } +} + +void EditBox::setVisible(bool visible) +{ + Widget::setVisible(visible); + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setVisible(visible); + } +} + +void EditBox::setContentSize(const Size& size) +{ + Widget::setContentSize(size); + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setContentSize(size); + } +} + +void EditBox::adaptRenderers() +{ + if (_contentSizeDirty) + { + _backgroundSprite->setContentSize(_contentSize); + _backgroundSprite->setPosition(Vec2(_contentSize.width/2, _contentSize.height/2)); + } +} + +void EditBox::setAnchorPoint(const Vec2& anchorPoint) +{ + Widget::setAnchorPoint(anchorPoint); + if (_editBoxImpl != nullptr) + { + _editBoxImpl->setAnchorPoint(anchorPoint); + } +} + +void EditBox::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) +{ + Widget::visit(renderer, parentTransform, parentFlags); + if (_editBoxImpl != nullptr) + { + _editBoxImpl->visit(); + } +} + +void EditBox::onEnter(void) +{ +#if CC_ENABLE_SCRIPT_BINDING + if (_scriptType == kScriptTypeJavascript) + { + if (ScriptEngineManager::sendNodeEventToJSExtended(this, kNodeOnEnter)) + return; + } +#endif + + Widget::onEnter(); + if (_editBoxImpl != nullptr) + { + _editBoxImpl->onEnter(); + } +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + this->schedule(schedule_selector(EditBox::updatePosition), CHECK_EDITBOX_POSITION_INTERVAL); +#endif +} + +void EditBox::updatePosition(float dt) +{ + if (nullptr != _editBoxImpl) { + _editBoxImpl->updatePosition(dt); + } +} + + +void EditBox::onExit(void) +{ + Widget::onExit(); + if (_editBoxImpl != nullptr) + { + // remove system edit control + _editBoxImpl->closeKeyboard(); + } +} + +static Rect getRect(Node * pNode) +{ + Size contentSize = pNode->getContentSize(); + Rect rect = Rect(0, 0, contentSize.width, contentSize.height); + return RectApplyTransform(rect, pNode->getNodeToWorldTransform()); +} + +void EditBox::keyboardWillShow(IMEKeyboardNotificationInfo& info) +{ + // CCLOG("CCEditBox::keyboardWillShow"); + Rect rectTracked = getRect(this); + // some adjustment for margin between the keyboard and the edit box. + rectTracked.origin.y -= 4; + + // if the keyboard area doesn't intersect with the tracking node area, nothing needs to be done. + if (!rectTracked.intersectsRect(info.end)) + { + CCLOG("needn't to adjust view layout."); + return; + } + + // assume keyboard at the bottom of screen, calculate the vertical adjustment. + _adjustHeight = info.end.getMaxY() - rectTracked.getMinY(); + // CCLOG("CCEditBox:needAdjustVerticalPosition(%f)", _adjustHeight); + + if (_editBoxImpl != nullptr) + { + _editBoxImpl->doAnimationWhenKeyboardMove(info.duration, _adjustHeight); + } +} + +void EditBox::keyboardDidShow(IMEKeyboardNotificationInfo& info) +{ + +} + +void EditBox::keyboardWillHide(IMEKeyboardNotificationInfo& info) +{ + // CCLOG("CCEditBox::keyboardWillHide"); + if (_editBoxImpl != nullptr) + { + _editBoxImpl->doAnimationWhenKeyboardMove(info.duration, -_adjustHeight); + } +} + +void EditBox::keyboardDidHide(IMEKeyboardNotificationInfo& info) +{ + +} + +#if CC_ENABLE_SCRIPT_BINDING +void EditBox::registerScriptEditBoxHandler(int handler) +{ + unregisterScriptEditBoxHandler(); + _scriptEditBoxHandler = handler; +} + +void EditBox::unregisterScriptEditBoxHandler(void) +{ + if (0 != _scriptEditBoxHandler) + { + ScriptEngineManager::getInstance()->getScriptEngine()->removeScriptHandler(_scriptEditBoxHandler); + _scriptEditBoxHandler = 0; + } +} +#endif + +} + +NS_CC_END diff --git a/cocos/ui/UIEditBox/UIEditBox.h b/cocos/ui/UIEditBox/UIEditBox.h new file mode 100644 index 0000000000..335193fee8 --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBox.h @@ -0,0 +1,462 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2012 James Chen + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __UIEDITTEXT_H__ +#define __UIEDITTEXT_H__ + +#include "base/CCIMEDelegate.h" +#include "ui/GUIDefine.h" +#include "ui/UIButton.h" +#include "ui/UIScale9Sprite.h" + +NS_CC_BEGIN + +namespace ui { + + class EditBox; + class EditBoxImpl; + + + class CC_GUI_DLL EditBoxDelegate + { + public: + /** + * @js NA + * @lua NA + */ + virtual ~EditBoxDelegate() {}; + + /** + * This method is called when an edit box gains focus after keyboard is shown. + * @param editBox The edit box object that generated the event. + * @js NA + * @lua NA + */ + virtual void editBoxEditingDidBegin(EditBox* editBox) {}; + + + /** + * This method is called when an edit box loses focus after keyboard is hidden. + * @param editBox The edit box object that generated the event. + * @js NA + * @lua NA + */ + virtual void editBoxEditingDidEnd(EditBox* editBox) {}; + + /** + * This method is called when the edit box text was changed. + * @param editBox The edit box object that generated the event. + * @param text The new text. + * @js NA + * @lua NA + */ + virtual void editBoxTextChanged(EditBox* editBox, const std::string& text) {}; + + /** + * This method is called when the return button was pressed or the outside area of keyboard was touched. + * @param editBox The edit box object that generated the event. + * @js NA + * @lua NA + */ + virtual void editBoxReturn(EditBox* editBox) = 0; + + }; + + /** + * \brief Class for edit box. + * + * You can use this widget to gather small amounts of text from the user. + * + */ + + class CC_GUI_DLL EditBox + : public Widget + , public IMEDelegate + { + public: + enum class KeyboardReturnType + { + DEFAULT, + DONE, + SEND, + SEARCH, + GO + }; + + /** + * \brief The EditBox::InputMode defines the type of text that the user is allowed + * to enter. + */ + enum class InputMode + { + /** + * The user is allowed to enter any text, including line breaks. + */ + ANY, + + /** + * The user is allowed to enter an e-mail address. + */ + EMAIL_ADDRESS, + + /** + * The user is allowed to enter an integer value. + */ + NUMERIC, + + /** + * The user is allowed to enter a phone number. + */ + PHONE_NUMBER, + + /** + * The user is allowed to enter a URL. + */ + URL, + + /** + * The user is allowed to enter a real number value. + * This extends kEditBoxInputModeNumeric by allowing a decimal point. + */ + DECIMAL, + + /** + * The user is allowed to enter any text, except for line breaks. + */ + SINGLE_LINE, + }; + + /** + * \brief The EditBox::InputFlag defines how the input text is displayed/formatted. + */ + enum class InputFlag + { + /** + * Indicates that the text entered is confidential data that should be + * obscured whenever possible. This implies EDIT_BOX_INPUT_FLAG_SENSITIVE. + */ + PASSWORD, + + /** + * Indicates that the text entered is sensitive data that the + * implementation must never store into a dictionary or table for use + * in predictive, auto-completing, or other accelerated input schemes. + * A credit card number is an example of sensitive data. + */ + SENSITIVE, + + /** + * This flag is a hint to the implementation that during text editing, + * the initial letter of each word should be capitalized. + */ + INITIAL_CAPS_WORD, + + /** + * This flag is a hint to the implementation that during text editing, + * the initial letter of each sentence should be capitalized. + */ + INITIAL_CAPS_SENTENCE, + + /** + * Capitalize all characters automatically. + */ + INTIAL_CAPS_ALL_CHARACTERS, + }; + + /** + * create a edit box with size. + * @return An autorelease pointer of EditBox, you don't need to release it only if you retain it again. + */ + static EditBox* create(const Size& size, + const std::string& pNormal9SpriteBg, + TextureResType texType = TextureResType::LOCAL); + + /** + * Constructor. + * @js ctor + */ + EditBox(void); + + /** + * Destructor. + * @js NA + * @lua NA + */ + virtual ~EditBox(void); + + /** + * Init edit box with specified size. This method should be invoked right after constructor. + * @param size The size of edit box. + */ + bool initWithSizeAndBackgroundSprite(const Size& size, + const std::string& pNormal9SpriteBg, + TextureResType texType = TextureResType::LOCAL); + + /** + * Gets/Sets the delegate for edit box. + * @lua NA + */ + void setDelegate(EditBoxDelegate* pDelegate); + /** + * @js NA + * @lua NA + */ + EditBoxDelegate* getDelegate(); + +#if CC_ENABLE_SCRIPT_BINDING + /** + * 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 + */ + void registerScriptEditBoxHandler(int handler); + + /** + * Unregisters a script function that will be called for EditBox events. + * @js NA + * @lua NA + */ + void unregisterScriptEditBoxHandler(void); + /** + * get a script Handler + * @js NA + * @lua NA + */ + int getScriptEditBoxHandler(void){ return _scriptEditBoxHandler ;} + +#endif // #if CC_ENABLE_SCRIPT_BINDING + + /** + * Set the text entered in the edit box. + * @param pText The given text. + */ + void setText(const char* pText); + + /** + * Get the text entered in the edit box. + * @return The text entered in the edit box. + */ + const char* getText(void); + + /** + * Set the font. + * @param pFontName The font name. + * @param fontSize The font size. + */ + void setFont(const char* pFontName, int fontSize); + + /** + * Set the font name. + * @param pFontName The font name. + */ + void setFontName(const char* pFontName); + + /** + * Set the font size. + * @param fontSize The font size. + */ + void setFontSize(int fontSize); + + /** + * Set the font color of the widget's text. + */ + void setFontColor(const Color3B& color); + + /** + * Set the placeholder's font. + * @param pFontName The font name. + * @param fontSize The font size. + */ + void setPlaceholderFont(const char* pFontName, int fontSize); + + /** + * Set the placeholder's font name. + * @param pFontName The font name. + */ + void setPlaceholderFontName(const char* pFontName); + + /** + * Set the placeholder's font size. + * @param fontSize The font size. + */ + void setPlaceholderFontSize(int fontSize); + + /** + * Set the font color of the placeholder text when the edit box is empty. + * Not supported on IOS. + */ + void setPlaceholderFontColor(const Color3B& color); + + /** + * Set a text in the edit box that acts as a placeholder when an + * edit box is empty. + * @param pText The given text. + */ + void setPlaceHolder(const char* pText); + + /** + * Get a text in the edit box that acts as a placeholder when an + * edit box is empty. + */ + const char* getPlaceHolder(void); + + /** + * Set the input mode of the edit box. + * @param inputMode One of the EditBox::InputMode constants. + */ + void setInputMode(InputMode inputMode); + + /** + * 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. + */ + void setMaxLength(int maxLength); + + /** + * Gets the maximum input length of the edit box. + * + * @return Maximum input length. + */ + int getMaxLength(); + + /** + * Set the input flags that are to be applied to the edit box. + * @param inputFlag One of the EditBox::InputFlag constants. + */ + void setInputFlag(InputFlag inputFlag); + + /** + * Set the return type that are to be applied to the edit box. + * @param returnType One of the EditBox::KeyboardReturnType constants. + */ + void setReturnType(EditBox::KeyboardReturnType returnType); + + /* override functions */ + virtual void setPosition(const Vec2& pos) override; + virtual void setVisible(bool visible) override; + virtual void setContentSize(const Size& size) override; + virtual void setAnchorPoint(const Vec2& anchorPoint) override; + /** + * @js NA + * @lua NA + */ + virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override; + /** + * @js NA + * @lua NA + */ + virtual void onEnter(void) override; + /** + * @js NA + * @lua NA + */ + virtual void onExit(void) override; + /** + * @js NA + * @lua NA + */ + virtual void keyboardWillShow(IMEKeyboardNotificationInfo& info) override; + /** + * @js NA + * @lua NA + */ + virtual void keyboardDidShow(IMEKeyboardNotificationInfo& info) override; + /** + * @js NA + * @lua NA + */ + virtual void keyboardWillHide(IMEKeyboardNotificationInfo& info) override; + /** + * @js NA + * @lua NA + */ + virtual void keyboardDidHide(IMEKeyboardNotificationInfo& info) override; + + /* callback funtions + * @js NA + * @lua NA + */ + void touchDownAction(Ref *sender, TouchEventType controlEvent); + + protected: + virtual void adaptRenderers(); + + void updatePosition(float dt); + EditBoxImpl* _editBoxImpl; + EditBoxDelegate* _delegate; + + InputMode _editBoxInputMode; + InputFlag _editBoxInputFlag; + EditBox::KeyboardReturnType _keyboardReturnType; + + Scale9Sprite *_backgroundSprite; + std::string _text; + std::string _placeHolder; + + std::string _fontName; + std::string _placeholderFontName; + + int _fontSize; + int _placeholderFontSize; + + Color3B _colText; + Color3B _colPlaceHolder; + + int _maxLength; + float _adjustHeight; +#if CC_ENABLE_SCRIPT_BINDING + int _scriptEditBoxHandler; +#endif + }; +} + +NS_CC_END + +#endif /* __UIEDITTEXT_H__ */ + diff --git a/cocos/ui/UIEditBox/UIEditBoxImpl.h b/cocos/ui/UIEditBox/UIEditBoxImpl.h new file mode 100644 index 0000000000..8413b62bae --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImpl.h @@ -0,0 +1,103 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2012 James Chen + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __UIEditBoxIMPL_H__ +#define __UIEditBoxIMPL_H__ + +#include "UIEditBox.h" + + +namespace cocos2d { + namespace ui{ + + class CC_GUI_DLL EditBoxImpl + { + public: + /** + * @js NA + */ + EditBoxImpl(EditBox* pEditBox) : _delegate(nullptr),_editBox(pEditBox) {} + /** + * @js NA + * @lua NA + */ + virtual ~EditBoxImpl() {} + + virtual bool initWithSize(const Size& size) = 0; + virtual void setFont(const char* pFontName, int fontSize) = 0; + virtual void setFontColor(const Color3B& color) = 0; + virtual void setPlaceholderFont(const char* pFontName, int fontSize) = 0; + virtual void setPlaceholderFontColor(const Color3B& color) = 0; + virtual void setInputMode(EditBox::InputMode inputMode) = 0; + virtual void setInputFlag(EditBox::InputFlag inputFlag) = 0; + virtual void setMaxLength(int maxLength) = 0; + virtual int getMaxLength() = 0; + virtual void setReturnType(EditBox::KeyboardReturnType returnType) = 0; + virtual bool isEditing() = 0; + + virtual void setText(const char* pText) = 0; + virtual const char* getText(void) = 0; + virtual void setPlaceHolder(const char* pText) = 0; + virtual void doAnimationWhenKeyboardMove(float duration, float distance) = 0; + + virtual void openKeyboard() = 0; + virtual void closeKeyboard() = 0; + + virtual void setPosition(const Vec2& pos) = 0; + virtual void setVisible(bool visible) = 0; + virtual void setContentSize(const Size& size) = 0; + virtual void setAnchorPoint(const Vec2& anchorPoint) = 0; + + /** + * check the editbox's position, update it when needed + */ + virtual void updatePosition(float dt){}; + /** + * @js NA + * @lua NA + */ + virtual void visit(void) = 0; + /** + * @js NA + * @lua NA + */ + virtual void onEnter(void) = 0; + + + void setDelegate(EditBoxDelegate* pDelegate) { _delegate = pDelegate; }; + EditBoxDelegate* getDelegate() { return _delegate; }; + EditBox* getEditBox() { return _editBox; }; + protected: + EditBoxDelegate* _delegate; + EditBox* _editBox; + }; + + // This method must be implemented at each subclass of EditBoxImpl. + extern EditBoxImpl* __createSystemEditBox(EditBox* pEditBox); + + } +} + +#endif /* __UIEditBoxIMPL_H__ */ diff --git a/cocos/ui/UIEditBox/UIEditBoxImplAndroid.cpp b/cocos/ui/UIEditBox/UIEditBoxImplAndroid.cpp new file mode 100644 index 0000000000..62251e235f --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplAndroid.cpp @@ -0,0 +1,319 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2012 James Chen + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "UIEditBoxImplAndroid.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + +#include "UIEditBox.h" +#include "jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.h" +#include "jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" + + +NS_CC_BEGIN + +namespace ui { + +EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) +{ + return new EditBoxImplAndroid(pEditBox); +} + +EditBoxImplAndroid::EditBoxImplAndroid(EditBox* pEditText) +: EditBoxImpl(pEditText) +, _label(nullptr) +, _labelPlaceHolder(nullptr) +, _editBoxInputMode(EditBox::InputMode::SINGLE_LINE) +, _editBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS) +, _keyboardReturnType(EditBox::KeyboardReturnType::DEFAULT) +, _colText(Color3B::WHITE) +, _colPlaceHolder(Color3B::GRAY) +, _maxLength(-1) +{ + +} + +EditBoxImplAndroid::~EditBoxImplAndroid() +{ + +} + +void EditBoxImplAndroid::doAnimationWhenKeyboardMove(float duration, float distance) +{ // don't need to be implemented on android platform. + +} + +static const int CC_EDIT_BOX_PADDING = 5; + +bool EditBoxImplAndroid::initWithSize(const Size& size) +{ + int fontSize = getFontSizeAccordingHeightJni(size.height-12); + _label = Label::create(); + _label->setSystemFontSize(size.height-12); + // align the text vertically center + _label->setAnchorPoint(Vec2(0, 0.5f)); + _label->setPosition(Vec2(CC_EDIT_BOX_PADDING, size.height / 2.0f)); + _label->setColor(_colText); + _editBox->addChild(_label); + + _labelPlaceHolder = Label::create(); + _labelPlaceHolder->setSystemFontSize(size.height-12); + // align the text vertically center + _labelPlaceHolder->setAnchorPoint(Vec2(0, 0.5f)); + _labelPlaceHolder->setPosition(Vec2(CC_EDIT_BOX_PADDING, size.height / 2.0f)); + _labelPlaceHolder->setVisible(false); + _labelPlaceHolder->setColor(_colPlaceHolder); + _editBox->addChild(_labelPlaceHolder); + + _editSize = size; + return true; +} + +void EditBoxImplAndroid::setFont(const char* pFontName, int fontSize) +{ + if(_label != NULL) { + _label->setSystemFontName(pFontName); + _label->setSystemFontSize(fontSize); + } + + if(_labelPlaceHolder != NULL) { + _labelPlaceHolder->setSystemFontName(pFontName); + _labelPlaceHolder->setSystemFontSize(fontSize); + } +} + +void EditBoxImplAndroid::setFontColor(const Color3B& color) +{ + _colText = color; + _label->setColor(color); +} + +void EditBoxImplAndroid::setPlaceholderFont(const char* pFontName, int fontSize) +{ + if(_labelPlaceHolder != NULL) { + _labelPlaceHolder->setSystemFontName(pFontName); + _labelPlaceHolder->setSystemFontSize(fontSize); + } +} + +void EditBoxImplAndroid::setPlaceholderFontColor(const Color3B& color) +{ + _colPlaceHolder = color; + _labelPlaceHolder->setColor(color); +} + +void EditBoxImplAndroid::setInputMode(EditBox::InputMode inputMode) +{ + _editBoxInputMode = inputMode; +} + +void EditBoxImplAndroid::setMaxLength(int maxLength) +{ + _maxLength = maxLength; +} + +int EditBoxImplAndroid::getMaxLength() +{ + return _maxLength; +} + +void EditBoxImplAndroid::setInputFlag(EditBox::InputFlag inputFlag) +{ + _editBoxInputFlag = inputFlag; +} + +void EditBoxImplAndroid::setReturnType(EditBox::KeyboardReturnType returnType) +{ + _keyboardReturnType = returnType; +} + +bool EditBoxImplAndroid::isEditing() +{ + return false; +} + +void EditBoxImplAndroid::setText(const char* pText) +{ + if (pText != NULL) + { + _text = pText; + + if (_text.length() > 0) + { + _labelPlaceHolder->setVisible(false); + + std::string strToShow; + + if (EditBox::InputFlag::PASSWORD == _editBoxInputFlag) + { + long length = cc_utf8_strlen(_text.c_str(), -1); + for (long i = 0; i < length; i++) + { + strToShow.append("*"); + } + } + else + { + strToShow = _text; + } + + _label->setString(strToShow.c_str()); + + // Clip the text width to fit to the text box + + float fMaxWidth = _editSize.width - CC_EDIT_BOX_PADDING * 2; + auto labelSize = _label->getContentSize(); + if(labelSize.width > fMaxWidth) { + _label->setDimensions(fMaxWidth,labelSize.height); + } + } + else + { + _labelPlaceHolder->setVisible(true); + _label->setString(""); + } + + } +} + +const char* EditBoxImplAndroid::getText(void) +{ + return _text.c_str(); +} + +void EditBoxImplAndroid::setPlaceHolder(const char* pText) +{ + if (pText != NULL) + { + _placeHolder = pText; + if (_placeHolder.length() > 0 && _text.length() == 0) + { + _labelPlaceHolder->setVisible(true); + } + + _labelPlaceHolder->setString(_placeHolder.c_str()); + } +} + +void EditBoxImplAndroid::setPosition(const Vec2& pos) +{ // don't need to be implemented on android platform. + +} + +void EditBoxImplAndroid::setVisible(bool visible) +{ // don't need to be implemented on android platform. + +} + +void EditBoxImplAndroid::setContentSize(const Size& size) +{ // don't need to be implemented on android platform. + +} + +void EditBoxImplAndroid::setAnchorPoint(const Vec2& anchorPoint) +{ // don't need to be implemented on android platform. + +} + +void EditBoxImplAndroid::visit(void) +{ // don't need to be implemented on android platform. + +} + +void EditBoxImplAndroid::onEnter(void) +{ // don't need to be implemented on android platform. + +} + +static void editBoxCallbackFunc(const char* pText, void* ctx) +{ + EditBoxImplAndroid* thiz = (EditBoxImplAndroid*)ctx; + thiz->setText(pText); + + if (thiz->getDelegate() != NULL) + { + thiz->getDelegate()->editBoxTextChanged(thiz->getEditBox(), thiz->getText()); + thiz->getDelegate()->editBoxEditingDidEnd(thiz->getEditBox()); + thiz->getDelegate()->editBoxReturn(thiz->getEditBox()); + } + +#if CC_ENABLE_SCRIPT_BINDING + EditBox* pEditBox = thiz->getEditBox(); + if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) + { + CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "changed",pEditBox); + ScriptEvent event(kCommonEvent,(void*)&data); + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + memset(data.eventName, 0, sizeof(data.eventName)); + strncpy(data.eventName, "ended", sizeof(data.eventName)); + event.data = (void*)&data; + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + memset(data.eventName, 0, sizeof(data.eventName)); + strncpy(data.eventName, "return", sizeof(data.eventName)); + event.data = (void*)&data; + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } +#endif +} + +void EditBoxImplAndroid::openKeyboard() +{ + if (_delegate != NULL) + { + _delegate->editBoxEditingDidBegin(_editBox); + } + +#if CC_ENABLE_SCRIPT_BINDING + EditBox* pEditBox = this->getEditBox(); + if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) + { + CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); + ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } +#endif + + showEditTextDialogJNI( _placeHolder.c_str(), + _text.c_str(), + (int)_editBoxInputMode, + (int)_editBoxInputFlag, + (int)_keyboardReturnType, + _maxLength, + editBoxCallbackFunc, + (void*)this ); + +} + +void EditBoxImplAndroid::closeKeyboard() +{ + +} + +} + +NS_CC_END + +#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) */ + diff --git a/cocos/ui/UIEditBox/UIEditBoxImplAndroid.h b/cocos/ui/UIEditBox/UIEditBoxImplAndroid.h new file mode 100644 index 0000000000..2b38934752 --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplAndroid.h @@ -0,0 +1,112 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2012 James Chen + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __UIEDITBOXIMPLANDROID_H__ +#define __UIEDITBOXIMPLANDROID_H__ + +#include "cocos2d.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) + +#include "UIEditBoxImpl.h" + +NS_CC_BEGIN + +namespace ui { + +class EditBox; + +class EditBoxImplAndroid : public EditBoxImpl +{ +public: + /** + * @js NA + */ + EditBoxImplAndroid(EditBox* pEditText); + /** + * @js NA + * @lua NA + */ + virtual ~EditBoxImplAndroid(); + + virtual bool initWithSize(const Size& size); + virtual void setFont(const char* pFontName, int fontSize); + virtual void setFontColor(const Color3B& color); + virtual void setPlaceholderFont(const char* pFontName, int fontSize); + virtual void setPlaceholderFontColor(const Color3B& color); + virtual void setInputMode(EditBox::InputMode inputMode); + virtual void setInputFlag(EditBox::InputFlag inputFlag); + virtual void setMaxLength(int maxLength); + virtual int getMaxLength(); + virtual void setReturnType(EditBox::KeyboardReturnType returnType); + virtual bool isEditing(); + + virtual void setText(const char* pText); + virtual const char* getText(void); + virtual void setPlaceHolder(const char* pText); + virtual void setPosition(const Vec2& pos); + virtual void setVisible(bool visible); + virtual void setContentSize(const Size& size); + virtual void setAnchorPoint(const Vec2& anchorPoint); + /** + * @js NA + * @lua NA + */ + virtual void visit(void); + /** + * @js NA + * @lua NA + */ + virtual void onEnter(void); + virtual void doAnimationWhenKeyboardMove(float duration, float distance); + virtual void openKeyboard(); + virtual void closeKeyboard(); + +private: + Label* _label; + Label* _labelPlaceHolder; + EditBox::InputMode _editBoxInputMode; + EditBox::InputFlag _editBoxInputFlag; + EditBox::KeyboardReturnType _keyboardReturnType; + + std::string _text; + std::string _placeHolder; + + Color3B _colText; + Color3B _colPlaceHolder; + + int _maxLength; + Size _editSize; +}; + + +} + +NS_CC_END + +#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) */ + +#endif /* __UIEDITBOXIMPLANDROID_H__ */ + diff --git a/cocos/ui/UIEditBox/UIEditBoxImplIOS.h b/cocos/ui/UIEditBox/UIEditBoxImplIOS.h new file mode 100644 index 0000000000..b78ce96da6 --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplIOS.h @@ -0,0 +1,147 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2012 James Chen + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __UIEditBoxIMPLIOS_H__ +#define __UIEditBoxIMPLIOS_H__ + +#include "cocos2d.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + +#include "extensions/ExtensionMacros.h" +#include "UIEditBoxImpl.h" + +#import +#import + +@interface UICustomUITextField : UITextField +{ +} + +@end + + +@interface UIEditBoxImplIOS_objc : NSObject +{ + UICustomUITextField* textField_; + void* editBox_; + BOOL editState_; +} + +@property(nonatomic, retain) UITextField* textField; +@property(nonatomic, readonly, getter = isEditState) BOOL editState; +@property(nonatomic, assign) void* editBox; + +-(id) initWithFrame: (CGRect) frameRect editBox: (void*) editBox; +-(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance; +-(void) setPosition:(CGPoint) pos; +-(void) setContentSize:(CGSize) size; +-(void) visit; +-(void) openKeyboard; +-(void) closeKeyboard; + +@end + +NS_CC_BEGIN + +namespace ui { + +class EditBox; + +class EditBoxImplIOS : public EditBoxImpl +{ +public: + /** + * @js NA + */ + EditBoxImplIOS(EditBox* pEditText); + /** + * @js NA + * @lua NA + */ + virtual ~EditBoxImplIOS(); + + virtual bool initWithSize(const Size& size); + virtual void setFont(const char* pFontName, int fontSize); + virtual void setFontColor(const Color3B& color); + virtual void setPlaceholderFont(const char* pFontName, int fontSize); + virtual void setPlaceholderFontColor(const Color3B& color); + virtual void setInputMode(EditBox::InputMode inputMode); + virtual void setInputFlag(EditBox::InputFlag inputFlag); + virtual void setMaxLength(int maxLength); + virtual int getMaxLength(); + virtual void setReturnType(EditBox::KeyboardReturnType returnType); + virtual bool isEditing(); + + virtual void setText(const char* pText); + virtual const char* getText(void); + virtual void refreshInactiveText(); + virtual void setPlaceHolder(const char* pText); + virtual void setPosition(const Vec2& pos); + virtual void setVisible(bool visible); + virtual void setContentSize(const Size& size); + virtual void setAnchorPoint(const Vec2& anchorPoint); + virtual void updatePosition(float dt) override; + /** + * @js NA + * @lua NA + */ + virtual void visit(void); + /** + * @js NA + * @lua NA + */ + virtual void onEnter(void); + virtual void doAnimationWhenKeyboardMove(float duration, float distance); + virtual void openKeyboard(); + virtual void closeKeyboard(); + + virtual void onEndEditing(); +private: + void initInactiveLabels(const Size& size); + void setInactiveText(const char* pText); + void adjustTextFieldPosition(); + void placeInactiveLabels(); + + Label* _label; + Label* _labelPlaceHolder; + Size _contentSize; + Vec2 _position; + Vec2 _anchorPoint; + UIEditBoxImplIOS_objc* _systemControl; + int _maxTextLength; + bool _inRetinaMode; +}; + + +} + +NS_CC_END + + +#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) */ + +#endif /* __UIEditBoxIMPLIOS_H__ */ + diff --git a/cocos/ui/UIEditBox/UIEditBoxImplIOS.mm b/cocos/ui/UIEditBox/UIEditBoxImplIOS.mm new file mode 100644 index 0000000000..44a5b1a33e --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplIOS.mm @@ -0,0 +1,678 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2012 James Chen + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#include "UIEditBoxImplIOS.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + +#define kLabelZOrder 9999 + +#include "UIEditBox.h" +#import "CCEAGLView.h" + +#define getEditBoxImplIOS() ((cocos2d::ui::EditBoxImplIOS*)editBox_) + +static const int CC_EDIT_BOX_PADDING = 5; + +@implementation UICustomUITextField +- (CGRect)textRectForBounds:(CGRect)bounds +{ + auto glview = cocos2d::Director::getInstance()->getOpenGLView(); + + float padding = CC_EDIT_BOX_PADDING * glview->getScaleX() / glview->getContentScaleFactor(); + return CGRectMake(bounds.origin.x + padding, bounds.origin.y + padding, + bounds.size.width - padding*2, bounds.size.height - padding*2); +} +- (CGRect)editingRectForBounds:(CGRect)bounds { + return [self textRectForBounds:bounds]; +} +@end + + +@implementation UIEditBoxImplIOS_objc + +@synthesize textField = textField_; +@synthesize editState = editState_; +@synthesize editBox = editBox_; + +- (void)dealloc +{ + [textField_ resignFirstResponder]; + [textField_ removeFromSuperview]; + self.textField = NULL; + [super dealloc]; +} + +-(id) initWithFrame: (CGRect) frameRect editBox: (void*) editBox +{ + self = [super init]; + + if (self) + { + editState_ = NO; + self.textField = [[[UICustomUITextField alloc] initWithFrame: frameRect] autorelease]; + + [textField_ setTextColor:[UIColor whiteColor]]; + textField_.font = [UIFont systemFontOfSize:frameRect.size.height*2/3]; //TODO need to delete hard code here. + textField_.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; + textField_.backgroundColor = [UIColor clearColor]; + textField_.borderStyle = UITextBorderStyleNone; + textField_.delegate = self; + textField_.hidden = true; + textField_.returnKeyType = UIReturnKeyDefault; + [textField_ addTarget:self action:@selector(textChanged) forControlEvents:UIControlEventEditingChanged]; + self.editBox = editBox; + } + + return self; +} + +-(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance +{ + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); + + [eaglview doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; +} + +-(void) setPosition:(CGPoint) pos +{ + CGRect frame = [textField_ frame]; + frame.origin = pos; + [textField_ setFrame:frame]; +} + +-(void) setContentSize:(CGSize) size +{ + CGRect frame = [textField_ frame]; + frame.size = size; + [textField_ setFrame:frame]; +} + +-(void) visit +{ + +} + +-(void) openKeyboard +{ + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); + + [eaglview addSubview:textField_]; + [textField_ becomeFirstResponder]; +} + +-(void) closeKeyboard +{ + [textField_ resignFirstResponder]; + [textField_ removeFromSuperview]; +} + +- (BOOL)textFieldShouldReturn:(UITextField *)sender +{ + if (sender == textField_) { + [sender resignFirstResponder]; + } + return NO; +} + +-(void)animationSelector +{ + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); + + [eaglview doAnimationWhenAnotherEditBeClicked]; +} + +- (BOOL)textFieldShouldBeginEditing:(UITextField *)sender // return NO to disallow editing. +{ + CCLOG("textFieldShouldBeginEditing..."); + editState_ = YES; + + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); + + if ([eaglview isKeyboardShown]) + { + [self performSelector:@selector(animationSelector) withObject:nil afterDelay:0.0f]; + } + cocos2d::ui::EditBoxDelegate* pDelegate = getEditBoxImplIOS()->getDelegate(); + if (pDelegate != NULL) + { + pDelegate->editBoxEditingDidBegin(getEditBoxImplIOS()->getEditBox()); + } + +#if CC_ENABLE_SCRIPT_BINDING + cocos2d::ui::EditBox* pEditBox= getEditBoxImplIOS()->getEditBox(); + if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) + { + cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); + cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); + cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } +#endif + return YES; +} + +- (BOOL)textFieldShouldEndEditing:(UITextField *)sender +{ + CCLOG("textFieldShouldEndEditing..."); + editState_ = NO; + getEditBoxImplIOS()->refreshInactiveText(); + + cocos2d::ui::EditBoxDelegate* pDelegate = getEditBoxImplIOS()->getDelegate(); + if (pDelegate != NULL) + { + pDelegate->editBoxEditingDidEnd(getEditBoxImplIOS()->getEditBox()); + pDelegate->editBoxReturn(getEditBoxImplIOS()->getEditBox()); + } + +#if CC_ENABLE_SCRIPT_BINDING + cocos2d::ui::EditBox* pEditBox= getEditBoxImplIOS()->getEditBox(); + if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) + { + cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "ended",pEditBox); + cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); + cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + memset(data.eventName, 0, sizeof(data.eventName)); + strncpy(data.eventName, "return", sizeof(data.eventName)); + event.data = (void*)&data; + cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } +#endif + + if(editBox_ != nil) + { + getEditBoxImplIOS()->onEndEditing(); + } + return YES; +} + +/** + * Delegate method called before the text has been changed. + * @param textField The text field containing the text. + * @param range The range of characters to be replaced. + * @param string The replacement string. + * @return YES if the specified text range should be replaced; otherwise, NO to keep the old text. + */ +- (BOOL)textField:(UITextField *) textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string +{ + if (getEditBoxImplIOS()->getMaxLength() < 0) + { + return YES; + } + + NSUInteger oldLength = [textField.text length]; + NSUInteger replacementLength = [string length]; + NSUInteger rangeLength = range.length; + + NSUInteger newLength = oldLength - rangeLength + replacementLength; + + return newLength <= getEditBoxImplIOS()->getMaxLength(); +} + +/** + * Called each time when the text field's text has changed. + */ +- (void) textChanged +{ + // NSLog(@"text is %@", self.textField.text); + cocos2d::ui::EditBoxDelegate* pDelegate = getEditBoxImplIOS()->getDelegate(); + if (pDelegate != NULL) + { + pDelegate->editBoxTextChanged(getEditBoxImplIOS()->getEditBox(), getEditBoxImplIOS()->getText()); + } + +#if CC_ENABLE_SCRIPT_BINDING + cocos2d::ui::EditBox* pEditBox= getEditBoxImplIOS()->getEditBox(); + if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) + { + cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "changed",pEditBox); + cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); + cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } +#endif +} + +@end + + +NS_CC_BEGIN + +namespace ui { + +EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) +{ + return new EditBoxImplIOS(pEditBox); +} + +EditBoxImplIOS::EditBoxImplIOS(EditBox* pEditText) +: EditBoxImpl(pEditText) +, _label(nullptr) +, _labelPlaceHolder(nullptr) +, _anchorPoint(Vec2(0.5f, 0.5f)) +, _systemControl(nullptr) +, _maxTextLength(-1) +{ + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + + _inRetinaMode = view->isRetinaDisplay(); +} + +EditBoxImplIOS::~EditBoxImplIOS() +{ + [_systemControl release]; +} + +void EditBoxImplIOS::doAnimationWhenKeyboardMove(float duration, float distance) +{ + if ([_systemControl isEditState] || distance < 0.0f) + { + [_systemControl doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; + } +} + +bool EditBoxImplIOS::initWithSize(const Size& size) +{ + do + { + auto glview = cocos2d::Director::getInstance()->getOpenGLView(); + + CGRect rect = CGRectMake(0, 0, size.width * glview->getScaleX(),size.height * glview->getScaleY()); + + if (_inRetinaMode) + { + rect.size.width /= 2.0f; + rect.size.height /= 2.0f; + } + + _systemControl = [[UIEditBoxImplIOS_objc alloc] initWithFrame:rect editBox:this]; + if (!_systemControl) break; + + initInactiveLabels(size); + setContentSize(size); + + return true; + }while (0); + + return false; +} + +void EditBoxImplIOS::initInactiveLabels(const Size& size) +{ + const char* pDefaultFontName = [[_systemControl.textField.font fontName] UTF8String]; + + _label = Label::create(); + _label->setAnchorPoint(Vec2(0, 0.5f)); + _label->setColor(Color3B::WHITE); + _label->setVisible(false); + _editBox->addChild(_label, kLabelZOrder); + + _labelPlaceHolder = Label::create(); + // align the text vertically center + _labelPlaceHolder->setAnchorPoint(Vec2(0, 0.5f)); + _labelPlaceHolder->setColor(Color3B::GRAY); + _editBox->addChild(_labelPlaceHolder, kLabelZOrder); + + setFont(pDefaultFontName, size.height*2/3); + setPlaceholderFont(pDefaultFontName, size.height*2/3); +} + +void EditBoxImplIOS::placeInactiveLabels() +{ + _label->setPosition(Vec2(CC_EDIT_BOX_PADDING, _contentSize.height / 2.0f)); + _labelPlaceHolder->setPosition(Vec2(CC_EDIT_BOX_PADDING, _contentSize.height / 2.0f)); +} + +void EditBoxImplIOS::setInactiveText(const char* pText) +{ + if(_systemControl.textField.secureTextEntry == YES) + { + std::string passwordString; + for(int i = 0; i < strlen(pText); ++i) + passwordString.append("\u25CF"); + _label->setString(passwordString.c_str()); + } + else + _label->setString(getText()); + + // Clip the text width to fit to the text box + float fMaxWidth = _editBox->getContentSize().width - CC_EDIT_BOX_PADDING * 2; + Size labelSize = _label->getContentSize(); + if(labelSize.width > fMaxWidth) { + _label->setDimensions(fMaxWidth,labelSize.height); + } +} + +void EditBoxImplIOS::setFont(const char* pFontName, int fontSize) +{ + bool isValidFontName = true; + if(pFontName == NULL || strlen(pFontName) == 0) { + isValidFontName = false; + } + + float retinaFactor = _inRetinaMode ? 2.0f : 1.0f; + NSString * fntName = [NSString stringWithUTF8String:pFontName]; + + auto glview = cocos2d::Director::getInstance()->getOpenGLView(); + + float scaleFactor = glview->getScaleX(); + UIFont *textFont = nil; + if (isValidFontName) { + textFont = [UIFont fontWithName:fntName size:fontSize * scaleFactor / retinaFactor]; + } + + if (!isValidFontName || textFont == nil){ + textFont = [UIFont systemFontOfSize:fontSize * scaleFactor / retinaFactor]; + } + + if(textFont != nil) { + [_systemControl.textField setFont:textFont]; + } + + _label->setSystemFontName(pFontName); + _label->setSystemFontSize(fontSize); + _labelPlaceHolder->setSystemFontName(pFontName); + _labelPlaceHolder->setSystemFontSize(fontSize); +} + +void EditBoxImplIOS::setFontColor(const Color3B& color) +{ + _systemControl.textField.textColor = [UIColor colorWithRed:color.r / 255.0f green:color.g / 255.0f blue:color.b / 255.0f alpha:1.0f]; + _label->setColor(color); +} + +void EditBoxImplIOS::setPlaceholderFont(const char* pFontName, int fontSize) +{ + // TODO need to be implemented. +} + +void EditBoxImplIOS::setPlaceholderFontColor(const Color3B& color) +{ + _labelPlaceHolder->setColor(color); +} + +void EditBoxImplIOS::setInputMode(EditBox::InputMode inputMode) +{ + switch (inputMode) + { + case EditBox::InputMode::EMAIL_ADDRESS: + _systemControl.textField.keyboardType = UIKeyboardTypeEmailAddress; + break; + case EditBox::InputMode::NUMERIC: + _systemControl.textField.keyboardType = UIKeyboardTypeDecimalPad; + break; + case EditBox::InputMode::PHONE_NUMBER: + _systemControl.textField.keyboardType = UIKeyboardTypePhonePad; + break; + case EditBox::InputMode::URL: + _systemControl.textField.keyboardType = UIKeyboardTypeURL; + break; + case EditBox::InputMode::DECIMAL: + _systemControl.textField.keyboardType = UIKeyboardTypeDecimalPad; + break; + case EditBox::InputMode::SINGLE_LINE: + _systemControl.textField.keyboardType = UIKeyboardTypeDefault; + break; + default: + _systemControl.textField.keyboardType = UIKeyboardTypeDefault; + break; + } +} + +void EditBoxImplIOS::setMaxLength(int maxLength) +{ + _maxTextLength = maxLength; +} + +int EditBoxImplIOS::getMaxLength() +{ + return _maxTextLength; +} + +void EditBoxImplIOS::setInputFlag(EditBox::InputFlag inputFlag) +{ + switch (inputFlag) + { + case EditBox::InputFlag::PASSWORD: + _systemControl.textField.secureTextEntry = YES; + break; + case EditBox::InputFlag::INITIAL_CAPS_WORD: + _systemControl.textField.autocapitalizationType = UITextAutocapitalizationTypeWords; + break; + case EditBox::InputFlag::INITIAL_CAPS_SENTENCE: + _systemControl.textField.autocapitalizationType = UITextAutocapitalizationTypeSentences; + break; + case EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS: + _systemControl.textField.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters; + break; + case EditBox::InputFlag::SENSITIVE: + _systemControl.textField.autocorrectionType = UITextAutocorrectionTypeNo; + break; + default: + break; + } +} + +void EditBoxImplIOS::setReturnType(EditBox::KeyboardReturnType returnType) +{ + switch (returnType) { + case EditBox::KeyboardReturnType::DEFAULT: + _systemControl.textField.returnKeyType = UIReturnKeyDefault; + break; + case EditBox::KeyboardReturnType::DONE: + _systemControl.textField.returnKeyType = UIReturnKeyDone; + break; + case EditBox::KeyboardReturnType::SEND: + _systemControl.textField.returnKeyType = UIReturnKeySend; + break; + case EditBox::KeyboardReturnType::SEARCH: + _systemControl.textField.returnKeyType = UIReturnKeySearch; + break; + case EditBox::KeyboardReturnType::GO: + _systemControl.textField.returnKeyType = UIReturnKeyGo; + break; + default: + _systemControl.textField.returnKeyType = UIReturnKeyDefault; + break; + } +} + +bool EditBoxImplIOS::isEditing() +{ + return [_systemControl isEditState] ? true : false; +} + +void EditBoxImplIOS::refreshInactiveText() +{ + const char* text = getText(); + if(_systemControl.textField.hidden == YES) + { + setInactiveText(text); + if(strlen(text) == 0) + { + _label->setVisible(false); + _labelPlaceHolder->setVisible(true); + } + else + { + _label->setVisible(true); + _labelPlaceHolder->setVisible(false); + } + } +} + +void EditBoxImplIOS::setText(const char* text) +{ + NSString* nsText =[NSString stringWithUTF8String:text]; + if ([nsText compare:_systemControl.textField.text] != NSOrderedSame) + { + _systemControl.textField.text = nsText; + } + + refreshInactiveText(); +} + +NSString* removeSiriString(NSString* str) +{ + NSString* siriString = @"\xef\xbf\xbc"; + return [str stringByReplacingOccurrencesOfString:siriString withString:@""]; +} + +const char* EditBoxImplIOS::getText(void) +{ + return [removeSiriString(_systemControl.textField.text) UTF8String]; +} + +void EditBoxImplIOS::setPlaceHolder(const char* pText) +{ + _systemControl.textField.placeholder = [NSString stringWithUTF8String:pText]; + _labelPlaceHolder->setString(pText); +} + +static CGPoint convertDesignCoordToScreenCoord(const Vec2& designCoord, bool bInRetinaMode) +{ + auto glview = cocos2d::Director::getInstance()->getOpenGLView(); + CCEAGLView *eaglview = (CCEAGLView *) glview->getEAGLView(); + + float viewH = (float)[eaglview getHeight]; + + Vec2 visiblePos = Vec2(designCoord.x * glview->getScaleX(), designCoord.y * glview->getScaleY()); + Vec2 screenGLPos = visiblePos + glview->getViewPortRect().origin; + + CGPoint screenPos = CGPointMake(screenGLPos.x, viewH - screenGLPos.y); + + if (bInRetinaMode) + { + screenPos.x = screenPos.x / 2.0f; + screenPos.y = screenPos.y / 2.0f; + } + CCLOGINFO("[EditBox] pos x = %f, y = %f", screenGLPos.x, screenGLPos.y); + return screenPos; +} + +void EditBoxImplIOS::setPosition(const Vec2& pos) +{ + _position = pos; + adjustTextFieldPosition(); +} + +void EditBoxImplIOS::setVisible(bool visible) +{ +// _systemControl.textField.hidden = !visible; +} + +void EditBoxImplIOS::setContentSize(const Size& size) +{ + _contentSize = size; + CCLOG("[Edit text] content size = (%f, %f)", size.width, size.height); + placeInactiveLabels(); + auto glview = cocos2d::Director::getInstance()->getOpenGLView(); + CGSize controlSize = CGSizeMake(size.width * glview->getScaleX(),size.height * glview->getScaleY()); + + if (_inRetinaMode) + { + controlSize.width /= 2.0f; + controlSize.height /= 2.0f; + } + [_systemControl setContentSize:controlSize]; +} + +void EditBoxImplIOS::setAnchorPoint(const Vec2& anchorPoint) +{ + CCLOG("[Edit text] anchor point = (%f, %f)", anchorPoint.x, anchorPoint.y); + _anchorPoint = anchorPoint; + setPosition(_position); +} + +void EditBoxImplIOS::visit(void) +{ +} + +void EditBoxImplIOS::onEnter(void) +{ + adjustTextFieldPosition(); + const char* pText = getText(); + if (pText) { + setInactiveText(pText); + } +} + +void EditBoxImplIOS::updatePosition(float dt) +{ + if (nullptr != _systemControl) { + this->adjustTextFieldPosition(); + } +} + + + +void EditBoxImplIOS::adjustTextFieldPosition() +{ + Size contentSize = _editBox->getContentSize(); + Rect rect = Rect(0, 0, contentSize.width, contentSize.height); + rect = RectApplyAffineTransform(rect, _editBox->nodeToWorldTransform()); + + Vec2 designCoord = Vec2(rect.origin.x, rect.origin.y + rect.size.height); + [_systemControl setPosition:convertDesignCoordToScreenCoord(designCoord, _inRetinaMode)]; +} + +void EditBoxImplIOS::openKeyboard() +{ + _label->setVisible(false); + _labelPlaceHolder->setVisible(false); + + _systemControl.textField.hidden = NO; + [_systemControl openKeyboard]; +} + +void EditBoxImplIOS::closeKeyboard() +{ + [_systemControl closeKeyboard]; +} + +void EditBoxImplIOS::onEndEditing() +{ + _systemControl.textField.hidden = YES; + if(strlen(getText()) == 0) + { + _label->setVisible(false); + _labelPlaceHolder->setVisible(true); + } + else + { + _label->setVisible(true); + _labelPlaceHolder->setVisible(false); + setInactiveText(getText()); + } +} + +} + +NS_CC_END + +#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) */ + + diff --git a/cocos/ui/UIEditBox/UIEditBoxImplMac.h b/cocos/ui/UIEditBox/UIEditBoxImplMac.h new file mode 100644 index 0000000000..ffb53d29ef --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplMac.h @@ -0,0 +1,136 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2012 Jozef Pridavok + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __UIEditBoxIMPLMAC_H__ +#define __UIEditBoxIMPLMAC_H__ + +#include "cocos2d.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + +#import +#import + +#include "UIEditBoxImpl.h" + + +@interface UIEditBoxImplMac : NSObject +{ + NSTextField* textField_; + NSSecureTextField* secureTextField_; + void* editBox_; + BOOL editState_; + NSMutableDictionary* placeholderAttributes_; +} + +@property(nonatomic, retain) NSTextField* textField; +@property(nonatomic, retain) NSSecureTextField* secureTextField; +@property(nonatomic, retain) NSMutableDictionary* placeholderAttributes; +@property(nonatomic, readonly, getter = isEditState) BOOL editState; +@property(nonatomic, assign) void* editBox; + +-(id) initWithFrame: (NSRect) frameRect editBox: (void*) editBox; +-(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance; +-(void) setPosition:(NSPoint) pos; +-(void) setContentSize:(NSSize) size; +-(void) visit; +-(void) openKeyboard; +-(void) closeKeyboard; + +@end + + +NS_CC_BEGIN + +namespace ui { + +class EditBox; + +class EditBoxImplMac : public EditBoxImpl +{ +public: + /** + * @js NA + */ + EditBoxImplMac(EditBox* pEditText); + /** + * @js NA + * @lua NA + */ + virtual ~EditBoxImplMac(); + + virtual bool initWithSize(const Size& size); + virtual void setFont(const char* pFontName, int fontSize); + virtual void setFontColor(const Color3B& color); + virtual void setPlaceholderFont(const char* pFontName, int fontSize); + virtual void setPlaceholderFontColor(const Color3B& color); + virtual void setInputMode(EditBox::InputMode inputMode); + virtual void setInputFlag(EditBox::InputFlag inputFlag); + virtual void setMaxLength(int maxLength); + virtual int getMaxLength(); + virtual void setReturnType(EditBox::KeyboardReturnType returnType); + virtual bool isEditing(); + + virtual void setText(const char* pText); + virtual const char* getText(void); + virtual void setPlaceHolder(const char* pText); + virtual void setPosition(const Vec2& pos); + virtual void setVisible(bool visible); + virtual void setContentSize(const Size& size); + virtual void setAnchorPoint(const Vec2& anchorPoint); + /** + * @js NA + * @lua NA + */ + virtual void visit(void); + virtual void doAnimationWhenKeyboardMove(float duration, float distance); + virtual void openKeyboard(); + virtual void closeKeyboard(); + virtual void updatePosition(float dt) override; + /** + * @js NA + * @lua NA + */ + virtual void onEnter(void); +private: + NSPoint convertDesignCoordToScreenCoord(const Vec2& designCoord, bool bInRetinaMode); + void adjustTextFieldPosition(); + Size _contentSize; + Vec2 _position; + Vec2 _anchorPoint; + int _maxTextLength; + bool _inRetinaMode; + UIEditBoxImplMac* _sysEdit; +}; + + +} + +NS_CC_END + +#endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + +#endif /* __UIEditBoxIMPLMAC_H__ */ + diff --git a/cocos/ui/UIEditBox/UIEditBoxImplMac.mm b/cocos/ui/UIEditBox/UIEditBoxImplMac.mm new file mode 100644 index 0000000000..b832f3d8bd --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplMac.mm @@ -0,0 +1,524 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2012 Jozef Pridavok + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "UIEditBoxImplMac.h" +#include "base/CCDirector.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + +#include "UIEditBox.h" + + +#define getEditBoxImplMac() ((cocos2d::ui::EditBoxImplMac*)editBox_) + + + +@implementation UIEditBoxImplMac + +@synthesize textField = textField_; +@synthesize secureTextField = secureTextField_; +@synthesize placeholderAttributes = placeholderAttributes_; +@synthesize editState = editState_; +@synthesize editBox = editBox_; + +- (id) getNSWindow +{ + auto glview = cocos2d::Director::getInstance()->getOpenGLView(); + return glview->getCocoaWindow(); +} + +- (void)dealloc +{ + [textField_ resignFirstResponder]; + [textField_ removeFromSuperview]; + [textField_ release]; + + [secureTextField_ resignFirstResponder]; + [secureTextField_ removeFromSuperview]; + [secureTextField_ release]; + + [placeholderAttributes_ release]; + [super dealloc]; +} + +-(id) initWithFrame: (NSRect) frameRect editBox: (void*) editBox +{ + self = [super init]; + + if (self) + { + editState_ = NO; + self.textField = [[[NSTextField alloc] initWithFrame:frameRect] autorelease]; + self.secureTextField = [[[NSSecureTextField alloc] initWithFrame:frameRect] autorelease]; + + NSFont *font = [NSFont systemFontOfSize:frameRect.size.height*2/3]; //TODO need to delete hard code here. + textField_.font = font; + secureTextField_.font = font; + + [self setupTextField:textField_]; + [self setupTextField:secureTextField_]; + + self.editBox = editBox; + self.placeholderAttributes = [NSMutableDictionary dictionaryWithObjectsAndKeys: + font, NSFontAttributeName, + [NSColor grayColor], NSForegroundColorAttributeName, + nil]; + + [[[self getNSWindow] contentView] addSubview:textField_]; + } + + return self; +} + +- (void)setupTextField:(NSTextField *)textField +{ + [textField setTextColor:[NSColor whiteColor]]; + [textField setBackgroundColor:[NSColor clearColor]]; + [textField setBordered:NO]; + [textField setHidden:NO]; + [textField setWantsLayer:YES]; + [textField setDelegate:self]; +} + +-(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance +{ + [[[self getNSWindow] contentView] doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; +} + +-(void) setPosition:(NSPoint) pos +{ + NSRect frame = [textField_ frame]; + frame.origin = pos; + [textField_ setFrame:frame]; + [secureTextField_ setFrame:frame]; +} + +-(void) setContentSize:(NSSize) size +{ + +} + +-(void) visit +{ + +} + +-(void) openKeyboard +{ + if ([textField_ superview]) { + [textField_ becomeFirstResponder]; + } + else { + [secureTextField_ becomeFirstResponder]; + } +} + +-(void) closeKeyboard +{ + if ([textField_ superview]) { + [textField_ resignFirstResponder]; + [textField_ removeFromSuperview]; + } + else { + [secureTextField_ resignFirstResponder]; + [secureTextField_ removeFromSuperview]; + } +} + +- (BOOL)textFieldShouldReturn:(NSTextField *)sender +{ + if (sender == textField_ || sender == secureTextField_) { + [sender resignFirstResponder]; + } + return NO; +} + +-(void)animationSelector +{ +} + +- (void)controlTextDidBeginEditing:(NSNotification *)notification +{ + editState_ = YES; + cocos2d::ui::EditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate(); + if (pDelegate != NULL) + { + pDelegate->editBoxEditingDidBegin(getEditBoxImplMac()->getEditBox()); + } + +#if CC_ENABLE_SCRIPT_BINDING + cocos2d::ui::EditBox* pEditBox= getEditBoxImplMac()->getEditBox(); + if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) + { + cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); + cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); + cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } +#endif +} + +- (void)controlTextDidEndEditing:(NSNotification *)notification +{ + editState_ = NO; + cocos2d::ui::EditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate(); + if (pDelegate != NULL) + { + pDelegate->editBoxEditingDidEnd(getEditBoxImplMac()->getEditBox()); + pDelegate->editBoxReturn(getEditBoxImplMac()->getEditBox()); + } + +#if CC_ENABLE_SCRIPT_BINDING + cocos2d::ui::EditBox* pEditBox= getEditBoxImplMac()->getEditBox(); + if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) + { + cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "ended",pEditBox); + cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); + cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + memset(data.eventName, 0, sizeof(data.eventName)); + strncpy(data.eventName, "return", sizeof(data.eventName)); + event.data = (void*)&data; + cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } +#endif +} + +/** + * Delegate method called before the text has been changed. + * @param textField The text field containing the text. + * @param range The range of characters to be replaced. + * @param string The replacement string. + * @return YES if the specified text range should be replaced; otherwise, NO to keep the old text. + */ +- (BOOL)textField:(NSTextField *) textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string +{ + if (getEditBoxImplMac()->getMaxLength() < 0) + { + return YES; + } + + NSUInteger oldLength = [[textField stringValue] length]; + NSUInteger replacementLength = [string length]; + NSUInteger rangeLength = range.length; + + NSUInteger newLength = oldLength - rangeLength + replacementLength; + + return newLength <= getEditBoxImplMac()->getMaxLength(); +} + +/** + * Called each time when the text field's text has changed. + */ +- (void)controlTextDidChange:(NSNotification *)notification +{ + cocos2d::ui::EditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate(); + if (pDelegate != NULL) + { + pDelegate->editBoxTextChanged(getEditBoxImplMac()->getEditBox(), getEditBoxImplMac()->getText()); + } + +#if CC_ENABLE_SCRIPT_BINDING + cocos2d::ui::EditBox* pEditBox= getEditBoxImplMac()->getEditBox(); + if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) + { + cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "changed",pEditBox); + cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); + cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } +#endif +} + +@end + +NS_CC_BEGIN + +namespace ui { + +EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) +{ + return new EditBoxImplMac(pEditBox); +} + +EditBoxImplMac::EditBoxImplMac(EditBox* pEditText) +: EditBoxImpl(pEditText) +, _anchorPoint(Vec2(0.5f, 0.5f)) +, _maxTextLength(-1) +, _sysEdit(nullptr) +{ + //! TODO: Retina on Mac + //! _inRetinaMode = [[CCEAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false; + _inRetinaMode = false; +} + +EditBoxImplMac::~EditBoxImplMac() +{ + [_sysEdit release]; +} + +void EditBoxImplMac::doAnimationWhenKeyboardMove(float duration, float distance) +{ + if ([_sysEdit isEditState] || distance < 0.0f) + [_sysEdit doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; +} + +bool EditBoxImplMac::initWithSize(const Size& size) +{ + GLView* eglView = Director::getInstance()->getOpenGLView(); + + NSRect rect = NSMakeRect(0, 0, size.width * eglView->getScaleX(),size.height * eglView->getScaleY()); + + if (_inRetinaMode) { + rect.size.width /= 2.0f; + rect.size.height /= 2.0f; + } + + _sysEdit = [[UIEditBoxImplMac alloc] initWithFrame:rect editBox:this]; + + if (!_sysEdit) + return false; + + return true; +} + +void EditBoxImplMac::setFont(const char* pFontName, int fontSize) +{ + NSString * fntName = [NSString stringWithUTF8String:pFontName]; + float retinaFactor = _inRetinaMode ? 2.0f : 1.0f; + auto glview = cocos2d::Director::getInstance()->getOpenGLView(); + float scaleFactor = glview->getScaleX(); + NSFont *textFont = [NSFont fontWithName:fntName size:fontSize * scaleFactor / retinaFactor]; + if (textFont != nil) { + [_sysEdit.textField setFont:textFont]; + [_sysEdit.secureTextField setFont:textFont]; + } +} + +void EditBoxImplMac::setPlaceholderFont(const char* pFontName, int fontSize) +{ + NSString *fontName = [NSString stringWithUTF8String:pFontName]; + float retinaFactor = _inRetinaMode ? 2.0f : 1.0f; + auto glview = cocos2d::Director::getInstance()->getOpenGLView(); + float scaleFactor = glview->getScaleX(); + NSFont *font = [NSFont fontWithName:fontName size:fontSize * scaleFactor / retinaFactor]; + + if (!font) { + CCLOGWARN("Font not found: %s", pFontName); + return; + } + + [_sysEdit.placeholderAttributes setObject:font forKey:NSFontAttributeName]; + + /* reload placeholder */ + const char *placeholder = [_sysEdit.textField.cell placeholderAttributedString].string.UTF8String; + if (placeholder) { + setPlaceHolder(placeholder); + } +} + +void EditBoxImplMac::setFontColor(const Color3B& color) +{ + NSColor *newColor = [NSColor colorWithCalibratedRed:color.r / 255.0f green:color.g / 255.0f blue:color.b / 255.0f alpha:1.0f]; + _sysEdit.textField.textColor = newColor; + _sysEdit.secureTextField.textColor = newColor; +} + +void EditBoxImplMac::setPlaceholderFontColor(const Color3B& color) +{ + NSColor *nsColor = [NSColor colorWithCalibratedRed:color.r/255.f green:color.g / 255.f blue:color.b / 255.f alpha:1.0f]; + [_sysEdit.placeholderAttributes setObject:nsColor forKey:NSForegroundColorAttributeName]; + + /* reload placeholder */ + const char *placeholder = [_sysEdit.textField.cell placeholderAttributedString].string.UTF8String; + if (placeholder) { + setPlaceHolder(placeholder); + } +} + +void EditBoxImplMac::setInputMode(EditBox::InputMode inputMode) +{ +} + +void EditBoxImplMac::setMaxLength(int maxLength) +{ + _maxTextLength = maxLength; +} + +int EditBoxImplMac::getMaxLength() +{ + return _maxTextLength; +} + +void EditBoxImplMac::setInputFlag(EditBox::InputFlag inputFlag) +{ + switch (inputFlag) + { + case EditBox::InputFlag::PASSWORD: + [_sysEdit.textField.superview addSubview:_sysEdit.secureTextField]; + [_sysEdit.textField removeFromSuperview]; + break; + case EditBox::InputFlag::INITIAL_CAPS_WORD: + CCLOGWARN("INITIAL_CAPS_WORD not implemented"); + break; + case EditBox::InputFlag::INITIAL_CAPS_SENTENCE: + CCLOGWARN("INITIAL_CAPS_SENTENCE not implemented"); + break; + case EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS: + CCLOGWARN("INTIAL_CAPS_ALL_CHARACTERS not implemented"); + break; + case EditBox::InputFlag::SENSITIVE: + CCLOGWARN("SENSITIVE not implemented"); + break; + default: + break; + } +} + +void EditBoxImplMac::setReturnType(EditBox::KeyboardReturnType returnType) +{ +} + +bool EditBoxImplMac::isEditing() +{ + return [_sysEdit isEditState] ? true : false; +} + +void EditBoxImplMac::setText(const char* pText) +{ + NSString *string = [NSString stringWithUTF8String:pText]; + _sysEdit.textField.stringValue = string; + _sysEdit.secureTextField.stringValue = string; +} + +const char* EditBoxImplMac::getText(void) +{ + if (_sysEdit.secureTextField.superview) { + return [_sysEdit.secureTextField.stringValue UTF8String]; + } + + return [_sysEdit.textField.stringValue UTF8String]; +} + +void EditBoxImplMac::setPlaceHolder(const char* pText) +{ + NSAttributedString *as = [[NSAttributedString alloc] initWithString:[NSString stringWithUTF8String:pText] + attributes:_sysEdit.placeholderAttributes]; + + [[_sysEdit.textField cell] setPlaceholderAttributedString:as]; + [[_sysEdit.secureTextField cell] setPlaceholderAttributedString:as]; + [as release]; +} + +NSPoint EditBoxImplMac::convertDesignCoordToScreenCoord(const Vec2& designCoord, bool bInRetinaMode) +{ + NSRect frame = [_sysEdit.textField frame]; + CGFloat height = frame.size.height; + + GLView* eglView = Director::getInstance()->getOpenGLView(); + + Vec2 visiblePos = Vec2(designCoord.x * eglView->getScaleX(), designCoord.y * eglView->getScaleY()); + Vec2 screenGLPos = visiblePos + eglView->getViewPortRect().origin; + + //TODO: I don't know why here needs to substract `height`. + NSPoint screenPos = NSMakePoint(screenGLPos.x, screenGLPos.y-height); + + if (bInRetinaMode) { + screenPos.x = screenPos.x / 2.0f; + screenPos.y = screenPos.y / 2.0f; + } + + CCLOGINFO("[EditBox] pos x = %f, y = %f", screenGLPos.x, screenGLPos.y); + return screenPos; +} + +void EditBoxImplMac::updatePosition(float dt) +{ + if(nullptr != _sysEdit) + { + adjustTextFieldPosition(); + } +} + +void EditBoxImplMac::adjustTextFieldPosition() +{ + Size contentSize = _editBox->getContentSize(); + Rect rect = Rect(0, 0, contentSize.width, contentSize.height); + + rect = RectApplyAffineTransform(rect, _editBox->nodeToWorldTransform()); + + Vec2 designCoord = Vec2(rect.origin.x, rect.origin.y + rect.size.height); + [_sysEdit setPosition:convertDesignCoordToScreenCoord(designCoord, _inRetinaMode)]; +} + +void EditBoxImplMac::setPosition(const Vec2& pos) +{ + _position = pos; + adjustTextFieldPosition(); +} + +void EditBoxImplMac::setVisible(bool visible) +{ + [_sysEdit.textField setHidden:!visible]; + [_sysEdit.secureTextField setHidden:!visible]; +} + +void EditBoxImplMac::setContentSize(const Size& size) +{ + _contentSize = size; + CCLOG("[Edit text] content size = (%f, %f)", size.width, size.height); +} + +void EditBoxImplMac::setAnchorPoint(const Vec2& anchorPoint) +{ + CCLOG("[Edit text] anchor point = (%f, %f)", anchorPoint.x, anchorPoint.y); + _anchorPoint = anchorPoint; + setPosition(_position); +} + +void EditBoxImplMac::visit(void) +{ + +} + +void EditBoxImplMac::openKeyboard() +{ + [_sysEdit openKeyboard]; +} + +void EditBoxImplMac::closeKeyboard() +{ + [_sysEdit closeKeyboard]; +} + +void EditBoxImplMac::onEnter(void) +{ + adjustTextFieldPosition(); +} + +} + +NS_CC_END + +#endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + + diff --git a/cocos/ui/UIEditBox/UIEditBoxImplNone.cpp b/cocos/ui/UIEditBox/UIEditBoxImplNone.cpp new file mode 100644 index 0000000000..7e3899672c --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplNone.cpp @@ -0,0 +1,18 @@ +#include "UIEditBox.h" + +#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID ) && (CC_TARGET_PLATFORM != CC_PLATFORM_IOS ) && (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) && (CC_TARGET_PLATFORM != CC_PLATFORM_MAC) && (CC_TARGET_PLATFORM != CC_PLATFORM_TIZEN) + +NS_CC_BEGIN + +namespace ui { + +EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) +{ + return NULL; +} + +} + +NS_CC_END + +#endif /* #if (..) */ diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWin.cpp b/cocos/ui/UIEditBox/UIEditBoxImplWin.cpp new file mode 100644 index 0000000000..e539dabd41 --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplWin.cpp @@ -0,0 +1,302 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2013 Jozef Pridavok + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#include "UIEditBoxImplWin.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + +#include "UIEditBox.h" +#include "proj.win32/Win32InputBox.h" + +NS_CC_BEGIN + +namespace ui { + +EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) +{ + return new EditBoxImplWin(pEditBox); +} + +EditBoxImplWin::EditBoxImplWin(EditBox* pEditText) +: EditBoxImpl(pEditText) +, _label(nullptr) +, _labelPlaceHolder(nullptr) +, _editBoxInputMode(EditBox::InputMode::SINGLE_LINE) +, _editBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS) +, _keyboardReturnType(EditBox::KeyboardReturnType::DEFAULT) +, _colText(Color3B::WHITE) +, _colPlaceHolder(Color3B::GRAY) +, _maxLength(-1) +{ + +} + +EditBoxImplWin::~EditBoxImplWin() +{ +} + +void EditBoxImplWin::doAnimationWhenKeyboardMove(float duration, float distance) +{ +} + +bool EditBoxImplWin::initWithSize(const Size& size) +{ + //! int fontSize = getFontSizeAccordingHeightJni(size.height-12); + _label = Label::create(); + _label->setSystemFontSize(size.height-12); + // align the text vertically center + _label->setAnchorPoint(Vec2(0, 0.5f)); + _label->setPosition(Vec2(5, size.height / 2.0f)); + _label->setColor(_colText); + _editBox->addChild(_label); + + _labelPlaceHolder = Label::create(); + _labelPlaceHolder->setSystemFontSize(size.height-12); + // align the text vertically center + _labelPlaceHolder->setAnchorPoint(Vec2(0, 0.5f)); + _labelPlaceHolder->setPosition(Vec2(5, size.height / 2.0f)); + _labelPlaceHolder->setVisible(false); + _labelPlaceHolder->setColor(_colPlaceHolder); + _editBox->addChild(_labelPlaceHolder); + + _editSize = size; + return true; +} + +void EditBoxImplWin::setFont(const char* pFontName, int fontSize) +{ + if(_label != nullptr) { + _label->setSystemFontName(pFontName); + _label->setSystemFontSize(fontSize); + } + + if(_labelPlaceHolder != nullptr) { + _labelPlaceHolder->setSystemFontName(pFontName); + _labelPlaceHolder->setSystemFontSize(fontSize); + } +} + +void EditBoxImplWin::setFontColor(const Color3B& color) +{ + _colText = color; + _label->setColor(color); +} + +void EditBoxImplWin::setPlaceholderFont(const char* pFontName, int fontSize) +{ + if(_labelPlaceHolder != nullptr) { + _labelPlaceHolder->setSystemFontName(pFontName); + _labelPlaceHolder->setSystemFontSize(fontSize); + } +} + +void EditBoxImplWin::setPlaceholderFontColor(const Color3B& color) +{ + _colPlaceHolder = color; + _labelPlaceHolder->setColor(color); +} + +void EditBoxImplWin::setInputMode(EditBox::InputMode inputMode) +{ + _editBoxInputMode = inputMode; +} + +void EditBoxImplWin::setMaxLength(int maxLength) +{ + _maxLength = maxLength; +} + +int EditBoxImplWin::getMaxLength() +{ + return _maxLength; +} + +void EditBoxImplWin::setInputFlag(EditBox::InputFlag inputFlag) +{ + _editBoxInputFlag = inputFlag; +} + +void EditBoxImplWin::setReturnType(EditBox::KeyboardReturnType returnType) +{ + _keyboardReturnType = returnType; +} + +bool EditBoxImplWin::isEditing() +{ + return false; +} + +void EditBoxImplWin::setText(const char* pText) +{ + if (pText != nullptr) + { + _text = pText; + + if (_text.length() > 0) + { + _labelPlaceHolder->setVisible(false); + + std::string strToShow; + + if (EditBox::InputFlag::PASSWORD == _editBoxInputFlag) + { + long length = cc_utf8_strlen(_text.c_str(), -1); + for (long i = 0; i < length; i++) + { + strToShow.append("*"); + } + } + else + { + strToShow = _text; + } + + //! std::string strWithEllipsis = getStringWithEllipsisJni(strToShow.c_str(), _editSize.width, _editSize.height-12); + //! _label->setString(strWithEllipsis.c_str()); + _label->setString(strToShow.c_str()); + } + else + { + _labelPlaceHolder->setVisible(true); + _label->setString(""); + } + + } +} + +const char* EditBoxImplWin::getText(void) +{ + return _text.c_str(); +} + +void EditBoxImplWin::setPlaceHolder(const char* pText) +{ + if (pText != nullptr) + { + _placeHolder = pText; + if (_placeHolder.length() > 0 && _text.length() == 0) + { + _labelPlaceHolder->setVisible(true); + } + + _labelPlaceHolder->setString(_placeHolder.c_str()); + } +} + +void EditBoxImplWin::setPosition(const Vec2& pos) +{ + //_label->setPosition(pos); + //_labelPlaceHolder->setPosition(pos); +} + +void EditBoxImplWin::setVisible(bool visible) +{ // don't need to be implemented on win32 platform. +} + +void EditBoxImplWin::setContentSize(const Size& size) +{ +} + +void EditBoxImplWin::setAnchorPoint(const Vec2& anchorPoint) +{ // don't need to be implemented on win32 platform. + +} + +void EditBoxImplWin::visit(void) +{ +} + +void EditBoxImplWin::openKeyboard() +{ + if (_delegate != nullptr) + { + _delegate->editBoxEditingDidBegin(_editBox); + } + + EditBox* pEditBox = this->getEditBox(); + if (nullptr != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) + { + CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); + ScriptEvent event(kCommonEvent,(void*)&data); + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } + + std::string placeHolder = _labelPlaceHolder->getString(); + if (placeHolder.length() == 0) + placeHolder = "Enter value"; + + char pText[100]= {0}; + std::string text = getText(); + if (text.length()) + strncpy(pText, text.c_str(), 100); + auto glView = Director::getInstance()->getOpenGLView(); + HWND hwnd = glView->getWin32Window(); + bool didChange = CWin32InputBox::InputBox("Input", placeHolder.c_str(), pText, 100, false, hwnd) == IDOK; + + if (didChange) + setText(pText); + + if (_delegate != nullptr) { + if (didChange) + _delegate->editBoxTextChanged(_editBox, getText()); + _delegate->editBoxEditingDidEnd(_editBox); + _delegate->editBoxReturn(_editBox); + } + +#if CC_ENABLE_SCRIPT_BINDING + if (nullptr != _editBox && 0 != _editBox->getScriptEditBoxHandler()) + { + CommonScriptData data(_editBox->getScriptEditBoxHandler(), "changed",_editBox); + ScriptEvent event(kCommonEvent,(void*)&data); + if (didChange) + { + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } + memset(data.eventName,0,sizeof(data.eventName)); + strncpy(data.eventName,"ended",sizeof(data.eventName)); + event.data = (void*)&data; + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + memset(data.eventName,0,sizeof(data.eventName)); + strncpy(data.eventName,"return",sizeof(data.eventName)); + event.data = (void*)&data; + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } +#endif // #if CC_ENABLE_SCRIPT_BINDING +} + +void EditBoxImplWin::closeKeyboard() +{ + +} + +void EditBoxImplWin::onEnter(void) +{ + +} + +} + +NS_CC_END + +#endif /* (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) */ diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWin.h b/cocos/ui/UIEditBox/UIEditBoxImplWin.h new file mode 100644 index 0000000000..b4c9cf9f47 --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplWin.h @@ -0,0 +1,118 @@ +/**************************************************************************** + Copyright (c) 2010-2012 cocos2d-x.org + Copyright (c) 2013 Jozef Pridavok + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __UIEditBoxIMPLWIN_H__ +#define __UIEditBoxIMPLWIN_H__ + +#include "cocos2d.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + +#include "UIEditBoxImpl.h" + +NS_CC_BEGIN + +namespace ui { + +class EditBox; + +class CC_GUI_DLL EditBoxImplWin : public EditBoxImpl +{ +public: + /** + * @js NA + */ + EditBoxImplWin(EditBox* pEditText); + /** + * @js NA + * @lua NA + */ + virtual ~EditBoxImplWin(); + + virtual bool initWithSize(const Size& size); + virtual void setFont(const char* pFontName, int fontSize); + virtual void setFontColor(const Color3B& color); + virtual void setPlaceholderFont(const char* pFontName, int fontSize); + virtual void setPlaceholderFontColor(const Color3B& color); + virtual void setInputMode(EditBox::InputMode inputMode); + virtual void setInputFlag(EditBox::InputFlag inputFlag); + virtual void setMaxLength(int maxLength); + virtual int getMaxLength(); + virtual void setReturnType(EditBox::KeyboardReturnType returnType); + virtual bool isEditing(); + + virtual void setText(const char* pText); + virtual const char* getText(void); + virtual void setPlaceHolder(const char* pText); + virtual void setPosition(const Vec2& pos); + virtual void setVisible(bool visible); + virtual void setContentSize(const Size& size); + virtual void setAnchorPoint(const Vec2& anchorPoint); + /** + * @js NA + * @lua NA + */ + virtual void visit(void); + virtual void doAnimationWhenKeyboardMove(float duration, float distance); + virtual void openKeyboard(); + virtual void closeKeyboard(); + /** + * @js NA + * @lua NA + */ + virtual void onEnter(void); +private: + + Label* _label; + Label* _labelPlaceHolder; + EditBox::InputMode _editBoxInputMode; + EditBox::InputFlag _editBoxInputFlag; + EditBox::KeyboardReturnType _keyboardReturnType; + + std::string _text; + std::string _placeHolder; + + Color3B _colText; + Color3B _colPlaceHolder; + + int _maxLength; + Size _editSize; + + /* + Size _contentSize; + HWND _sysEdit; + int _maxTextLength; + */ +}; + + +} + +NS_CC_END + +#endif /* (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) */ + +#endif /* __UIEditBoxIMPLWIN_H__ */ + diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp b/cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp new file mode 100644 index 0000000000..b8a2f23050 --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp @@ -0,0 +1,307 @@ +/**************************************************************************** +Copyright (c) 2014 cocos2d-x.org + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ + +#include "UIEditBoxImplWp8.h" +#include "UIEditBox.h" +#include "CCGLViewImpl.h" +#include "base/CCScriptSupport.h" +#include "base/ccUTF8.h" + +NS_CC_BEGIN + +namespace ui { + +EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) +{ + return new UIEditBoxImplWp8(pEditBox); +} + +UIEditBoxImplWp8::UIEditBoxImplWp8( EditBox* pEditText ) + : EditBoxImpl(pEditText) + , m_pLabel(NULL) + , m_pLabelPlaceHolder(NULL) + , m_eEditBoxInputMode(EditBox::InputMode::SINGLE_LINE) + , m_eEditBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS) + , m_eKeyboardReturnType(EditBox::KeyboardReturnType::DEFAULT) + , m_colText(Color3B::WHITE) + , m_colPlaceHolder(Color3B::GRAY) + , m_nMaxLength(-1) +{ + +} + +UIEditBoxImplWp8::~UIEditBoxImplWp8() +{ + +} + +void UIEditBoxImplWp8::openKeyboard() +{ + if (_delegate != NULL) + { + _delegate->editBoxEditingDidBegin(_editBox); + } + + EditBox* pEditBox = this->getEditBox(); + if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) + { + CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); + ScriptEvent event(kCommonEvent,(void*)&data); + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } + + std::string placeHolder = m_pLabelPlaceHolder->getString(); + if (placeHolder.length() == 0) + placeHolder = "Enter value"; + + char pText[100]= {0}; + std::string text = getText(); + if (text.length()) + strncpy(pText, text.c_str(), 100); + + Windows::Foundation::EventHandler^ receiveHandler = ref new Windows::Foundation::EventHandler( + [this](Platform::Object^ sender, Platform::String^ arg) + { + setText(PlatformStringTostring(arg).c_str()); + if (_delegate != NULL) { + _delegate->editBoxTextChanged(_editBox, getText()); + _delegate->editBoxEditingDidEnd(_editBox); + _delegate->editBoxReturn(_editBox); + } + }); + + GLViewImpl::sharedOpenGLView()->OpenXamlEditBox(stringToPlatformString(placeHolder), stringToPlatformString(getText()), m_nMaxLength, (int)m_eEditBoxInputMode, (int)m_eEditBoxInputFlag, receiveHandler); +} + +bool UIEditBoxImplWp8::initWithSize( const Size& size ) +{ + //! int fontSize = getFontSizeAccordingHeightJni(size.height-12); + m_pLabel = Label::createWithSystemFont("", "", size.height-12); + // align the text vertically center + m_pLabel->setAnchorPoint(Vec2(0.0f, 0.5f)); + m_pLabel->setPosition(Vec2(5.0, size.height / 2.0f)); + m_pLabel->setColor(m_colText); + _editBox->addChild(m_pLabel); + + m_pLabelPlaceHolder = Label::createWithSystemFont("", "", size.height-12); + // align the text vertically center + m_pLabelPlaceHolder->setAnchorPoint(Vec2(0.0f, 0.5f)); + m_pLabelPlaceHolder->setPosition(Vec2(5.0f, size.height / 2.0f)); + m_pLabelPlaceHolder->setVisible(false); + m_pLabelPlaceHolder->setColor(m_colPlaceHolder); + _editBox->addChild(m_pLabelPlaceHolder); + + m_EditSize = size; + return true; +} + +void UIEditBoxImplWp8::setFont( const char* pFontName, int fontSize ) +{ + if(m_pLabel != NULL) { + m_pLabel->setSystemFontName(pFontName); + m_pLabel->setSystemFontSize(fontSize); + } + + if(m_pLabelPlaceHolder != NULL) { + m_pLabelPlaceHolder->setSystemFontName(pFontName); + m_pLabelPlaceHolder->setSystemFontSize(fontSize); + } +} + +void UIEditBoxImplWp8::setFontColor( const Color3B& color ) +{ + m_colText = color; + m_pLabel->setColor(color); +} + +void UIEditBoxImplWp8::setPlaceholderFont( const char* pFontName, int fontSize ) +{ + if(m_pLabelPlaceHolder != NULL) { + m_pLabelPlaceHolder->setSystemFontName(pFontName); + m_pLabelPlaceHolder->setSystemFontSize(fontSize); + } +} + +void UIEditBoxImplWp8::setPlaceholderFontColor( const Color3B& color ) +{ + m_colPlaceHolder = color; + m_pLabelPlaceHolder->setColor(color); +} + +void UIEditBoxImplWp8::setInputMode( EditBox::InputMode inputMode ) +{ + m_eEditBoxInputMode = inputMode; +} + +void UIEditBoxImplWp8::setInputFlag(EditBox::InputFlag inputFlag ) +{ + m_eEditBoxInputFlag = inputFlag; +} + +void UIEditBoxImplWp8::setMaxLength( int maxLength ) +{ + m_nMaxLength = maxLength; +} + +int UIEditBoxImplWp8::getMaxLength() +{ + return m_nMaxLength; +} + +void UIEditBoxImplWp8::setReturnType( EditBox::KeyboardReturnType returnType ) +{ + m_eKeyboardReturnType = returnType; +} + +bool UIEditBoxImplWp8::isEditing() +{ + return false; +} + +void UIEditBoxImplWp8::setText( const char* pText ) +{ + if (pText != NULL) + { + m_strText = pText; + + if (m_strText.length() > 0) + { + m_pLabelPlaceHolder->setVisible(false); + + std::string strToShow; + + if (EditBox::InputFlag::PASSWORD == m_eEditBoxInputFlag) + { + long length = cc_utf8_strlen(m_strText.c_str(), -1); + for (long i = 0; i < length; i++) + { + strToShow.append("*"); + } + } + else + { + strToShow = m_strText; + } + + //! std::string strWithEllipsis = getStringWithEllipsisJni(strToShow.c_str(), m_EditSize.width, m_EditSize.height-12); + //! m_pLabel->setString(strWithEllipsis.c_str()); + m_pLabel->setString(strToShow.c_str()); + } + else + { + m_pLabelPlaceHolder->setVisible(true); + m_pLabel->setString(""); + } + + } +} + +const char* UIEditBoxImplWp8::getText( void ) +{ + return m_strText.c_str(); +} + +void UIEditBoxImplWp8::setPlaceHolder( const char* pText ) +{ + if (pText != NULL) + { + m_strPlaceHolder = pText; + if (m_strPlaceHolder.length() > 0 && m_strText.length() == 0) + { + m_pLabelPlaceHolder->setVisible(true); + } + + m_pLabelPlaceHolder->setString(m_strPlaceHolder.c_str()); + } +} + +void UIEditBoxImplWp8::setPosition( const Vec2& pos ) +{ + +} + +void UIEditBoxImplWp8::setVisible( bool visible ) +{ + +} + +void UIEditBoxImplWp8::setContentSize( const Size& size ) +{ + +} + +void UIEditBoxImplWp8::setAnchorPoint( const Vec2& anchorPoint ) +{ + +} + +void UIEditBoxImplWp8::visit( void ) +{ + +} + +void UIEditBoxImplWp8::doAnimationWhenKeyboardMove( float duration, float distance ) +{ + +} + +void UIEditBoxImplWp8::closeKeyboard() +{ + +} + +void UIEditBoxImplWp8::onEnter( void ) +{ + +} + +Platform::String^ UIEditBoxImplWp8::stringToPlatformString( std::string strSrc ) +{ + // to wide char + int nStrLen = MultiByteToWideChar(CP_UTF8, 0, strSrc.c_str(), -1, NULL, 0); + wchar_t* pWStr = new wchar_t[nStrLen + 1]; + memset(pWStr, 0, nStrLen + 1); + MultiByteToWideChar(CP_UTF8, 0, strSrc.c_str(), -1, pWStr, nStrLen); + Platform::String^ strDst = ref new Platform::String(pWStr); + delete[] pWStr; + return strDst; +} + +std::string UIEditBoxImplWp8::PlatformStringTostring( Platform::String^ strSrc ) +{ + const wchar_t* pWStr = strSrc->Data(); + int nStrLen = WideCharToMultiByte(CP_UTF8, 0, pWStr, -1, NULL, 0, NULL, NULL); + char* pStr = new char[nStrLen + 1]; + memset(pStr, 0, nStrLen + 1); + WideCharToMultiByte(CP_UTF8, 0, pWStr, -1, pStr, nStrLen, NULL, NULL); ; + + std::string strDst = std::string(pStr); + + delete[] pStr; + return strDst; +} + +} + +NS_CC_END diff --git a/cocos/ui/UIEditBox/UIEditBoxImplWp8.h b/cocos/ui/UIEditBox/UIEditBoxImplWp8.h new file mode 100644 index 0000000000..09d78167cd --- /dev/null +++ b/cocos/ui/UIEditBox/UIEditBoxImplWp8.h @@ -0,0 +1,88 @@ +/**************************************************************************** +Copyright (c) 2014 cocos2d-x.org + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +#ifndef __UIEditBoxIMPLWP8_H__ +#define __UIEditBoxIMPLWP8_H__ + +#include "UIEditBoxImpl.h" + +NS_CC_BEGIN + +namespace ui { + class EditBox; + + class CC_GUI_DLL UIEditBoxImplWp8 : public EditBoxImpl + { + public: + UIEditBoxImplWp8(EditBox* pEditText); + virtual ~UIEditBoxImplWp8(); + + virtual bool initWithSize(const Size& size); + virtual void setFont(const char* pFontName, int fontSize); + virtual void setFontColor(const Color3B& color); + virtual void setPlaceholderFont(const char* pFontName, int fontSize); + virtual void setPlaceholderFontColor(const Color3B& color); + virtual void setInputMode(EditBox::InputMode inputMode); + virtual void setInputFlag(EditBox::InputFlag inputFlag); + virtual void setMaxLength(int maxLength); + virtual int getMaxLength(); + virtual void setReturnType(EditBox::KeyboardReturnType returnType); + virtual bool isEditing(); + + virtual void setText(const char* pText); + virtual const char* getText(void); + virtual void setPlaceHolder(const char* pText); + virtual void setPosition(const Vec2& pos); + virtual void setVisible(bool visible); + virtual void setContentSize(const Size& size); + virtual void setAnchorPoint(const Vec2& anchorPoint); + virtual void visit(void); + virtual void doAnimationWhenKeyboardMove(float duration, float distance); + virtual void openKeyboard(); + virtual void closeKeyboard(); + virtual void onEnter(void); + private: + Platform::String^ stringToPlatformString(std::string strSrc); + std::string PlatformStringTostring(Platform::String^ strSrc); + private: + + Label* m_pLabel; + Label* m_pLabelPlaceHolder; + EditBox::InputMode m_eEditBoxInputMode; + EditBox::InputFlag m_eEditBoxInputFlag; + (EditBox::KeyboardReturnType m_eKeyboardReturnType; + + std::string m_strText; + std::string m_strPlaceHolder; + + Color3B m_colText; + Color3B m_colPlaceHolder; + + int m_nMaxLength; + Size m_EditSize; + }; +} + +NS_CC_END + +#endif diff --git a/cocos/ui/proj.win32/Win32InputBox.cpp b/cocos/ui/proj.win32/Win32InputBox.cpp new file mode 100644 index 0000000000..da1cb12301 --- /dev/null +++ b/cocos/ui/proj.win32/Win32InputBox.cpp @@ -0,0 +1,383 @@ +#include "Win32InputBox.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + +#include + +#pragma warning (disable: 4312) + +typedef struct _MSDN_DLGTEMPLATEEX +{ + WORD dlgVer; + WORD signature; + DWORD helpID; + DWORD exStyle; + DWORD style; + WORD cDlgItems; + short x; + short y; + short cx; + short cy; + BYTE _rest[1]; // rest of structure +} MSDN_DLGTEMPLATEEX; + +static bool IsDlgTemplateExtended(DLGTEMPLATE *dlgTemplate) +{ + MSDN_DLGTEMPLATEEX *dgExTemplate = (MSDN_DLGTEMPLATEEX *) dlgTemplate; + + // MSDN excerpt: + //* dlgVer + // Specifies the version number of the extended dialog box template. This member must be 1. + //* signature + // Indicates whether a template is an extended dialog box template. + // If signature is 0xFFFF, this is an extended dialog box template. + // In this case, the dlgVer member specifies the template version number. + // If signature is any value other than 0xFFFF, this is a standard dialog box template that uses the DLGTEMPLATE and DLGITEMTEMPLATE structures. + + return (dgExTemplate->dlgVer == 1) && (dgExTemplate->signature == 0xFFFF); +} + +// Use alignment if supported by the compiler +#ifdef _MSC_VER + #if _MSC_VER > 1200 + __declspec(align(4)) + #endif +#endif + +// per the MSDN, the DLGTEMPLATE must be DWORD aligned +// this was generated by the DlgResToDlgTemplate tool +static unsigned char definputbox_dlg[] = +{ + 0x01,0x00,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x00,0xc8,0x00,0x06, + 0x00,0x16,0x00,0x11,0x00,0xe7,0x00,0x6d,0x00,0x00,0x00,0x00,0x00,0x57,0x00,0x69, + 0x00,0x6e,0x00,0x33,0x00,0x32,0x00,0x49,0x00,0x6e,0x00,0x70,0x00,0x75,0x00,0x74, + 0x00,0x42,0x00,0x6f,0x00,0x78,0x00,0x00,0x00,0x08,0x00,0xbc,0x02,0x00,0x00,0x4d, + 0x00,0x53,0x00,0x20,0x00,0x53,0x00,0x68,0x00,0x65,0x00,0x6c,0x00,0x6c,0x00,0x20, + 0x00,0x44,0x00,0x6c,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0x00,0x02,0x50,0x06,0x00,0x04,0x00,0x9d,0x00,0x21,0x00,0xe8, + 0x03,0x00,0x00,0xff,0xff,0x82,0x00,0x50,0x00,0x72,0x00,0x6f,0x00,0x6d,0x00,0x70, + 0x00,0x74,0x00,0x3a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x80,0x00,0x81,0x50,0x06,0x00,0x25,0x00,0xd8,0x00,0x0e,0x00,0xe9, + 0x03,0x00,0x00,0xff,0xff,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x84,0x10,0xa1,0x50,0x06,0x00,0x37,0x00,0xd8,0x00,0x31,0x00,0xea, + 0x03,0x00,0x00,0xff,0xff,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x01,0x00,0x03,0x50,0xab,0x00,0x04,0x00,0x33,0x00,0x0e,0x00,0x01, + 0x00,0x00,0x00,0xff,0xff,0x80,0x00,0x4f,0x00,0x4b,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x50,0xab,0x00,0x15,0x00,0x33, + 0x00,0x0e,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0x80,0x00,0x43,0x00,0x41,0x00,0x4e, + 0x00,0x43,0x00,0x45,0x00,0x4c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x27,0x00,0x08,0x00,0x08,0x00,0xff, + 0xff,0xff,0xff,0xff,0xff,0x82,0x00,0x00,0x00,0x00,0x00 +}; + +static LPCTSTR definputbox_buttonnames[] = { _T("OK"), _T("CANCEL") }; +static const INT_PTR definputbox_buttonids[] = { IDOK, IDCANCEL }; + +static const INT + definputbox_id_prompt = 1000, + definputbox_id_edit1 = 1001, + definputbox_id_edit2 = 1002; + +WIN32INPUTBOX_PARAM::WIN32INPUTBOX_PARAM() +{ + bMultiline = false; + hwndOwner = 0; + DlgTemplateName = 0; + hInstance = (HINSTANCE) ::GetModuleHandle(0); + DlgTemplateData = definputbox_dlg; + + bCenter = true; + + dwStylesPlus = 0; + dwExStylesPlus = 0; + dwStylesMinus = 0xFFFFFFFF; + dwExStylesMinus = 0xFFFFFFFF; + + xPos = yPos = -1; + + szResult = 0; + nResultSize = 0; +} + +CWin32InputBox::CWin32InputBox(WIN32INPUTBOX_PARAM *param) +{ + _param = param; +} + +CWin32InputBox::~CWin32InputBox() +{ + +} + +void CWin32InputBox::SetParam(WIN32INPUTBOX_PARAM *param) +{ + _param = param; +} + +WIN32INPUTBOX_PARAM *CWin32InputBox::GetParam() +{ + return _param; +} + +INT_PTR CWin32InputBox::InputBoxEx(WIN32INPUTBOX_PARAM *param) +{ + // Check mandatory parameters + if (param->szResult == 0) + { + ::SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + + LPDLGTEMPLATE dlgTemplate; + + if (param->DlgTemplateName != 0) + { + HMODULE hModule = (HMODULE)param->hInstance; +#ifdef __MINGW32__ + HRSRC rcDlg = ::FindResource(hModule, (LPWSTR)(ULONG_PTR)(size_t)(param->DlgTemplateName), RT_DIALOG); +#else + HRSRC rcDlg = ::FindResource(hModule, MAKEINTRESOURCE(param->DlgTemplateName), RT_DIALOG); +#endif + if (rcDlg == nullptr) + return 0; + + HGLOBAL hglobalDlg = ::LoadResource(hModule, rcDlg); + if (hglobalDlg == nullptr) + return 0; + + dlgTemplate = (LPDLGTEMPLATE) hglobalDlg; + } + else if (param->DlgTemplateData != 0) + { + dlgTemplate = (LPDLGTEMPLATE) param->DlgTemplateData; + } + + MSDN_DLGTEMPLATEEX *dlgTemplateEx = + IsDlgTemplateExtended((LPDLGTEMPLATE) dlgTemplate) ? (MSDN_DLGTEMPLATEEX *) dlgTemplate : 0; + + if (dlgTemplateEx != 0) + { + dlgTemplateEx->exStyle |= param->dwExStylesPlus; + dlgTemplateEx->style |= param->dwStylesPlus; + dlgTemplateEx->exStyle &= param->dwExStylesMinus; + dlgTemplateEx->style &= param->dwStylesMinus; + + if (param->bCenter) + dlgTemplateEx->style |= DS_CENTER; + + if (param->xPos != -1) + dlgTemplateEx->x = param->xPos; + if (param->yPos != -1) + dlgTemplateEx->y = param->yPos; + } + else + { + dlgTemplate->dwExtendedStyle |= param->dwExStylesPlus; + dlgTemplate->style |= param->dwStylesPlus; + dlgTemplate->dwExtendedStyle &= param->dwExStylesMinus; + dlgTemplate->style &= param->dwStylesMinus; + + if (param->bCenter) + dlgTemplate->style |= DS_CENTER; + + if (param->xPos != -1) + dlgTemplate->x = param->xPos; + + if (param->yPos != -1) + dlgTemplate->y = param->yPos; + } + + CWin32InputBox inputbox(param); + + // Resize dialog and SHOW or HIDE multiline + INT_PTR r = ::DialogBoxIndirectParam(param->hInstance, dlgTemplate, param->hwndOwner, (DLGPROC)DlgProc, (LPARAM)&inputbox); + + return r; +} + +INT_PTR CWin32InputBox::InputBox( + LPCSTR szTitle, + LPCSTR szPrompt, + LPSTR szResult, + DWORD nResultSize, + bool bMultiLine, + HWND hwndParent) +{ + WIN32INPUTBOX_PARAM param; + + param.szTitle = szTitle; + param.szPrompt = szPrompt; + param.szResult = szResult; + param.nResultSize = nResultSize; + param.bMultiline = bMultiLine; + param.hwndOwner = hwndParent; + return InputBoxEx(¶m); +} + +void CWin32InputBox::InitDialog() +{ + // Set the button captions + for (size_t i=0;ihDlg, (int) definputbox_buttonids[i], definputbox_buttonnames[i]); + + // Set other controls + ::SetWindowTextA(_param->hDlg, Utf8ToAnsi(_param->szTitle).c_str()); + ::SetDlgItemTextA(_param->hDlg, definputbox_id_prompt, Utf8ToAnsi(_param->szPrompt).c_str()); + + HWND hwndEdit1 = ::GetDlgItem(_param->hDlg, definputbox_id_edit1); + HWND hwndEdit2 = ::GetDlgItem(_param->hDlg, definputbox_id_edit2); + + if (_param->bMultiline) + _hwndEditCtrl = hwndEdit2; + else + _hwndEditCtrl = hwndEdit1; + + ::SetWindowTextA(_hwndEditCtrl, Utf8ToAnsi(_param->szResult).c_str()); + + RECT rectDlg, rectEdit1, rectEdit2; + + ::GetWindowRect(_param->hDlg, &rectDlg); + ::GetWindowRect(hwndEdit1, &rectEdit1); + ::GetWindowRect(hwndEdit2, &rectEdit2); + + if (_param->bMultiline) + { + ::ShowWindow(hwndEdit1, SW_HIDE); + ::SetWindowPos( + hwndEdit2, + HWND_NOTOPMOST, + rectEdit1.left - rectDlg.left, + (rectEdit1.top - rectDlg.top) - (rectEdit1.bottom - rectEdit1.top), + 0, + 0, + SWP_NOSIZE | SWP_NOZORDER); + + ::SetWindowPos( + _param->hDlg, + HWND_NOTOPMOST, + 0, + 0, + rectDlg.right - rectDlg.left, + rectDlg.bottom - rectDlg.top - (rectEdit1.bottom - rectEdit1.top), + SWP_NOMOVE); + + } + else + { + ::SetWindowPos( + _param->hDlg, + HWND_NOTOPMOST, + 0, + 0, + rectDlg.right - rectDlg.left, + rectEdit1.bottom - rectDlg.top + 5, + SWP_NOMOVE); + + ::ShowWindow(hwndEdit2, SW_HIDE); + } +} + +// Message handler for about box. +LRESULT CALLBACK CWin32InputBox::DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + CWin32InputBox *_this = (CWin32InputBox *) ::GetWindowLongPtr(hDlg, GWLP_USERDATA); + WIN32INPUTBOX_PARAM *param = _this ? _this->GetParam() : 0; + + switch (message) + { + case WM_INITDIALOG: + { + SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR) lParam); + + _this = (CWin32InputBox *) lParam; + _this->_param->hDlg = hDlg; + _this->InitDialog(); + return TRUE; + } + + case WM_COMMAND: + { +#ifdef _MY_DEBUG + CHAR buf[1024]; + static int i=0; + sprintf(buf, "WM_COMMAND: %09d wParam=%08X lParam=%08X\n", i++, wParam, lParam); + OutputDebugString(buf); +#endif + INT_PTR buttonId = LOWORD(wParam); + for (size_t i=0; + i_hwndEditCtrl, + _this->_param->szResult, + _this->_param->nResultSize); + + std::string strUtf8 = AnsiToUtf8(_this->_param->szResult); + + memset(_this->_param->szResult, 0, _this->_param->nResultSize); + strncpy(_this->_param->szResult, strUtf8.c_str(), _this->_param->nResultSize-1); + + ::EndDialog(hDlg, buttonId); + return TRUE; + } + } + } + break; + } + return FALSE; +} + + +std::string CWin32InputBox::AnsiToUtf8(std::string strAnsi) +{ + std::string ret; + if (strAnsi.length() > 0) + { + int nWideStrLength = MultiByteToWideChar(CP_ACP, 0, strAnsi.c_str(), -1, nullptr, 0); + WCHAR* pwszBuf = (WCHAR*)malloc((nWideStrLength+1)*sizeof(WCHAR)); + memset(pwszBuf, 0, (nWideStrLength+1)*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, strAnsi.c_str(), -1, pwszBuf, (nWideStrLength+1)*sizeof(WCHAR)); + + int nUtf8Length = WideCharToMultiByte( CP_UTF8,0,pwszBuf,-1,nullptr,0,nullptr,FALSE ); + char* pszUtf8Buf = (char*)malloc((nUtf8Length+1)*sizeof(char)); + memset(pszUtf8Buf, 0, (nUtf8Length+1)*sizeof(char)); + + WideCharToMultiByte(CP_UTF8, 0, pwszBuf, -1, pszUtf8Buf, (nUtf8Length+1)*sizeof(char), nullptr, FALSE); + ret = pszUtf8Buf; + + free(pszUtf8Buf); + free(pwszBuf); + } + return ret; +} + +std::string CWin32InputBox::Utf8ToAnsi(std::string strUTF8) +{ + std::string ret; + if (strUTF8.length() > 0) + { + int nWideStrLength = MultiByteToWideChar(CP_UTF8, 0, strUTF8.c_str(), -1, nullptr, 0); + WCHAR* pwszBuf = (WCHAR*)malloc((nWideStrLength+1)*sizeof(WCHAR)); + memset(pwszBuf, 0, (nWideStrLength+1)*sizeof(WCHAR)); + MultiByteToWideChar(CP_UTF8, 0, strUTF8.c_str(), -1, pwszBuf, (nWideStrLength+1)*sizeof(WCHAR)); + + int nAnsiStrLength = WideCharToMultiByte( CP_ACP,0,pwszBuf,-1,nullptr,0,nullptr,FALSE ); + char* pszAnsiBuf = (char*)malloc((nAnsiStrLength+1)*sizeof(char)); + memset(pszAnsiBuf, 0, (nAnsiStrLength+1)*sizeof(char)); + + WideCharToMultiByte(CP_ACP, 0, pwszBuf, -1, pszAnsiBuf, (nAnsiStrLength+1)*sizeof(char), nullptr, FALSE); + ret = pszAnsiBuf; + + free(pszAnsiBuf); + free(pwszBuf); + } + + return ret; +} + + + +#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) */ diff --git a/cocos/ui/proj.win32/Win32InputBox.h b/cocos/ui/proj.win32/Win32InputBox.h new file mode 100644 index 0000000000..1fd46a5593 --- /dev/null +++ b/cocos/ui/proj.win32/Win32InputBox.h @@ -0,0 +1,106 @@ +#ifndef __03022006__WIN32INPUTBOX__ +#define __03022006__WIN32INPUTBOX__ + +#include "cocos2d.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +/* + +This library is (c) Elias Bachaalany aka lallous +You may use this library under the following license agreement: + +The zlib/libpng License. +--------------------------- +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial applications, +and to alter it and redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, + and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +*/ + +#include +#include + +class CWin32InputBox; + +// Structure used to orient the inputbox behavior +struct WIN32INPUTBOX_PARAM +{ + friend class CWin32InputBox; + + // + IN OPTIONAL bool bMultiline; + + // Pass this as none zero so to use this memory dlg template + IN OPTIONAL LPVOID DlgTemplateData; + + // Pass this as none ZERO so to load DLGTEMPLATE from resources + IN OPTIONAL LPCSTR DlgTemplateName; + + // passing both "DlgTemplateName" and "DlgTemplateData" ZERO will cause + // the dialog to use his default embedded resource + + // Center on monitor or owner window? + IN OPTIONAL bool bCenter; + + // Want to add more styles to the dialog? + IN OPTIONAL DWORD dwStylesPlus, dwStylesMinus; + IN OPTIONAL DWORD dwExStylesPlus, dwExStylesMinus; + + IN LPCSTR szTitle, szPrompt; + + // Return buffer + OUT LPSTR szResult; + IN DWORD nResultSize; + + // Owner window + HWND hwndOwner; + HINSTANCE hInstance; + + short xPos, yPos; + + WIN32INPUTBOX_PARAM(); +private: + HWND hDlg; +}; + +class CWin32InputBox +{ +private: + WIN32INPUTBOX_PARAM *_param; + static LRESULT CALLBACK DlgProc(HWND, UINT, WPARAM, LPARAM); + HWND _hwndEditCtrl; + + void InitDialog(); + void SetParam(WIN32INPUTBOX_PARAM *); + WIN32INPUTBOX_PARAM * GetParam(); + +public: + + CWin32InputBox(WIN32INPUTBOX_PARAM *); + ~CWin32InputBox(); + + static INT_PTR InputBoxEx(WIN32INPUTBOX_PARAM *); + static INT_PTR InputBox( + LPCSTR szTitle, + LPCSTR szPrompt, + LPSTR szResult, + DWORD nResultSize, + bool bMultiLine = false, + HWND hwndParent = 0); + + static std::string AnsiToUtf8(std::string strAnsi); + static std::string Utf8ToAnsi(std::string strUTF8); +}; + +#endif /* (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) */ + +#endif diff --git a/cocos/ui/proj.win32/libui.vcxproj b/cocos/ui/proj.win32/libui.vcxproj index ed67cf90df..92003d88cd 100644 --- a/cocos/ui/proj.win32/libui.vcxproj +++ b/cocos/ui/proj.win32/libui.vcxproj @@ -16,6 +16,9 @@ + + + @@ -36,12 +39,15 @@ + + + @@ -62,6 +68,7 @@ + diff --git a/cocos/ui/proj.win32/libui.vcxproj.filters b/cocos/ui/proj.win32/libui.vcxproj.filters index c51a43c85d..2933d8b07f 100644 --- a/cocos/ui/proj.win32/libui.vcxproj.filters +++ b/cocos/ui/proj.win32/libui.vcxproj.filters @@ -16,6 +16,9 @@ {b59b178a-b7e0-4826-ba07-44c46cd29a10} + + {08fb4468-821b-4e5c-9298-8b57a3152a5b} + @@ -93,6 +96,18 @@ BaseClasses + + UIWidgets\UIEditBox + + + UIWidgets\UIEditBox + + + UIWidgets\UIEditBox + + + UIWidgets\UIEditBox + @@ -167,5 +182,14 @@ BaseClasses + + UIWidgets\UIEditBox + + + UIWidgets\UIEditBox + + + UIWidgets\UIEditBox + \ No newline at end of file diff --git a/cocos/ui/proj.wp8/libGUI.vcxproj b/cocos/ui/proj.wp8/libGUI.vcxproj index 5e2e4e6453..47ec5d9d10 100644 --- a/cocos/ui/proj.wp8/libGUI.vcxproj +++ b/cocos/ui/proj.wp8/libGUI.vcxproj @@ -184,6 +184,9 @@ + + + @@ -210,6 +213,8 @@ + + diff --git a/cocos/ui/proj.wp8/libGUI.vcxproj.filters b/cocos/ui/proj.wp8/libGUI.vcxproj.filters index 7a7b4ae6b4..c0a7f8250b 100644 --- a/cocos/ui/proj.wp8/libGUI.vcxproj.filters +++ b/cocos/ui/proj.wp8/libGUI.vcxproj.filters @@ -87,6 +87,15 @@ BaseClasses + + UIWidgets + + + UIWidgets + + + UIWidgets + @@ -161,5 +170,11 @@ BaseClasses + + UIWidgets + + + UIWidgets + \ No newline at end of file diff --git a/tests/cpp-tests/Android.mk b/tests/cpp-tests/Android.mk index c1fcaefe21..6d122eac83 100644 --- a/tests/cpp-tests/Android.mk +++ b/tests/cpp-tests/Android.mk @@ -70,6 +70,7 @@ Classes/UITest/CocoStudioGUITest/GUIEditorTest.cpp \ Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp \ Classes/UITest/CocoStudioGUITest/UIScene.cpp \ Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp \ Classes/UITest/CocoStudioGUITest/UISceneManager.cpp \ Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp \ Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp \ diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp index 51fb94d967..5e0141dbd1 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp @@ -37,12 +37,23 @@ g_guisTests[] = UISceneManager* sceneManager = UISceneManager::sharedUISceneManager(); sceneManager->setCurrentUISceneId(KUIFocusTest_HBox); sceneManager->setMinUISceneId(KUIFocusTest_HBox); - //TODO: improve ListView focus sceneManager->setMaxUISceneId(KUIFocusTest_NestedLayout3); Scene* scene = sceneManager->currentUIScene(); Director::getInstance()->replaceScene(scene); } }, + { + "EditBox test", + [](Ref* sender) + { + UISceneManager* sceneManager = UISceneManager::sharedUISceneManager(); + sceneManager->setCurrentUISceneId(kUIEditBoxTest); + sceneManager->setMinUISceneId(kUIEditBoxTest); + sceneManager->setMaxUISceneId(kUIEditBoxTest); + Scene* scene = sceneManager->currentUIScene(); + Director::getInstance()->replaceScene(scene); + } + }, { "Scale9 Sprite Test", [](Ref* sender) diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp new file mode 100644 index 0000000000..30d7fcc822 --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp @@ -0,0 +1,137 @@ +/**************************************************************************** + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "UIEditBoxTest.h" +#include "testResource.h" + +// UIEditBoxTest +UIEditBoxTest::UIEditBoxTest() +{ + +} + +UIEditBoxTest::~UIEditBoxTest() +{ +} + +bool UIEditBoxTest::init() +{ + if (UIScene::init()) + { + auto glview = Director::getInstance()->getOpenGLView(); + auto visibleOrigin = glview->getVisibleOrigin(); + auto visibleSize = glview->getVisibleSize(); + + auto pBg = Sprite::create("Images/HelloWorld.png"); + pBg->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/2)); + addChild(pBg); + + _TTFShowEditReturn = Label::createWithSystemFont("No edit control return!", "Arial", 30); + _TTFShowEditReturn->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y + visibleSize.height - 50)); + addChild(_TTFShowEditReturn); + + + auto editBoxSize = Size(visibleSize.width - 100, 60); + + // top + std::string pNormalSprite = "extensions/green_edit.png"; + _editName = ui::EditBox::create(editBoxSize, pNormalSprite); + _editName->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height*3/4)); + _editName->setFontName("Paint Boy"); + _editName->setFontSize(25); + _editName->setFontColor(Color3B::RED); + _editName->setPlaceHolder("Name:"); + _editName->setPlaceholderFontColor(Color3B::WHITE); + _editName->setMaxLength(8); + _editName->setReturnType(ui::EditBox::KeyboardReturnType::DONE); + _editName->setDelegate(this); + addChild(_editName); + + // middle + _editPassword = ui::EditBox::create(editBoxSize, "extensions/orange_edit.png"); + _editPassword->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/2)); +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + _editPassword->setFont("American Typewriter", 30); +#else + _editPassword->setFont("American Typewriter", 80); + _editPassword->setPlaceholderFont("American Typewriter", 80); +#endif + _editPassword->setFontColor(Color3B::GREEN); + _editPassword->setPlaceHolder("Password:"); + _editPassword->setMaxLength(6); + _editPassword->setInputFlag(ui::EditBox::InputFlag::PASSWORD); + _editPassword->setInputMode(ui::EditBox::InputMode::SINGLE_LINE); + _editPassword->setDelegate(this); + addChild(_editPassword); + + // bottom + _editEmail = ui::EditBox::create(Size(editBoxSize.width, editBoxSize.height), "extensions/yellow_edit.png"); + _editEmail->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/4)); + _editEmail->setAnchorPoint(Vec2(0.5, 1.0f)); + _editEmail->setPlaceHolder("Email:"); + _editEmail->setInputMode(ui::EditBox::InputMode::EMAIL_ADDRESS); + _editEmail->setDelegate(this); + addChild(_editEmail); + + this->setPosition(Vec2(10, 20)); + + + + return true; + } + return false; +} + +void UIEditBoxTest::editBoxEditingDidBegin(cocos2d::ui::EditBox* editBox) +{ + log("editBox %p DidBegin !", editBox); +} + +void UIEditBoxTest::editBoxEditingDidEnd(cocos2d::ui::EditBox* editBox) +{ + log("editBox %p DidEnd !", editBox); +} + +void UIEditBoxTest::editBoxTextChanged(cocos2d::ui::EditBox* editBox, const std::string& text) +{ + log("editBox %p TextChanged, text: %s ", editBox, text.c_str()); +} + +void UIEditBoxTest::editBoxReturn(ui::EditBox* editBox) +{ + log("editBox %p was returned !",editBox); + + if (_editName == editBox) + { + _TTFShowEditReturn->setString("Name EditBox return !"); + } + else if (_editPassword == editBox) + { + _TTFShowEditReturn->setString("Password EditBox return !"); + } + else if (_editEmail == editBox) + { + _TTFShowEditReturn->setString("Email EditBox return !"); + } +} diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.h new file mode 100644 index 0000000000..3d93dd7717 --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.h @@ -0,0 +1,52 @@ +/**************************************************************************** + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __cocos2d_tests__UIEditBoxTest__ +#define __cocos2d_tests__UIEditBoxTest__ + +#include "UIScene.h" + +class UIEditBoxTest : public UIScene, public cocos2d::ui::EditBoxDelegate +{ +public: + UIEditBoxTest(); + ~UIEditBoxTest(); + bool init(); + + virtual void editBoxEditingDidBegin(cocos2d::ui::EditBox* editBox); + virtual void editBoxEditingDidEnd(cocos2d::ui::EditBox* editBox); + virtual void editBoxTextChanged(cocos2d::ui::EditBox* editBox, const std::string& text); + virtual void editBoxReturn(cocos2d::ui::EditBox* editBox); + + +protected: + cocos2d::Label* _TTFShowEditReturn; + cocos2d::ui::EditBox* _editName; + cocos2d::ui::EditBox* _editPassword; + cocos2d::ui::EditBox* _editEmail; + + UI_SCENE_CREATE_FUNC(UIEditBoxTest) +}; + +#endif /* defined(__cocos2d_tests__UIEditBoxTest__) */ diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.h index 28a1b172e7..51aa68a126 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.h @@ -31,7 +31,7 @@ USING_NS_CC; USING_NS_CC_EXT; -using namespace ui; +using namespace cocos2d::ui; #define UI_SCENE_CREATE_FUNC(UIScene) \ public: \ diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp index 11e781e255..ee0ff4e5b1 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp @@ -22,6 +22,7 @@ #include "UIVideoPlayerTest/UIVideoPlayerTest.h" #endif #include "UIScale9SpriteTest.h" +#include "UIEditBoxTest.h" USING_NS_CC; @@ -35,6 +36,7 @@ static const char* s_testArray[] = "UIButtonTest_RemoveSelf", "UIButtonTestSwitchScale9", "UIButtonTestZoomScale", + "UIEditBoxTest", "UICheckBoxTest", "UISliderTest", "UISliderTest_Scale9", @@ -369,6 +371,8 @@ Scene *UISceneManager::currentUIScene() return UIS9Flip::sceneWithTitle(s_testArray[_currentUISceneId]); case kUIS9ChangeAnchorPoint: return UIS9ChangeAnchorPoint::sceneWithTitle(s_testArray[_currentUISceneId]); + case kUIEditBoxTest: + return UIEditBoxTest::sceneWithTitle(s_testArray[_currentUISceneId]); } return nullptr; } diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h index 4361de611f..6562a722db 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h @@ -38,6 +38,7 @@ enum kUIButtonTest_RemoveSelf, kUIButtonTestSwitchScale9, kUIButtonTestZoomScale, + kUIEditBoxTest, kUICheckBoxTest, kUISliderTest, kUISliderTest_Scale9, diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index cd2cbd3f0a..0b80cec40e 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -204,6 +204,7 @@ + @@ -392,6 +393,7 @@ + diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters index e815660d53..7d7fc6199c 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters @@ -867,6 +867,9 @@ Classes\Sprite3DTest + + Classes\UITest\CocostudioGUISceneTest + @@ -1601,5 +1604,8 @@ Classes\Sprite3DTest + + Classes\UITest\CocostudioGUISceneTest + \ No newline at end of file diff --git a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj index c152ba0746..9d77c284f5 100644 --- a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj +++ b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj @@ -248,6 +248,7 @@ + @@ -449,6 +450,7 @@ + diff --git a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters index 5959863578..98b5c51559 100644 --- a/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters +++ b/tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters @@ -858,6 +858,9 @@ Classes\UITest\CocosStudioGUITest + + Classes\UITest\CocosStudioGUITest + @@ -1590,6 +1593,9 @@ Classes\UITest\CocosStudioGUITest + + Classes\UITest\CocosStudioGUITest + From 534938d88c22fd3349dda3f94299c84dc84ce3e4 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 19 Aug 2014 15:17:48 +0800 Subject: [PATCH 02/74] fix linux compile error --- tests/cpp-tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/cpp-tests/CMakeLists.txt b/tests/cpp-tests/CMakeLists.txt index 5dcfe748c8..81baa37543 100644 --- a/tests/cpp-tests/CMakeLists.txt +++ b/tests/cpp-tests/CMakeLists.txt @@ -82,6 +82,7 @@ set(SAMPLE_SRC Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp Classes/UITest/CocoStudioGUITest/UIScene.cpp Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp + Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp Classes/UITest/CocoStudioGUITest/UISceneManager.cpp Classes/UITest/CocoStudioGUITest/CocostudioParserTest/CocostudioParserJsonTest.cpp Classes/UITest/CocoStudioGUITest/CocostudioParserTest.cpp From a8ab1a85b71e175bc66ff7a785d0ebce3d238418 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 19 Aug 2014 17:42:17 +0800 Subject: [PATCH 03/74] fix linux compile error --- cocos/ui/CMakeLists.txt | 4 ++++ .../Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp | 2 ++ .../Classes/UITest/CocoStudioGUITest/UISceneManager.cpp | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/cocos/ui/CMakeLists.txt b/cocos/ui/CMakeLists.txt index 3ccdf27b25..132f7c4635 100644 --- a/cocos/ui/CMakeLists.txt +++ b/cocos/ui/CMakeLists.txt @@ -23,6 +23,10 @@ set(COCOS_UI_SRC UIWidget.cpp UIDeprecated.cpp UIScale9Sprite.cpp + UIEditBox/UIEditBox.cpp + UIEditBox/UIEditBoxImplAndroid.cpp + UIEditBox/UIEditBoxImplNone.cpp + UIEditBox/UIEditBoxImplWin.cpp ) include_directories( diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp index 5e0141dbd1..e3cd3c24fb 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp @@ -42,6 +42,7 @@ g_guisTests[] = Director::getInstance()->replaceScene(scene); } }, +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) { "EditBox test", [](Ref* sender) @@ -54,6 +55,7 @@ g_guisTests[] = Director::getInstance()->replaceScene(scene); } }, +#endif { "Scale9 Sprite Test", [](Ref* sender) diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp index ee0ff4e5b1..d552528b00 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp @@ -22,7 +22,9 @@ #include "UIVideoPlayerTest/UIVideoPlayerTest.h" #endif #include "UIScale9SpriteTest.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) #include "UIEditBoxTest.h" +#endif USING_NS_CC; @@ -36,7 +38,9 @@ static const char* s_testArray[] = "UIButtonTest_RemoveSelf", "UIButtonTestSwitchScale9", "UIButtonTestZoomScale", +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) "UIEditBoxTest", +#endif "UICheckBoxTest", "UISliderTest", "UISliderTest_Scale9", @@ -371,8 +375,11 @@ Scene *UISceneManager::currentUIScene() return UIS9Flip::sceneWithTitle(s_testArray[_currentUISceneId]); case kUIS9ChangeAnchorPoint: return UIS9ChangeAnchorPoint::sceneWithTitle(s_testArray[_currentUISceneId]); +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) case kUIEditBoxTest: return UIEditBoxTest::sceneWithTitle(s_testArray[_currentUISceneId]); +#endif + } return nullptr; } From 46f3ab9b571a0d7837ffb1d026a76d69d9649144 Mon Sep 17 00:00:00 2001 From: andyque Date: Wed, 20 Aug 2014 16:08:28 +0800 Subject: [PATCH 04/74] add Scale9Sprite to create method of ui::EditBox --- cocos/ui/UIEditBox/UIEditBox.cpp | 43 +++++++++++++++++++ cocos/ui/UIEditBox/UIEditBox.h | 9 ++++ .../CocoStudioGUITest/UIEditBoxTest.cpp | 2 +- 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/cocos/ui/UIEditBox/UIEditBox.cpp b/cocos/ui/UIEditBox/UIEditBox.cpp index 12723cdb6e..3d9034d372 100644 --- a/cocos/ui/UIEditBox/UIEditBox.cpp +++ b/cocos/ui/UIEditBox/UIEditBox.cpp @@ -84,6 +84,49 @@ EditBox* EditBox::create(const Size& size, return pRet; } + +EditBox* EditBox::create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *pNormal9SpriteBg) +{ + EditBox* pRet = new EditBox(); + + if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, pNormal9SpriteBg)) + { + pRet->autorelease(); + } + else + { + CC_SAFE_DELETE(pRet); + } + + return pRet; +} + +bool EditBox::initWithSizeAndBackgroundSprite(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *pNormal9SpriteBg) +{ + if (Widget::init()) + { + _editBoxImpl = __createSystemEditBox(this); + _editBoxImpl->initWithSize(size); + _editBoxImpl->setInputMode(EditBox::InputMode::ANY); + + _backgroundSprite = pNormal9SpriteBg; + + this->setContentSize(size); + this->setPosition(Vec2(0, 0)); + + _backgroundSprite->setPosition(Vec2(_contentSize.width/2, _contentSize.height/2)); + _backgroundSprite->setContentSize(size); + this->addProtectedChild(_backgroundSprite); + + this->setTouchEnabled(true); + + this->addTouchEventListener(CC_CALLBACK_2(EditBox::touchDownAction, this)); + + return true; + } + return false; +} + bool EditBox::initWithSizeAndBackgroundSprite(const Size& size, const std::string& pNormal9SpriteBg, diff --git a/cocos/ui/UIEditBox/UIEditBox.h b/cocos/ui/UIEditBox/UIEditBox.h index 335193fee8..61bbeab965 100644 --- a/cocos/ui/UIEditBox/UIEditBox.h +++ b/cocos/ui/UIEditBox/UIEditBox.h @@ -185,6 +185,13 @@ namespace ui { INTIAL_CAPS_ALL_CHARACTERS, }; + /** + * create a edit box with size. + * @return An autorelease pointer of EditBox, you don't need to release it only if you retain it again. + */ + static EditBox* create(const Size& size, + Scale9Sprite* pNormal9SpriteBg); + /** * create a edit box with size. * @return An autorelease pointer of EditBox, you don't need to release it only if you retain it again. @@ -214,6 +221,8 @@ namespace ui { const std::string& pNormal9SpriteBg, TextureResType texType = TextureResType::LOCAL); + bool initWithSizeAndBackgroundSprite(const Size& size, Scale9Sprite* pNormal9SpriteBg); + /** * Gets/Sets the delegate for edit box. * @lua NA diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp index 30d7fcc822..121f6a1fb0 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp @@ -56,7 +56,7 @@ bool UIEditBoxTest::init() // top std::string pNormalSprite = "extensions/green_edit.png"; - _editName = ui::EditBox::create(editBoxSize, pNormalSprite); + _editName = ui::EditBox::create(editBoxSize, ui::Scale9Sprite::create(pNormalSprite)); _editName->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height*3/4)); _editName->setFontName("Paint Boy"); _editName->setFontSize(25); From 2d8bec2ba92741056654691c738c850fa13d3de7 Mon Sep 17 00:00:00 2001 From: andyque Date: Wed, 20 Aug 2014 16:20:57 +0800 Subject: [PATCH 05/74] remove Extension EditBox --- build/cocos2d_libs.xcodeproj/project.pbxproj | 62 -- extensions/GUI/CCEditBox/CCEditBox.cpp | 435 ----------- extensions/GUI/CCEditBox/CCEditBox.h | 452 ------------ extensions/GUI/CCEditBox/CCEditBoxImpl.h | 104 --- .../GUI/CCEditBox/CCEditBoxImplAndroid.cpp | 315 -------- .../GUI/CCEditBox/CCEditBoxImplAndroid.h | 109 --- extensions/GUI/CCEditBox/CCEditBoxImplIOS.h | 143 ---- extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm | 674 ------------------ extensions/GUI/CCEditBox/CCEditBoxImplMac.h | 132 ---- extensions/GUI/CCEditBox/CCEditBoxImplMac.mm | 520 -------------- .../GUI/CCEditBox/CCEditBoxImplNone.cpp | 14 - extensions/GUI/CCEditBox/CCEditBoxImplWin.cpp | 298 -------- extensions/GUI/CCEditBox/CCEditBoxImplWin.h | 116 --- extensions/GUI/CCEditBox/CCEditBoxImplWp8.cpp | 303 -------- extensions/GUI/CCEditBox/CCEditBoxImplWp8.h | 87 --- extensions/cocos-ext.h | 2 +- .../EditBoxTest/EditBoxTest.cpp | 13 +- .../ExtensionsTest/EditBoxTest/EditBoxTest.h | 16 +- 18 files changed, 16 insertions(+), 3779 deletions(-) delete mode 100644 extensions/GUI/CCEditBox/CCEditBox.cpp delete mode 100644 extensions/GUI/CCEditBox/CCEditBox.h delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImpl.h delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplAndroid.cpp delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplAndroid.h delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplIOS.h delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplMac.h delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplMac.mm delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplNone.cpp delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplWin.cpp delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplWin.h delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplWp8.cpp delete mode 100644 extensions/GUI/CCEditBox/CCEditBoxImplWp8.h diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 0225d99ce9..83f7a98a31 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -731,19 +731,6 @@ 460E47AC18080904000CDD6D /* CCInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1684B1807AF4E005B8026 /* CCInvocation.h */; }; 460E47AD18080904000CDD6D /* CCScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684C1807AF4E005B8026 /* CCScale9Sprite.cpp */; }; 460E47AE18080904000CDD6D /* CCScale9Sprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1684D1807AF4E005B8026 /* CCScale9Sprite.h */; }; - 460E47AF1808090B000CDD6D /* CCEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684F1807AF4E005B8026 /* CCEditBox.cpp */; }; - 460E47B01808090B000CDD6D /* CCEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168501807AF4E005B8026 /* CCEditBox.h */; }; - 460E47B11808090B000CDD6D /* CCEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168511807AF4E005B8026 /* CCEditBoxImpl.h */; }; - 460E47BD1808090D000CDD6D /* CCEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684F1807AF4E005B8026 /* CCEditBox.cpp */; }; - 460E47BE1808090D000CDD6D /* CCEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168501807AF4E005B8026 /* CCEditBox.h */; }; - 460E47BF1808090D000CDD6D /* CCEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168511807AF4E005B8026 /* CCEditBoxImpl.h */; }; - 460E47C01808090D000CDD6D /* CCEditBoxImplAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168521807AF4E005B8026 /* CCEditBoxImplAndroid.cpp */; }; - 460E47C11808090D000CDD6D /* CCEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */; }; - 460E47C21808090D000CDD6D /* CCEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */; }; - 460E47C31808090D000CDD6D /* CCEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */; }; - 460E47C61808090D000CDD6D /* CCEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */; }; - 460E47C91808090D000CDD6D /* CCEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */; }; - 460E47CA1808090D000CDD6D /* CCEditBoxImplWin.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */; }; 460E47CB18080913000CDD6D /* CCScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */; }; 460E47CC18080913000CDD6D /* CCScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685F1807AF4E005B8026 /* CCScrollView.h */; }; 460E47CF18080913000CDD6D /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168621807AF4E005B8026 /* CCTableView.cpp */; }; @@ -1365,8 +1352,6 @@ B276EF651988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B276EF5E1988D1D500CD400F /* CCVertexIndexBuffer.cpp */; }; B276EF661988D1D500CD400F /* CCVertexIndexBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B276EF5E1988D1D500CD400F /* CCVertexIndexBuffer.cpp */; }; B27AEE0219768934008BD575 /* libwebsockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AAF5384180E35A3000584C8 /* libwebsockets.a */; }; - B282B4801980E08F00666787 /* CCEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = B282B47D1980E02B00666787 /* CCEditBoxImplMac.h */; }; - B282B4811980E0A300666787 /* CCEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B282B47C1980E02B00666787 /* CCEditBoxImplMac.mm */; }; B29594B41926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594B21926D5EC003EEF37 /* CCMeshCommand.cpp */; }; B29594B51926D5EC003EEF37 /* CCMeshCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B29594B21926D5EC003EEF37 /* CCMeshCommand.cpp */; }; B29594B61926D5EC003EEF37 /* CCMeshCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B29594B31926D5EC003EEF37 /* CCMeshCommand.h */; }; @@ -2629,16 +2614,6 @@ 46A1684B1807AF4E005B8026 /* CCInvocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCInvocation.h; sourceTree = ""; }; 46A1684C1807AF4E005B8026 /* CCScale9Sprite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCScale9Sprite.cpp; sourceTree = ""; }; 46A1684D1807AF4E005B8026 /* CCScale9Sprite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCScale9Sprite.h; sourceTree = ""; }; - 46A1684F1807AF4E005B8026 /* CCEditBox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBox.cpp; sourceTree = ""; }; - 46A168501807AF4E005B8026 /* CCEditBox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBox.h; sourceTree = ""; }; - 46A168511807AF4E005B8026 /* CCEditBoxImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImpl.h; sourceTree = ""; }; - 46A168521807AF4E005B8026 /* CCEditBoxImplAndroid.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplAndroid.cpp; sourceTree = ""; }; - 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplAndroid.h; sourceTree = ""; }; - 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplIOS.h; sourceTree = ""; }; - 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CCEditBoxImplIOS.mm; sourceTree = ""; }; - 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplNone.cpp; sourceTree = ""; }; - 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplWin.cpp; sourceTree = ""; }; - 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplWin.h; sourceTree = ""; }; 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCScrollView.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 46A1685F1807AF4E005B8026 /* CCScrollView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCScrollView.h; sourceTree = ""; }; 46A168621807AF4E005B8026 /* CCTableView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableView.cpp; sourceTree = ""; }; @@ -3103,8 +3078,6 @@ B276EF5C1988D1D500CD400F /* CCVertexIndexData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVertexIndexData.cpp; sourceTree = ""; }; B276EF5D1988D1D500CD400F /* CCVertexIndexBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVertexIndexBuffer.h; sourceTree = ""; }; B276EF5E1988D1D500CD400F /* CCVertexIndexBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVertexIndexBuffer.cpp; sourceTree = ""; }; - B282B47C1980E02B00666787 /* CCEditBoxImplMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCEditBoxImplMac.mm; sourceTree = ""; }; - B282B47D1980E02B00666787 /* CCEditBoxImplMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplMac.h; sourceTree = ""; }; B29594AF1926D5D9003EEF37 /* ccShader_3D_Color.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Color.frag; sourceTree = ""; }; B29594B01926D5D9003EEF37 /* ccShader_3D_ColorTex.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_ColorTex.frag; sourceTree = ""; }; B29594B11926D5D9003EEF37 /* ccShader_3D_PositionTex.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_PositionTex.vert; sourceTree = ""; }; @@ -4596,7 +4569,6 @@ isa = PBXGroup; children = ( 46A168341807AF4E005B8026 /* CCControlExtension */, - 46A1684E1807AF4E005B8026 /* CCEditBox */, 46A1685D1807AF4E005B8026 /* CCScrollView */, ); path = GUI; @@ -4634,25 +4606,6 @@ path = CCControlExtension; sourceTree = ""; }; - 46A1684E1807AF4E005B8026 /* CCEditBox */ = { - isa = PBXGroup; - children = ( - B282B47C1980E02B00666787 /* CCEditBoxImplMac.mm */, - B282B47D1980E02B00666787 /* CCEditBoxImplMac.h */, - 46A1684F1807AF4E005B8026 /* CCEditBox.cpp */, - 46A168501807AF4E005B8026 /* CCEditBox.h */, - 46A168511807AF4E005B8026 /* CCEditBoxImpl.h */, - 46A168521807AF4E005B8026 /* CCEditBoxImplAndroid.cpp */, - 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */, - 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */, - 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */, - 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */, - 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */, - 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */, - ); - path = CCEditBox; - sourceTree = ""; - }; 46A1685D1807AF4E005B8026 /* CCScrollView */ = { isa = PBXGroup; children = ( @@ -5774,15 +5727,12 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - B282B4801980E08F00666787 /* CCEditBoxImplMac.h in Headers */, 460E478318080902000CDD6D /* CCControlExtensions.h in Headers */, 460E477E18080902000CDD6D /* CCControl.h in Headers */, - 460E47B11808090B000CDD6D /* CCEditBoxImpl.h in Headers */, 460E477B180808F5000CDD6D /* ExtensionMacros.h in Headers */, 460E479118080902000CDD6D /* CCControlUtils.h in Headers */, 460E468118080832000CDD6D /* cocos-ext.h in Headers */, 460E47CC18080913000CDD6D /* CCScrollView.h in Headers */, - 460E47B01808090B000CDD6D /* CCEditBox.h in Headers */, 460E478918080902000CDD6D /* CCControlSaturationBrightnessPicker.h in Headers */, 460E47D018080913000CDD6D /* CCTableView.h in Headers */, 460E478F18080902000CDD6D /* CCControlSwitch.h in Headers */, @@ -6044,13 +5994,10 @@ 460E47A418080904000CDD6D /* CCControlSlider.h in Headers */, 460E479E18080904000CDD6D /* CCControlHuePicker.h in Headers */, 460E468218080836000CDD6D /* cocos-ext.h in Headers */, - 460E47BF1808090D000CDD6D /* CCEditBoxImpl.h in Headers */, 460E47AE18080904000CDD6D /* CCScale9Sprite.h in Headers */, 460E477C180808F7000CDD6D /* ExtensionMacros.h in Headers */, 460E47A218080904000CDD6D /* CCControlSaturationBrightnessPicker.h in Headers */, 460E479B18080904000CDD6D /* CCControlColourPicker.h in Headers */, - 460E47C11808090D000CDD6D /* CCEditBoxImplAndroid.h in Headers */, - 460E47CA1808090D000CDD6D /* CCEditBoxImplWin.h in Headers */, 460E47AA18080904000CDD6D /* CCControlUtils.h in Headers */, 460E47A818080904000CDD6D /* CCControlSwitch.h in Headers */, 460E47D818080914000CDD6D /* CCTableView.h in Headers */, @@ -6059,8 +6006,6 @@ 460E47DA18080914000CDD6D /* CCTableViewCell.h in Headers */, 460E47AC18080904000CDD6D /* CCInvocation.h in Headers */, 460E47A018080904000CDD6D /* CCControlPotentiometer.h in Headers */, - 460E47BE1808090D000CDD6D /* CCEditBox.h in Headers */, - 460E47C21808090D000CDD6D /* CCEditBoxImplIOS.h in Headers */, 1AD71EF3180E27CF00808F54 /* CCPhysicsDebugNode.h in Headers */, 1AD71EF7180E27CF00808F54 /* CCPhysicsSprite.h in Headers */, 1AAF5356180E3060000584C8 /* AssetsManager.h in Headers */, @@ -7303,7 +7248,6 @@ buildActionMask = 2147483647; files = ( 460E477D18080902000CDD6D /* CCControl.cpp in Sources */, - B282B4811980E0A300666787 /* CCEditBoxImplMac.mm in Sources */, 460E47CB18080913000CDD6D /* CCScrollView.cpp in Sources */, 460E47D118080913000CDD6D /* CCTableViewCell.cpp in Sources */, 460E47CF18080913000CDD6D /* CCTableView.cpp in Sources */, @@ -7315,7 +7259,6 @@ 460E478E18080902000CDD6D /* CCControlSwitch.cpp in Sources */, 460E479218080902000CDD6D /* CCInvocation.cpp in Sources */, 460E477F18080902000CDD6D /* CCControlButton.cpp in Sources */, - 460E47AF1808090B000CDD6D /* CCEditBox.cpp in Sources */, 460E479418080902000CDD6D /* CCScale9Sprite.cpp in Sources */, 460E478118080902000CDD6D /* CCControlColourPicker.cpp in Sources */, 460E479018080902000CDD6D /* CCControlUtils.cpp in Sources */, @@ -7526,12 +7469,8 @@ buildActionMask = 2147483647; files = ( 460E47D918080914000CDD6D /* CCTableViewCell.cpp in Sources */, - 460E47C01808090D000CDD6D /* CCEditBoxImplAndroid.cpp in Sources */, 460E47A118080904000CDD6D /* CCControlSaturationBrightnessPicker.cpp in Sources */, - 460E47BD1808090D000CDD6D /* CCEditBox.cpp in Sources */, - 460E47C61808090D000CDD6D /* CCEditBoxImplNone.cpp in Sources */, 460E47D318080914000CDD6D /* CCScrollView.cpp in Sources */, - 460E47C91808090D000CDD6D /* CCEditBoxImplWin.cpp in Sources */, 460E47A918080904000CDD6D /* CCControlUtils.cpp in Sources */, 460E47D718080914000CDD6D /* CCTableView.cpp in Sources */, 460E479F18080904000CDD6D /* CCControlPotentiometer.cpp in Sources */, @@ -7540,7 +7479,6 @@ 460E47A318080904000CDD6D /* CCControlSlider.cpp in Sources */, 460E47AB18080904000CDD6D /* CCInvocation.cpp in Sources */, 460E47AD18080904000CDD6D /* CCScale9Sprite.cpp in Sources */, - 460E47C31808090D000CDD6D /* CCEditBoxImplIOS.mm in Sources */, 460E47A718080904000CDD6D /* CCControlSwitch.cpp in Sources */, 460E479618080904000CDD6D /* CCControl.cpp in Sources */, 460E47A518080904000CDD6D /* CCControlStepper.cpp in Sources */, diff --git a/extensions/GUI/CCEditBox/CCEditBox.cpp b/extensions/GUI/CCEditBox/CCEditBox.cpp deleted file mode 100644 index 97c34951c7..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBox.cpp +++ /dev/null @@ -1,435 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "CCEditBox.h" -#include "CCEditBoxImpl.h" - -NS_CC_EXT_BEGIN - -static const float CHECK_EDITBOX_POSITION_INTERVAL = 0.1f; - -EditBox::EditBox(void) -: _editBoxImpl(nullptr) -, _delegate(nullptr) -, _editBoxInputMode(EditBox::InputMode::SINGLE_LINE) -, _editBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS) -, _keyboardReturnType(KeyboardReturnType::DEFAULT) -, _fontSize(-1) -, _placeholderFontSize(-1) -, _colText(Color3B::WHITE) -, _colPlaceHolder(Color3B::GRAY) -, _maxLength(0) -, _adjustHeight(0.0f) -#if CC_ENABLE_SCRIPT_BINDING -, _scriptEditBoxHandler(0) -#endif -{ -} - -EditBox::~EditBox(void) -{ - CC_SAFE_DELETE(_editBoxImpl); -#if CC_ENABLE_SCRIPT_BINDING - unregisterScriptEditBoxHandler(); -#endif -} - - -void EditBox::touchDownAction(Ref *sender, Control::EventType controlEvent) -{ - _editBoxImpl->openKeyboard(); -} - -EditBox* EditBox::create(const Size& size, Scale9Sprite* pNormal9SpriteBg, Scale9Sprite* pPressed9SpriteBg/* = nullptr*/, Scale9Sprite* pDisabled9SpriteBg/* = nullptr*/) -{ - EditBox* pRet = new EditBox(); - - if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, pNormal9SpriteBg)) - { - if (pPressed9SpriteBg != nullptr) - { - pRet->setBackgroundSpriteForState(pPressed9SpriteBg, Control::State::HIGH_LIGHTED); - } - - if (pDisabled9SpriteBg != nullptr) - { - pRet->setBackgroundSpriteForState(pDisabled9SpriteBg, Control::State::DISABLED); - } - pRet->autorelease(); - } - else - { - CC_SAFE_DELETE(pRet); - } - - return pRet; -} - -bool EditBox::initWithSizeAndBackgroundSprite(const Size& size, Scale9Sprite* pPressed9SpriteBg) -{ - if (ControlButton::initWithBackgroundSprite(pPressed9SpriteBg)) - { - _editBoxImpl = __createSystemEditBox(this); - _editBoxImpl->initWithSize(size); - _editBoxImpl->setInputMode(EditBox::InputMode::ANY); - - this->setZoomOnTouchDown(false); - this->setPreferredSize(size); - this->setPosition(Vec2(0, 0)); - this->addTargetWithActionForControlEvent(this, cccontrol_selector(EditBox::touchDownAction), Control::EventType::TOUCH_UP_INSIDE); - - return true; - } - return false; -} - -void EditBox::setDelegate(EditBoxDelegate* pDelegate) -{ - _delegate = pDelegate; - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setDelegate(pDelegate); - } -} - -EditBoxDelegate* EditBox::getDelegate() -{ - return _delegate; -} - -void EditBox::setText(const char* pText) -{ - if (pText != nullptr) - { - _text = pText; - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setText(pText); - } - } -} - -const char* EditBox::getText(void) -{ - if (_editBoxImpl != nullptr) - { - const char* pText = _editBoxImpl->getText(); - if(pText != nullptr) - return pText; - } - - return ""; -} - -void EditBox::setFont(const char* pFontName, int fontSize) -{ - _fontName = pFontName; - _fontSize = fontSize; - if (pFontName != nullptr) - { - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setFont(pFontName, fontSize); - } - } -} - -void EditBox::setFontName(const char* pFontName) -{ - _fontName = pFontName; - if (_editBoxImpl != nullptr && _fontSize != -1) - { - _editBoxImpl->setFont(pFontName, _fontSize); - } -} - -void EditBox::setFontSize(int fontSize) -{ - _fontSize = fontSize; - if (_editBoxImpl != nullptr && _fontName.length() > 0) - { - _editBoxImpl->setFont(_fontName.c_str(), _fontSize); - } -} - -void EditBox::setFontColor(const Color3B& color) -{ - _colText = color; - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setFontColor(color); - } -} - -void EditBox::setPlaceholderFont(const char* pFontName, int fontSize) -{ - _placeholderFontName = pFontName; - _placeholderFontSize = fontSize; - if (pFontName != nullptr) - { - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setPlaceholderFont(pFontName, fontSize); - } - } -} - -void EditBox::setPlaceholderFontName(const char* pFontName) -{ - _placeholderFontName = pFontName; - if (_editBoxImpl != nullptr && _placeholderFontSize != -1) - { - _editBoxImpl->setPlaceholderFont(pFontName, _fontSize); - } -} - -void EditBox::setPlaceholderFontSize(int fontSize) -{ - _placeholderFontSize = fontSize; - if (_editBoxImpl != nullptr && _placeholderFontName.length() > 0) - { - _editBoxImpl->setPlaceholderFont(_placeholderFontName.c_str(), _fontSize); - } -} - -void EditBox::setPlaceholderFontColor(const Color3B& color) -{ - _colText = color; - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setPlaceholderFontColor(color); - } -} - -void EditBox::setPlaceHolder(const char* pText) -{ - if (pText != nullptr) - { - _placeHolder = pText; - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setPlaceHolder(pText); - } - } -} - -const char* EditBox::getPlaceHolder(void) -{ - return _placeHolder.c_str(); -} - -void EditBox::setInputMode(EditBox::InputMode inputMode) -{ - _editBoxInputMode = inputMode; - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setInputMode(inputMode); - } -} - -void EditBox::setMaxLength(int maxLength) -{ - _maxLength = maxLength; - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setMaxLength(maxLength); - } -} - - -int EditBox::getMaxLength() -{ - return _maxLength; -} - -void EditBox::setInputFlag(EditBox::InputFlag inputFlag) -{ - _editBoxInputFlag = inputFlag; - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setInputFlag(inputFlag); - } -} - -void EditBox::setReturnType(EditBox::KeyboardReturnType returnType) -{ - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setReturnType(returnType); - } -} - -/* override function */ -void EditBox::setPosition(const Vec2& pos) -{ - ControlButton::setPosition(pos); - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setPosition(pos); - } -} - -void EditBox::setVisible(bool visible) -{ - ControlButton::setVisible(visible); - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setVisible(visible); - } -} - -void EditBox::setContentSize(const Size& size) -{ - ControlButton::setContentSize(size); - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setContentSize(size); - } -} - -void EditBox::setAnchorPoint(const Vec2& anchorPoint) -{ - ControlButton::setAnchorPoint(anchorPoint); - if (_editBoxImpl != nullptr) - { - _editBoxImpl->setAnchorPoint(anchorPoint); - } -} - -void EditBox::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) -{ - ControlButton::visit(renderer, parentTransform, parentFlags); - if (_editBoxImpl != nullptr) - { - _editBoxImpl->visit(); - } -} - -void EditBox::onEnter(void) -{ -#if CC_ENABLE_SCRIPT_BINDING - if (_scriptType == kScriptTypeJavascript) - { - if (ScriptEngineManager::sendNodeEventToJSExtended(this, kNodeOnEnter)) - return; - } -#endif - - ControlButton::onEnter(); - if (_editBoxImpl != nullptr) - { - _editBoxImpl->onEnter(); - } -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - this->schedule(schedule_selector(EditBox::updatePosition), CHECK_EDITBOX_POSITION_INTERVAL); -#endif -} - -void EditBox::updatePosition(float dt) -{ - if (nullptr != _editBoxImpl) { - _editBoxImpl->updatePosition(dt); - } -} - - -void EditBox::onExit(void) -{ - ControlButton::onExit(); - if (_editBoxImpl != nullptr) - { - // remove system edit control - _editBoxImpl->closeKeyboard(); - } -} - -static Rect getRect(Node * pNode) -{ - Size contentSize = pNode->getContentSize(); - Rect rect = Rect(0, 0, contentSize.width, contentSize.height); - return RectApplyTransform(rect, pNode->getNodeToWorldTransform()); -} - -void EditBox::keyboardWillShow(IMEKeyboardNotificationInfo& info) -{ - // CCLOG("CCEditBox::keyboardWillShow"); - Rect rectTracked = getRect(this); - // some adjustment for margin between the keyboard and the edit box. - rectTracked.origin.y -= 4; - - // if the keyboard area doesn't intersect with the tracking node area, nothing needs to be done. - if (!rectTracked.intersectsRect(info.end)) - { - CCLOG("needn't to adjust view layout."); - return; - } - - // assume keyboard at the bottom of screen, calculate the vertical adjustment. - _adjustHeight = info.end.getMaxY() - rectTracked.getMinY(); - // CCLOG("CCEditBox:needAdjustVerticalPosition(%f)", _adjustHeight); - - if (_editBoxImpl != nullptr) - { - _editBoxImpl->doAnimationWhenKeyboardMove(info.duration, _adjustHeight); - } -} - -void EditBox::keyboardDidShow(IMEKeyboardNotificationInfo& info) -{ - -} - -void EditBox::keyboardWillHide(IMEKeyboardNotificationInfo& info) -{ - // CCLOG("CCEditBox::keyboardWillHide"); - if (_editBoxImpl != nullptr) - { - _editBoxImpl->doAnimationWhenKeyboardMove(info.duration, -_adjustHeight); - } -} - -void EditBox::keyboardDidHide(IMEKeyboardNotificationInfo& info) -{ - -} - -#if CC_ENABLE_SCRIPT_BINDING -void EditBox::registerScriptEditBoxHandler(int handler) -{ - unregisterScriptEditBoxHandler(); - _scriptEditBoxHandler = handler; -} - -void EditBox::unregisterScriptEditBoxHandler(void) -{ - if (0 != _scriptEditBoxHandler) - { - ScriptEngineManager::getInstance()->getScriptEngine()->removeScriptHandler(_scriptEditBoxHandler); - _scriptEditBoxHandler = 0; - } -} -#endif - -NS_CC_EXT_END diff --git a/extensions/GUI/CCEditBox/CCEditBox.h b/extensions/GUI/CCEditBox/CCEditBox.h deleted file mode 100644 index 9203cbfaac..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBox.h +++ /dev/null @@ -1,452 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEDITTEXT_H__ -#define __CCEDITTEXT_H__ - -#include "base/CCIMEDelegate.h" -#include "extensions/ExtensionMacros.h" -#include "../CCControlExtension/CCControlExtensions.h" -#include "extensions/ExtensionExport.h" - -NS_CC_EXT_BEGIN - -class EditBox; -class EditBoxImpl; - - -class CC_EX_DLL EditBoxDelegate -{ -public: - /** - * @js NA - * @lua NA - */ - virtual ~EditBoxDelegate() {}; - - /** - * This method is called when an edit box gains focus after keyboard is shown. - * @param editBox The edit box object that generated the event. - * @js NA - * @lua NA - */ - virtual void editBoxEditingDidBegin(EditBox* editBox) {}; - - - /** - * This method is called when an edit box loses focus after keyboard is hidden. - * @param editBox The edit box object that generated the event. - * @js NA - * @lua NA - */ - virtual void editBoxEditingDidEnd(EditBox* editBox) {}; - - /** - * This method is called when the edit box text was changed. - * @param editBox The edit box object that generated the event. - * @param text The new text. - * @js NA - * @lua NA - */ - virtual void editBoxTextChanged(EditBox* editBox, const std::string& text) {}; - - /** - * This method is called when the return button was pressed or the outside area of keyboard was touched. - * @param editBox The edit box object that generated the event. - * @js NA - * @lua NA - */ - virtual void editBoxReturn(EditBox* editBox) = 0; - -}; - -/** - * \brief Class for edit box. - * - * You can use this widget to gather small amounts of text from the user. - * - */ - -class CC_EX_DLL EditBox -: public ControlButton -, public IMEDelegate -{ -public: - enum class KeyboardReturnType - { - DEFAULT, - DONE, - SEND, - SEARCH, - GO - }; - - /** - * \brief The EditBox::InputMode defines the type of text that the user is allowed - * to enter. - */ - enum class InputMode - { - /** - * The user is allowed to enter any text, including line breaks. - */ - ANY, - - /** - * The user is allowed to enter an e-mail address. - */ - EMAIL_ADDRESS, - - /** - * The user is allowed to enter an integer value. - */ - NUMERIC, - - /** - * The user is allowed to enter a phone number. - */ - PHONE_NUMBER, - - /** - * The user is allowed to enter a URL. - */ - URL, - - /** - * The user is allowed to enter a real number value. - * This extends kEditBoxInputModeNumeric by allowing a decimal point. - */ - DECIMAL, - - /** - * The user is allowed to enter any text, except for line breaks. - */ - SINGLE_LINE, - }; - - /** - * \brief The EditBox::InputFlag defines how the input text is displayed/formatted. - */ - enum class InputFlag - { - /** - * Indicates that the text entered is confidential data that should be - * obscured whenever possible. This implies EDIT_BOX_INPUT_FLAG_SENSITIVE. - */ - PASSWORD, - - /** - * Indicates that the text entered is sensitive data that the - * implementation must never store into a dictionary or table for use - * in predictive, auto-completing, or other accelerated input schemes. - * A credit card number is an example of sensitive data. - */ - SENSITIVE, - - /** - * This flag is a hint to the implementation that during text editing, - * the initial letter of each word should be capitalized. - */ - INITIAL_CAPS_WORD, - - /** - * This flag is a hint to the implementation that during text editing, - * the initial letter of each sentence should be capitalized. - */ - INITIAL_CAPS_SENTENCE, - - /** - * Capitalize all characters automatically. - */ - INTIAL_CAPS_ALL_CHARACTERS, - }; - - /** - * create a edit box with size. - * @return An autorelease pointer of EditBox, you don't need to release it only if you retain it again. - */ - static EditBox* create(const Size& size, Scale9Sprite* pNormal9SpriteBg, Scale9Sprite* pPressed9SpriteBg = NULL, Scale9Sprite* pDisabled9SpriteBg = NULL); - - /** - * Constructor. - * @js ctor - */ - EditBox(void); - - /** - * Destructor. - * @js NA - * @lua NA - */ - virtual ~EditBox(void); - - /** - * Init edit box with specified size. This method should be invoked right after constructor. - * @param size The size of edit box. - */ - bool initWithSizeAndBackgroundSprite(const Size& size, Scale9Sprite* pNormal9SpriteBg); - - /** - * Gets/Sets the delegate for edit box. - * @lua NA - */ - void setDelegate(EditBoxDelegate* pDelegate); - /** - * @js NA - * @lua NA - */ - EditBoxDelegate* getDelegate(); - -#if CC_ENABLE_SCRIPT_BINDING - /** - * 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 - */ - void registerScriptEditBoxHandler(int handler); - - /** - * Unregisters a script function that will be called for EditBox events. - * @js NA - * @lua NA - */ - void unregisterScriptEditBoxHandler(void); - /** - * get a script Handler - * @js NA - * @lua NA - */ - int getScriptEditBoxHandler(void){ return _scriptEditBoxHandler ;} - -#endif // #if CC_ENABLE_SCRIPT_BINDING - - /** - * Set the text entered in the edit box. - * @param pText The given text. - */ - void setText(const char* pText); - - /** - * Get the text entered in the edit box. - * @return The text entered in the edit box. - */ - const char* getText(void); - - /** - * Set the font. - * @param pFontName The font name. - * @param fontSize The font size. - */ - void setFont(const char* pFontName, int fontSize); - - /** - * Set the font name. - * @param pFontName The font name. - */ - void setFontName(const char* pFontName); - - /** - * Set the font size. - * @param fontSize The font size. - */ - void setFontSize(int fontSize); - - /** - * Set the font color of the widget's text. - */ - void setFontColor(const Color3B& color); - - /** - * Set the placeholder's font. - * @param pFontName The font name. - * @param fontSize The font size. - */ - void setPlaceholderFont(const char* pFontName, int fontSize); - - /** - * Set the placeholder's font name. - * @param pFontName The font name. - */ - void setPlaceholderFontName(const char* pFontName); - - /** - * Set the placeholder's font size. - * @param fontSize The font size. - */ - void setPlaceholderFontSize(int fontSize); - - /** - * Set the font color of the placeholder text when the edit box is empty. - * Not supported on IOS. - */ - void setPlaceholderFontColor(const Color3B& color); - - /** - * Set a text in the edit box that acts as a placeholder when an - * edit box is empty. - * @param pText The given text. - */ - void setPlaceHolder(const char* pText); - - /** - * Get a text in the edit box that acts as a placeholder when an - * edit box is empty. - */ - const char* getPlaceHolder(void); - - /** - * Set the input mode of the edit box. - * @param inputMode One of the EditBox::InputMode constants. - */ - void setInputMode(InputMode inputMode); - - /** - * 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. - */ - void setMaxLength(int maxLength); - - /** - * Gets the maximum input length of the edit box. - * - * @return Maximum input length. - */ - int getMaxLength(); - - /** - * Set the input flags that are to be applied to the edit box. - * @param inputFlag One of the EditBox::InputFlag constants. - */ - void setInputFlag(InputFlag inputFlag); - - /** - * Set the return type that are to be applied to the edit box. - * @param returnType One of the EditBox::KeyboardReturnType constants. - */ - void setReturnType(EditBox::KeyboardReturnType returnType); - - /* override functions */ - virtual void setPosition(const Vec2& pos) override; - virtual void setVisible(bool visible) override; - virtual void setContentSize(const Size& size) override; - virtual void setAnchorPoint(const Vec2& anchorPoint) override; - /** - * @js NA - * @lua NA - */ - virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override; - /** - * @js NA - * @lua NA - */ - virtual void onEnter(void) override; - /** - * @js NA - * @lua NA - */ - virtual void onExit(void) override; - /** - * @js NA - * @lua NA - */ - virtual void keyboardWillShow(IMEKeyboardNotificationInfo& info) override; - /** - * @js NA - * @lua NA - */ - virtual void keyboardDidShow(IMEKeyboardNotificationInfo& info) override; - /** - * @js NA - * @lua NA - */ - virtual void keyboardWillHide(IMEKeyboardNotificationInfo& info) override; - /** - * @js NA - * @lua NA - */ - virtual void keyboardDidHide(IMEKeyboardNotificationInfo& info) override; - - /* callback funtions - * @js NA - * @lua NA - */ - void touchDownAction(Ref *sender, Control::EventType controlEvent); - -protected: - void updatePosition(float dt); - EditBoxImpl* _editBoxImpl; - EditBoxDelegate* _delegate; - - InputMode _editBoxInputMode; - InputFlag _editBoxInputFlag; - EditBox::KeyboardReturnType _keyboardReturnType; - - std::string _text; - std::string _placeHolder; - - std::string _fontName; - std::string _placeholderFontName; - - int _fontSize; - int _placeholderFontSize; - - Color3B _colText; - Color3B _colPlaceHolder; - - int _maxLength; - float _adjustHeight; -#if CC_ENABLE_SCRIPT_BINDING - int _scriptEditBoxHandler; -#endif -}; - -NS_CC_EXT_END - -#endif /* __CCEDITTEXT_H__ */ - diff --git a/extensions/GUI/CCEditBox/CCEditBoxImpl.h b/extensions/GUI/CCEditBox/CCEditBoxImpl.h deleted file mode 100644 index 79d3d8f3fa..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImpl.h +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEditBoxIMPL_H__ -#define __CCEditBoxIMPL_H__ - -#include "extensions/ExtensionMacros.h" -#include "CCEditBox.h" -#include "extensions/ExtensionExport.h" - -NS_CC_EXT_BEGIN - - -class CC_EX_DLL EditBoxImpl -{ -public: - /** - * @js NA - */ - EditBoxImpl(EditBox* pEditBox) : _delegate(nullptr),_editBox(pEditBox) {} - /** - * @js NA - * @lua NA - */ - virtual ~EditBoxImpl() {} - - virtual bool initWithSize(const Size& size) = 0; - virtual void setFont(const char* pFontName, int fontSize) = 0; - virtual void setFontColor(const Color3B& color) = 0; - virtual void setPlaceholderFont(const char* pFontName, int fontSize) = 0; - virtual void setPlaceholderFontColor(const Color3B& color) = 0; - virtual void setInputMode(EditBox::InputMode inputMode) = 0; - virtual void setInputFlag(EditBox::InputFlag inputFlag) = 0; - virtual void setMaxLength(int maxLength) = 0; - virtual int getMaxLength() = 0; - virtual void setReturnType(EditBox::KeyboardReturnType returnType) = 0; - virtual bool isEditing() = 0; - - virtual void setText(const char* pText) = 0; - virtual const char* getText(void) = 0; - virtual void setPlaceHolder(const char* pText) = 0; - virtual void doAnimationWhenKeyboardMove(float duration, float distance) = 0; - - virtual void openKeyboard() = 0; - virtual void closeKeyboard() = 0; - - virtual void setPosition(const Vec2& pos) = 0; - virtual void setVisible(bool visible) = 0; - virtual void setContentSize(const Size& size) = 0; - virtual void setAnchorPoint(const Vec2& anchorPoint) = 0; - - /** - * check the editbox's position, update it when needed - */ - virtual void updatePosition(float dt){}; - /** - * @js NA - * @lua NA - */ - virtual void visit(void) = 0; - /** - * @js NA - * @lua NA - */ - virtual void onEnter(void) = 0; - - - void setDelegate(EditBoxDelegate* pDelegate) { _delegate = pDelegate; }; - EditBoxDelegate* getDelegate() { return _delegate; }; - EditBox* getEditBox() { return _editBox; }; -protected: - EditBoxDelegate* _delegate; - EditBox* _editBox; -}; - -// This method must be implemented at each subclass of EditBoxImpl. -extern EditBoxImpl* __createSystemEditBox(EditBox* pEditBox); - - -NS_CC_EXT_END - -#endif /* __CCEditBoxIMPL_H__ */ diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplAndroid.cpp b/extensions/GUI/CCEditBox/CCEditBoxImplAndroid.cpp deleted file mode 100644 index e610819d17..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplAndroid.cpp +++ /dev/null @@ -1,315 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "CCEditBoxImplAndroid.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - -#include "CCEditBox.h" -#include "jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.h" -#include "jni/Java_org_cocos2dx_lib_Cocos2dxHelper.h" - - -NS_CC_EXT_BEGIN - -EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) -{ - return new EditBoxImplAndroid(pEditBox); -} - -EditBoxImplAndroid::EditBoxImplAndroid(EditBox* pEditText) -: EditBoxImpl(pEditText) -, _label(nullptr) -, _labelPlaceHolder(nullptr) -, _editBoxInputMode(EditBox::InputMode::SINGLE_LINE) -, _editBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS) -, _keyboardReturnType(EditBox::KeyboardReturnType::DEFAULT) -, _colText(Color3B::WHITE) -, _colPlaceHolder(Color3B::GRAY) -, _maxLength(-1) -{ - -} - -EditBoxImplAndroid::~EditBoxImplAndroid() -{ - -} - -void EditBoxImplAndroid::doAnimationWhenKeyboardMove(float duration, float distance) -{ // don't need to be implemented on android platform. - -} - -static const int CC_EDIT_BOX_PADDING = 5; - -bool EditBoxImplAndroid::initWithSize(const Size& size) -{ - int fontSize = getFontSizeAccordingHeightJni(size.height-12); - _label = Label::create(); - _label->setSystemFontSize(size.height-12); - // align the text vertically center - _label->setAnchorPoint(Vec2(0, 0.5f)); - _label->setPosition(Vec2(CC_EDIT_BOX_PADDING, size.height / 2.0f)); - _label->setColor(_colText); - _editBox->addChild(_label); - - _labelPlaceHolder = Label::create(); - _labelPlaceHolder->setSystemFontSize(size.height-12); - // align the text vertically center - _labelPlaceHolder->setAnchorPoint(Vec2(0, 0.5f)); - _labelPlaceHolder->setPosition(Vec2(CC_EDIT_BOX_PADDING, size.height / 2.0f)); - _labelPlaceHolder->setVisible(false); - _labelPlaceHolder->setColor(_colPlaceHolder); - _editBox->addChild(_labelPlaceHolder); - - _editSize = size; - return true; -} - -void EditBoxImplAndroid::setFont(const char* pFontName, int fontSize) -{ - if(_label != NULL) { - _label->setSystemFontName(pFontName); - _label->setSystemFontSize(fontSize); - } - - if(_labelPlaceHolder != NULL) { - _labelPlaceHolder->setSystemFontName(pFontName); - _labelPlaceHolder->setSystemFontSize(fontSize); - } -} - -void EditBoxImplAndroid::setFontColor(const Color3B& color) -{ - _colText = color; - _label->setColor(color); -} - -void EditBoxImplAndroid::setPlaceholderFont(const char* pFontName, int fontSize) -{ - if(_labelPlaceHolder != NULL) { - _labelPlaceHolder->setSystemFontName(pFontName); - _labelPlaceHolder->setSystemFontSize(fontSize); - } -} - -void EditBoxImplAndroid::setPlaceholderFontColor(const Color3B& color) -{ - _colPlaceHolder = color; - _labelPlaceHolder->setColor(color); -} - -void EditBoxImplAndroid::setInputMode(EditBox::InputMode inputMode) -{ - _editBoxInputMode = inputMode; -} - -void EditBoxImplAndroid::setMaxLength(int maxLength) -{ - _maxLength = maxLength; -} - -int EditBoxImplAndroid::getMaxLength() -{ - return _maxLength; -} - -void EditBoxImplAndroid::setInputFlag(EditBox::InputFlag inputFlag) -{ - _editBoxInputFlag = inputFlag; -} - -void EditBoxImplAndroid::setReturnType(EditBox::KeyboardReturnType returnType) -{ - _keyboardReturnType = returnType; -} - -bool EditBoxImplAndroid::isEditing() -{ - return false; -} - -void EditBoxImplAndroid::setText(const char* pText) -{ - if (pText != NULL) - { - _text = pText; - - if (_text.length() > 0) - { - _labelPlaceHolder->setVisible(false); - - std::string strToShow; - - if (EditBox::InputFlag::PASSWORD == _editBoxInputFlag) - { - long length = cc_utf8_strlen(_text.c_str(), -1); - for (long i = 0; i < length; i++) - { - strToShow.append("*"); - } - } - else - { - strToShow = _text; - } - - _label->setString(strToShow.c_str()); - - // Clip the text width to fit to the text box - - float fMaxWidth = _editSize.width - CC_EDIT_BOX_PADDING * 2; - auto labelSize = _label->getContentSize(); - if(labelSize.width > fMaxWidth) { - _label->setDimensions(fMaxWidth,labelSize.height); - } - } - else - { - _labelPlaceHolder->setVisible(true); - _label->setString(""); - } - - } -} - -const char* EditBoxImplAndroid::getText(void) -{ - return _text.c_str(); -} - -void EditBoxImplAndroid::setPlaceHolder(const char* pText) -{ - if (pText != NULL) - { - _placeHolder = pText; - if (_placeHolder.length() > 0 && _text.length() == 0) - { - _labelPlaceHolder->setVisible(true); - } - - _labelPlaceHolder->setString(_placeHolder.c_str()); - } -} - -void EditBoxImplAndroid::setPosition(const Vec2& pos) -{ // don't need to be implemented on android platform. - -} - -void EditBoxImplAndroid::setVisible(bool visible) -{ // don't need to be implemented on android platform. - -} - -void EditBoxImplAndroid::setContentSize(const Size& size) -{ // don't need to be implemented on android platform. - -} - -void EditBoxImplAndroid::setAnchorPoint(const Vec2& anchorPoint) -{ // don't need to be implemented on android platform. - -} - -void EditBoxImplAndroid::visit(void) -{ // don't need to be implemented on android platform. - -} - -void EditBoxImplAndroid::onEnter(void) -{ // don't need to be implemented on android platform. - -} - -static void editBoxCallbackFunc(const char* pText, void* ctx) -{ - EditBoxImplAndroid* thiz = (EditBoxImplAndroid*)ctx; - thiz->setText(pText); - - if (thiz->getDelegate() != NULL) - { - thiz->getDelegate()->editBoxTextChanged(thiz->getEditBox(), thiz->getText()); - thiz->getDelegate()->editBoxEditingDidEnd(thiz->getEditBox()); - thiz->getDelegate()->editBoxReturn(thiz->getEditBox()); - } - -#if CC_ENABLE_SCRIPT_BINDING - EditBox* pEditBox = thiz->getEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "changed",pEditBox); - ScriptEvent event(kCommonEvent,(void*)&data); - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - memset(data.eventName, 0, sizeof(data.eventName)); - strncpy(data.eventName, "ended", sizeof(data.eventName)); - event.data = (void*)&data; - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - memset(data.eventName, 0, sizeof(data.eventName)); - strncpy(data.eventName, "return", sizeof(data.eventName)); - event.data = (void*)&data; - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif -} - -void EditBoxImplAndroid::openKeyboard() -{ - if (_delegate != NULL) - { - _delegate->editBoxEditingDidBegin(_editBox); - } - -#if CC_ENABLE_SCRIPT_BINDING - EditBox* pEditBox = this->getEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); - ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif - - showEditTextDialogJNI( _placeHolder.c_str(), - _text.c_str(), - (int)_editBoxInputMode, - (int)_editBoxInputFlag, - (int)_keyboardReturnType, - _maxLength, - editBoxCallbackFunc, - (void*)this ); - -} - -void EditBoxImplAndroid::closeKeyboard() -{ - -} - -NS_CC_EXT_END - -#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) */ - diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplAndroid.h b/extensions/GUI/CCEditBox/CCEditBoxImplAndroid.h deleted file mode 100644 index 8f4d6a1e95..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplAndroid.h +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEDITBOXIMPLANDROID_H__ -#define __CCEDITBOXIMPLANDROID_H__ - -#include "cocos2d.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - -#include "extensions/ExtensionMacros.h" -#include "CCEditBoxImpl.h" - -NS_CC_EXT_BEGIN - -class EditBox; - -class EditBoxImplAndroid : public EditBoxImpl -{ -public: - /** - * @js NA - */ - EditBoxImplAndroid(EditBox* pEditText); - /** - * @js NA - * @lua NA - */ - virtual ~EditBoxImplAndroid(); - - virtual bool initWithSize(const Size& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const Color3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const Color3B& color); - virtual void setInputMode(EditBox::InputMode inputMode); - virtual void setInputFlag(EditBox::InputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(EditBox::KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const Vec2& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const Size& size); - virtual void setAnchorPoint(const Vec2& anchorPoint); - /** - * @js NA - * @lua NA - */ - virtual void visit(void); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - -private: - Label* _label; - Label* _labelPlaceHolder; - EditBox::InputMode _editBoxInputMode; - EditBox::InputFlag _editBoxInputFlag; - EditBox::KeyboardReturnType _keyboardReturnType; - - std::string _text; - std::string _placeHolder; - - Color3B _colText; - Color3B _colPlaceHolder; - - int _maxLength; - Size _editSize; -}; - - -NS_CC_EXT_END - -#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) */ - -#endif /* __CCEDITBOXIMPLANDROID_H__ */ - diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h deleted file mode 100644 index 0e666ee6ed..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h +++ /dev/null @@ -1,143 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEditBoxIMPLIOS_H__ -#define __CCEditBoxIMPLIOS_H__ - -#include "cocos2d.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - -#include "extensions/ExtensionMacros.h" -#include "CCEditBoxImpl.h" - -#import -#import - -@interface CCCustomUITextField : UITextField -{ -} - -@end - - -@interface CCEditBoxImplIOS_objc : NSObject -{ - CCCustomUITextField* textField_; - void* editBox_; - BOOL editState_; -} - -@property(nonatomic, retain) UITextField* textField; -@property(nonatomic, readonly, getter = isEditState) BOOL editState; -@property(nonatomic, assign) void* editBox; - --(id) initWithFrame: (CGRect) frameRect editBox: (void*) editBox; --(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance; --(void) setPosition:(CGPoint) pos; --(void) setContentSize:(CGSize) size; --(void) visit; --(void) openKeyboard; --(void) closeKeyboard; - -@end - -NS_CC_EXT_BEGIN - -class EditBox; - -class EditBoxImplIOS : public EditBoxImpl -{ -public: - /** - * @js NA - */ - EditBoxImplIOS(EditBox* pEditText); - /** - * @js NA - * @lua NA - */ - virtual ~EditBoxImplIOS(); - - virtual bool initWithSize(const Size& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const Color3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const Color3B& color); - virtual void setInputMode(EditBox::InputMode inputMode); - virtual void setInputFlag(EditBox::InputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(EditBox::KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void refreshInactiveText(); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const Vec2& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const Size& size); - virtual void setAnchorPoint(const Vec2& anchorPoint); - virtual void updatePosition(float dt) override; - /** - * @js NA - * @lua NA - */ - virtual void visit(void); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - - virtual void onEndEditing(); -private: - void initInactiveLabels(const Size& size); - void setInactiveText(const char* pText); - void adjustTextFieldPosition(); - void placeInactiveLabels(); - - Label* _label; - Label* _labelPlaceHolder; - Size _contentSize; - Vec2 _position; - Vec2 _anchorPoint; - CCEditBoxImplIOS_objc* _systemControl; - int _maxTextLength; - bool _inRetinaMode; -}; - - -NS_CC_EXT_END - - -#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) */ - -#endif /* __CCEditBoxIMPLIOS_H__ */ - diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm deleted file mode 100644 index edab22c826..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm +++ /dev/null @@ -1,674 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ -#include "CCEditBoxImplIOS.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - -#define kLabelZOrder 9999 - -#include "CCEditBox.h" -#import "CCEAGLView.h" - -#define getEditBoxImplIOS() ((cocos2d::extension::EditBoxImplIOS*)editBox_) - -static const int CC_EDIT_BOX_PADDING = 5; - -@implementation CCCustomUITextField -- (CGRect)textRectForBounds:(CGRect)bounds -{ - auto glview = cocos2d::Director::getInstance()->getOpenGLView(); - - float padding = CC_EDIT_BOX_PADDING * glview->getScaleX() / glview->getContentScaleFactor(); - return CGRectMake(bounds.origin.x + padding, bounds.origin.y + padding, - bounds.size.width - padding*2, bounds.size.height - padding*2); -} -- (CGRect)editingRectForBounds:(CGRect)bounds { - return [self textRectForBounds:bounds]; -} -@end - - -@implementation CCEditBoxImplIOS_objc - -@synthesize textField = textField_; -@synthesize editState = editState_; -@synthesize editBox = editBox_; - -- (void)dealloc -{ - [textField_ resignFirstResponder]; - [textField_ removeFromSuperview]; - self.textField = NULL; - [super dealloc]; -} - --(id) initWithFrame: (CGRect) frameRect editBox: (void*) editBox -{ - self = [super init]; - - if (self) - { - editState_ = NO; - self.textField = [[[CCCustomUITextField alloc] initWithFrame: frameRect] autorelease]; - - [textField_ setTextColor:[UIColor whiteColor]]; - textField_.font = [UIFont systemFontOfSize:frameRect.size.height*2/3]; //TODO need to delete hard code here. - textField_.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; - textField_.backgroundColor = [UIColor clearColor]; - textField_.borderStyle = UITextBorderStyleNone; - textField_.delegate = self; - textField_.hidden = true; - textField_.returnKeyType = UIReturnKeyDefault; - [textField_ addTarget:self action:@selector(textChanged) forControlEvents:UIControlEventEditingChanged]; - self.editBox = editBox; - } - - return self; -} - --(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance -{ - auto view = cocos2d::Director::getInstance()->getOpenGLView(); - CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); - - [eaglview doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; -} - --(void) setPosition:(CGPoint) pos -{ - CGRect frame = [textField_ frame]; - frame.origin = pos; - [textField_ setFrame:frame]; -} - --(void) setContentSize:(CGSize) size -{ - CGRect frame = [textField_ frame]; - frame.size = size; - [textField_ setFrame:frame]; -} - --(void) visit -{ - -} - --(void) openKeyboard -{ - auto view = cocos2d::Director::getInstance()->getOpenGLView(); - CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); - - [eaglview addSubview:textField_]; - [textField_ becomeFirstResponder]; -} - --(void) closeKeyboard -{ - [textField_ resignFirstResponder]; - [textField_ removeFromSuperview]; -} - -- (BOOL)textFieldShouldReturn:(UITextField *)sender -{ - if (sender == textField_) { - [sender resignFirstResponder]; - } - return NO; -} - --(void)animationSelector -{ - auto view = cocos2d::Director::getInstance()->getOpenGLView(); - CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); - - [eaglview doAnimationWhenAnotherEditBeClicked]; -} - -- (BOOL)textFieldShouldBeginEditing:(UITextField *)sender // return NO to disallow editing. -{ - CCLOG("textFieldShouldBeginEditing..."); - editState_ = YES; - - auto view = cocos2d::Director::getInstance()->getOpenGLView(); - CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); - - if ([eaglview isKeyboardShown]) - { - [self performSelector:@selector(animationSelector) withObject:nil afterDelay:0.0f]; - } - cocos2d::extension::EditBoxDelegate* pDelegate = getEditBoxImplIOS()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxEditingDidBegin(getEditBoxImplIOS()->getEditBox()); - } - -#if CC_ENABLE_SCRIPT_BINDING - cocos2d::extension::EditBox* pEditBox= getEditBoxImplIOS()->getEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); - cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); - cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif - return YES; -} - -- (BOOL)textFieldShouldEndEditing:(UITextField *)sender -{ - CCLOG("textFieldShouldEndEditing..."); - editState_ = NO; - getEditBoxImplIOS()->refreshInactiveText(); - - cocos2d::extension::EditBoxDelegate* pDelegate = getEditBoxImplIOS()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxEditingDidEnd(getEditBoxImplIOS()->getEditBox()); - pDelegate->editBoxReturn(getEditBoxImplIOS()->getEditBox()); - } - -#if CC_ENABLE_SCRIPT_BINDING - cocos2d::extension::EditBox* pEditBox= getEditBoxImplIOS()->getEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "ended",pEditBox); - cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); - cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - memset(data.eventName, 0, sizeof(data.eventName)); - strncpy(data.eventName, "return", sizeof(data.eventName)); - event.data = (void*)&data; - cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif - - if(editBox_ != nil) - { - getEditBoxImplIOS()->onEndEditing(); - } - return YES; -} - -/** - * Delegate method called before the text has been changed. - * @param textField The text field containing the text. - * @param range The range of characters to be replaced. - * @param string The replacement string. - * @return YES if the specified text range should be replaced; otherwise, NO to keep the old text. - */ -- (BOOL)textField:(UITextField *) textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string -{ - if (getEditBoxImplIOS()->getMaxLength() < 0) - { - return YES; - } - - NSUInteger oldLength = [textField.text length]; - NSUInteger replacementLength = [string length]; - NSUInteger rangeLength = range.length; - - NSUInteger newLength = oldLength - rangeLength + replacementLength; - - return newLength <= getEditBoxImplIOS()->getMaxLength(); -} - -/** - * Called each time when the text field's text has changed. - */ -- (void) textChanged -{ - // NSLog(@"text is %@", self.textField.text); - cocos2d::extension::EditBoxDelegate* pDelegate = getEditBoxImplIOS()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxTextChanged(getEditBoxImplIOS()->getEditBox(), getEditBoxImplIOS()->getText()); - } - -#if CC_ENABLE_SCRIPT_BINDING - cocos2d::extension::EditBox* pEditBox= getEditBoxImplIOS()->getEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "changed",pEditBox); - cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); - cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif -} - -@end - - -NS_CC_EXT_BEGIN - -EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) -{ - return new EditBoxImplIOS(pEditBox); -} - -EditBoxImplIOS::EditBoxImplIOS(EditBox* pEditText) -: EditBoxImpl(pEditText) -, _label(nullptr) -, _labelPlaceHolder(nullptr) -, _anchorPoint(Vec2(0.5f, 0.5f)) -, _systemControl(nullptr) -, _maxTextLength(-1) -{ - auto view = cocos2d::Director::getInstance()->getOpenGLView(); - - _inRetinaMode = view->isRetinaDisplay(); -} - -EditBoxImplIOS::~EditBoxImplIOS() -{ - [_systemControl release]; -} - -void EditBoxImplIOS::doAnimationWhenKeyboardMove(float duration, float distance) -{ - if ([_systemControl isEditState] || distance < 0.0f) - { - [_systemControl doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; - } -} - -bool EditBoxImplIOS::initWithSize(const Size& size) -{ - do - { - auto glview = cocos2d::Director::getInstance()->getOpenGLView(); - - CGRect rect = CGRectMake(0, 0, size.width * glview->getScaleX(),size.height * glview->getScaleY()); - - if (_inRetinaMode) - { - rect.size.width /= 2.0f; - rect.size.height /= 2.0f; - } - - _systemControl = [[CCEditBoxImplIOS_objc alloc] initWithFrame:rect editBox:this]; - if (!_systemControl) break; - - initInactiveLabels(size); - setContentSize(size); - - return true; - }while (0); - - return false; -} - -void EditBoxImplIOS::initInactiveLabels(const Size& size) -{ - const char* pDefaultFontName = [[_systemControl.textField.font fontName] UTF8String]; - - _label = Label::create(); - _label->setAnchorPoint(Vec2(0, 0.5f)); - _label->setColor(Color3B::WHITE); - _label->setVisible(false); - _editBox->addChild(_label, kLabelZOrder); - - _labelPlaceHolder = Label::create(); - // align the text vertically center - _labelPlaceHolder->setAnchorPoint(Vec2(0, 0.5f)); - _labelPlaceHolder->setColor(Color3B::GRAY); - _editBox->addChild(_labelPlaceHolder, kLabelZOrder); - - setFont(pDefaultFontName, size.height*2/3); - setPlaceholderFont(pDefaultFontName, size.height*2/3); -} - -void EditBoxImplIOS::placeInactiveLabels() -{ - _label->setPosition(Vec2(CC_EDIT_BOX_PADDING, _contentSize.height / 2.0f)); - _labelPlaceHolder->setPosition(Vec2(CC_EDIT_BOX_PADDING, _contentSize.height / 2.0f)); -} - -void EditBoxImplIOS::setInactiveText(const char* pText) -{ - if(_systemControl.textField.secureTextEntry == YES) - { - std::string passwordString; - for(int i = 0; i < strlen(pText); ++i) - passwordString.append("\u25CF"); - _label->setString(passwordString.c_str()); - } - else - _label->setString(getText()); - - // Clip the text width to fit to the text box - float fMaxWidth = _editBox->getContentSize().width - CC_EDIT_BOX_PADDING * 2; - Size labelSize = _label->getContentSize(); - if(labelSize.width > fMaxWidth) { - _label->setDimensions(fMaxWidth,labelSize.height); - } -} - -void EditBoxImplIOS::setFont(const char* pFontName, int fontSize) -{ - bool isValidFontName = true; - if(pFontName == NULL || strlen(pFontName) == 0) { - isValidFontName = false; - } - - float retinaFactor = _inRetinaMode ? 2.0f : 1.0f; - NSString * fntName = [NSString stringWithUTF8String:pFontName]; - - auto glview = cocos2d::Director::getInstance()->getOpenGLView(); - - float scaleFactor = glview->getScaleX(); - UIFont *textFont = nil; - if (isValidFontName) { - textFont = [UIFont fontWithName:fntName size:fontSize * scaleFactor / retinaFactor]; - } - - if (!isValidFontName || textFont == nil){ - textFont = [UIFont systemFontOfSize:fontSize * scaleFactor / retinaFactor]; - } - - if(textFont != nil) { - [_systemControl.textField setFont:textFont]; - } - - _label->setSystemFontName(pFontName); - _label->setSystemFontSize(fontSize); - _labelPlaceHolder->setSystemFontName(pFontName); - _labelPlaceHolder->setSystemFontSize(fontSize); -} - -void EditBoxImplIOS::setFontColor(const Color3B& color) -{ - _systemControl.textField.textColor = [UIColor colorWithRed:color.r / 255.0f green:color.g / 255.0f blue:color.b / 255.0f alpha:1.0f]; - _label->setColor(color); -} - -void EditBoxImplIOS::setPlaceholderFont(const char* pFontName, int fontSize) -{ - // TODO need to be implemented. -} - -void EditBoxImplIOS::setPlaceholderFontColor(const Color3B& color) -{ - _labelPlaceHolder->setColor(color); -} - -void EditBoxImplIOS::setInputMode(EditBox::InputMode inputMode) -{ - switch (inputMode) - { - case EditBox::InputMode::EMAIL_ADDRESS: - _systemControl.textField.keyboardType = UIKeyboardTypeEmailAddress; - break; - case EditBox::InputMode::NUMERIC: - _systemControl.textField.keyboardType = UIKeyboardTypeDecimalPad; - break; - case EditBox::InputMode::PHONE_NUMBER: - _systemControl.textField.keyboardType = UIKeyboardTypePhonePad; - break; - case EditBox::InputMode::URL: - _systemControl.textField.keyboardType = UIKeyboardTypeURL; - break; - case EditBox::InputMode::DECIMAL: - _systemControl.textField.keyboardType = UIKeyboardTypeDecimalPad; - break; - case EditBox::InputMode::SINGLE_LINE: - _systemControl.textField.keyboardType = UIKeyboardTypeDefault; - break; - default: - _systemControl.textField.keyboardType = UIKeyboardTypeDefault; - break; - } -} - -void EditBoxImplIOS::setMaxLength(int maxLength) -{ - _maxTextLength = maxLength; -} - -int EditBoxImplIOS::getMaxLength() -{ - return _maxTextLength; -} - -void EditBoxImplIOS::setInputFlag(EditBox::InputFlag inputFlag) -{ - switch (inputFlag) - { - case EditBox::InputFlag::PASSWORD: - _systemControl.textField.secureTextEntry = YES; - break; - case EditBox::InputFlag::INITIAL_CAPS_WORD: - _systemControl.textField.autocapitalizationType = UITextAutocapitalizationTypeWords; - break; - case EditBox::InputFlag::INITIAL_CAPS_SENTENCE: - _systemControl.textField.autocapitalizationType = UITextAutocapitalizationTypeSentences; - break; - case EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS: - _systemControl.textField.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters; - break; - case EditBox::InputFlag::SENSITIVE: - _systemControl.textField.autocorrectionType = UITextAutocorrectionTypeNo; - break; - default: - break; - } -} - -void EditBoxImplIOS::setReturnType(EditBox::KeyboardReturnType returnType) -{ - switch (returnType) { - case EditBox::KeyboardReturnType::DEFAULT: - _systemControl.textField.returnKeyType = UIReturnKeyDefault; - break; - case EditBox::KeyboardReturnType::DONE: - _systemControl.textField.returnKeyType = UIReturnKeyDone; - break; - case EditBox::KeyboardReturnType::SEND: - _systemControl.textField.returnKeyType = UIReturnKeySend; - break; - case EditBox::KeyboardReturnType::SEARCH: - _systemControl.textField.returnKeyType = UIReturnKeySearch; - break; - case EditBox::KeyboardReturnType::GO: - _systemControl.textField.returnKeyType = UIReturnKeyGo; - break; - default: - _systemControl.textField.returnKeyType = UIReturnKeyDefault; - break; - } -} - -bool EditBoxImplIOS::isEditing() -{ - return [_systemControl isEditState] ? true : false; -} - -void EditBoxImplIOS::refreshInactiveText() -{ - const char* text = getText(); - if(_systemControl.textField.hidden == YES) - { - setInactiveText(text); - if(strlen(text) == 0) - { - _label->setVisible(false); - _labelPlaceHolder->setVisible(true); - } - else - { - _label->setVisible(true); - _labelPlaceHolder->setVisible(false); - } - } -} - -void EditBoxImplIOS::setText(const char* text) -{ - NSString* nsText =[NSString stringWithUTF8String:text]; - if ([nsText compare:_systemControl.textField.text] != NSOrderedSame) - { - _systemControl.textField.text = nsText; - } - - refreshInactiveText(); -} - -NSString* removeSiriString(NSString* str) -{ - NSString* siriString = @"\xef\xbf\xbc"; - return [str stringByReplacingOccurrencesOfString:siriString withString:@""]; -} - -const char* EditBoxImplIOS::getText(void) -{ - return [removeSiriString(_systemControl.textField.text) UTF8String]; -} - -void EditBoxImplIOS::setPlaceHolder(const char* pText) -{ - _systemControl.textField.placeholder = [NSString stringWithUTF8String:pText]; - _labelPlaceHolder->setString(pText); -} - -static CGPoint convertDesignCoordToScreenCoord(const Vec2& designCoord, bool bInRetinaMode) -{ - auto glview = cocos2d::Director::getInstance()->getOpenGLView(); - CCEAGLView *eaglview = (CCEAGLView *) glview->getEAGLView(); - - float viewH = (float)[eaglview getHeight]; - - Vec2 visiblePos = Vec2(designCoord.x * glview->getScaleX(), designCoord.y * glview->getScaleY()); - Vec2 screenGLPos = visiblePos + glview->getViewPortRect().origin; - - CGPoint screenPos = CGPointMake(screenGLPos.x, viewH - screenGLPos.y); - - if (bInRetinaMode) - { - screenPos.x = screenPos.x / 2.0f; - screenPos.y = screenPos.y / 2.0f; - } - CCLOGINFO("[EditBox] pos x = %f, y = %f", screenGLPos.x, screenGLPos.y); - return screenPos; -} - -void EditBoxImplIOS::setPosition(const Vec2& pos) -{ - _position = pos; - adjustTextFieldPosition(); -} - -void EditBoxImplIOS::setVisible(bool visible) -{ -// _systemControl.textField.hidden = !visible; -} - -void EditBoxImplIOS::setContentSize(const Size& size) -{ - _contentSize = size; - CCLOG("[Edit text] content size = (%f, %f)", size.width, size.height); - placeInactiveLabels(); - auto glview = cocos2d::Director::getInstance()->getOpenGLView(); - CGSize controlSize = CGSizeMake(size.width * glview->getScaleX(),size.height * glview->getScaleY()); - - if (_inRetinaMode) - { - controlSize.width /= 2.0f; - controlSize.height /= 2.0f; - } - [_systemControl setContentSize:controlSize]; -} - -void EditBoxImplIOS::setAnchorPoint(const Vec2& anchorPoint) -{ - CCLOG("[Edit text] anchor point = (%f, %f)", anchorPoint.x, anchorPoint.y); - _anchorPoint = anchorPoint; - setPosition(_position); -} - -void EditBoxImplIOS::visit(void) -{ -} - -void EditBoxImplIOS::onEnter(void) -{ - adjustTextFieldPosition(); - const char* pText = getText(); - if (pText) { - setInactiveText(pText); - } -} - -void EditBoxImplIOS::updatePosition(float dt) -{ - if (nullptr != _systemControl) { - this->adjustTextFieldPosition(); - } -} - - - -void EditBoxImplIOS::adjustTextFieldPosition() -{ - Size contentSize = _editBox->getContentSize(); - Rect rect = Rect(0, 0, contentSize.width, contentSize.height); - rect = RectApplyAffineTransform(rect, _editBox->nodeToWorldTransform()); - - Vec2 designCoord = Vec2(rect.origin.x, rect.origin.y + rect.size.height); - [_systemControl setPosition:convertDesignCoordToScreenCoord(designCoord, _inRetinaMode)]; -} - -void EditBoxImplIOS::openKeyboard() -{ - _label->setVisible(false); - _labelPlaceHolder->setVisible(false); - - _systemControl.textField.hidden = NO; - [_systemControl openKeyboard]; -} - -void EditBoxImplIOS::closeKeyboard() -{ - [_systemControl closeKeyboard]; -} - -void EditBoxImplIOS::onEndEditing() -{ - _systemControl.textField.hidden = YES; - if(strlen(getText()) == 0) - { - _label->setVisible(false); - _labelPlaceHolder->setVisible(true); - } - else - { - _label->setVisible(true); - _labelPlaceHolder->setVisible(false); - setInactiveText(getText()); - } -} - -NS_CC_EXT_END - -#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) */ - - diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplMac.h b/extensions/GUI/CCEditBox/CCEditBoxImplMac.h deleted file mode 100644 index 34085e8278..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplMac.h +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 Jozef Pridavok - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEditBoxIMPLMAC_H__ -#define __CCEditBoxIMPLMAC_H__ - -#include "cocos2d.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - -#import -#import - -#include "extensions/ExtensionMacros.h" -#include "CCEditBoxImpl.h" - - -@interface CCEditBoxImplMac : NSObject -{ - NSTextField* textField_; - NSSecureTextField* secureTextField_; - void* editBox_; - BOOL editState_; - NSMutableDictionary* placeholderAttributes_; -} - -@property(nonatomic, retain) NSTextField* textField; -@property(nonatomic, retain) NSSecureTextField* secureTextField; -@property(nonatomic, retain) NSMutableDictionary* placeholderAttributes; -@property(nonatomic, readonly, getter = isEditState) BOOL editState; -@property(nonatomic, assign) void* editBox; - --(id) initWithFrame: (NSRect) frameRect editBox: (void*) editBox; --(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance; --(void) setPosition:(NSPoint) pos; --(void) setContentSize:(NSSize) size; --(void) visit; --(void) openKeyboard; --(void) closeKeyboard; - -@end - -NS_CC_EXT_BEGIN - -class EditBox; - -class EditBoxImplMac : public EditBoxImpl -{ -public: - /** - * @js NA - */ - EditBoxImplMac(EditBox* pEditText); - /** - * @js NA - * @lua NA - */ - virtual ~EditBoxImplMac(); - - virtual bool initWithSize(const Size& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const Color3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const Color3B& color); - virtual void setInputMode(EditBox::InputMode inputMode); - virtual void setInputFlag(EditBox::InputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(EditBox::KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const Vec2& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const Size& size); - virtual void setAnchorPoint(const Vec2& anchorPoint); - /** - * @js NA - * @lua NA - */ - virtual void visit(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - virtual void updatePosition(float dt) override; - /** - * @js NA - * @lua NA - */ - virtual void onEnter(void); -private: - NSPoint convertDesignCoordToScreenCoord(const Vec2& designCoord, bool bInRetinaMode); - void adjustTextFieldPosition(); - Size _contentSize; - Vec2 _position; - Vec2 _anchorPoint; - int _maxTextLength; - bool _inRetinaMode; - CCEditBoxImplMac* _sysEdit; -}; - - -NS_CC_EXT_END - -#endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - -#endif /* __CCEditBoxIMPLMAC_H__ */ - diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm deleted file mode 100644 index 47063b2907..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm +++ /dev/null @@ -1,520 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 Jozef Pridavok - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "CCEditBoxImplMac.h" -#include "base/CCDirector.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - -#include "CCEditBox.h" - - -#define getEditBoxImplMac() ((cocos2d::extension::EditBoxImplMac*)editBox_) - - - -@implementation CCEditBoxImplMac - -@synthesize textField = textField_; -@synthesize secureTextField = secureTextField_; -@synthesize placeholderAttributes = placeholderAttributes_; -@synthesize editState = editState_; -@synthesize editBox = editBox_; - -- (id) getNSWindow -{ - auto glview = cocos2d::Director::getInstance()->getOpenGLView(); - return glview->getCocoaWindow(); -} - -- (void)dealloc -{ - [textField_ resignFirstResponder]; - [textField_ removeFromSuperview]; - [textField_ release]; - - [secureTextField_ resignFirstResponder]; - [secureTextField_ removeFromSuperview]; - [secureTextField_ release]; - - [placeholderAttributes_ release]; - [super dealloc]; -} - --(id) initWithFrame: (NSRect) frameRect editBox: (void*) editBox -{ - self = [super init]; - - if (self) - { - editState_ = NO; - self.textField = [[[NSTextField alloc] initWithFrame:frameRect] autorelease]; - self.secureTextField = [[[NSSecureTextField alloc] initWithFrame:frameRect] autorelease]; - - NSFont *font = [NSFont systemFontOfSize:frameRect.size.height*2/3]; //TODO need to delete hard code here. - textField_.font = font; - secureTextField_.font = font; - - [self setupTextField:textField_]; - [self setupTextField:secureTextField_]; - - self.editBox = editBox; - self.placeholderAttributes = [NSMutableDictionary dictionaryWithObjectsAndKeys: - font, NSFontAttributeName, - [NSColor grayColor], NSForegroundColorAttributeName, - nil]; - - [[[self getNSWindow] contentView] addSubview:textField_]; - } - - return self; -} - -- (void)setupTextField:(NSTextField *)textField -{ - [textField setTextColor:[NSColor whiteColor]]; - [textField setBackgroundColor:[NSColor clearColor]]; - [textField setBordered:NO]; - [textField setHidden:NO]; - [textField setWantsLayer:YES]; - [textField setDelegate:self]; -} - --(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance -{ - [[[self getNSWindow] contentView] doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; -} - --(void) setPosition:(NSPoint) pos -{ - NSRect frame = [textField_ frame]; - frame.origin = pos; - [textField_ setFrame:frame]; - [secureTextField_ setFrame:frame]; -} - --(void) setContentSize:(NSSize) size -{ - -} - --(void) visit -{ - -} - --(void) openKeyboard -{ - if ([textField_ superview]) { - [textField_ becomeFirstResponder]; - } - else { - [secureTextField_ becomeFirstResponder]; - } -} - --(void) closeKeyboard -{ - if ([textField_ superview]) { - [textField_ resignFirstResponder]; - [textField_ removeFromSuperview]; - } - else { - [secureTextField_ resignFirstResponder]; - [secureTextField_ removeFromSuperview]; - } -} - -- (BOOL)textFieldShouldReturn:(NSTextField *)sender -{ - if (sender == textField_ || sender == secureTextField_) { - [sender resignFirstResponder]; - } - return NO; -} - --(void)animationSelector -{ -} - -- (void)controlTextDidBeginEditing:(NSNotification *)notification -{ - editState_ = YES; - cocos2d::extension::EditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxEditingDidBegin(getEditBoxImplMac()->getEditBox()); - } - -#if CC_ENABLE_SCRIPT_BINDING - cocos2d::extension::EditBox* pEditBox= getEditBoxImplMac()->getEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); - cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); - cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif -} - -- (void)controlTextDidEndEditing:(NSNotification *)notification -{ - editState_ = NO; - cocos2d::extension::EditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxEditingDidEnd(getEditBoxImplMac()->getEditBox()); - pDelegate->editBoxReturn(getEditBoxImplMac()->getEditBox()); - } - -#if CC_ENABLE_SCRIPT_BINDING - cocos2d::extension::EditBox* pEditBox= getEditBoxImplMac()->getEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "ended",pEditBox); - cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); - cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - memset(data.eventName, 0, sizeof(data.eventName)); - strncpy(data.eventName, "return", sizeof(data.eventName)); - event.data = (void*)&data; - cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif -} - -/** - * Delegate method called before the text has been changed. - * @param textField The text field containing the text. - * @param range The range of characters to be replaced. - * @param string The replacement string. - * @return YES if the specified text range should be replaced; otherwise, NO to keep the old text. - */ -- (BOOL)textField:(NSTextField *) textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string -{ - if (getEditBoxImplMac()->getMaxLength() < 0) - { - return YES; - } - - NSUInteger oldLength = [[textField stringValue] length]; - NSUInteger replacementLength = [string length]; - NSUInteger rangeLength = range.length; - - NSUInteger newLength = oldLength - rangeLength + replacementLength; - - return newLength <= getEditBoxImplMac()->getMaxLength(); -} - -/** - * Called each time when the text field's text has changed. - */ -- (void)controlTextDidChange:(NSNotification *)notification -{ - cocos2d::extension::EditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxTextChanged(getEditBoxImplMac()->getEditBox(), getEditBoxImplMac()->getText()); - } - -#if CC_ENABLE_SCRIPT_BINDING - cocos2d::extension::EditBox* pEditBox= getEditBoxImplMac()->getEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "changed",pEditBox); - cocos2d::ScriptEvent event(cocos2d::kCommonEvent,(void*)&data); - cocos2d::ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif -} - -@end - -NS_CC_EXT_BEGIN - -EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) -{ - return new EditBoxImplMac(pEditBox); -} - -EditBoxImplMac::EditBoxImplMac(EditBox* pEditText) -: EditBoxImpl(pEditText) -, _anchorPoint(Vec2(0.5f, 0.5f)) -, _maxTextLength(-1) -, _sysEdit(nullptr) -{ - //! TODO: Retina on Mac - //! _inRetinaMode = [[CCEAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false; - _inRetinaMode = false; -} - -EditBoxImplMac::~EditBoxImplMac() -{ - [_sysEdit release]; -} - -void EditBoxImplMac::doAnimationWhenKeyboardMove(float duration, float distance) -{ - if ([_sysEdit isEditState] || distance < 0.0f) - [_sysEdit doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; -} - -bool EditBoxImplMac::initWithSize(const Size& size) -{ - GLView* eglView = Director::getInstance()->getOpenGLView(); - - NSRect rect = NSMakeRect(0, 0, size.width * eglView->getScaleX(),size.height * eglView->getScaleY()); - - if (_inRetinaMode) { - rect.size.width /= 2.0f; - rect.size.height /= 2.0f; - } - - _sysEdit = [[CCEditBoxImplMac alloc] initWithFrame:rect editBox:this]; - - if (!_sysEdit) - return false; - - return true; -} - -void EditBoxImplMac::setFont(const char* pFontName, int fontSize) -{ - NSString * fntName = [NSString stringWithUTF8String:pFontName]; - float retinaFactor = _inRetinaMode ? 2.0f : 1.0f; - auto glview = cocos2d::Director::getInstance()->getOpenGLView(); - float scaleFactor = glview->getScaleX(); - NSFont *textFont = [NSFont fontWithName:fntName size:fontSize * scaleFactor / retinaFactor]; - if (textFont != nil) { - [_sysEdit.textField setFont:textFont]; - [_sysEdit.secureTextField setFont:textFont]; - } -} - -void EditBoxImplMac::setPlaceholderFont(const char* pFontName, int fontSize) -{ - NSString *fontName = [NSString stringWithUTF8String:pFontName]; - float retinaFactor = _inRetinaMode ? 2.0f : 1.0f; - auto glview = cocos2d::Director::getInstance()->getOpenGLView(); - float scaleFactor = glview->getScaleX(); - NSFont *font = [NSFont fontWithName:fontName size:fontSize * scaleFactor / retinaFactor]; - - if (!font) { - CCLOGWARN("Font not found: %s", pFontName); - return; - } - - [_sysEdit.placeholderAttributes setObject:font forKey:NSFontAttributeName]; - - /* reload placeholder */ - const char *placeholder = [_sysEdit.textField.cell placeholderAttributedString].string.UTF8String; - if (placeholder) { - setPlaceHolder(placeholder); - } -} - -void EditBoxImplMac::setFontColor(const Color3B& color) -{ - NSColor *newColor = [NSColor colorWithCalibratedRed:color.r / 255.0f green:color.g / 255.0f blue:color.b / 255.0f alpha:1.0f]; - _sysEdit.textField.textColor = newColor; - _sysEdit.secureTextField.textColor = newColor; -} - -void EditBoxImplMac::setPlaceholderFontColor(const Color3B& color) -{ - NSColor *nsColor = [NSColor colorWithCalibratedRed:color.r/255.f green:color.g / 255.f blue:color.b / 255.f alpha:1.0f]; - [_sysEdit.placeholderAttributes setObject:nsColor forKey:NSForegroundColorAttributeName]; - - /* reload placeholder */ - const char *placeholder = [_sysEdit.textField.cell placeholderAttributedString].string.UTF8String; - if (placeholder) { - setPlaceHolder(placeholder); - } -} - -void EditBoxImplMac::setInputMode(EditBox::InputMode inputMode) -{ -} - -void EditBoxImplMac::setMaxLength(int maxLength) -{ - _maxTextLength = maxLength; -} - -int EditBoxImplMac::getMaxLength() -{ - return _maxTextLength; -} - -void EditBoxImplMac::setInputFlag(EditBox::InputFlag inputFlag) -{ - switch (inputFlag) - { - case EditBox::InputFlag::PASSWORD: - [_sysEdit.textField.superview addSubview:_sysEdit.secureTextField]; - [_sysEdit.textField removeFromSuperview]; - break; - case EditBox::InputFlag::INITIAL_CAPS_WORD: - CCLOGWARN("INITIAL_CAPS_WORD not implemented"); - break; - case EditBox::InputFlag::INITIAL_CAPS_SENTENCE: - CCLOGWARN("INITIAL_CAPS_SENTENCE not implemented"); - break; - case EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS: - CCLOGWARN("INTIAL_CAPS_ALL_CHARACTERS not implemented"); - break; - case EditBox::InputFlag::SENSITIVE: - CCLOGWARN("SENSITIVE not implemented"); - break; - default: - break; - } -} - -void EditBoxImplMac::setReturnType(EditBox::KeyboardReturnType returnType) -{ -} - -bool EditBoxImplMac::isEditing() -{ - return [_sysEdit isEditState] ? true : false; -} - -void EditBoxImplMac::setText(const char* pText) -{ - NSString *string = [NSString stringWithUTF8String:pText]; - _sysEdit.textField.stringValue = string; - _sysEdit.secureTextField.stringValue = string; -} - -const char* EditBoxImplMac::getText(void) -{ - if (_sysEdit.secureTextField.superview) { - return [_sysEdit.secureTextField.stringValue UTF8String]; - } - - return [_sysEdit.textField.stringValue UTF8String]; -} - -void EditBoxImplMac::setPlaceHolder(const char* pText) -{ - NSAttributedString *as = [[NSAttributedString alloc] initWithString:[NSString stringWithUTF8String:pText] - attributes:_sysEdit.placeholderAttributes]; - - [[_sysEdit.textField cell] setPlaceholderAttributedString:as]; - [[_sysEdit.secureTextField cell] setPlaceholderAttributedString:as]; - [as release]; -} - -NSPoint EditBoxImplMac::convertDesignCoordToScreenCoord(const Vec2& designCoord, bool bInRetinaMode) -{ - NSRect frame = [_sysEdit.textField frame]; - CGFloat height = frame.size.height; - - GLView* eglView = Director::getInstance()->getOpenGLView(); - - Vec2 visiblePos = Vec2(designCoord.x * eglView->getScaleX(), designCoord.y * eglView->getScaleY()); - Vec2 screenGLPos = visiblePos + eglView->getViewPortRect().origin; - - //TODO: I don't know why here needs to substract `height`. - NSPoint screenPos = NSMakePoint(screenGLPos.x, screenGLPos.y-height); - - if (bInRetinaMode) { - screenPos.x = screenPos.x / 2.0f; - screenPos.y = screenPos.y / 2.0f; - } - - CCLOGINFO("[EditBox] pos x = %f, y = %f", screenGLPos.x, screenGLPos.y); - return screenPos; -} - -void EditBoxImplMac::updatePosition(float dt) -{ - if(nullptr != _sysEdit) - { - adjustTextFieldPosition(); - } -} - -void EditBoxImplMac::adjustTextFieldPosition() -{ - Size contentSize = _editBox->getContentSize(); - Rect rect = Rect(0, 0, contentSize.width, contentSize.height); - - rect = RectApplyAffineTransform(rect, _editBox->nodeToWorldTransform()); - - Vec2 designCoord = Vec2(rect.origin.x, rect.origin.y + rect.size.height); - [_sysEdit setPosition:convertDesignCoordToScreenCoord(designCoord, _inRetinaMode)]; -} - -void EditBoxImplMac::setPosition(const Vec2& pos) -{ - _position = pos; - adjustTextFieldPosition(); -} - -void EditBoxImplMac::setVisible(bool visible) -{ - [_sysEdit.textField setHidden:!visible]; - [_sysEdit.secureTextField setHidden:!visible]; -} - -void EditBoxImplMac::setContentSize(const Size& size) -{ - _contentSize = size; - CCLOG("[Edit text] content size = (%f, %f)", size.width, size.height); -} - -void EditBoxImplMac::setAnchorPoint(const Vec2& anchorPoint) -{ - CCLOG("[Edit text] anchor point = (%f, %f)", anchorPoint.x, anchorPoint.y); - _anchorPoint = anchorPoint; - setPosition(_position); -} - -void EditBoxImplMac::visit(void) -{ - -} - -void EditBoxImplMac::openKeyboard() -{ - [_sysEdit openKeyboard]; -} - -void EditBoxImplMac::closeKeyboard() -{ - [_sysEdit closeKeyboard]; -} - -void EditBoxImplMac::onEnter(void) -{ - adjustTextFieldPosition(); -} - -NS_CC_EXT_END - -#endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - - diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplNone.cpp b/extensions/GUI/CCEditBox/CCEditBoxImplNone.cpp deleted file mode 100644 index 5cac865d3d..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplNone.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "CCEditBox.h" - -#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID ) && (CC_TARGET_PLATFORM != CC_PLATFORM_IOS ) && (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) && (CC_TARGET_PLATFORM != CC_PLATFORM_MAC) && (CC_TARGET_PLATFORM != CC_PLATFORM_TIZEN) - -NS_CC_EXT_BEGIN - -EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) -{ - return NULL; -} - -NS_CC_EXT_END - -#endif /* #if (..) */ diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplWin.cpp b/extensions/GUI/CCEditBox/CCEditBoxImplWin.cpp deleted file mode 100644 index 2259e4dda0..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplWin.cpp +++ /dev/null @@ -1,298 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2013 Jozef Pridavok - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ -#include "CCEditBoxImplWin.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - -#include "CCEditBox.h" -#include "proj.win32/Win32InputBox.h" - -NS_CC_EXT_BEGIN - -EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) -{ - return new EditBoxImplWin(pEditBox); -} - -EditBoxImplWin::EditBoxImplWin(EditBox* pEditText) -: EditBoxImpl(pEditText) -, _label(nullptr) -, _labelPlaceHolder(nullptr) -, _editBoxInputMode(EditBox::InputMode::SINGLE_LINE) -, _editBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS) -, _keyboardReturnType(EditBox::KeyboardReturnType::DEFAULT) -, _colText(Color3B::WHITE) -, _colPlaceHolder(Color3B::GRAY) -, _maxLength(-1) -{ - -} - -EditBoxImplWin::~EditBoxImplWin() -{ -} - -void EditBoxImplWin::doAnimationWhenKeyboardMove(float duration, float distance) -{ -} - -bool EditBoxImplWin::initWithSize(const Size& size) -{ - //! int fontSize = getFontSizeAccordingHeightJni(size.height-12); - _label = Label::create(); - _label->setSystemFontSize(size.height-12); - // align the text vertically center - _label->setAnchorPoint(Vec2(0, 0.5f)); - _label->setPosition(Vec2(5, size.height / 2.0f)); - _label->setColor(_colText); - _editBox->addChild(_label); - - _labelPlaceHolder = Label::create(); - _labelPlaceHolder->setSystemFontSize(size.height-12); - // align the text vertically center - _labelPlaceHolder->setAnchorPoint(Vec2(0, 0.5f)); - _labelPlaceHolder->setPosition(Vec2(5, size.height / 2.0f)); - _labelPlaceHolder->setVisible(false); - _labelPlaceHolder->setColor(_colPlaceHolder); - _editBox->addChild(_labelPlaceHolder); - - _editSize = size; - return true; -} - -void EditBoxImplWin::setFont(const char* pFontName, int fontSize) -{ - if(_label != nullptr) { - _label->setSystemFontName(pFontName); - _label->setSystemFontSize(fontSize); - } - - if(_labelPlaceHolder != nullptr) { - _labelPlaceHolder->setSystemFontName(pFontName); - _labelPlaceHolder->setSystemFontSize(fontSize); - } -} - -void EditBoxImplWin::setFontColor(const Color3B& color) -{ - _colText = color; - _label->setColor(color); -} - -void EditBoxImplWin::setPlaceholderFont(const char* pFontName, int fontSize) -{ - if(_labelPlaceHolder != nullptr) { - _labelPlaceHolder->setSystemFontName(pFontName); - _labelPlaceHolder->setSystemFontSize(fontSize); - } -} - -void EditBoxImplWin::setPlaceholderFontColor(const Color3B& color) -{ - _colPlaceHolder = color; - _labelPlaceHolder->setColor(color); -} - -void EditBoxImplWin::setInputMode(EditBox::InputMode inputMode) -{ - _editBoxInputMode = inputMode; -} - -void EditBoxImplWin::setMaxLength(int maxLength) -{ - _maxLength = maxLength; -} - -int EditBoxImplWin::getMaxLength() -{ - return _maxLength; -} - -void EditBoxImplWin::setInputFlag(EditBox::InputFlag inputFlag) -{ - _editBoxInputFlag = inputFlag; -} - -void EditBoxImplWin::setReturnType(EditBox::KeyboardReturnType returnType) -{ - _keyboardReturnType = returnType; -} - -bool EditBoxImplWin::isEditing() -{ - return false; -} - -void EditBoxImplWin::setText(const char* pText) -{ - if (pText != nullptr) - { - _text = pText; - - if (_text.length() > 0) - { - _labelPlaceHolder->setVisible(false); - - std::string strToShow; - - if (EditBox::InputFlag::PASSWORD == _editBoxInputFlag) - { - long length = cc_utf8_strlen(_text.c_str(), -1); - for (long i = 0; i < length; i++) - { - strToShow.append("*"); - } - } - else - { - strToShow = _text; - } - - //! std::string strWithEllipsis = getStringWithEllipsisJni(strToShow.c_str(), _editSize.width, _editSize.height-12); - //! _label->setString(strWithEllipsis.c_str()); - _label->setString(strToShow.c_str()); - } - else - { - _labelPlaceHolder->setVisible(true); - _label->setString(""); - } - - } -} - -const char* EditBoxImplWin::getText(void) -{ - return _text.c_str(); -} - -void EditBoxImplWin::setPlaceHolder(const char* pText) -{ - if (pText != nullptr) - { - _placeHolder = pText; - if (_placeHolder.length() > 0 && _text.length() == 0) - { - _labelPlaceHolder->setVisible(true); - } - - _labelPlaceHolder->setString(_placeHolder.c_str()); - } -} - -void EditBoxImplWin::setPosition(const Vec2& pos) -{ - //_label->setPosition(pos); - //_labelPlaceHolder->setPosition(pos); -} - -void EditBoxImplWin::setVisible(bool visible) -{ // don't need to be implemented on win32 platform. -} - -void EditBoxImplWin::setContentSize(const Size& size) -{ -} - -void EditBoxImplWin::setAnchorPoint(const Vec2& anchorPoint) -{ // don't need to be implemented on win32 platform. - -} - -void EditBoxImplWin::visit(void) -{ -} - -void EditBoxImplWin::openKeyboard() -{ - if (_delegate != nullptr) - { - _delegate->editBoxEditingDidBegin(_editBox); - } - - EditBox* pEditBox = this->getEditBox(); - if (nullptr != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); - ScriptEvent event(kCommonEvent,(void*)&data); - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } - - std::string placeHolder = _labelPlaceHolder->getString(); - if (placeHolder.length() == 0) - placeHolder = "Enter value"; - - char pText[100]= {0}; - std::string text = getText(); - if (text.length()) - strncpy(pText, text.c_str(), 100); - auto glView = Director::getInstance()->getOpenGLView(); - HWND hwnd = glView->getWin32Window(); - bool didChange = CWin32InputBox::InputBox("Input", placeHolder.c_str(), pText, 100, false, hwnd) == IDOK; - - if (didChange) - setText(pText); - - if (_delegate != nullptr) { - if (didChange) - _delegate->editBoxTextChanged(_editBox, getText()); - _delegate->editBoxEditingDidEnd(_editBox); - _delegate->editBoxReturn(_editBox); - } - -#if CC_ENABLE_SCRIPT_BINDING - if (nullptr != _editBox && 0 != _editBox->getScriptEditBoxHandler()) - { - CommonScriptData data(_editBox->getScriptEditBoxHandler(), "changed",_editBox); - ScriptEvent event(kCommonEvent,(void*)&data); - if (didChange) - { - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } - memset(data.eventName,0,sizeof(data.eventName)); - strncpy(data.eventName,"ended",sizeof(data.eventName)); - event.data = (void*)&data; - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - memset(data.eventName,0,sizeof(data.eventName)); - strncpy(data.eventName,"return",sizeof(data.eventName)); - event.data = (void*)&data; - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif // #if CC_ENABLE_SCRIPT_BINDING -} - -void EditBoxImplWin::closeKeyboard() -{ - -} - -void EditBoxImplWin::onEnter(void) -{ - -} - -NS_CC_EXT_END - -#endif /* (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) */ diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplWin.h b/extensions/GUI/CCEditBox/CCEditBoxImplWin.h deleted file mode 100644 index 4d04fb6cce..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplWin.h +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2013 Jozef Pridavok - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEditBoxIMPLWIN_H__ -#define __CCEditBoxIMPLWIN_H__ - -#include "cocos2d.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - -#include "extensions/ExtensionMacros.h" -#include "CCEditBoxImpl.h" -#include "extensions/ExtensionExport.h" - -NS_CC_EXT_BEGIN - -class EditBox; - -class CC_EX_DLL EditBoxImplWin : public EditBoxImpl -{ -public: - /** - * @js NA - */ - EditBoxImplWin(EditBox* pEditText); - /** - * @js NA - * @lua NA - */ - virtual ~EditBoxImplWin(); - - virtual bool initWithSize(const Size& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const Color3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const Color3B& color); - virtual void setInputMode(EditBox::InputMode inputMode); - virtual void setInputFlag(EditBox::InputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(EditBox::KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const Vec2& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const Size& size); - virtual void setAnchorPoint(const Vec2& anchorPoint); - /** - * @js NA - * @lua NA - */ - virtual void visit(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(void); -private: - - Label* _label; - Label* _labelPlaceHolder; - EditBox::InputMode _editBoxInputMode; - EditBox::InputFlag _editBoxInputFlag; - EditBox::KeyboardReturnType _keyboardReturnType; - - std::string _text; - std::string _placeHolder; - - Color3B _colText; - Color3B _colPlaceHolder; - - int _maxLength; - Size _editSize; - - /* - Size _contentSize; - HWND _sysEdit; - int _maxTextLength; - */ -}; - - -NS_CC_EXT_END - -#endif /* (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) */ - -#endif /* __CCEditBoxIMPLWIN_H__ */ - diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplWp8.cpp b/extensions/GUI/CCEditBox/CCEditBoxImplWp8.cpp deleted file mode 100644 index 245149d164..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplWp8.cpp +++ /dev/null @@ -1,303 +0,0 @@ -/**************************************************************************** -Copyright (c) 2014 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "CCEditBoxImplWp8.h" -#include "CCEditBox.h" -#include "CCGLViewImpl.h" -#include "base/CCScriptSupport.h" -#include "base/ccUTF8.h" - -NS_CC_EXT_BEGIN - -EditBoxImpl* __createSystemEditBox(EditBox* pEditBox) -{ - return new CCEditBoxImplWp8(pEditBox); -} - -CCEditBoxImplWp8::CCEditBoxImplWp8( EditBox* pEditText ) - : EditBoxImpl(pEditText) - , m_pLabel(NULL) - , m_pLabelPlaceHolder(NULL) - , m_eEditBoxInputMode(EditBox::InputMode::SINGLE_LINE) - , m_eEditBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS) - , m_eKeyboardReturnType(EditBox::KeyboardReturnType::DEFAULT) - , m_colText(Color3B::WHITE) - , m_colPlaceHolder(Color3B::GRAY) - , m_nMaxLength(-1) -{ - -} - -CCEditBoxImplWp8::~CCEditBoxImplWp8() -{ - -} - -void CCEditBoxImplWp8::openKeyboard() -{ - if (_delegate != NULL) - { - _delegate->editBoxEditingDidBegin(_editBox); - } - - EditBox* pEditBox = this->getEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); - ScriptEvent event(kCommonEvent,(void*)&data); - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } - - std::string placeHolder = m_pLabelPlaceHolder->getString(); - if (placeHolder.length() == 0) - placeHolder = "Enter value"; - - char pText[100]= {0}; - std::string text = getText(); - if (text.length()) - strncpy(pText, text.c_str(), 100); - - Windows::Foundation::EventHandler^ receiveHandler = ref new Windows::Foundation::EventHandler( - [this](Platform::Object^ sender, Platform::String^ arg) - { - setText(PlatformStringTostring(arg).c_str()); - if (_delegate != NULL) { - _delegate->editBoxTextChanged(_editBox, getText()); - _delegate->editBoxEditingDidEnd(_editBox); - _delegate->editBoxReturn(_editBox); - } - }); - - GLViewImpl::sharedOpenGLView()->OpenXamlEditBox(stringToPlatformString(placeHolder), stringToPlatformString(getText()), m_nMaxLength, (int)m_eEditBoxInputMode, (int)m_eEditBoxInputFlag, receiveHandler); -} - -bool CCEditBoxImplWp8::initWithSize( const Size& size ) -{ - //! int fontSize = getFontSizeAccordingHeightJni(size.height-12); - m_pLabel = Label::createWithSystemFont("", "", size.height-12); - // align the text vertically center - m_pLabel->setAnchorPoint(Vec2(0.0f, 0.5f)); - m_pLabel->setPosition(Vec2(5.0, size.height / 2.0f)); - m_pLabel->setColor(m_colText); - _editBox->addChild(m_pLabel); - - m_pLabelPlaceHolder = Label::createWithSystemFont("", "", size.height-12); - // align the text vertically center - m_pLabelPlaceHolder->setAnchorPoint(Vec2(0.0f, 0.5f)); - m_pLabelPlaceHolder->setPosition(Vec2(5.0f, size.height / 2.0f)); - m_pLabelPlaceHolder->setVisible(false); - m_pLabelPlaceHolder->setColor(m_colPlaceHolder); - _editBox->addChild(m_pLabelPlaceHolder); - - m_EditSize = size; - return true; -} - -void CCEditBoxImplWp8::setFont( const char* pFontName, int fontSize ) -{ - if(m_pLabel != NULL) { - m_pLabel->setSystemFontName(pFontName); - m_pLabel->setSystemFontSize(fontSize); - } - - if(m_pLabelPlaceHolder != NULL) { - m_pLabelPlaceHolder->setSystemFontName(pFontName); - m_pLabelPlaceHolder->setSystemFontSize(fontSize); - } -} - -void CCEditBoxImplWp8::setFontColor( const Color3B& color ) -{ - m_colText = color; - m_pLabel->setColor(color); -} - -void CCEditBoxImplWp8::setPlaceholderFont( const char* pFontName, int fontSize ) -{ - if(m_pLabelPlaceHolder != NULL) { - m_pLabelPlaceHolder->setSystemFontName(pFontName); - m_pLabelPlaceHolder->setSystemFontSize(fontSize); - } -} - -void CCEditBoxImplWp8::setPlaceholderFontColor( const Color3B& color ) -{ - m_colPlaceHolder = color; - m_pLabelPlaceHolder->setColor(color); -} - -void CCEditBoxImplWp8::setInputMode( EditBox::InputMode inputMode ) -{ - m_eEditBoxInputMode = inputMode; -} - -void CCEditBoxImplWp8::setInputFlag(EditBox::InputFlag inputFlag ) -{ - m_eEditBoxInputFlag = inputFlag; -} - -void CCEditBoxImplWp8::setMaxLength( int maxLength ) -{ - m_nMaxLength = maxLength; -} - -int CCEditBoxImplWp8::getMaxLength() -{ - return m_nMaxLength; -} - -void CCEditBoxImplWp8::setReturnType( EditBox::KeyboardReturnType returnType ) -{ - m_eKeyboardReturnType = returnType; -} - -bool CCEditBoxImplWp8::isEditing() -{ - return false; -} - -void CCEditBoxImplWp8::setText( const char* pText ) -{ - if (pText != NULL) - { - m_strText = pText; - - if (m_strText.length() > 0) - { - m_pLabelPlaceHolder->setVisible(false); - - std::string strToShow; - - if (EditBox::InputFlag::PASSWORD == m_eEditBoxInputFlag) - { - long length = cc_utf8_strlen(m_strText.c_str(), -1); - for (long i = 0; i < length; i++) - { - strToShow.append("*"); - } - } - else - { - strToShow = m_strText; - } - - //! std::string strWithEllipsis = getStringWithEllipsisJni(strToShow.c_str(), m_EditSize.width, m_EditSize.height-12); - //! m_pLabel->setString(strWithEllipsis.c_str()); - m_pLabel->setString(strToShow.c_str()); - } - else - { - m_pLabelPlaceHolder->setVisible(true); - m_pLabel->setString(""); - } - - } -} - -const char* CCEditBoxImplWp8::getText( void ) -{ - return m_strText.c_str(); -} - -void CCEditBoxImplWp8::setPlaceHolder( const char* pText ) -{ - if (pText != NULL) - { - m_strPlaceHolder = pText; - if (m_strPlaceHolder.length() > 0 && m_strText.length() == 0) - { - m_pLabelPlaceHolder->setVisible(true); - } - - m_pLabelPlaceHolder->setString(m_strPlaceHolder.c_str()); - } -} - -void CCEditBoxImplWp8::setPosition( const Vec2& pos ) -{ - -} - -void CCEditBoxImplWp8::setVisible( bool visible ) -{ - -} - -void CCEditBoxImplWp8::setContentSize( const Size& size ) -{ - -} - -void CCEditBoxImplWp8::setAnchorPoint( const Vec2& anchorPoint ) -{ - -} - -void CCEditBoxImplWp8::visit( void ) -{ - -} - -void CCEditBoxImplWp8::doAnimationWhenKeyboardMove( float duration, float distance ) -{ - -} - -void CCEditBoxImplWp8::closeKeyboard() -{ - -} - -void CCEditBoxImplWp8::onEnter( void ) -{ - -} - -Platform::String^ CCEditBoxImplWp8::stringToPlatformString( std::string strSrc ) -{ - // to wide char - int nStrLen = MultiByteToWideChar(CP_UTF8, 0, strSrc.c_str(), -1, NULL, 0); - wchar_t* pWStr = new wchar_t[nStrLen + 1]; - memset(pWStr, 0, nStrLen + 1); - MultiByteToWideChar(CP_UTF8, 0, strSrc.c_str(), -1, pWStr, nStrLen); - Platform::String^ strDst = ref new Platform::String(pWStr); - delete[] pWStr; - return strDst; -} - -std::string CCEditBoxImplWp8::PlatformStringTostring( Platform::String^ strSrc ) -{ - const wchar_t* pWStr = strSrc->Data(); - int nStrLen = WideCharToMultiByte(CP_UTF8, 0, pWStr, -1, NULL, 0, NULL, NULL); - char* pStr = new char[nStrLen + 1]; - memset(pStr, 0, nStrLen + 1); - WideCharToMultiByte(CP_UTF8, 0, pWStr, -1, pStr, nStrLen, NULL, NULL); ; - - std::string strDst = std::string(pStr); - - delete[] pStr; - return strDst; -} - -NS_CC_EXT_END diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplWp8.h b/extensions/GUI/CCEditBox/CCEditBoxImplWp8.h deleted file mode 100644 index 4513ec6dfd..0000000000 --- a/extensions/GUI/CCEditBox/CCEditBoxImplWp8.h +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -Copyright (c) 2014 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCEditBoxIMPLWP8_H__ -#define __CCEditBoxIMPLWP8_H__ - -#include "ExtensionMacros.h" -#include "CCEditBoxImpl.h" - -NS_CC_EXT_BEGIN - -class CCEditBox; - -class CCEditBoxImplWp8 : public EditBoxImpl -{ -public: - CCEditBoxImplWp8(EditBox* pEditText); - virtual ~CCEditBoxImplWp8(); - - virtual bool initWithSize(const Size& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const Color3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const Color3B& color); - virtual void setInputMode(EditBox::InputMode inputMode); - virtual void setInputFlag(EditBox::InputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(EditBox::KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const Vec2& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const Size& size); - virtual void setAnchorPoint(const Vec2& anchorPoint); - virtual void visit(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - virtual void onEnter(void); -private: - Platform::String^ stringToPlatformString(std::string strSrc); - std::string PlatformStringTostring(Platform::String^ strSrc); -private: - - Label* m_pLabel; - Label* m_pLabelPlaceHolder; - EditBox::InputMode m_eEditBoxInputMode; - EditBox::InputFlag m_eEditBoxInputFlag; - (EditBox::KeyboardReturnType m_eKeyboardReturnType; - - std::string m_strText; - std::string m_strPlaceHolder; - - Color3B m_colText; - Color3B m_colPlaceHolder; - - int m_nMaxLength; - Size m_EditSize; -}; - -NS_CC_EXT_END - -#endif diff --git a/extensions/cocos-ext.h b/extensions/cocos-ext.h index a204f40e43..695077d628 100644 --- a/extensions/cocos-ext.h +++ b/extensions/cocos-ext.h @@ -7,7 +7,7 @@ #include "GUI/CCControlExtension/CCControlExtensions.h" #include "GUI/CCScrollView/CCScrollView.h" #include "GUI/CCScrollView/CCTableView.h" -#include "GUI/CCEditBox/CCEditBox.h" +#include "ui/UIEditBox/UIEditBox.h" // Physics integration #include "physics-nodes/CCPhysicsDebugNode.h" diff --git a/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp index b54a42aa32..a84855b7b8 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp @@ -11,6 +11,7 @@ USING_NS_CC; USING_NS_CC_EXT; +using namespace ui; EditBoxTest::EditBoxTest() @@ -37,7 +38,7 @@ EditBoxTest::EditBoxTest() auto editBoxSize = Size(visibleSize.width - 100, 60); // top - _editName = EditBox::create(editBoxSize, Scale9Sprite::create("extensions/green_edit.png")); + _editName = EditBox::create(editBoxSize, ui::Scale9Sprite::create("extensions/green_edit.png")); _editName->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height*3/4)); _editName->setFontName("Paint Boy"); _editName->setFontSize(25); @@ -50,7 +51,7 @@ EditBoxTest::EditBoxTest() addChild(_editName); // middle - _editPassword = EditBox::create(editBoxSize, Scale9Sprite::create("extensions/orange_edit.png")); + _editPassword = EditBox::create(editBoxSize, ui::Scale9Sprite::create("extensions/orange_edit.png")); _editPassword->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/2)); #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) _editPassword->setFont("American Typewriter", 30); @@ -67,7 +68,7 @@ EditBoxTest::EditBoxTest() addChild(_editPassword); // bottom - _editEmail = EditBox::create(Size(editBoxSize.width, editBoxSize.height), Scale9Sprite::create("extensions/yellow_edit.png")); + _editEmail = EditBox::create(Size(editBoxSize.width, editBoxSize.height), ui::Scale9Sprite::create("extensions/yellow_edit.png")); _editEmail->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/4)); _editEmail->setAnchorPoint(Vec2(0.5, 1.0f)); _editEmail->setPlaceHolder("Email:"); @@ -90,17 +91,17 @@ void EditBoxTest::toExtensionsMainLayer(cocos2d::Ref *sender) scene->release(); } -void EditBoxTest::editBoxEditingDidBegin(cocos2d::extension::EditBox* editBox) +void EditBoxTest::editBoxEditingDidBegin(cocos2d::ui::EditBox* editBox) { log("editBox %p DidBegin !", editBox); } -void EditBoxTest::editBoxEditingDidEnd(cocos2d::extension::EditBox* editBox) +void EditBoxTest::editBoxEditingDidEnd(cocos2d::ui::EditBox* editBox) { log("editBox %p DidEnd !", editBox); } -void EditBoxTest::editBoxTextChanged(cocos2d::extension::EditBox* editBox, const std::string& text) +void EditBoxTest::editBoxTextChanged(cocos2d::ui::EditBox* editBox, const std::string& text) { log("editBox %p TextChanged, text: %s ", editBox, text.c_str()); } diff --git a/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.h b/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.h index 3cef026dbd..2de0e0642f 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.h +++ b/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.h @@ -12,22 +12,22 @@ #include "cocos2d.h" #include "extensions/cocos-ext.h" -class EditBoxTest : public cocos2d::Layer, public cocos2d::extension::EditBoxDelegate +class EditBoxTest : public cocos2d::Layer, public cocos2d::ui::EditBoxDelegate { public: EditBoxTest(); virtual ~EditBoxTest(); void toExtensionsMainLayer(cocos2d::Ref *sender); - virtual void editBoxEditingDidBegin(cocos2d::extension::EditBox* editBox); - virtual void editBoxEditingDidEnd(cocos2d::extension::EditBox* editBox); - virtual void editBoxTextChanged(cocos2d::extension::EditBox* editBox, const std::string& text); - virtual void editBoxReturn(cocos2d::extension::EditBox* editBox); + virtual void editBoxEditingDidBegin(cocos2d::ui::EditBox* editBox); + virtual void editBoxEditingDidEnd(cocos2d::ui::EditBox* editBox); + virtual void editBoxTextChanged(cocos2d::ui::EditBox* editBox, const std::string& text); + virtual void editBoxReturn(cocos2d::ui::EditBox* editBox); private: cocos2d::Label* _TTFShowEditReturn; - cocos2d::extension::EditBox* _editName; - cocos2d::extension::EditBox* _editPassword; - cocos2d::extension::EditBox* _editEmail; + cocos2d::ui::EditBox* _editName; + cocos2d::ui::EditBox* _editPassword; + cocos2d::ui::EditBox* _editEmail; }; void runEditBoxTest(); From de429591c3c0c963debd5cd81d570172fe5d4ce8 Mon Sep 17 00:00:00 2001 From: gin0606 Date: Mon, 25 Aug 2014 14:44:38 +0900 Subject: [PATCH 06/74] Add WebView to libui iOS --- build/cocos2d_libs.xcodeproj/project.pbxproj | 28 ++++ cocos/ui/UIWebViewWrapper.h | 47 ++++++ cocos/ui/UIWebViewWrapper.mm | 156 +++++++++++++++++++ cocos/ui/WebView-inl.h | 91 +++++++++++ cocos/ui/WebView.h | 143 +++++++++++++++++ cocos/ui/WebView.mm | 7 + cocos/ui/WebViewImpl_iOS.h | 63 ++++++++ cocos/ui/WebViewImpl_iOS.mm | 134 ++++++++++++++++ 8 files changed, 669 insertions(+) create mode 100644 cocos/ui/UIWebViewWrapper.h create mode 100644 cocos/ui/UIWebViewWrapper.mm create mode 100644 cocos/ui/WebView-inl.h create mode 100644 cocos/ui/WebView.h create mode 100644 cocos/ui/WebView.mm create mode 100644 cocos/ui/WebViewImpl_iOS.h create mode 100644 cocos/ui/WebViewImpl_iOS.mm diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 1bc96d79ab..b82b9e196a 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -634,6 +634,13 @@ 1AD71EF5180E27CF00808F54 /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */; }; 1AD71EF6180E27CF00808F54 /* CCPhysicsSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */; }; 1AD71EF7180E27CF00808F54 /* CCPhysicsSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */; }; + 1F36C41832F21B0EB4B6E581 /* WebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F36C97CCD87CFB096B921D5 /* WebView.h */; }; + 1F36C5DC6B9AD57C010B5FAA /* UIWebViewWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F36C89CE6DA969A8AF515AD /* UIWebViewWrapper.h */; }; + 1F36C63198F935DE23451317 /* WebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1F36C92BF6113FEFC19554AA /* WebView.mm */; }; + 1F36C6456029931BAEC90A06 /* WebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1F36CF6F04510B2F6F74EC8A /* WebViewImpl_iOS.mm */; }; + 1F36C7010C074699AF6C9371 /* WebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F36C64BC5CD5BA16A6AB1E9 /* WebViewImpl_iOS.h */; }; + 1F36C8D2A011ABC37E2A5673 /* UIWebViewWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1F36CDAC69B487B7531C782F /* UIWebViewWrapper.mm */; }; + 1F36CFD339EDB3FD6F3C6755 /* WebView-inl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F36C3CA177A0FBE289B6BD5 /* WebView-inl.h */; }; 2958244B19873D8E00F9746D /* UIScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */; }; 2958244C19873D8E00F9746D /* UIScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */; }; 2958244D19873D8E00F9746D /* UIScale9Sprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 2958244A19873D8E00F9746D /* UIScale9Sprite.h */; }; @@ -2450,6 +2457,13 @@ 1AD71EED180E27CF00808F54 /* CCPhysicsDebugNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsDebugNode.h; sourceTree = ""; }; 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsSprite.cpp; sourceTree = ""; }; 1AD71EEF180E27CF00808F54 /* CCPhysicsSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsSprite.h; sourceTree = ""; }; + 1F36C3CA177A0FBE289B6BD5 /* WebView-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WebView-inl.h"; sourceTree = ""; }; + 1F36C64BC5CD5BA16A6AB1E9 /* WebViewImpl_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewImpl_iOS.h; sourceTree = ""; }; + 1F36C89CE6DA969A8AF515AD /* UIWebViewWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebViewWrapper.h; sourceTree = ""; }; + 1F36C92BF6113FEFC19554AA /* WebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebView.mm; sourceTree = ""; }; + 1F36C97CCD87CFB096B921D5 /* WebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebView.h; sourceTree = ""; }; + 1F36CDAC69B487B7531C782F /* UIWebViewWrapper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebViewWrapper.mm; sourceTree = ""; }; + 1F36CF6F04510B2F6F74EC8A /* WebViewImpl_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewImpl_iOS.mm; sourceTree = ""; }; 2905F9E918CF08D000240AA3 /* CocosGUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocosGUI.cpp; sourceTree = ""; }; 2905F9EA18CF08D000240AA3 /* CocosGUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosGUI.h; sourceTree = ""; }; 2905F9EB18CF08D000240AA3 /* GUIDefine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIDefine.h; sourceTree = ""; }; @@ -4457,6 +4471,13 @@ 2905F9F318CF08D000240AA3 /* UICheckBox.h */, 2905F9F618CF08D000240AA3 /* UIImageView.cpp */, 2905F9F718CF08D000240AA3 /* UIImageView.h */, + 1F36C97CCD87CFB096B921D5 /* WebView.h */, + 1F36C3CA177A0FBE289B6BD5 /* WebView-inl.h */, + 1F36C64BC5CD5BA16A6AB1E9 /* WebViewImpl_iOS.h */, + 1F36C92BF6113FEFC19554AA /* WebView.mm */, + 1F36CF6F04510B2F6F74EC8A /* WebViewImpl_iOS.mm */, + 1F36CDAC69B487B7531C782F /* UIWebViewWrapper.mm */, + 1F36C89CE6DA969A8AF515AD /* UIWebViewWrapper.h */, ); name = widgets; sourceTree = ""; @@ -6174,6 +6195,10 @@ B2C59A4A19777ECF00B452DF /* UILayout.h in Headers */, B2C59A4B19777ECF00B452DF /* UILayoutParameter.h in Headers */, B2C59A4C19777ECF00B452DF /* UILayoutManager.h in Headers */, + 1F36C41832F21B0EB4B6E581 /* WebView.h in Headers */, + 1F36CFD339EDB3FD6F3C6755 /* WebView-inl.h in Headers */, + 1F36C7010C074699AF6C9371 /* WebViewImpl_iOS.h in Headers */, + 1F36C5DC6B9AD57C010B5FAA /* UIWebViewWrapper.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -7644,6 +7669,9 @@ B2C59A3219777E8C00B452DF /* UILayoutParameter.cpp in Sources */, B2C59A3319777E8C00B452DF /* UILayoutManager.cpp in Sources */, B2C59A2919777E7A00B452DF /* CocosGUI.cpp in Sources */, + 1F36C63198F935DE23451317 /* WebView.mm in Sources */, + 1F36C6456029931BAEC90A06 /* WebViewImpl_iOS.mm in Sources */, + 1F36C8D2A011ABC37E2A5673 /* UIWebViewWrapper.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/cocos/ui/UIWebViewWrapper.h b/cocos/ui/UIWebViewWrapper.h new file mode 100644 index 0000000000..2311f24d45 --- /dev/null +++ b/cocos/ui/UIWebViewWrapper.h @@ -0,0 +1,47 @@ +// +// Created by gin0606 on 2014/07/29. +// + + +#include +#include +#include + + +@interface UIWebViewWrapper : NSObject +@property (nonatomic) std::function shouldStartLoading; +@property (nonatomic) std::function didFinishLoading; +@property (nonatomic) std::function didFailLoading; +@property (nonatomic) std::function onJsCallback; + +@property(nonatomic, readonly, getter=canGoBack) BOOL canGoBack; +@property(nonatomic, readonly, getter=canGoForward) BOOL canGoForward; + ++ (instancetype)webViewWrapper; + +- (void)setVisible:(bool)visible; + +- (void)setFrameWithX:(float)x y:(float)y width:(float)width height:(float)height; + +- (void)setJavascriptInterfaceScheme:(const std::string &)scheme; + +- (void)loadData:(const std::string &)data MIMEType:(const std::string &)MIMEType textEncodingName:(const std::string &)encodingName baseURL:(const std::string &)baseURL; + +- (void)loadHTMLString:(const std::string &)string baseURL:(const std::string &)baseURL; + +- (void)loadUrl:(const std::string &)urlString; + +- (void)loadFile:(const std::string &)filePath; + +- (void)stopLoading; + +- (void)reload; + +- (void)evaluateJS:(const std::string &)js; + +- (void)goBack; + +- (void)goForward; + +- (void)setScalesPageToFit:(const bool)scalesPageToFit; +@end diff --git a/cocos/ui/UIWebViewWrapper.mm b/cocos/ui/UIWebViewWrapper.mm new file mode 100644 index 0000000000..600d8290f8 --- /dev/null +++ b/cocos/ui/UIWebViewWrapper.mm @@ -0,0 +1,156 @@ +// +// Created by gin0606 on 2014/07/29. +// + + +#import "UIWebViewWrapper.h" +#import "WebView.h" +#import "CCGLView.h" +#import "CCEAGLView.h" +#import "CCDirector.h" + + +@interface UIWebViewWrapper () +@property(nonatomic, retain) UIWebView *uiWebView; +@property(nonatomic, copy) NSString *jsScheme; +@end + +@implementation UIWebViewWrapper { + +} + ++ (instancetype)webViewWrapper { + return [[[self alloc] init] autorelease]; +} + +- (instancetype)init { + self = [super init]; + if (self) { + self.uiWebView = nil; + self.shouldStartLoading = nullptr; + self.didFinishLoading = nullptr; + self.didFailLoading = nullptr; + } + return self; +} + +- (void)dealloc { + [self.uiWebView removeFromSuperview]; + self.jsScheme = nil; + [super dealloc]; +} + +- (void)setupWebView { + if (!self.uiWebView) { + self.uiWebView = [[[UIWebView alloc] init] autorelease]; + self.uiWebView.delegate = self; + } + if (!self.uiWebView.superview) { + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + auto eaglview = (CCEAGLView *) view->getEAGLView(); + [eaglview addSubview:self.uiWebView]; + } +} + +- (void)setVisible:(bool)visible { + self.uiWebView.hidden = !visible; +} + +- (void)setFrameWithX:(float)x y:(float)y width:(float)width height:(float)height { + if (!self.uiWebView) {[self setupWebView];} + CGRect newFrame = CGRectMake(x, y, width, height); + if (!CGRectEqualToRect(self.uiWebView.frame, newFrame)) { + self.uiWebView.frame = CGRectMake(x, y, width, height); + } +} + +- (void)setJavascriptInterfaceScheme:(const std::string &)scheme { + self.jsScheme = @(scheme.c_str()); +} + +- (void)loadData:(const std::string &)data MIMEType:(const std::string &)MIMEType textEncodingName:(const std::string &)encodingName baseURL:(const std::string &)baseURL { + [self.uiWebView loadData:[NSData dataWithBytes:data.c_str() length:data.length()] + MIMEType:@(MIMEType.c_str()) + textEncodingName:@(encodingName.c_str()) + baseURL:[NSURL URLWithString:@(baseURL.c_str())]]; +} + +- (void)loadHTMLString:(const std::string &)string baseURL:(const std::string &)baseURL { + [self.uiWebView loadHTMLString:@(string.c_str()) baseURL:[NSURL URLWithString:@(baseURL.c_str())]]; +} + +- (void)loadUrl:(const std::string &)urlString { + if (!self.uiWebView) {[self setupWebView];} + NSURL *url = [NSURL URLWithString:@(urlString.c_str())]; + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + [self.uiWebView loadRequest:request]; +} + +- (void)loadFile:(const std::string &)filePath { + if (!self.uiWebView) {[self setupWebView];} + NSURL *url = [NSURL fileURLWithPath:@(filePath.c_str())]; + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + [self.uiWebView loadRequest:request]; +} + +- (void)stopLoading { + [self.uiWebView stopLoading]; +} + +- (void)reload { + [self.uiWebView reload]; +} + +- (BOOL)canGoForward { + return self.uiWebView.canGoForward; +} + +- (BOOL)canGoBack { + return self.uiWebView.canGoBack; +} + +- (void)goBack { + [self.uiWebView goBack]; +} + +- (void)goForward { + [self.uiWebView goForward]; +} + +- (void)evaluateJS:(const std::string &)js { + if (!self.uiWebView) {[self setupWebView];} + [self.uiWebView stringByEvaluatingJavaScriptFromString:@(js.c_str())]; +} + +- (void)setScalesPageToFit:(const bool)scalesPageToFit { + self.uiWebView.scalesPageToFit = scalesPageToFit; +} + +#pragma mark - UIWebViewDelegate +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { + NSString *url = [[request URL] absoluteString]; + if ([[[request URL] scheme] isEqualToString:self.jsScheme]) { + self.onJsCallback([url UTF8String]); + return NO; + } + if (self.shouldStartLoading) { + return self.shouldStartLoading([url UTF8String]); + } + return YES; +} + +- (void)webViewDidFinishLoad:(UIWebView *)webView { + if (self.didFinishLoading) { + NSString *url = [[webView.request URL] absoluteString]; + self.didFinishLoading([url UTF8String]); + } +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { + if (self.didFailLoading) { + NSString *url = error.userInfo[NSURLErrorFailingURLStringErrorKey]; + self.didFailLoading([url UTF8String]); + } +} + +@end diff --git a/cocos/ui/WebView-inl.h b/cocos/ui/WebView-inl.h new file mode 100644 index 0000000000..d044cf1189 --- /dev/null +++ b/cocos/ui/WebView-inl.h @@ -0,0 +1,91 @@ +#ifndef __CC_WebView_INL_H_ +#define __CC_WebView_INL_H_ + +#include "WebView.h" +#include "CCGLView.h" +#include "base/CCDirector.h" +#include "platform/CCFileUtils.h" + +namespace cocos2d { +namespace plugin { +WebView::WebView() : _impl(new WebViewImpl(this)) { +} + +WebView::~WebView() { + delete _impl; +} + +WebView *WebView::create() { + auto pRet = new WebView(); + if (pRet->init()) { + pRet->autorelease(); + return pRet; + } + return nullptr; +} + +void WebView::setJavascriptInterfaceScheme(const std::string &scheme) { + _impl->setJavascriptInterfaceScheme(scheme); +} + +void WebView::loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { + _impl->loadData(data, MIMEType, encoding, baseURL); +} + +void WebView::loadHTMLString(const std::string &string, const std::string &baseURL) { + _impl->loadHTMLString(string, baseURL); +} + +void WebView::loadUrl(const std::string &url) { + _impl->loadUrl(url); +} + +void WebView::loadFile(const std::string &fileName) { + _impl->loadFile(fileName); +} + +void WebView::stopLoading() { + _impl->stopLoading(); +} + +void WebView::reload() { + _impl->reload(); +} + +bool WebView::canGoBack() { + return _impl->canGoBack(); +} + +bool WebView::canGoForward() { + return _impl->canGoForward(); +} + +void WebView::goBack() { + _impl->goBack(); +} + +void WebView::goForward() { + _impl->goForward(); +} + +void WebView::evaluateJS(const std::string &js) { + _impl->evaluateJS(js); +} + +void WebView::setScalesPageToFit(bool const scalesPageToFit) { + _impl->setScalesPageToFit(scalesPageToFit); +} + +void WebView::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { + cocos2d::ui::Widget::draw(renderer, transform, flags); + _impl->draw(renderer, transform, flags); +} + +void WebView::setVisible(bool visible) { + Node::setVisible(visible); + _impl->setVisible(visible); +} +} // namespace cocos2d +} // namespace plugin + +#endif diff --git a/cocos/ui/WebView.h b/cocos/ui/WebView.h new file mode 100644 index 0000000000..72f9053c47 --- /dev/null +++ b/cocos/ui/WebView.h @@ -0,0 +1,143 @@ +// +// Created by gin0606 on 2014/07/29. +// + +#ifndef __Cocos2d_Plugin_WebView_H_ +#define __Cocos2d_Plugin_WebView_H_ + +#include "ui/UIWidget.h" +#include "base/CCData.h" + +namespace cocos2d { +namespace plugin { +class WebViewImpl; + +class WebView : public cocos2d::ui::Widget { +public: + /** + * Allocates and initializes a WebView. + */ + static WebView *create(); + + /** + * Default constructor + */ + WebView(); + + /** + * Default destructor + */ + virtual ~WebView(); + + /** + * Call before a web view begins loading. + * @param sender The web view that is about to load new content. + * @param url content URL. + * @return YES if the web view should begin loading content; otherwise, NO . + */ + std::function shouldStartLoading; + /** + * Call after a web view finishes loading. + * @param sender The web view that has finished loading. + * @param url content URL. + */ + std::function didFinishLoading; + /** + * Call if a web view failed to load content. + * @param sender The web view that has failed loading. + * @param url content URL. + */ + std::function didFailLoading; + + /** + * Set javascript interface scheme. + * @see #onJsCallback + */ + void setJavascriptInterfaceScheme(const std::string &scheme); + + /** + * This callback called when load URL that start with javascript interface scheme. + */ + std::function onJsCallback; + + /** + * Sets the main page contents, MIME type, content encoding, and base URL. + * @param data The content for the main page. + * @param MIMEType The MIME type of the data. + * @param encoding the encoding of the data. + * @param baseURL The base URL for the content. + */ + void loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL); + + /** + * Sets the main page content and base URL. + * @param string The content for the main page. + * @param baseURL The base URL for the content. + */ + void loadHTMLString(const std::string &string, const std::string &baseURL); + + /** + * Loads the given URL. + * @param url content URL + */ + void loadUrl(const std::string &url); + + /** + * Loads the given fileName. + * @param fileName content fileName + */ + void loadFile(const std::string &fileName); + + /** + * Stops the current load. + */ + void stopLoading(); + + /** + * Reloads the current URL. + */ + void reload(); + + /** + * Gets whether this WebView has a back history item. + * @return web view has a back history item. + */ + bool canGoBack(); + + /** + * Gets whether this WebView has a forward history item. + * @return web view has a forward history item. + */ + bool canGoForward(); + + /** + * Goes back in the history. + */ + void goBack(); + + /** + * Goes forward in the history. + */ + void goForward(); + + /** + * evaluates JavaScript in the context of the currently displayed page + */ + void evaluateJS(const std::string &js); + + /** + * Set WebView should support zooming. The default value is false. + */ + void setScalesPageToFit(const bool scalesPageToFit); + + virtual void draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) override; + + virtual void setVisible(bool visible) override; + +private: + cocos2d::plugin::WebViewImpl *_impl; +}; +} // namespace cocos2d +} // namespace plugin + +#endif //__Cocos2d_Plugin_WebView_H_ diff --git a/cocos/ui/WebView.mm b/cocos/ui/WebView.mm new file mode 100644 index 0000000000..c0ed30d1e7 --- /dev/null +++ b/cocos/ui/WebView.mm @@ -0,0 +1,7 @@ +// +// Created by gin0606 on 2014/07/29. +// + + +#include "WebViewImpl_iOS.h" +#include "WebView-inl.h" diff --git a/cocos/ui/WebViewImpl_iOS.h b/cocos/ui/WebViewImpl_iOS.h new file mode 100644 index 0000000000..a2f317235e --- /dev/null +++ b/cocos/ui/WebViewImpl_iOS.h @@ -0,0 +1,63 @@ +// +// Created by gin0606 on 2014/07/30. +// + +#ifndef __cocos2d_plugin_WebViewImpl_IOS_H_ +#define __cocos2d_plugin_WebViewImpl_IOS_H_ + +#include + +@class UIWebViewWrapper; + +namespace cocos2d { +class Data; +class Renderer; +class Mat4; +namespace plugin { +class WebView; + +class WebViewImpl { +public: + WebViewImpl(cocos2d::plugin::WebView *webView); + + virtual ~WebViewImpl(); + + void setJavascriptInterfaceScheme(const std::string &scheme); + + void loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL); + + void loadHTMLString(const std::string &string, const std::string &baseURL); + + void loadUrl(const std::string &url); + + void loadFile(const std::string &fileName); + + void stopLoading(); + + void reload(); + + bool canGoBack(); + + bool canGoForward(); + + void goBack(); + + void goForward(); + + void evaluateJS(const std::string &js); + + void setScalesPageToFit(const bool scalesPageToFit); + + virtual void draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags); + + virtual void setVisible(bool visible); + +private: + UIWebViewWrapper *_uiWebViewWrapper; + WebView *_webView; +}; + +} // namespace cocos2d +} // namespace plugin + +#endif //__cocos2d_plugin_WebViewImpl_IOS_H_ diff --git a/cocos/ui/WebViewImpl_iOS.mm b/cocos/ui/WebViewImpl_iOS.mm new file mode 100644 index 0000000000..7788f3dd1f --- /dev/null +++ b/cocos/ui/WebViewImpl_iOS.mm @@ -0,0 +1,134 @@ +// +// Created by gin0606 on 2014/07/30. +// + +#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS + +#include "WebViewImpl_iOS.h" +#import "UIWebViewWrapper.h" +#include "renderer/CCRenderer.h" +#include "WebView.h" +#include "CCDirector.h" +#include "CCGLView.h" +#include "CCEAGLView.h" +#include "platform/CCFileUtils.h" + +namespace cocos2d { +namespace plugin { + +WebViewImpl::WebViewImpl(WebView *webView) + : _uiWebViewWrapper([UIWebViewWrapper webViewWrapper]), _webView(webView) { + [_uiWebViewWrapper retain]; + _uiWebViewWrapper.shouldStartLoading = [this](std::string url) { + if (this->_webView->shouldStartLoading) { + return this->_webView->shouldStartLoading(this->_webView, url); + } + return true; + }; + _uiWebViewWrapper.didFinishLoading = [this](std::string url) { + if (this->_webView->didFinishLoading) { + this->_webView->didFinishLoading(this->_webView, url); + } + }; + _uiWebViewWrapper.didFailLoading = [this](std::string url) { + if (this->_webView->didFailLoading) { + this->_webView->didFailLoading(this->_webView, url); + } + }; + _uiWebViewWrapper.onJsCallback = [this](std::string url) { + if (this->_webView->onJsCallback) { + this->_webView->onJsCallback(this->_webView, url); + } + }; +} + +WebViewImpl::~WebViewImpl() { + [_uiWebViewWrapper release]; + _uiWebViewWrapper = nullptr; +} + +void WebViewImpl::setJavascriptInterfaceScheme(const std::string &scheme) { + [_uiWebViewWrapper setJavascriptInterfaceScheme:scheme]; +} + +void WebViewImpl::loadData(const Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { + std::string dataString(reinterpret_cast(data.getBytes()), static_cast(data.getSize())); + [_uiWebViewWrapper loadData:dataString MIMEType:MIMEType textEncodingName:encoding baseURL:baseURL]; +} + +void WebViewImpl::loadHTMLString(const std::string &string, const std::string &baseURL) { + [_uiWebViewWrapper loadHTMLString:string baseURL:baseURL]; +} + +void WebViewImpl::loadUrl(const std::string &url) { + [_uiWebViewWrapper loadUrl:url]; +} + +void WebViewImpl::loadFile(const std::string &fileName) { + auto fullPath = cocos2d::FileUtils::getInstance()->fullPathForFilename(fileName); + [_uiWebViewWrapper loadFile:fullPath]; +} + +void WebViewImpl::stopLoading() { + [_uiWebViewWrapper stopLoading]; +} + +void WebViewImpl::reload() { + [_uiWebViewWrapper reload]; +} + +bool WebViewImpl::canGoBack() { + return _uiWebViewWrapper.canGoBack; +} + +bool WebViewImpl::canGoForward() { + return _uiWebViewWrapper.canGoForward; +} + +void WebViewImpl::goBack() { + [_uiWebViewWrapper goBack]; +} + +void WebViewImpl::goForward() { + [_uiWebViewWrapper goForward]; +} + +void WebViewImpl::evaluateJS(const std::string &js) { + [_uiWebViewWrapper evaluateJS:js]; +} + +void WebViewImpl::setScalesPageToFit(const bool scalesPageToFit) { + [_uiWebViewWrapper setScalesPageToFit:scalesPageToFit]; +} + +void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { + if (flags & cocos2d::Node::FLAGS_TRANSFORM_DIRTY) { + auto direcrot = cocos2d::Director::getInstance(); + auto glView = direcrot->getOpenGLView(); + auto frameSize = glView->getFrameSize(); + auto scaleFactor = [static_cast(glView->getEAGLView()) contentScaleFactor]; + + auto winSize = direcrot->getWinSize(); + + auto leftBottom = this->_webView->convertToWorldSpace(cocos2d::Vec2::ZERO); + auto rightTop = this->_webView->convertToWorldSpace(cocos2d::Vec2(this->_webView->getContentSize().width, this->_webView->getContentSize().height)); + + auto x = (frameSize.width / 2 + (leftBottom.x - winSize.width / 2) * glView->getScaleX()) / scaleFactor; + auto y = (frameSize.height / 2 - (rightTop.y - winSize.height / 2) * glView->getScaleY()) / scaleFactor; + auto width = (rightTop.x - leftBottom.x) * glView->getScaleX() / scaleFactor; + auto height = (rightTop.y - leftBottom.y) * glView->getScaleY() / scaleFactor; + + [_uiWebViewWrapper setFrameWithX:x + y:y + width:width + height:height]; + } +} + +void WebViewImpl::setVisible(bool visible) { + [_uiWebViewWrapper setVisible:visible]; +} +} // namespace cocos2d +} // namespace plugin + +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS From a3f4164b643a3cda5819fc88304f343ef4ce9775 Mon Sep 17 00:00:00 2001 From: gin0606 Date: Mon, 25 Aug 2014 14:46:26 +0900 Subject: [PATCH 07/74] Fix compile error --- build/cocos2d_libs.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index b82b9e196a..f1f482648b 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -8733,6 +8733,7 @@ ALWAYS_SEARCH_USER_PATHS = YES; ARCHS = "$(ARCHS_STANDARD)"; EXECUTABLE_PREFIX = ""; + GCC_PREFIX_HEADER = "../cocos/cocos2d-prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", CC_TARGET_OS_IPHONE, @@ -8755,6 +8756,7 @@ ARCHS = "$(ARCHS_STANDARD)"; EXECUTABLE_PREFIX = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PREFIX_HEADER = "../cocos/cocos2d-prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", CC_TARGET_OS_IPHONE, From 41011824c147653a9aa2abce2473111728ef8ca7 Mon Sep 17 00:00:00 2001 From: gin0606 Date: Mon, 25 Aug 2014 15:01:18 +0900 Subject: [PATCH 08/74] Add WebView to libui Android --- cocos/ui/Android.mk | 3 + cocos/ui/WebView-inl.h | 2 +- cocos/ui/WebView.cpp | 7 + cocos/ui/WebViewImpl_android.cpp | 334 ++++++++++++++++++ cocos/ui/WebViewImpl_android.h | 72 ++++ ...org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp | 35 ++ .../org_cocos2dx_lib_Cocos2dxWebViewHelper.h | 59 ++++ 7 files changed, 511 insertions(+), 1 deletion(-) create mode 100644 cocos/ui/WebView.cpp create mode 100644 cocos/ui/WebViewImpl_android.cpp create mode 100644 cocos/ui/WebViewImpl_android.h create mode 100644 cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp create mode 100644 cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.h diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index ab417448f1..5dc94fe248 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -31,6 +31,9 @@ UIRelativeBox.cpp \ UIVideoPlayerAndroid.cpp \ UIDeprecated.cpp \ UIScale9Sprite.cpp \ +WebView.cpp \ +WebViewImpl_android.cpp \ +org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/../editor-support diff --git a/cocos/ui/WebView-inl.h b/cocos/ui/WebView-inl.h index d044cf1189..b37323a3d4 100644 --- a/cocos/ui/WebView-inl.h +++ b/cocos/ui/WebView-inl.h @@ -2,7 +2,7 @@ #define __CC_WebView_INL_H_ #include "WebView.h" -#include "CCGLView.h" +#include "platform/CCGLView.h" #include "base/CCDirector.h" #include "platform/CCFileUtils.h" diff --git a/cocos/ui/WebView.cpp b/cocos/ui/WebView.cpp new file mode 100644 index 0000000000..b8144927e7 --- /dev/null +++ b/cocos/ui/WebView.cpp @@ -0,0 +1,7 @@ +// +// Created by gin0606 on 2014/08/05. +// + + +#include "WebViewImpl_android.h" +#include "WebView-inl.h" diff --git a/cocos/ui/WebViewImpl_android.cpp b/cocos/ui/WebViewImpl_android.cpp new file mode 100644 index 0000000000..261db76781 --- /dev/null +++ b/cocos/ui/WebViewImpl_android.cpp @@ -0,0 +1,334 @@ +// +// Created by gin0606 on 2014/07/30. +// + +#include "WebViewImpl_android.h" +#include "WebView.h" +#include "org_cocos2dx_lib_Cocos2dxWebViewHelper.h" +#include "jni/JniHelper.h" +#include "platform/CCGLView.h" +#include "base/CCDirector.h" +#include "platform/CCFileUtils.h" +#include + +#define CLASS_NAME "org/cocos2dx/lib/Cocos2dxWebViewHelper" + +namespace { +int createWebViewJNI() { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "createWebView", "()I")) { + jint viewTag = t.env->CallStaticIntMethod(t.classID, t.methodID); + t.env->DeleteLocalRef(t.classID); + return viewTag; + } + return -1; +} + +void removeWebViewJNI(const int index) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "removeWebView", "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + } +} + +void setWebViewRectJNI(const int index, const int left, const int top, const int width, const int height) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setWebViewRect", "(IIIII)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, left, top, width, height); + t.env->DeleteLocalRef(t.classID); + } +} + +void setJavascriptInterfaceSchemeJNI(const int index, const std::string &scheme) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setJavascriptInterfaceScheme", "(ILjava/lang/String;)V")) { + jstring jScheme = t.env->NewStringUTF(scheme.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jScheme); + + t.env->DeleteLocalRef(jScheme); + t.env->DeleteLocalRef(t.classID); + } +} + +void loadDataJNI(const int index, const std::string &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadData", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V")) { + jstring jData = t.env->NewStringUTF(data.c_str()); + jstring jMIMEType = t.env->NewStringUTF(MIMEType.c_str()); + jstring jEncoding = t.env->NewStringUTF(encoding.c_str()); + jstring jBaseURL = t.env->NewStringUTF(baseURL.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jData, jMIMEType, jEncoding, jBaseURL); + + t.env->DeleteLocalRef(jData); + t.env->DeleteLocalRef(jMIMEType); + t.env->DeleteLocalRef(jEncoding); + t.env->DeleteLocalRef(jBaseURL); + t.env->DeleteLocalRef(t.classID); + } +} + +void loadHTMLStringJNI(const int index, const std::string &string, const std::string &baseURL) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadHTMLString", "(ILjava/lang/String;Ljava/lang/String;)V")) { + jstring jString = t.env->NewStringUTF(string.c_str()); + jstring jBaseURL = t.env->NewStringUTF(baseURL.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jString, jBaseURL); + + t.env->DeleteLocalRef(jString); + t.env->DeleteLocalRef(jBaseURL); + t.env->DeleteLocalRef(t.classID); + } +} + +void loadUrlJNI(const int index, const std::string &url) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadUrl", "(ILjava/lang/String;)V")) { + jstring jUrl = t.env->NewStringUTF(url.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jUrl); + + t.env->DeleteLocalRef(jUrl); + t.env->DeleteLocalRef(t.classID); + } +} + +void loadFileJNI(const int index, const std::string &filePath) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadFile", "(ILjava/lang/String;)V")) { + jstring jFilePath = t.env->NewStringUTF(filePath.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jFilePath); + + t.env->DeleteLocalRef(jFilePath); + t.env->DeleteLocalRef(t.classID); + } +} + +void stopLoadingJNI(const int index) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "stopLoading", "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + } +} + +void reloadJNI(const int index) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "reload", "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + } +} + +bool canGoBackJNI(const int index) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "canGoBack", "(I)Z")) { + jboolean ret = t.env->CallStaticBooleanMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + return ret; + } + return false; +} + +bool canGoForwardJNI(const int index) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "canGoForward", "(I)Z")) { + jboolean ret = t.env->CallStaticBooleanMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + return ret; + } + return false; +} + +void goBackJNI(const int index) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "goBack", "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + } +} + +void goForwardJNI(const int index) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "goForward", "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + t.env->DeleteLocalRef(t.classID); + } +} + +void evaluateJSJNI(const int index, const std::string &js) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "evaluateJS", "(ILjava/lang/String;)V")) { + jstring jjs = t.env->NewStringUTF(js.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jjs); + + t.env->DeleteLocalRef(jjs); + t.env->DeleteLocalRef(t.classID); + } +} + +void setScalesPageToFitJNI(const int index, const bool scalesPageToFit) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setScalesPageToFit", "(IZ)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, scalesPageToFit); + t.env->DeleteLocalRef(t.classID); + } +} + +void setWebViewVisibleJNI(const int index, const bool visible) { + cocos2d::JniMethodInfo t; + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setVisible", "(IZ)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, visible); + t.env->DeleteLocalRef(t.classID); + } +} + +std::string getUrlStringByFileName(const std::string &fileName) { + const std::string basePath("file:///android_asset/"); + std::string fullPath = cocos2d::FileUtils::getInstance()->fullPathForFilename(fileName); + const std::string assetsPath("assets/"); + + std::string urlString; + if (fullPath.find(assetsPath) != std::string::npos) { + urlString = fullPath.replace(fullPath.find_first_of(assetsPath), assetsPath.length(), basePath); + } else { + urlString = fullPath; + } + + return urlString; +} +} // namespace + +namespace cocos2d { +namespace plugin { +static std::unordered_map s_WebViewImpls; + +WebViewImpl::WebViewImpl(WebView *webView) : _viewTag(-1), _webView(webView) { + _viewTag = createWebViewJNI(); + s_WebViewImpls[_viewTag] = this; +} + +WebViewImpl::~WebViewImpl() { + removeWebViewJNI(_viewTag); + s_WebViewImpls.erase(_viewTag); +} + +void WebViewImpl::loadData(const Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { + std::string dataString(reinterpret_cast(data.getBytes()), static_cast(data.getSize())); + loadDataJNI(_viewTag, dataString, MIMEType, encoding, baseURL); +} + +void WebViewImpl::loadHTMLString(const std::string &string, const std::string &baseURL) { + loadHTMLStringJNI(_viewTag, string, baseURL); +} + +void WebViewImpl::loadUrl(const std::string &url) { + loadUrlJNI(_viewTag, url); +} + +void WebViewImpl::loadFile(const std::string &fileName) { + auto fullPath = getUrlStringByFileName(fileName); + loadFileJNI(_viewTag, fullPath); +} + +void WebViewImpl::stopLoading() { + stopLoadingJNI(_viewTag); +} + +void WebViewImpl::reload() { + reloadJNI(_viewTag); +} + +bool WebViewImpl::canGoBack() { + return canGoBackJNI(_viewTag); +} + +bool WebViewImpl::canGoForward() { + return canGoForwardJNI(_viewTag); +} + +void WebViewImpl::goBack() { + goBackJNI(_viewTag); +} + +void WebViewImpl::goForward() { + goForwardJNI(_viewTag); +} + +void WebViewImpl::setJavascriptInterfaceScheme(const std::string &scheme) { + setJavascriptInterfaceSchemeJNI(_viewTag, scheme); +} + +void WebViewImpl::evaluateJS(const std::string &js) { + evaluateJSJNI(_viewTag, js); +} + +void WebViewImpl::setScalesPageToFit(const bool scalesPageToFit) { + setScalesPageToFitJNI(_viewTag, scalesPageToFit); +} + +bool WebViewImpl::shouldStartLoading(const int viewTag, const std::string &url) { + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->shouldStartLoading) { + return webView->shouldStartLoading(webView, url); + } + } + return true; +} + +void WebViewImpl::didFinishLoading(const int viewTag, const std::string &url){ + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->didFinishLoading) { + webView->didFinishLoading(webView, url); + } + } +} + +void WebViewImpl::didFailLoading(const int viewTag, const std::string &url){ + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->didFailLoading) { + webView->didFailLoading(webView, url); + } + } +} + +void WebViewImpl::onJsCallback(const int viewTag, const std::string &message){ + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->onJsCallback) { + webView->onJsCallback(webView, message); + } + } +} + +void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { + if (flags & cocos2d::Node::FLAGS_TRANSFORM_DIRTY) { + auto directorInstance = cocos2d::Director::getInstance(); + auto glView = directorInstance->getOpenGLView(); + auto frameSize = glView->getFrameSize(); + + auto winSize = directorInstance->getWinSize(); + + auto leftBottom = this->_webView->convertToWorldSpace(cocos2d::Point::ZERO); + auto rightTop = this->_webView->convertToWorldSpace(cocos2d::Point(this->_webView->getContentSize().width,this->_webView->getContentSize().height)); + + auto uiLeft = frameSize.width / 2 + (leftBottom.x - winSize.width / 2 ) * glView->getScaleX(); + auto uiTop = frameSize.height /2 - (rightTop.y - winSize.height / 2) * glView->getScaleY(); + + setWebViewRectJNI(_viewTag,uiLeft,uiTop, + (rightTop.x - leftBottom.x) * glView->getScaleX(), + (rightTop.y - leftBottom.y) * glView->getScaleY()); + } +} + +void WebViewImpl::setVisible(bool visible) { + setWebViewVisibleJNI(_viewTag, visible); +} +} // namespace cocos2d +} // namespace plugin diff --git a/cocos/ui/WebViewImpl_android.h b/cocos/ui/WebViewImpl_android.h new file mode 100644 index 0000000000..bc43f72282 --- /dev/null +++ b/cocos/ui/WebViewImpl_android.h @@ -0,0 +1,72 @@ +// +// Created by gin0606 on 2014/07/30. +// + +#ifndef __cocos2d_plugin_WebViewImpl_android_H_ +#define __cocos2d_plugin_WebViewImpl_android_H_ + +#include + +namespace cocos2d { +class Data; +class Renderer; +class Mat4; + +namespace plugin { +class WebView; +} +} + +namespace cocos2d { +namespace plugin { + +class WebViewImpl { +public: + WebViewImpl(cocos2d::plugin::WebView *webView); + + virtual ~WebViewImpl(); + + void setJavascriptInterfaceScheme(const std::string &scheme); + + void loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL); + + void loadHTMLString(const std::string &string, const std::string &baseURL); + + void loadUrl(const std::string &url); + + void loadFile(const std::string &fileName); + + void stopLoading(); + + void reload(); + + bool canGoBack(); + + bool canGoForward(); + + void goBack(); + + void goForward(); + + void evaluateJS(const std::string &js); + + void setScalesPageToFit(const bool scalesPageToFit); + + virtual void draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags); + + virtual void setVisible(bool visible); + + static bool shouldStartLoading(const int viewTag, const std::string &url); + static void didFinishLoading(const int viewTag, const std::string &url); + static void didFailLoading(const int viewTag, const std::string &url); + static void onJsCallback(const int viewTag, const std::string &message); + +private: + int _viewTag; + WebView *_webView; +}; + +} // namespace cocos2d +} // namespace plugin + +#endif //__cocos2d_plugin_WebViewImpl_android_H_ diff --git a/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp b/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp new file mode 100644 index 0000000000..203bd43987 --- /dev/null +++ b/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp @@ -0,0 +1,35 @@ +#include "org_cocos2dx_lib_Cocos2dxWebViewHelper.h" +#include "WebViewImpl_android.h" +#include "WebView.h" +#include +#include +#include + + +JNIEXPORT jboolean JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_shouldStartLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + auto charUrl = env->GetStringUTFChars(jurl, NULL); + std::string url = charUrl; + env->ReleaseStringUTFChars(jurl, charUrl); + return cocos2d::plugin::WebViewImpl::shouldStartLoading(index, url); +} + +JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFinishLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + auto charUrl = env->GetStringUTFChars(jurl, NULL); + std::string url = charUrl; + env->ReleaseStringUTFChars(jurl, charUrl); + cocos2d::plugin::WebViewImpl::didFinishLoading(index, url); +} + +JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFailLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + auto charUrl = env->GetStringUTFChars(jurl, NULL); + std::string url = charUrl; + env->ReleaseStringUTFChars(jurl, charUrl); + cocos2d::plugin::WebViewImpl::didFailLoading(index, url); +} + +JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_onJsCallback(JNIEnv *env, jclass, jint index, jstring jmessage) { + auto charMessage = env->GetStringUTFChars(jmessage, NULL); + std::string message = charMessage; + env->ReleaseStringUTFChars(jmessage, charMessage); + cocos2d::plugin::WebViewImpl::onJsCallback(index, message); +} diff --git a/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.h b/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.h new file mode 100644 index 0000000000..288bf79765 --- /dev/null +++ b/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.h @@ -0,0 +1,59 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_cocos2dx_lib_Cocos2dxWebViewHelper */ + +#ifndef _Included_org_cocos2dx_lib_Cocos2dxWebViewHelper +#define _Included_org_cocos2dx_lib_Cocos2dxWebViewHelper +#ifdef __cplusplus +extern "C" { +#endif +/* Inaccessible static: handler */ +/* Inaccessible static: viewTag */ +#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskCreate +#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskCreate 0L +#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskRemove +#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskRemove 1L +#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskSetRect +#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskSetRect 2L +#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskLoadURI +#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskLoadURI 3L +#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskEvaluateJS +#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskEvaluateJS 4L +#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskSetVisible +#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskSetVisible 5L +/* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: shouldStartLoading + * Signature: (ILjava/lang/String;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_shouldStartLoading + (JNIEnv *, jclass, jint, jstring); + +/* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: didFinishLoading + * Signature: (ILjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFinishLoading + (JNIEnv *, jclass, jint, jstring); + +/* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: didFailLoading + * Signature: (ILjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFailLoading + (JNIEnv *, jclass, jint, jstring); + +/* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: onJsCallback + * Signature: (ILjava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_onJsCallback + (JNIEnv *, jclass, jint, jstring); + +#ifdef __cplusplus +} +#endif +#endif From 2226d4b420ff947346434d06726cd5d2adf17d82 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 26 Aug 2014 11:39:56 +0800 Subject: [PATCH 09/74] change WebView namespace and add WebViewTest --- build/cocos2d_libs.xcodeproj/project.pbxproj | 24 +++++ build/cocos2d_tests.xcodeproj/project.pbxproj | 14 +++ cocos/ui/CocosGUI.h | 1 + cocos/ui/UIWebViewWrapper.mm | 2 + cocos/ui/WebView-inl.h | 91 ------------------- cocos/ui/WebView.cpp | 3 +- cocos/ui/WebView.h | 17 +++- cocos/ui/WebView.mm | 90 +++++++++++++++++- cocos/ui/WebViewImpl_iOS.h | 11 ++- cocos/ui/WebViewImpl_iOS.mm | 13 ++- .../CocoStudioGUITest/CocosGUIScene.cpp | 14 +++ .../CocoStudioGUITest/UISceneManager.cpp | 4 + .../UITest/CocoStudioGUITest/UISceneManager.h | 1 + .../UIWebViewTest/UIWebViewTest.cpp | 39 ++++++++ .../UIWebViewTest/UIWebViewTest.h | 46 ++++++++++ 15 files changed, 265 insertions(+), 105 deletions(-) delete mode 100644 cocos/ui/WebView-inl.h create mode 100644 tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp create mode 100644 tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 6178a6bb87..80fff3af8a 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1351,6 +1351,12 @@ 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; 1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; }; + 298D7F6419AC2EFD00FF096D /* UIWebViewWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 298D7F5C19AC2EFD00FF096D /* UIWebViewWrapper.h */; }; + 298D7F6519AC2EFD00FF096D /* UIWebViewWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F5D19AC2EFD00FF096D /* UIWebViewWrapper.mm */; }; + 298D7F6819AC2EFD00FF096D /* WebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 298D7F6019AC2EFD00FF096D /* WebView.h */; }; + 298D7F6919AC2EFD00FF096D /* WebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F6119AC2EFD00FF096D /* WebView.mm */; }; + 298D7F6A19AC2EFD00FF096D /* WebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 298D7F6219AC2EFD00FF096D /* WebViewImpl_iOS.h */; }; + 298D7F6B19AC2EFD00FF096D /* WebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F6319AC2EFD00FF096D /* WebViewImpl_iOS.mm */; }; 299754F4193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; 299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; 299754F6193EC95400A54AC3 /* ObjectFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 299754F3193EC95400A54AC3 /* ObjectFactory.h */; }; @@ -2300,6 +2306,12 @@ 2958244A19873D8E00F9746D /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = ""; }; 2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = ""; }; 2986667918B1B079000E39CA /* CCTweenFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTweenFunction.h; sourceTree = ""; }; + 298D7F5C19AC2EFD00FF096D /* UIWebViewWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebViewWrapper.h; sourceTree = ""; }; + 298D7F5D19AC2EFD00FF096D /* UIWebViewWrapper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebViewWrapper.mm; sourceTree = ""; }; + 298D7F6019AC2EFD00FF096D /* WebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebView.h; sourceTree = ""; }; + 298D7F6119AC2EFD00FF096D /* WebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebView.mm; sourceTree = ""; }; + 298D7F6219AC2EFD00FF096D /* WebViewImpl_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewImpl_iOS.h; sourceTree = ""; }; + 298D7F6319AC2EFD00FF096D /* WebViewImpl_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewImpl_iOS.mm; sourceTree = ""; }; 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjectFactory.cpp; path = ../base/ObjectFactory.cpp; sourceTree = ""; }; 299754F3193EC95400A54AC3 /* ObjectFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectFactory.h; path = ../base/ObjectFactory.h; sourceTree = ""; }; 299CF1F919A434BC00C378C1 /* ccRandom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ccRandom.cpp; path = ../base/ccRandom.cpp; sourceTree = ""; }; @@ -4016,6 +4028,12 @@ 29CB8F521929D65500C841D6 /* experimental */ = { isa = PBXGroup; children = ( + 298D7F5C19AC2EFD00FF096D /* UIWebViewWrapper.h */, + 298D7F5D19AC2EFD00FF096D /* UIWebViewWrapper.mm */, + 298D7F6019AC2EFD00FF096D /* WebView.h */, + 298D7F6119AC2EFD00FF096D /* WebView.mm */, + 298D7F6219AC2EFD00FF096D /* WebViewImpl_iOS.h */, + 298D7F6319AC2EFD00FF096D /* WebViewImpl_iOS.mm */, 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */, 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */, ); @@ -5454,6 +5472,7 @@ 46A171061807CECB005B8026 /* CCPhysicsWorld.h in Headers */, 50ABBDB41925AB4100A911A9 /* ccShaders.h in Headers */, 15AE19B319AAD39700C27E9E /* SliderReader.h in Headers */, + 298D7F6419AC2EFD00FF096D /* UIWebViewWrapper.h in Headers */, 15AE1B7919AADA9A00C27E9E /* UIRichText.h in Headers */, 15AE1A4A19AAD3D500C27E9E /* b2CircleShape.h in Headers */, 50ABBE861925AB6F00A911A9 /* ccFPSImages.h in Headers */, @@ -5465,6 +5484,7 @@ 15AE1A4019AAD3D500C27E9E /* b2Collision.h in Headers */, 5034CA40191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, 15AE184719AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */, + 298D7F6819AC2EFD00FF096D /* WebView.h in Headers */, 15AE1BFC19AAE01E00C27E9E /* CCControlUtils.h in Headers */, 15AE193519AAD35100C27E9E /* CCActionObject.h in Headers */, 15AE1AA919AAD40300C27E9E /* b2TimeStep.h in Headers */, @@ -5839,6 +5859,7 @@ 15AE1B0919AAD42500C27E9E /* cpPolyShape.h in Headers */, 15AE193919AAD35100C27E9E /* CCArmatureAnimation.h in Headers */, 15AE1AA419AAD40300C27E9E /* b2ContactManager.h in Headers */, + 298D7F6A19AC2EFD00FF096D /* WebViewImpl_iOS.h in Headers */, B276EF601988D1D500CD400F /* CCVertexIndexData.h in Headers */, 50ABBD5F1925AB0000A911A9 /* Vec3.h in Headers */, 50ABBE921925AB6F00A911A9 /* CCPlatformMacros.h in Headers */, @@ -6672,6 +6693,7 @@ 15AE1A4319AAD3D500C27E9E /* b2DynamicTree.cpp in Sources */, 15AE1BFF19AAE01E00C27E9E /* CCScale9Sprite.cpp in Sources */, 15AE1A3A19AAD3D500C27E9E /* b2BroadPhase.cpp in Sources */, + 298D7F6519AC2EFD00FF096D /* UIWebViewWrapper.mm in Sources */, 15AE19B619AAD39700C27E9E /* TextBMFontReader.cpp in Sources */, 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, @@ -6710,6 +6732,7 @@ 1A5702C9180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */, 15AE1A0519AAD3A700C27E9E /* Bone.cpp in Sources */, 15AE1B3D19AAD43700C27E9E /* cpCollision.c in Sources */, + 298D7F6919AC2EFD00FF096D /* WebView.mm in Sources */, 15AE1C1719AAE2C700C27E9E /* CCPhysicsSprite.cpp in Sources */, 1A5702EB180BCE750088DEC7 /* CCTileMapAtlas.cpp in Sources */, 1A5702EF180BCE750088DEC7 /* CCTMXLayer.cpp in Sources */, @@ -6762,6 +6785,7 @@ 50ABBE5E1925AB6F00A911A9 /* CCEventListener.cpp in Sources */, 15AE1BC719AAE00000C27E9E /* AssetsManager.cpp in Sources */, 50ABBEA81925AB6F00A911A9 /* CCTouch.cpp in Sources */, + 298D7F6B19AC2EFD00FF096D /* WebViewImpl_iOS.mm in Sources */, 15AE1A9619AAD40300C27E9E /* b2Draw.cpp in Sources */, 503DD8E91926736A00CD74DD /* CCES2Renderer.m in Sources */, 5027253D190BF1B900AAF4ED /* cocos2d.cpp in Sources */, diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index 977187abac..a0dc2b00f6 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -865,6 +865,7 @@ 290E94B6196FC16900694919 /* CocostudioParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 290E94B3196FC16900694919 /* CocostudioParserTest.cpp */; }; 295824591987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; }; 2958245A1987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; }; + 298D7F6F19AC31F300FF096D /* UIWebViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */; }; 29FBBBFE196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; }; 29FBBBFF196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; }; 38FA2E73194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */; }; @@ -2886,6 +2887,8 @@ 290E94B4196FC16900694919 /* CocostudioParserTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CocostudioParserTest.h; path = ../CocostudioParserTest.h; sourceTree = ""; }; 295824571987415900F9746D /* UIScale9SpriteTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9SpriteTest.cpp; sourceTree = ""; }; 295824581987415900F9746D /* UIScale9SpriteTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9SpriteTest.h; sourceTree = ""; }; + 298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIWebViewTest.cpp; path = UIWebViewTest/UIWebViewTest.cpp; sourceTree = ""; }; + 298D7F6E19AC31F300FF096D /* UIWebViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIWebViewTest.h; path = UIWebViewTest/UIWebViewTest.h; sourceTree = ""; }; 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocostudioParserJsonTest.cpp; sourceTree = ""; }; 29FBBBFD196A9ECD00E65826 /* CocostudioParserJsonTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocostudioParserJsonTest.h; sourceTree = ""; }; 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActionTimelineTestScene.cpp; sourceTree = ""; }; @@ -6907,6 +6910,15 @@ path = UIWidgetAddNodeTest; sourceTree = ""; }; + 298D7F6C19AC31C000FF096D /* UIWebViewTest */ = { + isa = PBXGroup; + children = ( + 298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */, + 298D7F6E19AC31F300FF096D /* UIWebViewTest.h */, + ); + name = UIWebViewTest; + sourceTree = ""; + }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( @@ -6988,6 +7000,7 @@ 29FBBC00196A9F0D00E65826 /* UIAndEditorTests */ = { isa = PBXGroup; children = ( + 298D7F6C19AC31C000FF096D /* UIWebViewTest */, 295824571987415900F9746D /* UIScale9SpriteTest.cpp */, 295824581987415900F9746D /* UIScale9SpriteTest.h */, 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */, @@ -8316,6 +8329,7 @@ 1AC35B3E18CECF0C00F37B72 /* Bug-422.cpp in Sources */, 29080DAC191B595E0066F8DF /* UIFocusTest.cpp in Sources */, 1AC35BF618CECF0C00F37B72 /* HttpClientTest.cpp in Sources */, + 298D7F6F19AC31F300FF096D /* UIWebViewTest.cpp in Sources */, 29080DA6191B595E0066F8DF /* UIButtonTest_Editor.cpp in Sources */, 1AC35B5018CECF0C00F37B72 /* ClickAndMoveTest.cpp in Sources */, ); diff --git a/cocos/ui/CocosGUI.h b/cocos/ui/CocosGUI.h index 5fc08abefc..b4516a3512 100644 --- a/cocos/ui/CocosGUI.h +++ b/cocos/ui/CocosGUI.h @@ -47,6 +47,7 @@ THE SOFTWARE. #include "ui/UIRelativeBox.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "ui/UIVideoPlayer.h" +#include "ui/WebView.h" #endif #include "ui/UIDeprecated.h" #include "ui/GUIExport.h" diff --git a/cocos/ui/UIWebViewWrapper.mm b/cocos/ui/UIWebViewWrapper.mm index 600d8290f8..f5083dbeac 100644 --- a/cocos/ui/UIWebViewWrapper.mm +++ b/cocos/ui/UIWebViewWrapper.mm @@ -9,6 +9,8 @@ #import "CCEAGLView.h" #import "CCDirector.h" +using namespace cocos2d::experimental::ui; + @interface UIWebViewWrapper () @property(nonatomic, retain) UIWebView *uiWebView; diff --git a/cocos/ui/WebView-inl.h b/cocos/ui/WebView-inl.h deleted file mode 100644 index b37323a3d4..0000000000 --- a/cocos/ui/WebView-inl.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef __CC_WebView_INL_H_ -#define __CC_WebView_INL_H_ - -#include "WebView.h" -#include "platform/CCGLView.h" -#include "base/CCDirector.h" -#include "platform/CCFileUtils.h" - -namespace cocos2d { -namespace plugin { -WebView::WebView() : _impl(new WebViewImpl(this)) { -} - -WebView::~WebView() { - delete _impl; -} - -WebView *WebView::create() { - auto pRet = new WebView(); - if (pRet->init()) { - pRet->autorelease(); - return pRet; - } - return nullptr; -} - -void WebView::setJavascriptInterfaceScheme(const std::string &scheme) { - _impl->setJavascriptInterfaceScheme(scheme); -} - -void WebView::loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { - _impl->loadData(data, MIMEType, encoding, baseURL); -} - -void WebView::loadHTMLString(const std::string &string, const std::string &baseURL) { - _impl->loadHTMLString(string, baseURL); -} - -void WebView::loadUrl(const std::string &url) { - _impl->loadUrl(url); -} - -void WebView::loadFile(const std::string &fileName) { - _impl->loadFile(fileName); -} - -void WebView::stopLoading() { - _impl->stopLoading(); -} - -void WebView::reload() { - _impl->reload(); -} - -bool WebView::canGoBack() { - return _impl->canGoBack(); -} - -bool WebView::canGoForward() { - return _impl->canGoForward(); -} - -void WebView::goBack() { - _impl->goBack(); -} - -void WebView::goForward() { - _impl->goForward(); -} - -void WebView::evaluateJS(const std::string &js) { - _impl->evaluateJS(js); -} - -void WebView::setScalesPageToFit(bool const scalesPageToFit) { - _impl->setScalesPageToFit(scalesPageToFit); -} - -void WebView::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { - cocos2d::ui::Widget::draw(renderer, transform, flags); - _impl->draw(renderer, transform, flags); -} - -void WebView::setVisible(bool visible) { - Node::setVisible(visible); - _impl->setVisible(visible); -} -} // namespace cocos2d -} // namespace plugin - -#endif diff --git a/cocos/ui/WebView.cpp b/cocos/ui/WebView.cpp index b8144927e7..43772dc2c1 100644 --- a/cocos/ui/WebView.cpp +++ b/cocos/ui/WebView.cpp @@ -2,6 +2,5 @@ // Created by gin0606 on 2014/08/05. // - -#include "WebViewImpl_android.h" +#include "WebViewImpl_iOS.h" #include "WebView-inl.h" diff --git a/cocos/ui/WebView.h b/cocos/ui/WebView.h index 72f9053c47..325a1276d8 100644 --- a/cocos/ui/WebView.h +++ b/cocos/ui/WebView.h @@ -5,11 +5,16 @@ #ifndef __Cocos2d_Plugin_WebView_H_ #define __Cocos2d_Plugin_WebView_H_ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + + #include "ui/UIWidget.h" #include "base/CCData.h" -namespace cocos2d { -namespace plugin { +NS_CC_BEGIN +namespace experimental{ + namespace ui{ + class WebViewImpl; class WebView : public cocos2d::ui::Widget { @@ -135,9 +140,13 @@ public: virtual void setVisible(bool visible) override; private: - cocos2d::plugin::WebViewImpl *_impl; + WebViewImpl *_impl; }; + } // namespace cocos2d -} // namespace plugin +} // namespace experimental +}//namespace ui + +#endif #endif //__Cocos2d_Plugin_WebView_H_ diff --git a/cocos/ui/WebView.mm b/cocos/ui/WebView.mm index c0ed30d1e7..b670bc2b88 100644 --- a/cocos/ui/WebView.mm +++ b/cocos/ui/WebView.mm @@ -4,4 +4,92 @@ #include "WebViewImpl_iOS.h" -#include "WebView-inl.h" +#include "WebView.h" +#include "platform/CCGLView.h" +#include "base/CCDirector.h" +#include "platform/CCFileUtils.h" + +NS_CC_BEGIN +namespace experimental{ + namespace ui{ + + WebView::WebView() : _impl(new WebViewImpl(this)) { + } + + WebView::~WebView() { + delete _impl; + } + + WebView *WebView::create() { + auto pRet = new WebView(); + if (pRet->init()) { + pRet->autorelease(); + return pRet; + } + return nullptr; + } + + void WebView::setJavascriptInterfaceScheme(const std::string &scheme) { + _impl->setJavascriptInterfaceScheme(scheme); + } + + void WebView::loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { + _impl->loadData(data, MIMEType, encoding, baseURL); + } + + void WebView::loadHTMLString(const std::string &string, const std::string &baseURL) { + _impl->loadHTMLString(string, baseURL); + } + + void WebView::loadUrl(const std::string &url) { + _impl->loadUrl(url); + } + + void WebView::loadFile(const std::string &fileName) { + _impl->loadFile(fileName); + } + + void WebView::stopLoading() { + _impl->stopLoading(); + } + + void WebView::reload() { + _impl->reload(); + } + + bool WebView::canGoBack() { + return _impl->canGoBack(); + } + + bool WebView::canGoForward() { + return _impl->canGoForward(); + } + + void WebView::goBack() { + _impl->goBack(); + } + + void WebView::goForward() { + _impl->goForward(); + } + + void WebView::evaluateJS(const std::string &js) { + _impl->evaluateJS(js); + } + + void WebView::setScalesPageToFit(bool const scalesPageToFit) { + _impl->setScalesPageToFit(scalesPageToFit); + } + + void WebView::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { + cocos2d::ui::Widget::draw(renderer, transform, flags); + _impl->draw(renderer, transform, flags); + } + + void WebView::setVisible(bool visible) { + Node::setVisible(visible); + _impl->setVisible(visible); + } + } // namespace cocos2d +} // namespace ui +} //namespace experimental \ No newline at end of file diff --git a/cocos/ui/WebViewImpl_iOS.h b/cocos/ui/WebViewImpl_iOS.h index a2f317235e..04dce9039e 100644 --- a/cocos/ui/WebViewImpl_iOS.h +++ b/cocos/ui/WebViewImpl_iOS.h @@ -10,15 +10,19 @@ @class UIWebViewWrapper; namespace cocos2d { + class Data; class Renderer; class Mat4; -namespace plugin { + +namespace experimental { + namespace ui{ + class WebView; class WebViewImpl { public: - WebViewImpl(cocos2d::plugin::WebView *webView); + WebViewImpl(WebView *webView); virtual ~WebViewImpl(); @@ -58,6 +62,7 @@ private: }; } // namespace cocos2d -} // namespace plugin +} // namespace experimental +}//namespace ui #endif //__cocos2d_plugin_WebViewImpl_IOS_H_ diff --git a/cocos/ui/WebViewImpl_iOS.mm b/cocos/ui/WebViewImpl_iOS.mm index 7788f3dd1f..d26393581d 100644 --- a/cocos/ui/WebViewImpl_iOS.mm +++ b/cocos/ui/WebViewImpl_iOS.mm @@ -5,16 +5,19 @@ #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS #include "WebViewImpl_iOS.h" -#import "UIWebViewWrapper.h" #include "renderer/CCRenderer.h" -#include "WebView.h" #include "CCDirector.h" #include "CCGLView.h" #include "CCEAGLView.h" #include "platform/CCFileUtils.h" +#import "UIWebViewWrapper.h" +#include "ui/WebView.h" + + namespace cocos2d { -namespace plugin { +namespace experimental { + namespace ui{ WebViewImpl::WebViewImpl(WebView *webView) : _uiWebViewWrapper([UIWebViewWrapper webViewWrapper]), _webView(webView) { @@ -128,7 +131,9 @@ void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transfo void WebViewImpl::setVisible(bool visible) { [_uiWebViewWrapper setVisible:visible]; } + } // namespace cocos2d -} // namespace plugin +} // namespace experimental +} //namespace ui #endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp index 51fb94d967..164ca4c5d2 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp @@ -29,6 +29,20 @@ g_guisTests[] = Director::getInstance()->replaceScene(scene); } }, +#endif +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + { + "WebViewTest", + [](Ref* sender) + { + UISceneManager* sceneManager = UISceneManager::sharedUISceneManager(); + sceneManager->setCurrentUISceneId(KWebViewTest); + sceneManager->setMinUISceneId(KWebViewTest); + sceneManager->setMaxUISceneId(KWebViewTest); + Scene* scene = sceneManager->currentUIScene(); + Director::getInstance()->replaceScene(scene); + } + }, #endif { "focus test", diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp index 11e781e255..bdbfc3aa5b 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp @@ -20,6 +20,7 @@ #include "UIFocusTest/UIFocusTest.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "UIVideoPlayerTest/UIVideoPlayerTest.h" +#include "UIWebViewTest/UIWebViewTest.h" #endif #include "UIScale9SpriteTest.h" @@ -94,6 +95,7 @@ static const char* s_testArray[] = "UIFocusTest-ListView", #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) "UIVideoPlayerTest", + "UIWebViewTest", #endif "UIScale9SpriteTest", "UIScale9SpriteHierarchialTest", @@ -328,6 +330,8 @@ Scene *UISceneManager::currentUIScene() #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) case kUIVideoPlayerTest: return VideoPlayerTest::sceneWithTitle(s_testArray[_currentUISceneId]); + case KWebViewTest: + return WebViewTest::sceneWithTitle(s_testArray[_currentUISceneId]); #endif case kUIScale9SpriteTest: return UIScale9SpriteTest::sceneWithTitle(s_testArray[_currentUISceneId]); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h index 4361de611f..6bf7c2c2c9 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h @@ -92,6 +92,7 @@ enum kUIFocusTest_ListView, #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) kUIVideoPlayerTest, + KWebViewTest, #endif kUIScale9SpriteTest, kUIScale9SpriteHierarchialTest, diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp new file mode 100644 index 0000000000..847bbdcb92 --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp @@ -0,0 +1,39 @@ +/**************************************************************************** + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "UIWebViewTest.h" + +bool WebViewTest::init() +{ + if (UIScene::init()) { + _webView = experimental::ui::WebView::create(); + _webView->setPosition(Director::getInstance()->getVisibleSize()/2); + _webView->setContentSize(Director::getInstance()->getVisibleSize() * 0.5); + _webView->loadUrl("http://www.baidu.com"); + this->addChild(_webView); + + return true; + } + return false; +} \ No newline at end of file diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h new file mode 100644 index 0000000000..9365412eb0 --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h @@ -0,0 +1,46 @@ +/**************************************************************************** + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __cocos2d_tests__UIWebViewTest__ +#define __cocos2d_tests__UIWebViewTest__ + +#include "../UIScene.h" + +USING_NS_CC; + +class WebViewTest : public UIScene +{ +public: + UI_SCENE_CREATE_FUNC(WebViewTest); + + virtual bool init(); + + + +private: + cocos2d::experimental::ui::WebView *_webView; + +}; + +#endif /* defined(__cocos2d_tests__UIWebViewTest__) */ From e12db468664bb074caad4321b2f32c6594cd3619 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 26 Aug 2014 12:08:26 +0800 Subject: [PATCH 10/74] fix style --- build/cocos2d_libs.xcodeproj/project.pbxproj | 12 - cocos/ui/UIWebViewWrapper.h | 47 ---- cocos/ui/UIWebViewWrapper.mm | 158 ------------ cocos/ui/WebView.h | 36 ++- cocos/ui/WebView.mm | 105 +++++--- cocos/ui/WebViewImpl_iOS.h | 35 ++- cocos/ui/WebViewImpl_iOS.mm | 231 +++++++++++++++++- .../UIWebViewTest/UIWebViewTest.cpp | 1 + 8 files changed, 358 insertions(+), 267 deletions(-) delete mode 100644 cocos/ui/UIWebViewWrapper.h delete mode 100644 cocos/ui/UIWebViewWrapper.mm diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 80fff3af8a..dfa251f9db 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1351,8 +1351,6 @@ 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; 1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; }; - 298D7F6419AC2EFD00FF096D /* UIWebViewWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 298D7F5C19AC2EFD00FF096D /* UIWebViewWrapper.h */; }; - 298D7F6519AC2EFD00FF096D /* UIWebViewWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F5D19AC2EFD00FF096D /* UIWebViewWrapper.mm */; }; 298D7F6819AC2EFD00FF096D /* WebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 298D7F6019AC2EFD00FF096D /* WebView.h */; }; 298D7F6919AC2EFD00FF096D /* WebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F6119AC2EFD00FF096D /* WebView.mm */; }; 298D7F6A19AC2EFD00FF096D /* WebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 298D7F6219AC2EFD00FF096D /* WebViewImpl_iOS.h */; }; @@ -2306,8 +2304,6 @@ 2958244A19873D8E00F9746D /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = ""; }; 2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = ""; }; 2986667918B1B079000E39CA /* CCTweenFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTweenFunction.h; sourceTree = ""; }; - 298D7F5C19AC2EFD00FF096D /* UIWebViewWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebViewWrapper.h; sourceTree = ""; }; - 298D7F5D19AC2EFD00FF096D /* UIWebViewWrapper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebViewWrapper.mm; sourceTree = ""; }; 298D7F6019AC2EFD00FF096D /* WebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebView.h; sourceTree = ""; }; 298D7F6119AC2EFD00FF096D /* WebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebView.mm; sourceTree = ""; }; 298D7F6219AC2EFD00FF096D /* WebViewImpl_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewImpl_iOS.h; sourceTree = ""; }; @@ -2354,8 +2350,6 @@ 3EA3EDBB1991CDFA00645534 /* CCCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCCamera.h; path = ../base/CCCamera.h; sourceTree = ""; }; 464AD6E3197EBB1400E502D8 /* pvr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pvr.cpp; path = ../base/pvr.cpp; sourceTree = ""; }; 464AD6E4197EBB1400E502D8 /* pvr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pvr.h; path = ../base/pvr.h; sourceTree = ""; }; - 46633BC2199DDB2F00F6E838 /* CCModuleManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCModuleManager.cpp; path = ../base/CCModuleManager.cpp; sourceTree = ""; }; - 46633BC3199DDB2F00F6E838 /* CCModuleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCModuleManager.h; path = ../base/CCModuleManager.h; sourceTree = ""; }; 46A15FCC1807A544005B8026 /* AUTHORS */ = {isa = PBXFileReference; lastKnownFileType = text; name = AUTHORS; path = ../AUTHORS; sourceTree = ""; }; 46A15FCE1807A544005B8026 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = ""; }; 46A15FE11807A56F005B8026 /* Export.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = ""; }; @@ -3078,8 +3072,6 @@ 1A570095180BC5B00088DEC7 /* base-nodes */ = { isa = PBXGroup; children = ( - 46633BC2199DDB2F00F6E838 /* CCModuleManager.cpp */, - 46633BC3199DDB2F00F6E838 /* CCModuleManager.h */, 15EFA20F198A2BB5000C57D3 /* CCProtectedNode.cpp */, 15EFA210198A2BB5000C57D3 /* CCProtectedNode.h */, 1A57009C180BC5D20088DEC7 /* CCNode.cpp */, @@ -4028,8 +4020,6 @@ 29CB8F521929D65500C841D6 /* experimental */ = { isa = PBXGroup; children = ( - 298D7F5C19AC2EFD00FF096D /* UIWebViewWrapper.h */, - 298D7F5D19AC2EFD00FF096D /* UIWebViewWrapper.mm */, 298D7F6019AC2EFD00FF096D /* WebView.h */, 298D7F6119AC2EFD00FF096D /* WebView.mm */, 298D7F6219AC2EFD00FF096D /* WebViewImpl_iOS.h */, @@ -5472,7 +5462,6 @@ 46A171061807CECB005B8026 /* CCPhysicsWorld.h in Headers */, 50ABBDB41925AB4100A911A9 /* ccShaders.h in Headers */, 15AE19B319AAD39700C27E9E /* SliderReader.h in Headers */, - 298D7F6419AC2EFD00FF096D /* UIWebViewWrapper.h in Headers */, 15AE1B7919AADA9A00C27E9E /* UIRichText.h in Headers */, 15AE1A4A19AAD3D500C27E9E /* b2CircleShape.h in Headers */, 50ABBE861925AB6F00A911A9 /* ccFPSImages.h in Headers */, @@ -6693,7 +6682,6 @@ 15AE1A4319AAD3D500C27E9E /* b2DynamicTree.cpp in Sources */, 15AE1BFF19AAE01E00C27E9E /* CCScale9Sprite.cpp in Sources */, 15AE1A3A19AAD3D500C27E9E /* b2BroadPhase.cpp in Sources */, - 298D7F6519AC2EFD00FF096D /* UIWebViewWrapper.mm in Sources */, 15AE19B619AAD39700C27E9E /* TextBMFontReader.cpp in Sources */, 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, diff --git a/cocos/ui/UIWebViewWrapper.h b/cocos/ui/UIWebViewWrapper.h deleted file mode 100644 index 2311f24d45..0000000000 --- a/cocos/ui/UIWebViewWrapper.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// Created by gin0606 on 2014/07/29. -// - - -#include -#include -#include - - -@interface UIWebViewWrapper : NSObject -@property (nonatomic) std::function shouldStartLoading; -@property (nonatomic) std::function didFinishLoading; -@property (nonatomic) std::function didFailLoading; -@property (nonatomic) std::function onJsCallback; - -@property(nonatomic, readonly, getter=canGoBack) BOOL canGoBack; -@property(nonatomic, readonly, getter=canGoForward) BOOL canGoForward; - -+ (instancetype)webViewWrapper; - -- (void)setVisible:(bool)visible; - -- (void)setFrameWithX:(float)x y:(float)y width:(float)width height:(float)height; - -- (void)setJavascriptInterfaceScheme:(const std::string &)scheme; - -- (void)loadData:(const std::string &)data MIMEType:(const std::string &)MIMEType textEncodingName:(const std::string &)encodingName baseURL:(const std::string &)baseURL; - -- (void)loadHTMLString:(const std::string &)string baseURL:(const std::string &)baseURL; - -- (void)loadUrl:(const std::string &)urlString; - -- (void)loadFile:(const std::string &)filePath; - -- (void)stopLoading; - -- (void)reload; - -- (void)evaluateJS:(const std::string &)js; - -- (void)goBack; - -- (void)goForward; - -- (void)setScalesPageToFit:(const bool)scalesPageToFit; -@end diff --git a/cocos/ui/UIWebViewWrapper.mm b/cocos/ui/UIWebViewWrapper.mm deleted file mode 100644 index f5083dbeac..0000000000 --- a/cocos/ui/UIWebViewWrapper.mm +++ /dev/null @@ -1,158 +0,0 @@ -// -// Created by gin0606 on 2014/07/29. -// - - -#import "UIWebViewWrapper.h" -#import "WebView.h" -#import "CCGLView.h" -#import "CCEAGLView.h" -#import "CCDirector.h" - -using namespace cocos2d::experimental::ui; - - -@interface UIWebViewWrapper () -@property(nonatomic, retain) UIWebView *uiWebView; -@property(nonatomic, copy) NSString *jsScheme; -@end - -@implementation UIWebViewWrapper { - -} - -+ (instancetype)webViewWrapper { - return [[[self alloc] init] autorelease]; -} - -- (instancetype)init { - self = [super init]; - if (self) { - self.uiWebView = nil; - self.shouldStartLoading = nullptr; - self.didFinishLoading = nullptr; - self.didFailLoading = nullptr; - } - return self; -} - -- (void)dealloc { - [self.uiWebView removeFromSuperview]; - self.jsScheme = nil; - [super dealloc]; -} - -- (void)setupWebView { - if (!self.uiWebView) { - self.uiWebView = [[[UIWebView alloc] init] autorelease]; - self.uiWebView.delegate = self; - } - if (!self.uiWebView.superview) { - auto view = cocos2d::Director::getInstance()->getOpenGLView(); - auto eaglview = (CCEAGLView *) view->getEAGLView(); - [eaglview addSubview:self.uiWebView]; - } -} - -- (void)setVisible:(bool)visible { - self.uiWebView.hidden = !visible; -} - -- (void)setFrameWithX:(float)x y:(float)y width:(float)width height:(float)height { - if (!self.uiWebView) {[self setupWebView];} - CGRect newFrame = CGRectMake(x, y, width, height); - if (!CGRectEqualToRect(self.uiWebView.frame, newFrame)) { - self.uiWebView.frame = CGRectMake(x, y, width, height); - } -} - -- (void)setJavascriptInterfaceScheme:(const std::string &)scheme { - self.jsScheme = @(scheme.c_str()); -} - -- (void)loadData:(const std::string &)data MIMEType:(const std::string &)MIMEType textEncodingName:(const std::string &)encodingName baseURL:(const std::string &)baseURL { - [self.uiWebView loadData:[NSData dataWithBytes:data.c_str() length:data.length()] - MIMEType:@(MIMEType.c_str()) - textEncodingName:@(encodingName.c_str()) - baseURL:[NSURL URLWithString:@(baseURL.c_str())]]; -} - -- (void)loadHTMLString:(const std::string &)string baseURL:(const std::string &)baseURL { - [self.uiWebView loadHTMLString:@(string.c_str()) baseURL:[NSURL URLWithString:@(baseURL.c_str())]]; -} - -- (void)loadUrl:(const std::string &)urlString { - if (!self.uiWebView) {[self setupWebView];} - NSURL *url = [NSURL URLWithString:@(urlString.c_str())]; - NSURLRequest *request = [NSURLRequest requestWithURL:url]; - [self.uiWebView loadRequest:request]; -} - -- (void)loadFile:(const std::string &)filePath { - if (!self.uiWebView) {[self setupWebView];} - NSURL *url = [NSURL fileURLWithPath:@(filePath.c_str())]; - NSURLRequest *request = [NSURLRequest requestWithURL:url]; - [self.uiWebView loadRequest:request]; -} - -- (void)stopLoading { - [self.uiWebView stopLoading]; -} - -- (void)reload { - [self.uiWebView reload]; -} - -- (BOOL)canGoForward { - return self.uiWebView.canGoForward; -} - -- (BOOL)canGoBack { - return self.uiWebView.canGoBack; -} - -- (void)goBack { - [self.uiWebView goBack]; -} - -- (void)goForward { - [self.uiWebView goForward]; -} - -- (void)evaluateJS:(const std::string &)js { - if (!self.uiWebView) {[self setupWebView];} - [self.uiWebView stringByEvaluatingJavaScriptFromString:@(js.c_str())]; -} - -- (void)setScalesPageToFit:(const bool)scalesPageToFit { - self.uiWebView.scalesPageToFit = scalesPageToFit; -} - -#pragma mark - UIWebViewDelegate -- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { - NSString *url = [[request URL] absoluteString]; - if ([[[request URL] scheme] isEqualToString:self.jsScheme]) { - self.onJsCallback([url UTF8String]); - return NO; - } - if (self.shouldStartLoading) { - return self.shouldStartLoading([url UTF8String]); - } - return YES; -} - -- (void)webViewDidFinishLoad:(UIWebView *)webView { - if (self.didFinishLoading) { - NSString *url = [[webView.request URL] absoluteString]; - self.didFinishLoading([url UTF8String]); - } -} - -- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { - if (self.didFailLoading) { - NSString *url = error.userInfo[NSURLErrorFailingURLStringErrorKey]; - self.didFailLoading([url UTF8String]); - } -} - -@end diff --git a/cocos/ui/WebView.h b/cocos/ui/WebView.h index 325a1276d8..e0977d2e85 100644 --- a/cocos/ui/WebView.h +++ b/cocos/ui/WebView.h @@ -1,6 +1,26 @@ -// -// Created by gin0606 on 2014/07/29. -// +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ #ifndef __Cocos2d_Plugin_WebView_H_ #define __Cocos2d_Plugin_WebView_H_ @@ -72,7 +92,11 @@ public: * @param encoding the encoding of the data. * @param baseURL The base URL for the content. */ - void loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL); + void loadData(const cocos2d::Data &data, + const std::string &MIMEType, + const std::string &encoding, + const std::string &baseURL); + /** * Sets the main page content and base URL. @@ -143,8 +167,8 @@ private: WebViewImpl *_impl; }; -} // namespace cocos2d -} // namespace experimental + } // namespace cocos2d + } // namespace experimental }//namespace ui #endif diff --git a/cocos/ui/WebView.mm b/cocos/ui/WebView.mm index b670bc2b88..3be09fdb80 100644 --- a/cocos/ui/WebView.mm +++ b/cocos/ui/WebView.mm @@ -1,95 +1,144 @@ -// -// Created by gin0606 on 2014/07/29. -// +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#include "WebViewImpl_iOS.h" #include "WebView.h" #include "platform/CCGLView.h" #include "base/CCDirector.h" #include "platform/CCFileUtils.h" +#include "WebViewImpl_iOS.h" + + NS_CC_BEGIN namespace experimental{ namespace ui{ - WebView::WebView() : _impl(new WebViewImpl(this)) { + WebView::WebView() + : _impl(new WebViewImpl(this)) + { } - WebView::~WebView() { - delete _impl; + WebView::~WebView() + { + CC_SAFE_DELETE(_impl); } - WebView *WebView::create() { - auto pRet = new WebView(); - if (pRet->init()) { - pRet->autorelease(); - return pRet; + WebView *WebView::create() + { + auto webView = new(std::nothrow) WebView(); + if (webView && webView->init()) + { + webView->autorelease(); + return webView; } + CC_SAFE_DELETE(webView); return nullptr; } - void WebView::setJavascriptInterfaceScheme(const std::string &scheme) { + void WebView::setJavascriptInterfaceScheme(const std::string &scheme) + { _impl->setJavascriptInterfaceScheme(scheme); } - void WebView::loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { + void WebView::loadData(const cocos2d::Data &data, + const std::string &MIMEType, + const std::string &encoding, + const std::string &baseURL) + { _impl->loadData(data, MIMEType, encoding, baseURL); } - void WebView::loadHTMLString(const std::string &string, const std::string &baseURL) { + void WebView::loadHTMLString(const std::string &string, const std::string &baseURL) + { _impl->loadHTMLString(string, baseURL); } - void WebView::loadUrl(const std::string &url) { + void WebView::loadUrl(const std::string &url) + { _impl->loadUrl(url); } - void WebView::loadFile(const std::string &fileName) { + void WebView::loadFile(const std::string &fileName) + { _impl->loadFile(fileName); } - void WebView::stopLoading() { + void WebView::stopLoading() + { _impl->stopLoading(); } - void WebView::reload() { + void WebView::reload() + { _impl->reload(); } - bool WebView::canGoBack() { + bool WebView::canGoBack() + { return _impl->canGoBack(); } - bool WebView::canGoForward() { + bool WebView::canGoForward() + { return _impl->canGoForward(); } - void WebView::goBack() { + void WebView::goBack() + { _impl->goBack(); } - void WebView::goForward() { + void WebView::goForward() + { _impl->goForward(); } - void WebView::evaluateJS(const std::string &js) { + void WebView::evaluateJS(const std::string &js) + { _impl->evaluateJS(js); } - void WebView::setScalesPageToFit(bool const scalesPageToFit) { + void WebView::setScalesPageToFit(bool const scalesPageToFit) + { _impl->setScalesPageToFit(scalesPageToFit); } - void WebView::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { + void WebView::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) + { cocos2d::ui::Widget::draw(renderer, transform, flags); _impl->draw(renderer, transform, flags); } - void WebView::setVisible(bool visible) { + void WebView::setVisible(bool visible) + { Node::setVisible(visible); _impl->setVisible(visible); } } // namespace cocos2d } // namespace ui -} //namespace experimental \ No newline at end of file +} //namespace experimental + +#endif \ No newline at end of file diff --git a/cocos/ui/WebViewImpl_iOS.h b/cocos/ui/WebViewImpl_iOS.h index 04dce9039e..fb371ed424 100644 --- a/cocos/ui/WebViewImpl_iOS.h +++ b/cocos/ui/WebViewImpl_iOS.h @@ -1,6 +1,26 @@ -// -// Created by gin0606 on 2014/07/30. -// +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ #ifndef __cocos2d_plugin_WebViewImpl_IOS_H_ #define __cocos2d_plugin_WebViewImpl_IOS_H_ @@ -28,7 +48,10 @@ public: void setJavascriptInterfaceScheme(const std::string &scheme); - void loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL); + void loadData(const cocos2d::Data &data, + const std::string &MIMEType, + const std::string &encoding, + const std::string &baseURL); void loadHTMLString(const std::string &string, const std::string &baseURL); @@ -61,8 +84,8 @@ private: WebView *_webView; }; -} // namespace cocos2d -} // namespace experimental + } // namespace cocos2d + } // namespace experimental }//namespace ui #endif //__cocos2d_plugin_WebViewImpl_IOS_H_ diff --git a/cocos/ui/WebViewImpl_iOS.mm b/cocos/ui/WebViewImpl_iOS.mm index d26393581d..22652b2e91 100644 --- a/cocos/ui/WebViewImpl_iOS.mm +++ b/cocos/ui/WebViewImpl_iOS.mm @@ -1,6 +1,26 @@ -// -// Created by gin0606 on 2014/07/30. -// +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS @@ -10,18 +30,203 @@ #include "CCGLView.h" #include "CCEAGLView.h" #include "platform/CCFileUtils.h" - -#import "UIWebViewWrapper.h" #include "ui/WebView.h" +@interface UIWebViewWrapper : NSObject +@property (nonatomic) std::function shouldStartLoading; +@property (nonatomic) std::function didFinishLoading; +@property (nonatomic) std::function didFailLoading; +@property (nonatomic) std::function onJsCallback; + +@property(nonatomic, readonly, getter=canGoBack) BOOL canGoBack; +@property(nonatomic, readonly, getter=canGoForward) BOOL canGoForward; + ++ (instancetype)webViewWrapper; + +- (void)setVisible:(bool)visible; + +- (void)setFrameWithX:(float)x y:(float)y width:(float)width height:(float)height; + +- (void)setJavascriptInterfaceScheme:(const std::string &)scheme; + +- (void)loadData:(const std::string &)data MIMEType:(const std::string &)MIMEType textEncodingName:(const std::string &)encodingName baseURL:(const std::string &)baseURL; + +- (void)loadHTMLString:(const std::string &)string baseURL:(const std::string &)baseURL; + +- (void)loadUrl:(const std::string &)urlString; + +- (void)loadFile:(const std::string &)filePath; + +- (void)stopLoading; + +- (void)reload; + +- (void)evaluateJS:(const std::string &)js; + +- (void)goBack; + +- (void)goForward; + +- (void)setScalesPageToFit:(const bool)scalesPageToFit; +@end + + +@interface UIWebViewWrapper () +@property(nonatomic, retain) UIWebView *uiWebView; +@property(nonatomic, copy) NSString *jsScheme; +@end + +@implementation UIWebViewWrapper { + +} + ++ (instancetype)webViewWrapper { + return [[[self alloc] init] autorelease]; +} + +- (instancetype)init { + self = [super init]; + if (self) { + self.uiWebView = nil; + self.shouldStartLoading = nullptr; + self.didFinishLoading = nullptr; + self.didFailLoading = nullptr; + } + return self; +} + +- (void)dealloc { + [self.uiWebView removeFromSuperview]; + self.jsScheme = nil; + [super dealloc]; +} + +- (void)setupWebView { + if (!self.uiWebView) { + self.uiWebView = [[[UIWebView alloc] init] autorelease]; + self.uiWebView.delegate = self; + } + if (!self.uiWebView.superview) { + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + auto eaglview = (CCEAGLView *) view->getEAGLView(); + [eaglview addSubview:self.uiWebView]; + } +} + +- (void)setVisible:(bool)visible { + self.uiWebView.hidden = !visible; +} + +- (void)setFrameWithX:(float)x y:(float)y width:(float)width height:(float)height { + if (!self.uiWebView) {[self setupWebView];} + CGRect newFrame = CGRectMake(x, y, width, height); + if (!CGRectEqualToRect(self.uiWebView.frame, newFrame)) { + self.uiWebView.frame = CGRectMake(x, y, width, height); + } +} + +- (void)setJavascriptInterfaceScheme:(const std::string &)scheme { + self.jsScheme = @(scheme.c_str()); +} + +- (void)loadData:(const std::string &)data MIMEType:(const std::string &)MIMEType textEncodingName:(const std::string &)encodingName baseURL:(const std::string &)baseURL { + [self.uiWebView loadData:[NSData dataWithBytes:data.c_str() length:data.length()] + MIMEType:@(MIMEType.c_str()) + textEncodingName:@(encodingName.c_str()) + baseURL:[NSURL URLWithString:@(baseURL.c_str())]]; +} + +- (void)loadHTMLString:(const std::string &)string baseURL:(const std::string &)baseURL { + [self.uiWebView loadHTMLString:@(string.c_str()) baseURL:[NSURL URLWithString:@(baseURL.c_str())]]; +} + +- (void)loadUrl:(const std::string &)urlString { + if (!self.uiWebView) {[self setupWebView];} + NSURL *url = [NSURL URLWithString:@(urlString.c_str())]; + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + [self.uiWebView loadRequest:request]; +} + +- (void)loadFile:(const std::string &)filePath { + if (!self.uiWebView) {[self setupWebView];} + NSURL *url = [NSURL fileURLWithPath:@(filePath.c_str())]; + NSURLRequest *request = [NSURLRequest requestWithURL:url]; + [self.uiWebView loadRequest:request]; +} + +- (void)stopLoading { + [self.uiWebView stopLoading]; +} + +- (void)reload { + [self.uiWebView reload]; +} + +- (BOOL)canGoForward { + return self.uiWebView.canGoForward; +} + +- (BOOL)canGoBack { + return self.uiWebView.canGoBack; +} + +- (void)goBack { + [self.uiWebView goBack]; +} + +- (void)goForward { + [self.uiWebView goForward]; +} + +- (void)evaluateJS:(const std::string &)js { + if (!self.uiWebView) {[self setupWebView];} + [self.uiWebView stringByEvaluatingJavaScriptFromString:@(js.c_str())]; +} + +- (void)setScalesPageToFit:(const bool)scalesPageToFit { + self.uiWebView.scalesPageToFit = scalesPageToFit; +} + +#pragma mark - UIWebViewDelegate +- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { + NSString *url = [[request URL] absoluteString]; + if ([[[request URL] scheme] isEqualToString:self.jsScheme]) { + self.onJsCallback([url UTF8String]); + return NO; + } + if (self.shouldStartLoading) { + return self.shouldStartLoading([url UTF8String]); + } + return YES; +} + +- (void)webViewDidFinishLoad:(UIWebView *)webView { + if (self.didFinishLoading) { + NSString *url = [[webView.request URL] absoluteString]; + self.didFinishLoading([url UTF8String]); + } +} + +- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { + if (self.didFailLoading) { + NSString *url = error.userInfo[NSURLErrorFailingURLStringErrorKey]; + self.didFailLoading([url UTF8String]); + } +} + +@end + + namespace cocos2d { namespace experimental { namespace ui{ WebViewImpl::WebViewImpl(WebView *webView) - : _uiWebViewWrapper([UIWebViewWrapper webViewWrapper]), _webView(webView) { + : _uiWebViewWrapper([UIWebViewWrapper webViewWrapper]), + _webView(webView) { [_uiWebViewWrapper retain]; + _uiWebViewWrapper.shouldStartLoading = [this](std::string url) { if (this->_webView->shouldStartLoading) { return this->_webView->shouldStartLoading(this->_webView, url); @@ -45,7 +250,7 @@ WebViewImpl::WebViewImpl(WebView *webView) }; } -WebViewImpl::~WebViewImpl() { +WebViewImpl::~WebViewImpl(){ [_uiWebViewWrapper release]; _uiWebViewWrapper = nullptr; } @@ -54,7 +259,11 @@ void WebViewImpl::setJavascriptInterfaceScheme(const std::string &scheme) { [_uiWebViewWrapper setJavascriptInterfaceScheme:scheme]; } -void WebViewImpl::loadData(const Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { +void WebViewImpl::loadData(const Data &data, + const std::string &MIMEType, + const std::string &encoding, + const std::string &baseURL) { + std::string dataString(reinterpret_cast(data.getBytes()), static_cast(data.getSize())); [_uiWebViewWrapper loadData:dataString MIMEType:MIMEType textEncodingName:encoding baseURL:baseURL]; } @@ -106,9 +315,11 @@ void WebViewImpl::setScalesPageToFit(const bool scalesPageToFit) { void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { if (flags & cocos2d::Node::FLAGS_TRANSFORM_DIRTY) { + auto direcrot = cocos2d::Director::getInstance(); auto glView = direcrot->getOpenGLView(); auto frameSize = glView->getFrameSize(); + auto scaleFactor = [static_cast(glView->getEAGLView()) contentScaleFactor]; auto winSize = direcrot->getWinSize(); @@ -128,11 +339,11 @@ void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transfo } } -void WebViewImpl::setVisible(bool visible) { +void WebViewImpl::setVisible(bool visible){ [_uiWebViewWrapper setVisible:visible]; } -} // namespace cocos2d + } // namespace cocos2d } // namespace experimental } //namespace ui diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp index 847bbdcb92..2dd49d058f 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp @@ -31,6 +31,7 @@ bool WebViewTest::init() _webView->setPosition(Director::getInstance()->getVisibleSize()/2); _webView->setContentSize(Director::getInstance()->getVisibleSize() * 0.5); _webView->loadUrl("http://www.baidu.com"); + _webView->setScalesPageToFit(true); this->addChild(_webView); return true; From 631e1a70c44f293ab2c3d59757ef81a9710728ed Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 26 Aug 2014 14:26:37 +0800 Subject: [PATCH 11/74] add WebView-inl.h and refactor Android code --- .../src/org/cocos2dx/lib/Cocos2dxWebView.java | 92 ++++++ .../cocos2dx/lib/Cocos2dxWebViewHelper.java | 296 +++++++++++++++++ cocos/ui/Android.mk | 1 - cocos/ui/WebView.cpp | 32 +- cocos/ui/WebView.mm | 118 +------ cocos/ui/WebViewImpl_android.cpp | 304 +++++++++++------- cocos/ui/WebViewImpl_android.h | 102 +++--- cocos/ui/Webview-inl.h | 141 ++++++++ ...org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp | 35 -- .../org_cocos2dx_lib_Cocos2dxWebViewHelper.h | 59 ---- 10 files changed, 814 insertions(+), 366 deletions(-) create mode 100755 cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java create mode 100755 cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebViewHelper.java create mode 100644 cocos/ui/Webview-inl.h delete mode 100644 cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp delete mode 100644 cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.h diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java new file mode 100755 index 0000000000..362cc4e6c4 --- /dev/null +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java @@ -0,0 +1,92 @@ +package org.cocos2dx.lib; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.util.Log; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.FrameLayout; + +import java.lang.reflect.Method; +import java.net.URI; + +public class Cocos2dxWebView extends WebView { + private static final String TAG = Cocos2dxWebViewHelper.class.getSimpleName(); + + private int viewTag; + private String jsScheme; + + public Cocos2dxWebView(Context context) { + this(context, -1); + } + + @SuppressLint("SetJavaScriptEnabled") + public Cocos2dxWebView(Context context, int viewTag) { + super(context); + this.viewTag = viewTag; + this.jsScheme = ""; + + this.setFocusable(true); + this.setFocusableInTouchMode(true); + + this.getSettings().setSupportZoom(false); + + this.getSettings().setJavaScriptEnabled(true); + + // `searchBoxJavaBridge_` has big security risk. http://jvn.jp/en/jp/JVN53768697 + try { + Method method = this.getClass().getMethod("removeJavascriptInterface", new Class[]{String.class}); + method.invoke(this, "searchBoxJavaBridge_"); + } catch (ReflectiveOperationException e) { + Log.d(TAG, "This API level do not support `removeJavascriptInterface`"); + } + + this.setWebViewClient(new Cocos2dxWebViewClient()); + } + + public void setJavascriptInterfaceScheme(String scheme) { + this.jsScheme = scheme != null ? scheme : ""; + } + + public void setScalesPageToFit(boolean scalesPageToFit) { + this.getSettings().setSupportZoom(scalesPageToFit); + } + + class Cocos2dxWebViewClient extends WebViewClient { + @Override + public boolean shouldOverrideUrlLoading(WebView view, String urlString) { + URI uri = URI.create(urlString); + if (uri != null && uri.getScheme().equals(jsScheme)) { + Cocos2dxWebViewHelper._onJsCallback(viewTag, urlString); + return true; + } + return Cocos2dxWebViewHelper._shouldStartLoading(viewTag, urlString); + } + + @Override + public void onPageFinished(WebView view, String url) { + super.onPageFinished(view, url); + Cocos2dxWebViewHelper._didFinishLoading(viewTag, url); + } + + @Override + public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { + super.onReceivedError(view, errorCode, description, failingUrl); + Cocos2dxWebViewHelper._didFailLoading(viewTag, failingUrl); + } + } + + public void setWebViewRect(int left, int top, int maxWidth, int maxHeight) { + fixSize(left, top, maxWidth, maxHeight); + } + + private void fixSize(int left, int top, int width, int height) { + FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, + FrameLayout.LayoutParams.WRAP_CONTENT); + layoutParams.leftMargin = left; + layoutParams.topMargin = top; + layoutParams.width = width; + layoutParams.height = height; + this.setLayoutParams(layoutParams); + } +} diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebViewHelper.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebViewHelper.java new file mode 100755 index 0000000000..e8d45b787e --- /dev/null +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebViewHelper.java @@ -0,0 +1,296 @@ +package org.cocos2dx.lib; + +import android.os.Handler; +import android.os.Looper; +import android.util.SparseArray; +import android.view.View; +import android.widget.FrameLayout; + +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.FutureTask; + + +public class Cocos2dxWebViewHelper { + private static final String TAG = Cocos2dxWebViewHelper.class.getSimpleName(); + private static Handler handler; + private static Cocos2dxActivity cocos2dxActivity; + private static FrameLayout layout; + + private static SparseArray webViews; + private static int viewTag = 0; + + public Cocos2dxWebViewHelper(FrameLayout layout) { + Cocos2dxWebViewHelper.layout = layout; + Cocos2dxWebViewHelper.handler = new Handler(Looper.myLooper()); + + Cocos2dxWebViewHelper.cocos2dxActivity = (Cocos2dxActivity) Cocos2dxActivity.getContext(); + Cocos2dxWebViewHelper.webViews = new SparseArray(); + } + + private static native boolean shouldStartLoading(int index, String message); + + public static boolean _shouldStartLoading(int index, String message) { + return !shouldStartLoading(index, message); + } + + private static native void didFinishLoading(int index, String message); + + public static void _didFinishLoading(int index, String message) { + didFinishLoading(index, message); + } + + private static native void didFailLoading(int index, String message); + + public static void _didFailLoading(int index, String message) { + didFailLoading(index, message); + } + + private static native void onJsCallback(int index, String message); + + public static void _onJsCallback(int index, String message) { + onJsCallback(index, message); + } + + @SuppressWarnings("unused") + public static int createWebView() { + final int index = viewTag; + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = new Cocos2dxWebView(cocos2dxActivity, index); + FrameLayout.LayoutParams lParams = new FrameLayout.LayoutParams( + FrameLayout.LayoutParams.WRAP_CONTENT, + FrameLayout.LayoutParams.WRAP_CONTENT); + layout.addView(webView, lParams); + + webViews.put(index, webView); + } + }); + return viewTag++; + } + + @SuppressWarnings("unused") + public static void removeWebView(final int index) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webViews.remove(index); + layout.removeView(webView); + } + } + }); + } + + @SuppressWarnings("unused") + public static void setVisible(final int index, final boolean visible) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.setVisibility(visible ? View.VISIBLE : View.GONE); + } + } + }); + } + + @SuppressWarnings("unused") + public static void setWebViewRect(final int index, final int left, final int top, final int maxWidth, final int maxHeight) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.setWebViewRect(left, top, maxWidth, maxHeight); + } + } + }); + } + + @SuppressWarnings("unused") + public static void setJavascriptInterfaceScheme(final int index, final String scheme) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.setJavascriptInterfaceScheme(scheme); + } + } + }); + } + + @SuppressWarnings("unused") + public static void loadData(final int index, final String data, final String mimeType, final String encoding, final String baseURL) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.loadDataWithBaseURL(baseURL, data, mimeType, encoding, null); + } + } + }); + } + + @SuppressWarnings("unused") + public static void loadHTMLString(final int index, final String htmlString, final String mimeType, final String encoding) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.loadData(htmlString, mimeType, encoding); + } + } + }); + } + + @SuppressWarnings("unused") + public static void loadUrl(final int index, final String url) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.loadUrl(url); + } + } + }); + } + + @SuppressWarnings("unused") + public static void loadFile(final int index, final String filePath) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.loadUrl(filePath); + } + } + }); + } + + public static void stopLoading(final int index) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.stopLoading(); + } + } + }); + + } + + public static void reload(final int index) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.reload(); + } + } + }); + } + + public static T callInMainThread(Callable call) throws ExecutionException, InterruptedException { + FutureTask task = new FutureTask(call); + handler.post(task); + return task.get(); + } + + @SuppressWarnings("unused") + public static boolean canGoBack(final int index) { + Callable callable = new Callable() { + @Override + public Boolean call() throws Exception { + Cocos2dxWebView webView = webViews.get(index); + return webView != null && webView.canGoBack(); + } + }; + try { + return callInMainThread(callable); + } catch (ExecutionException e) { + return false; + } catch (InterruptedException e) { + return false; + } + } + + @SuppressWarnings("unused") + public static boolean canGoForward(final int index) { + Callable callable = new Callable() { + @Override + public Boolean call() throws Exception { + Cocos2dxWebView webView = webViews.get(index); + return webView != null && webView.canGoForward(); + } + }; + try { + return callInMainThread(callable); + } catch (ExecutionException e) { + return false; + } catch (InterruptedException e) { + return false; + } + } + + @SuppressWarnings("unused") + public static void goBack(final int index) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.goBack(); + } + } + }); + } + + @SuppressWarnings("unused") + public static void goForward(final int index) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.goForward(); + } + } + }); + } + + @SuppressWarnings("unused") + public static void evaluateJS(final int index, final String js) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.loadUrl("javascript:" + js); + } + } + }); + } + + @SuppressWarnings("unused") + public static void setScalesPageToFit(final int index, final boolean scalesPageToFit) { + cocos2dxActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + Cocos2dxWebView webView = webViews.get(index); + if (webView != null) { + webView.setScalesPageToFit(scalesPageToFit); + } + } + }); + } +} diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index 5dc94fe248..e2b875b237 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -33,7 +33,6 @@ UIDeprecated.cpp \ UIScale9Sprite.cpp \ WebView.cpp \ WebViewImpl_android.cpp \ -org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/../editor-support diff --git a/cocos/ui/WebView.cpp b/cocos/ui/WebView.cpp index 43772dc2c1..c8d4441d75 100644 --- a/cocos/ui/WebView.cpp +++ b/cocos/ui/WebView.cpp @@ -1,6 +1,30 @@ -// -// Created by gin0606 on 2014/08/05. -// +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#include "WebViewImpl_iOS.h" +#include "WebViewImpl_android.h" #include "WebView-inl.h" + + +#endif diff --git a/cocos/ui/WebView.mm b/cocos/ui/WebView.mm index 3be09fdb80..c2a6b0c9da 100644 --- a/cocos/ui/WebView.mm +++ b/cocos/ui/WebView.mm @@ -23,122 +23,8 @@ ****************************************************************************/ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - -#include "WebView.h" -#include "platform/CCGLView.h" -#include "base/CCDirector.h" -#include "platform/CCFileUtils.h" - #include "WebViewImpl_iOS.h" +#include "WebView-inl.h" -NS_CC_BEGIN -namespace experimental{ - namespace ui{ - - WebView::WebView() - : _impl(new WebViewImpl(this)) - { - } - - WebView::~WebView() - { - CC_SAFE_DELETE(_impl); - } - - WebView *WebView::create() - { - auto webView = new(std::nothrow) WebView(); - if (webView && webView->init()) - { - webView->autorelease(); - return webView; - } - CC_SAFE_DELETE(webView); - return nullptr; - } - - void WebView::setJavascriptInterfaceScheme(const std::string &scheme) - { - _impl->setJavascriptInterfaceScheme(scheme); - } - - void WebView::loadData(const cocos2d::Data &data, - const std::string &MIMEType, - const std::string &encoding, - const std::string &baseURL) - { - _impl->loadData(data, MIMEType, encoding, baseURL); - } - - void WebView::loadHTMLString(const std::string &string, const std::string &baseURL) - { - _impl->loadHTMLString(string, baseURL); - } - - void WebView::loadUrl(const std::string &url) - { - _impl->loadUrl(url); - } - - void WebView::loadFile(const std::string &fileName) - { - _impl->loadFile(fileName); - } - - void WebView::stopLoading() - { - _impl->stopLoading(); - } - - void WebView::reload() - { - _impl->reload(); - } - - bool WebView::canGoBack() - { - return _impl->canGoBack(); - } - - bool WebView::canGoForward() - { - return _impl->canGoForward(); - } - - void WebView::goBack() - { - _impl->goBack(); - } - - void WebView::goForward() - { - _impl->goForward(); - } - - void WebView::evaluateJS(const std::string &js) - { - _impl->evaluateJS(js); - } - - void WebView::setScalesPageToFit(bool const scalesPageToFit) - { - _impl->setScalesPageToFit(scalesPageToFit); - } - - void WebView::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) - { - cocos2d::ui::Widget::draw(renderer, transform, flags); - _impl->draw(renderer, transform, flags); - } - - void WebView::setVisible(bool visible) - { - Node::setVisible(visible); - _impl->setVisible(visible); - } - } // namespace cocos2d -} // namespace ui -} //namespace experimental - -#endif \ No newline at end of file +#endif diff --git a/cocos/ui/WebViewImpl_android.cpp b/cocos/ui/WebViewImpl_android.cpp index 261db76781..4207090169 100644 --- a/cocos/ui/WebViewImpl_android.cpp +++ b/cocos/ui/WebViewImpl_android.cpp @@ -1,19 +1,94 @@ -// -// Created by gin0606 on 2014/07/30. -// +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ #include "WebViewImpl_android.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #include "WebView.h" -#include "org_cocos2dx_lib_Cocos2dxWebViewHelper.h" #include "jni/JniHelper.h" +#include #include "platform/CCGLView.h" #include "base/CCDirector.h" #include "platform/CCFileUtils.h" #include +#include +#include +#include #define CLASS_NAME "org/cocos2dx/lib/Cocos2dxWebViewHelper" +extern "C"{ + /* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: shouldStartLoading + * Signature: (ILjava/lang/String;)Z + */ + JNIEXPORT jboolean JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_shouldStartLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + auto charUrl = env->GetStringUTFChars(jurl, NULL); + std::string url = charUrl; + env->ReleaseStringUTFChars(jurl, charUrl); + return cocos2d::experimental::ui::WebViewImpl::shouldStartLoading(index, url); + } + + /* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: didFinishLoading + * Signature: (ILjava/lang/String;)V + */ + JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFinishLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + auto charUrl = env->GetStringUTFChars(jurl, NULL); + std::string url = charUrl; + env->ReleaseStringUTFChars(jurl, charUrl); + cocos2d::experimental::ui::WebViewImpl::didFinishLoading(index, url); + } + + /* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: didFailLoading + * Signature: (ILjava/lang/String;)V + */ + JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFailLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + auto charUrl = env->GetStringUTFChars(jurl, NULL); + std::string url = charUrl; + env->ReleaseStringUTFChars(jurl, charUrl); + cocos2d::experimental::ui::WebViewImpl::didFailLoading(index, url); + } + + /* + * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper + * Method: onJsCallback + * Signature: (ILjava/lang/String;)V + */ + JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_onJsCallback(JNIEnv *env, jclass, jint index, jstring jmessage) { + auto charMessage = env->GetStringUTFChars(jmessage, NULL); + std::string message = charMessage; + env->ReleaseStringUTFChars(jmessage, charMessage); + cocos2d::experimental::ui::WebViewImpl::onJsCallback(index, message); + } +} namespace { + int createWebViewJNI() { cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "createWebView", "()I")) { @@ -199,136 +274,141 @@ std::string getUrlStringByFileName(const std::string &fileName) { } // namespace namespace cocos2d { -namespace plugin { -static std::unordered_map s_WebViewImpls; + namespace experimental { + namespace ui{ -WebViewImpl::WebViewImpl(WebView *webView) : _viewTag(-1), _webView(webView) { - _viewTag = createWebViewJNI(); - s_WebViewImpls[_viewTag] = this; -} + static std::unordered_map s_WebViewImpls; -WebViewImpl::~WebViewImpl() { - removeWebViewJNI(_viewTag); - s_WebViewImpls.erase(_viewTag); -} + WebViewImpl::WebViewImpl(WebView *webView) : _viewTag(-1), _webView(webView) { + _viewTag = createWebViewJNI(); + s_WebViewImpls[_viewTag] = this; + } -void WebViewImpl::loadData(const Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { - std::string dataString(reinterpret_cast(data.getBytes()), static_cast(data.getSize())); - loadDataJNI(_viewTag, dataString, MIMEType, encoding, baseURL); -} + WebViewImpl::~WebViewImpl() { + removeWebViewJNI(_viewTag); + s_WebViewImpls.erase(_viewTag); + } -void WebViewImpl::loadHTMLString(const std::string &string, const std::string &baseURL) { - loadHTMLStringJNI(_viewTag, string, baseURL); -} + void WebViewImpl::loadData(const Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { + std::string dataString(reinterpret_cast(data.getBytes()), static_cast(data.getSize())); + loadDataJNI(_viewTag, dataString, MIMEType, encoding, baseURL); + } -void WebViewImpl::loadUrl(const std::string &url) { - loadUrlJNI(_viewTag, url); -} + void WebViewImpl::loadHTMLString(const std::string &string, const std::string &baseURL) { + loadHTMLStringJNI(_viewTag, string, baseURL); + } -void WebViewImpl::loadFile(const std::string &fileName) { - auto fullPath = getUrlStringByFileName(fileName); - loadFileJNI(_viewTag, fullPath); -} + void WebViewImpl::loadUrl(const std::string &url) { + loadUrlJNI(_viewTag, url); + } -void WebViewImpl::stopLoading() { - stopLoadingJNI(_viewTag); -} + void WebViewImpl::loadFile(const std::string &fileName) { + auto fullPath = getUrlStringByFileName(fileName); + loadFileJNI(_viewTag, fullPath); + } -void WebViewImpl::reload() { - reloadJNI(_viewTag); -} + void WebViewImpl::stopLoading() { + stopLoadingJNI(_viewTag); + } -bool WebViewImpl::canGoBack() { - return canGoBackJNI(_viewTag); -} + void WebViewImpl::reload() { + reloadJNI(_viewTag); + } -bool WebViewImpl::canGoForward() { - return canGoForwardJNI(_viewTag); -} + bool WebViewImpl::canGoBack() { + return canGoBackJNI(_viewTag); + } -void WebViewImpl::goBack() { - goBackJNI(_viewTag); -} + bool WebViewImpl::canGoForward() { + return canGoForwardJNI(_viewTag); + } -void WebViewImpl::goForward() { - goForwardJNI(_viewTag); -} + void WebViewImpl::goBack() { + goBackJNI(_viewTag); + } -void WebViewImpl::setJavascriptInterfaceScheme(const std::string &scheme) { - setJavascriptInterfaceSchemeJNI(_viewTag, scheme); -} + void WebViewImpl::goForward() { + goForwardJNI(_viewTag); + } -void WebViewImpl::evaluateJS(const std::string &js) { - evaluateJSJNI(_viewTag, js); -} + void WebViewImpl::setJavascriptInterfaceScheme(const std::string &scheme) { + setJavascriptInterfaceSchemeJNI(_viewTag, scheme); + } -void WebViewImpl::setScalesPageToFit(const bool scalesPageToFit) { - setScalesPageToFitJNI(_viewTag, scalesPageToFit); -} + void WebViewImpl::evaluateJS(const std::string &js) { + evaluateJSJNI(_viewTag, js); + } -bool WebViewImpl::shouldStartLoading(const int viewTag, const std::string &url) { - auto it = s_WebViewImpls.find(viewTag); - if (it != s_WebViewImpls.end()) { - auto webView = s_WebViewImpls[viewTag]->_webView; - if (webView->shouldStartLoading) { - return webView->shouldStartLoading(webView, url); - } - } - return true; -} + void WebViewImpl::setScalesPageToFit(const bool scalesPageToFit) { + setScalesPageToFitJNI(_viewTag, scalesPageToFit); + } -void WebViewImpl::didFinishLoading(const int viewTag, const std::string &url){ - auto it = s_WebViewImpls.find(viewTag); - if (it != s_WebViewImpls.end()) { - auto webView = s_WebViewImpls[viewTag]->_webView; - if (webView->didFinishLoading) { - webView->didFinishLoading(webView, url); - } - } -} + bool WebViewImpl::shouldStartLoading(const int viewTag, const std::string &url) { + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->shouldStartLoading) { + return webView->shouldStartLoading(webView, url); + } + } + return true; + } -void WebViewImpl::didFailLoading(const int viewTag, const std::string &url){ - auto it = s_WebViewImpls.find(viewTag); - if (it != s_WebViewImpls.end()) { - auto webView = s_WebViewImpls[viewTag]->_webView; - if (webView->didFailLoading) { - webView->didFailLoading(webView, url); - } - } -} + void WebViewImpl::didFinishLoading(const int viewTag, const std::string &url){ + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->didFinishLoading) { + webView->didFinishLoading(webView, url); + } + } + } -void WebViewImpl::onJsCallback(const int viewTag, const std::string &message){ - auto it = s_WebViewImpls.find(viewTag); - if (it != s_WebViewImpls.end()) { - auto webView = s_WebViewImpls[viewTag]->_webView; - if (webView->onJsCallback) { - webView->onJsCallback(webView, message); - } - } -} + void WebViewImpl::didFailLoading(const int viewTag, const std::string &url){ + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->didFailLoading) { + webView->didFailLoading(webView, url); + } + } + } -void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { - if (flags & cocos2d::Node::FLAGS_TRANSFORM_DIRTY) { - auto directorInstance = cocos2d::Director::getInstance(); - auto glView = directorInstance->getOpenGLView(); - auto frameSize = glView->getFrameSize(); + void WebViewImpl::onJsCallback(const int viewTag, const std::string &message){ + auto it = s_WebViewImpls.find(viewTag); + if (it != s_WebViewImpls.end()) { + auto webView = s_WebViewImpls[viewTag]->_webView; + if (webView->onJsCallback) { + webView->onJsCallback(webView, message); + } + } + } - auto winSize = directorInstance->getWinSize(); + void WebViewImpl::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) { + if (flags & cocos2d::Node::FLAGS_TRANSFORM_DIRTY) { + auto directorInstance = cocos2d::Director::getInstance(); + auto glView = directorInstance->getOpenGLView(); + auto frameSize = glView->getFrameSize(); - auto leftBottom = this->_webView->convertToWorldSpace(cocos2d::Point::ZERO); - auto rightTop = this->_webView->convertToWorldSpace(cocos2d::Point(this->_webView->getContentSize().width,this->_webView->getContentSize().height)); + auto winSize = directorInstance->getWinSize(); - auto uiLeft = frameSize.width / 2 + (leftBottom.x - winSize.width / 2 ) * glView->getScaleX(); - auto uiTop = frameSize.height /2 - (rightTop.y - winSize.height / 2) * glView->getScaleY(); + auto leftBottom = this->_webView->convertToWorldSpace(cocos2d::Point::ZERO); + auto rightTop = this->_webView->convertToWorldSpace(cocos2d::Point(this->_webView->getContentSize().width,this->_webView->getContentSize().height)); - setWebViewRectJNI(_viewTag,uiLeft,uiTop, - (rightTop.x - leftBottom.x) * glView->getScaleX(), - (rightTop.y - leftBottom.y) * glView->getScaleY()); - } -} + auto uiLeft = frameSize.width / 2 + (leftBottom.x - winSize.width / 2 ) * glView->getScaleX(); + auto uiTop = frameSize.height /2 - (rightTop.y - winSize.height / 2) * glView->getScaleY(); -void WebViewImpl::setVisible(bool visible) { - setWebViewVisibleJNI(_viewTag, visible); -} -} // namespace cocos2d -} // namespace plugin + setWebViewRectJNI(_viewTag,uiLeft,uiTop, + (rightTop.x - leftBottom.x) * glView->getScaleX(), + (rightTop.y - leftBottom.y) * glView->getScaleY()); + } + } + + void WebViewImpl::setVisible(bool visible) { + setWebViewVisibleJNI(_viewTag, visible); + } + } // namespace cocos2d + } // namespace experimental +} //namespace ui + +#endif diff --git a/cocos/ui/WebViewImpl_android.h b/cocos/ui/WebViewImpl_android.h index bc43f72282..01a3fd86ef 100644 --- a/cocos/ui/WebViewImpl_android.h +++ b/cocos/ui/WebViewImpl_android.h @@ -1,6 +1,26 @@ -// -// Created by gin0606 on 2014/07/30. -// +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ #ifndef __cocos2d_plugin_WebViewImpl_android_H_ #define __cocos2d_plugin_WebViewImpl_android_H_ @@ -8,65 +28,69 @@ #include namespace cocos2d { -class Data; -class Renderer; -class Mat4; + class Data; + class Renderer; + class Mat4; -namespace plugin { -class WebView; -} + namespace experimental { + namespace ui{ + class WebView; + } + } } namespace cocos2d { -namespace plugin { + namespace experimental { + namespace ui{ -class WebViewImpl { -public: - WebViewImpl(cocos2d::plugin::WebView *webView); + class WebViewImpl { + public: + WebViewImpl(cocos2d::experimental::ui::WebView *webView); - virtual ~WebViewImpl(); + virtual ~WebViewImpl(); - void setJavascriptInterfaceScheme(const std::string &scheme); + void setJavascriptInterfaceScheme(const std::string &scheme); - void loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL); + void loadData(const cocos2d::Data &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL); - void loadHTMLString(const std::string &string, const std::string &baseURL); + void loadHTMLString(const std::string &string, const std::string &baseURL); - void loadUrl(const std::string &url); + void loadUrl(const std::string &url); - void loadFile(const std::string &fileName); + void loadFile(const std::string &fileName); - void stopLoading(); + void stopLoading(); - void reload(); + void reload(); - bool canGoBack(); + bool canGoBack(); - bool canGoForward(); + bool canGoForward(); - void goBack(); + void goBack(); - void goForward(); + void goForward(); - void evaluateJS(const std::string &js); + void evaluateJS(const std::string &js); - void setScalesPageToFit(const bool scalesPageToFit); + void setScalesPageToFit(const bool scalesPageToFit); - virtual void draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags); + virtual void draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags); - virtual void setVisible(bool visible); + virtual void setVisible(bool visible); - static bool shouldStartLoading(const int viewTag, const std::string &url); - static void didFinishLoading(const int viewTag, const std::string &url); - static void didFailLoading(const int viewTag, const std::string &url); - static void onJsCallback(const int viewTag, const std::string &message); + static bool shouldStartLoading(const int viewTag, const std::string &url); + static void didFinishLoading(const int viewTag, const std::string &url); + static void didFailLoading(const int viewTag, const std::string &url); + static void onJsCallback(const int viewTag, const std::string &message); -private: - int _viewTag; - WebView *_webView; -}; + private: + int _viewTag; + WebView *_webView; + }; -} // namespace cocos2d -} // namespace plugin + } // namespace ui + } // namespace experimental +} //cocos2d #endif //__cocos2d_plugin_WebViewImpl_android_H_ diff --git a/cocos/ui/Webview-inl.h b/cocos/ui/Webview-inl.h new file mode 100644 index 0000000000..8a76365b0c --- /dev/null +++ b/cocos/ui/Webview-inl.h @@ -0,0 +1,141 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + + +#include "WebView.h" +#include "platform/CCGLView.h" +#include "base/CCDirector.h" +#include "platform/CCFileUtils.h" + + + +NS_CC_BEGIN +namespace experimental{ + namespace ui{ + + WebView::WebView() + : _impl(new WebViewImpl(this)) + { + } + + WebView::~WebView() + { + CC_SAFE_DELETE(_impl); + } + + WebView *WebView::create() + { + auto webView = new(std::nothrow) WebView(); + if (webView && webView->init()) + { + webView->autorelease(); + return webView; + } + CC_SAFE_DELETE(webView); + return nullptr; + } + + void WebView::setJavascriptInterfaceScheme(const std::string &scheme) + { + _impl->setJavascriptInterfaceScheme(scheme); + } + + void WebView::loadData(const cocos2d::Data &data, + const std::string &MIMEType, + const std::string &encoding, + const std::string &baseURL) + { + _impl->loadData(data, MIMEType, encoding, baseURL); + } + + void WebView::loadHTMLString(const std::string &string, const std::string &baseURL) + { + _impl->loadHTMLString(string, baseURL); + } + + void WebView::loadUrl(const std::string &url) + { + _impl->loadUrl(url); + } + + void WebView::loadFile(const std::string &fileName) + { + _impl->loadFile(fileName); + } + + void WebView::stopLoading() + { + _impl->stopLoading(); + } + + void WebView::reload() + { + _impl->reload(); + } + + bool WebView::canGoBack() + { + return _impl->canGoBack(); + } + + bool WebView::canGoForward() + { + return _impl->canGoForward(); + } + + void WebView::goBack() + { + _impl->goBack(); + } + + void WebView::goForward() + { + _impl->goForward(); + } + + void WebView::evaluateJS(const std::string &js) + { + _impl->evaluateJS(js); + } + + void WebView::setScalesPageToFit(bool const scalesPageToFit) + { + _impl->setScalesPageToFit(scalesPageToFit); + } + + void WebView::draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags) + { + cocos2d::ui::Widget::draw(renderer, transform, flags); + _impl->draw(renderer, transform, flags); + } + + void WebView::setVisible(bool visible) + { + Node::setVisible(visible); + _impl->setVisible(visible); + } + } // namespace cocos2d +} // namespace ui +} //namespace experimental + diff --git a/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp b/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp deleted file mode 100644 index 203bd43987..0000000000 --- a/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "org_cocos2dx_lib_Cocos2dxWebViewHelper.h" -#include "WebViewImpl_android.h" -#include "WebView.h" -#include -#include -#include - - -JNIEXPORT jboolean JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_shouldStartLoading(JNIEnv *env, jclass, jint index, jstring jurl) { - auto charUrl = env->GetStringUTFChars(jurl, NULL); - std::string url = charUrl; - env->ReleaseStringUTFChars(jurl, charUrl); - return cocos2d::plugin::WebViewImpl::shouldStartLoading(index, url); -} - -JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFinishLoading(JNIEnv *env, jclass, jint index, jstring jurl) { - auto charUrl = env->GetStringUTFChars(jurl, NULL); - std::string url = charUrl; - env->ReleaseStringUTFChars(jurl, charUrl); - cocos2d::plugin::WebViewImpl::didFinishLoading(index, url); -} - -JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFailLoading(JNIEnv *env, jclass, jint index, jstring jurl) { - auto charUrl = env->GetStringUTFChars(jurl, NULL); - std::string url = charUrl; - env->ReleaseStringUTFChars(jurl, charUrl); - cocos2d::plugin::WebViewImpl::didFailLoading(index, url); -} - -JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_onJsCallback(JNIEnv *env, jclass, jint index, jstring jmessage) { - auto charMessage = env->GetStringUTFChars(jmessage, NULL); - std::string message = charMessage; - env->ReleaseStringUTFChars(jmessage, charMessage); - cocos2d::plugin::WebViewImpl::onJsCallback(index, message); -} diff --git a/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.h b/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.h deleted file mode 100644 index 288bf79765..0000000000 --- a/cocos/ui/org_cocos2dx_lib_Cocos2dxWebViewHelper.h +++ /dev/null @@ -1,59 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class org_cocos2dx_lib_Cocos2dxWebViewHelper */ - -#ifndef _Included_org_cocos2dx_lib_Cocos2dxWebViewHelper -#define _Included_org_cocos2dx_lib_Cocos2dxWebViewHelper -#ifdef __cplusplus -extern "C" { -#endif -/* Inaccessible static: handler */ -/* Inaccessible static: viewTag */ -#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskCreate -#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskCreate 0L -#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskRemove -#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskRemove 1L -#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskSetRect -#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskSetRect 2L -#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskLoadURI -#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskLoadURI 3L -#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskEvaluateJS -#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskEvaluateJS 4L -#undef org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskSetVisible -#define org_cocos2dx_lib_Cocos2dxWebViewHelper_kWebViewTaskSetVisible 5L -/* - * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper - * Method: shouldStartLoading - * Signature: (ILjava/lang/String;)Z - */ -JNIEXPORT jboolean JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_shouldStartLoading - (JNIEnv *, jclass, jint, jstring); - -/* - * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper - * Method: didFinishLoading - * Signature: (ILjava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFinishLoading - (JNIEnv *, jclass, jint, jstring); - -/* - * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper - * Method: didFailLoading - * Signature: (ILjava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFailLoading - (JNIEnv *, jclass, jint, jstring); - -/* - * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper - * Method: onJsCallback - * Signature: (ILjava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_onJsCallback - (JNIEnv *, jclass, jint, jstring); - -#ifdef __cplusplus -} -#endif -#endif From 15815118a2ae6b60d877617910efc3222192574c Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 26 Aug 2014 16:53:37 +0800 Subject: [PATCH 12/74] finish android version --- cocos/Android.mk | 4 +- .../org/cocos2dx/lib/Cocos2dxActivity.java | 12 ++++-- .../src/org/cocos2dx/lib/Cocos2dxWebView.java | 8 ++-- cocos/ui/WebViewImpl_android.cpp | 41 ++++++++++++++----- cocos/ui/Webview-inl.h | 6 +-- tests/cpp-tests/Android.mk | 1 + .../UIWebViewTest/UIWebViewTest.cpp | 14 ++++++- .../UIWebViewTest/UIWebViewTest.h | 2 + 8 files changed, 64 insertions(+), 24 deletions(-) diff --git a/cocos/Android.mk b/cocos/Android.mk index 7b2e999f32..086c9d07cc 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -349,7 +349,9 @@ LOCAL_SRC_FILES += ui/UIWidget.cpp \ ui/UIRelativeBox.cpp \ ui/UIVideoPlayerAndroid.cpp \ ui/UIDeprecated.cpp \ - ui/UIScale9Sprite.cpp + ui/UIScale9Sprite.cpp \ + ui/WebView.cpp \ + ui/WebViewImpl_android.cpp \ #extension LOCAL_SRC_FILES += ../extensions/assets-manager/AssetsManager.cpp \ diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java index 1ad24349ab..53ea0418a3 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java @@ -33,11 +33,10 @@ import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.os.Message; -import android.view.ViewGroup; -import android.view.WindowManager; -import android.util.Log; -import android.widget.FrameLayout; import android.preference.PreferenceManager.OnActivityResultListener; +import android.util.Log; +import android.view.ViewGroup; +import android.widget.FrameLayout; public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelperListener { // =========================================================== @@ -55,6 +54,7 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe private Cocos2dxHandler mHandler; private static Cocos2dxActivity sContext = null; private Cocos2dxVideoHelper mVideoHelper = null; + private Cocos2dxWebViewHelper mWebViewHelper = null; public static Context getContext() { return sContext; @@ -102,6 +102,10 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe if (mVideoHelper == null) { mVideoHelper = new Cocos2dxVideoHelper(this, mFrameLayout); } + + if(mWebViewHelper == null){ + mWebViewHelper = new Cocos2dxWebViewHelper(mFrameLayout); + } } //native method,call GLViewImpl::getGLContextAttrs() to get the OpenGL ES context attributions diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java index 362cc4e6c4..4229a21e0b 100755 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java @@ -1,5 +1,8 @@ package org.cocos2dx.lib; +import java.lang.reflect.Method; +import java.net.URI; + import android.annotation.SuppressLint; import android.content.Context; import android.util.Log; @@ -7,9 +10,6 @@ import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.FrameLayout; -import java.lang.reflect.Method; -import java.net.URI; - public class Cocos2dxWebView extends WebView { private static final String TAG = Cocos2dxWebViewHelper.class.getSimpleName(); @@ -37,7 +37,7 @@ public class Cocos2dxWebView extends WebView { try { Method method = this.getClass().getMethod("removeJavascriptInterface", new Class[]{String.class}); method.invoke(this, "searchBoxJavaBridge_"); - } catch (ReflectiveOperationException e) { + } catch (Exception e) { Log.d(TAG, "This API level do not support `removeJavascriptInterface`"); } diff --git a/cocos/ui/WebViewImpl_android.cpp b/cocos/ui/WebViewImpl_android.cpp index 4207090169..67c6bb30a0 100644 --- a/cocos/ui/WebViewImpl_android.cpp +++ b/cocos/ui/WebViewImpl_android.cpp @@ -24,20 +24,22 @@ #include "WebViewImpl_android.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) -#include "WebView.h" +#include +#include +#include #include "jni/JniHelper.h" #include + +#include "WebView.h" #include "platform/CCGLView.h" #include "base/CCDirector.h" #include "platform/CCFileUtils.h" -#include -#include -#include -#include #define CLASS_NAME "org/cocos2dx/lib/Cocos2dxWebViewHelper" -extern "C"{ + +#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,"",__VA_ARGS__) + +extern "C" { /* * Class: org_cocos2dx_lib_Cocos2dxWebViewHelper * Method: shouldStartLoading @@ -56,6 +58,7 @@ extern "C"{ * Signature: (ILjava/lang/String;)V */ JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFinishLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + // LOGD("didFinishLoading"); auto charUrl = env->GetStringUTFChars(jurl, NULL); std::string url = charUrl; env->ReleaseStringUTFChars(jurl, charUrl); @@ -68,6 +71,7 @@ extern "C"{ * Signature: (ILjava/lang/String;)V */ JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_didFailLoading(JNIEnv *env, jclass, jint index, jstring jurl) { + // LOGD("didFailLoading"); auto charUrl = env->GetStringUTFChars(jurl, NULL); std::string url = charUrl; env->ReleaseStringUTFChars(jurl, charUrl); @@ -80,6 +84,7 @@ extern "C"{ * Signature: (ILjava/lang/String;)V */ JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_onJsCallback(JNIEnv *env, jclass, jint index, jstring jmessage) { + // LOGD("jsCallback"); auto charMessage = env->GetStringUTFChars(jmessage, NULL); std::string message = charMessage; env->ReleaseStringUTFChars(jmessage, charMessage); @@ -92,6 +97,7 @@ namespace { int createWebViewJNI() { cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "createWebView", "()I")) { + // LOGD("error: %s,%d",__func__,__LINE__); jint viewTag = t.env->CallStaticIntMethod(t.classID, t.methodID); t.env->DeleteLocalRef(t.classID); return viewTag; @@ -100,6 +106,7 @@ int createWebViewJNI() { } void removeWebViewJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "removeWebView", "(I)V")) { t.env->CallStaticVoidMethod(t.classID, t.methodID, index); @@ -108,6 +115,7 @@ void removeWebViewJNI(const int index) { } void setWebViewRectJNI(const int index, const int left, const int top, const int width, const int height) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setWebViewRect", "(IIIII)V")) { t.env->CallStaticVoidMethod(t.classID, t.methodID, index, left, top, width, height); @@ -116,6 +124,7 @@ void setWebViewRectJNI(const int index, const int left, const int top, const int } void setJavascriptInterfaceSchemeJNI(const int index, const std::string &scheme) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setJavascriptInterfaceScheme", "(ILjava/lang/String;)V")) { jstring jScheme = t.env->NewStringUTF(scheme.c_str()); @@ -127,6 +136,7 @@ void setJavascriptInterfaceSchemeJNI(const int index, const std::string &scheme) } void loadDataJNI(const int index, const std::string &data, const std::string &MIMEType, const std::string &encoding, const std::string &baseURL) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadData", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V")) { jstring jData = t.env->NewStringUTF(data.c_str()); @@ -144,6 +154,7 @@ void loadDataJNI(const int index, const std::string &data, const std::string &MI } void loadHTMLStringJNI(const int index, const std::string &string, const std::string &baseURL) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadHTMLString", "(ILjava/lang/String;Ljava/lang/String;)V")) { jstring jString = t.env->NewStringUTF(string.c_str()); @@ -168,6 +179,7 @@ void loadUrlJNI(const int index, const std::string &url) { } void loadFileJNI(const int index, const std::string &filePath) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadFile", "(ILjava/lang/String;)V")) { jstring jFilePath = t.env->NewStringUTF(filePath.c_str()); @@ -179,6 +191,7 @@ void loadFileJNI(const int index, const std::string &filePath) { } void stopLoadingJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "stopLoading", "(I)V")) { t.env->CallStaticVoidMethod(t.classID, t.methodID, index); @@ -187,6 +200,7 @@ void stopLoadingJNI(const int index) { } void reloadJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "reload", "(I)V")) { t.env->CallStaticVoidMethod(t.classID, t.methodID, index); @@ -195,6 +209,7 @@ void reloadJNI(const int index) { } bool canGoBackJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "canGoBack", "(I)Z")) { jboolean ret = t.env->CallStaticBooleanMethod(t.classID, t.methodID, index); @@ -205,6 +220,7 @@ bool canGoBackJNI(const int index) { } bool canGoForwardJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "canGoForward", "(I)Z")) { jboolean ret = t.env->CallStaticBooleanMethod(t.classID, t.methodID, index); @@ -215,6 +231,7 @@ bool canGoForwardJNI(const int index) { } void goBackJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "goBack", "(I)V")) { t.env->CallStaticVoidMethod(t.classID, t.methodID, index); @@ -223,6 +240,7 @@ void goBackJNI(const int index) { } void goForwardJNI(const int index) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "goForward", "(I)V")) { t.env->CallStaticVoidMethod(t.classID, t.methodID, index); @@ -231,6 +249,7 @@ void goForwardJNI(const int index) { } void evaluateJSJNI(const int index, const std::string &js) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "evaluateJS", "(ILjava/lang/String;)V")) { jstring jjs = t.env->NewStringUTF(js.c_str()); @@ -242,6 +261,7 @@ void evaluateJSJNI(const int index, const std::string &js) { } void setScalesPageToFitJNI(const int index, const bool scalesPageToFit) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setScalesPageToFit", "(IZ)V")) { t.env->CallStaticVoidMethod(t.classID, t.methodID, index, scalesPageToFit); @@ -250,6 +270,7 @@ void setScalesPageToFitJNI(const int index, const bool scalesPageToFit) { } void setWebViewVisibleJNI(const int index, const bool visible) { + // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setVisible", "(IZ)V")) { t.env->CallStaticVoidMethod(t.classID, t.methodID, index, visible); @@ -258,6 +279,7 @@ void setWebViewVisibleJNI(const int index, const bool visible) { } std::string getUrlStringByFileName(const std::string &fileName) { + // LOGD("error: %s,%d",__func__,__LINE__); const std::string basePath("file:///android_asset/"); std::string fullPath = cocos2d::FileUtils::getInstance()->fullPathForFilename(fileName); const std::string assetsPath("assets/"); @@ -407,8 +429,7 @@ namespace cocos2d { void WebViewImpl::setVisible(bool visible) { setWebViewVisibleJNI(_viewTag, visible); } - } // namespace cocos2d + } // namespace ui } // namespace experimental -} //namespace ui +} //namespace cocos2d -#endif diff --git a/cocos/ui/Webview-inl.h b/cocos/ui/Webview-inl.h index 8a76365b0c..835d6829bb 100644 --- a/cocos/ui/Webview-inl.h +++ b/cocos/ui/Webview-inl.h @@ -135,7 +135,7 @@ namespace experimental{ Node::setVisible(visible); _impl->setVisible(visible); } - } // namespace cocos2d -} // namespace ui -} //namespace experimental + } // namespace ui +} // namespace experimental +} //namespace cocos2d diff --git a/tests/cpp-tests/Android.mk b/tests/cpp-tests/Android.mk index a954ff93e1..71ff77954d 100644 --- a/tests/cpp-tests/Android.mk +++ b/tests/cpp-tests/Android.mk @@ -104,6 +104,7 @@ Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp \ Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp \ Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp \ Classes/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp \ Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp \ Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp \ Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp \ diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp index 2dd49d058f..f7bec25f7d 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp @@ -24,10 +24,20 @@ #include "UIWebViewTest.h" +WebViewTest::WebViewTest() +{ + +} + +WebViewTest::~WebViewTest() +{ + +} + bool WebViewTest::init() { if (UIScene::init()) { - _webView = experimental::ui::WebView::create(); + _webView = cocos2d::experimental::ui::WebView::create(); _webView->setPosition(Director::getInstance()->getVisibleSize()/2); _webView->setContentSize(Director::getInstance()->getVisibleSize() * 0.5); _webView->loadUrl("http://www.baidu.com"); @@ -37,4 +47,4 @@ bool WebViewTest::init() return true; } return false; -} \ No newline at end of file +} diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h index 9365412eb0..865ed9f02c 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h @@ -32,6 +32,8 @@ USING_NS_CC; class WebViewTest : public UIScene { public: + WebViewTest(); + virtual ~WebViewTest(); UI_SCENE_CREATE_FUNC(WebViewTest); virtual bool init(); From 9449152cafc88741f89c86c720837db390e8feec Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 26 Aug 2014 22:03:55 +0800 Subject: [PATCH 13/74] finish WebView Tests --- build/cocos2d_tests.xcodeproj/project.pbxproj | 4 + cocos/ui/WebView.h | 4 +- cocos/ui/WebViewImpl_iOS.h | 4 +- cocos/ui/WebViewImpl_iOS.mm | 5 +- .../UIWebViewTest/UIWebViewTest.cpp | 124 +++++++++++++++++- .../UIWebViewTest/UIWebViewTest.h | 4 +- tests/cpp-tests/Resources/Test.html | 5 + 7 files changed, 140 insertions(+), 10 deletions(-) create mode 100644 tests/cpp-tests/Resources/Test.html diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index a0dc2b00f6..2029a5d0ff 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -866,6 +866,7 @@ 295824591987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; }; 2958245A1987415900F9746D /* UIScale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 295824571987415900F9746D /* UIScale9SpriteTest.cpp */; }; 298D7F6F19AC31F300FF096D /* UIWebViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */; }; + 29AFEF6719ACCAA000F6B10A /* Test.html in Resources */ = {isa = PBXBuildFile; fileRef = 29AFEF6619ACCAA000F6B10A /* Test.html */; }; 29FBBBFE196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; }; 29FBBBFF196A9ECD00E65826 /* CocostudioParserJsonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */; }; 38FA2E73194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */; }; @@ -2889,6 +2890,7 @@ 295824581987415900F9746D /* UIScale9SpriteTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9SpriteTest.h; sourceTree = ""; }; 298D7F6D19AC31F300FF096D /* UIWebViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UIWebViewTest.cpp; path = UIWebViewTest/UIWebViewTest.cpp; sourceTree = ""; }; 298D7F6E19AC31F300FF096D /* UIWebViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIWebViewTest.h; path = UIWebViewTest/UIWebViewTest.h; sourceTree = ""; }; + 29AFEF6619ACCAA000F6B10A /* Test.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = Test.html; path = "../tests/cpp-tests/Resources/Test.html"; sourceTree = ""; }; 29FBBBFC196A9ECD00E65826 /* CocostudioParserJsonTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocostudioParserJsonTest.cpp; sourceTree = ""; }; 29FBBBFD196A9ECD00E65826 /* CocostudioParserJsonTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocostudioParserJsonTest.h; sourceTree = ""; }; 38FA2E71194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActionTimelineTestScene.cpp; sourceTree = ""; }; @@ -6498,6 +6500,7 @@ 1AC35CB518CED84500F37B72 /* effect1.raw */, 1AC35CB618CED84500F37B72 /* effect1.wav */, 1AC35CC418CED84500F37B72 /* pew-pew-lei.wav */, + 29AFEF6619ACCAA000F6B10A /* Test.html */, ); name = Resources; sourceTree = ""; @@ -7829,6 +7832,7 @@ 1AC35D0918CED84500F37B72 /* TileMaps in Resources */, 1AC35CFF18CED84500F37B72 /* Particles in Resources */, 1AC35C8818CECF1400F37B72 /* Default-568h@2x.png in Resources */, + 29AFEF6719ACCAA000F6B10A /* Test.html in Resources */, 1AC35CD518CED84500F37B72 /* ccb in Resources */, 1AC35CE118CED84500F37B72 /* configs in Resources */, 1AC35CE918CED84500F37B72 /* extensions in Resources */, diff --git a/cocos/ui/WebView.h b/cocos/ui/WebView.h index e0977d2e85..37c67e3d91 100644 --- a/cocos/ui/WebView.h +++ b/cocos/ui/WebView.h @@ -167,9 +167,9 @@ private: WebViewImpl *_impl; }; - } // namespace cocos2d + } // namespace ui } // namespace experimental -}//namespace ui +}//namespace cocos2d #endif diff --git a/cocos/ui/WebViewImpl_iOS.h b/cocos/ui/WebViewImpl_iOS.h index fb371ed424..277ca59a58 100644 --- a/cocos/ui/WebViewImpl_iOS.h +++ b/cocos/ui/WebViewImpl_iOS.h @@ -84,8 +84,8 @@ private: WebView *_webView; }; - } // namespace cocos2d + } // namespace ui } // namespace experimental -}//namespace ui +}//namespace cocos2d #endif //__cocos2d_plugin_WebViewImpl_IOS_H_ diff --git a/cocos/ui/WebViewImpl_iOS.mm b/cocos/ui/WebViewImpl_iOS.mm index 22652b2e91..8ef646eef9 100644 --- a/cocos/ui/WebViewImpl_iOS.mm +++ b/cocos/ui/WebViewImpl_iOS.mm @@ -96,6 +96,7 @@ } - (void)dealloc { + self.uiWebView.delegate = nil; [self.uiWebView removeFromSuperview]; self.jsScheme = nil; [super dealloc]; @@ -343,8 +344,8 @@ void WebViewImpl::setVisible(bool visible){ [_uiWebViewWrapper setVisible:visible]; } - } // namespace cocos2d + } // namespace ui } // namespace experimental -} //namespace ui +} //namespace cocos2d #endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp index f7bec25f7d..a21c2afba4 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp @@ -37,14 +37,132 @@ WebViewTest::~WebViewTest() bool WebViewTest::init() { if (UIScene::init()) { + Size winSize = Director::getInstance()->getVisibleSize(); + + _webView = cocos2d::experimental::ui::WebView::create(); - _webView->setPosition(Director::getInstance()->getVisibleSize()/2); - _webView->setContentSize(Director::getInstance()->getVisibleSize() * 0.5); - _webView->loadUrl("http://www.baidu.com"); + _webView->setPosition(winSize/2); + _webView->setContentSize(winSize * 0.5); + _webView->loadUrl("http://www.google.com"); _webView->setScalesPageToFit(true); + + _webView->shouldStartLoading = CC_CALLBACK_2(WebViewTest::onWebViewShouldStartLoading, this); + _webView->didFinishLoading = CC_CALLBACK_2(WebViewTest::onWebViewDidFinishLoading, this); + _webView->didFailLoading = CC_CALLBACK_2(WebViewTest::onWebViewDidFailLoading, this); + this->addChild(_webView); + TextField *urlTextField = TextField::create("Input a URL here", "Arial", 20); + urlTextField->setPlaceHolderColor(Color3B::RED); + urlTextField->setPosition(Vec2(winSize/2) + Vec2(-80, _webView->getContentSize().height/2 + + urlTextField->getContentSize().height/2 + 10)); + this->addChild(urlTextField); + + Text *httpLabel = Text::create("http:// ", "Arial", 20); + httpLabel->setTextColor(Color4B::GREEN); + httpLabel->setAnchorPoint(Vec2(1.0,0.5)); + httpLabel->setPosition(urlTextField->getPosition() - Vec2(urlTextField->getContentSize().width/2,0)); + this->addChild(httpLabel); + + + Button *resetBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + resetBtn->setTitleText("Visit URL"); + resetBtn->setPosition(Vec2(winSize/2) + Vec2(50, _webView->getContentSize().height/2 + + resetBtn->getContentSize().height/2 + 10)); + resetBtn->addClickEventListener([=](Ref*){ + _webView->loadUrl(std::string("http://") + urlTextField->getStringValue()); + }); + this->addChild(resetBtn); + + + Button *reloadBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + reloadBtn->setTitleText("Reload"); + reloadBtn->setPosition(Vec2(winSize/2) + Vec2( _webView->getContentSize().width/2 + + reloadBtn->getContentSize().width/2 + 10,50 )); + reloadBtn->addClickEventListener([=](Ref*){ + _webView->reload(); + }); + this->addChild(reloadBtn); + + Button *forwardBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + forwardBtn->setTitleText("Forward"); + forwardBtn->setPosition(Vec2(winSize/2) + Vec2( _webView->getContentSize().width/2 + + forwardBtn->getContentSize().width/2 + 10,0 )); + forwardBtn->addClickEventListener([=](Ref*){ + _webView->goForward(); + }); + this->addChild(forwardBtn); + + + + Button *backBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + backBtn->setTitleText("Back"); + backBtn->setPosition(Vec2(winSize/2) + Vec2( _webView->getContentSize().width/2 + + backBtn->getContentSize().width/2 + 10,-50 )); + backBtn->addClickEventListener([=](Ref*){ + _webView->goBack(); + }); + this->addChild(backBtn); + + + Button *loadFileBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + loadFileBtn->setTitleText("Load FILE"); + loadFileBtn->setPosition(Vec2(winSize/2) - Vec2( _webView->getContentSize().width/2 + + loadFileBtn->getContentSize().width/2 + 10,50 )); + loadFileBtn->addClickEventListener([=](Ref*){ + _webView->loadFile("Test.html"); + }); + this->addChild(loadFileBtn); + + Button *loadHTMLBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + loadHTMLBtn->setTitleText("Load HTML"); + loadHTMLBtn->setPosition(Vec2(winSize/2) - Vec2( _webView->getContentSize().width/2 + + loadHTMLBtn->getContentSize().width/2 + 10,0 )); + loadHTMLBtn->addClickEventListener([=](Ref*){ + _webView->loadHTMLString("Hello World",""); + }); + this->addChild(loadHTMLBtn); + + + + + Button *evalJsBtn = Button::create("cocosui/animationbuttonnormal.png", + "cocosui/animationbuttonpressed.png"); + evalJsBtn->setTitleText("Evaluate JS"); + evalJsBtn->setPosition(Vec2(winSize/2) - Vec2( _webView->getContentSize().width/2 + + evalJsBtn->getContentSize().width/2 + 10,-50 )); + evalJsBtn->addClickEventListener([=](Ref*){ + _webView->evaluateJS("alert(\"hello\")"); + }); + this->addChild(evalJsBtn); + return true; } return false; } + +bool WebViewTest::onWebViewShouldStartLoading(experimental::ui::WebView *sender, std::string url) +{ + CCLOG("onWebViewShouldStartLoading, url is %s", url.c_str()); + + return true; +} + +void WebViewTest::onWebViewDidFinishLoading(experimental::ui::WebView *sender, std::string url) +{ + CCLOG("onWebViewDidFinishLoading, url is %s", url.c_str()); + +} + +void WebViewTest::onWebViewDidFailLoading(experimental::ui::WebView *sender, std::string url) +{ + CCLOG("onWebViewDidFailLoading, url is %s", url.c_str()); + +} + diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h index 865ed9f02c..a7ae59e075 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h @@ -37,8 +37,10 @@ public: UI_SCENE_CREATE_FUNC(WebViewTest); virtual bool init(); + bool onWebViewShouldStartLoading(experimental::ui::WebView *sender, std::string url); + void onWebViewDidFinishLoading(experimental::ui::WebView *sender, std::string url); + void onWebViewDidFailLoading(experimental::ui::WebView *sender, std::string url); - private: cocos2d::experimental::ui::WebView *_webView; diff --git a/tests/cpp-tests/Resources/Test.html b/tests/cpp-tests/Resources/Test.html new file mode 100644 index 0000000000..1e90fb526f --- /dev/null +++ b/tests/cpp-tests/Resources/Test.html @@ -0,0 +1,5 @@ + + + Hello World + + \ No newline at end of file From fc3a30b9ca04e6dcafc501af5abb31b9b329e33f Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 26 Aug 2014 23:25:07 +0800 Subject: [PATCH 14/74] modify cmakeList.txt --- cocos/CMakeLists.txt | 1 + cocos/ui/WebViewImpl_android.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index f56e2e6351..7bcfe84efb 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -85,6 +85,7 @@ list(REMOVE_ITEM cocos2d_source_files "${CMAKE_CURRENT_SOURCE_DIR}/base/CCController-android.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCUserDefaultAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIVideoPlayerAndroid.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/ui/WebView.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/LocalStorageAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventController.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventListenerController.cpp" diff --git a/cocos/ui/WebViewImpl_android.cpp b/cocos/ui/WebViewImpl_android.cpp index 67c6bb30a0..514ddaf648 100644 --- a/cocos/ui/WebViewImpl_android.cpp +++ b/cocos/ui/WebViewImpl_android.cpp @@ -156,10 +156,10 @@ void loadDataJNI(const int index, const std::string &data, const std::string &MI void loadHTMLStringJNI(const int index, const std::string &string, const std::string &baseURL) { // LOGD("error: %s,%d",__func__,__LINE__); cocos2d::JniMethodInfo t; - if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadHTMLString", "(ILjava/lang/String;Ljava/lang/String;)V")) { + if (cocos2d::JniHelper::getStaticMethodInfo(t, CLASS_NAME, "loadHTMLString", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V")) { jstring jString = t.env->NewStringUTF(string.c_str()); jstring jBaseURL = t.env->NewStringUTF(baseURL.c_str()); - t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jString, jBaseURL); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, jString, jBaseURL,nullptr); t.env->DeleteLocalRef(jString); t.env->DeleteLocalRef(jBaseURL); From 4597de069de5c9ed17e4551bf643ee3b9cb0cd39 Mon Sep 17 00:00:00 2001 From: andyque Date: Wed, 27 Aug 2014 08:02:22 +0800 Subject: [PATCH 15/74] improve test case and make program more robust --- cocos/CMakeLists.txt | 1 + cocos/ui/WebViewImpl_iOS.mm | 6 ++++-- .../CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index 7bcfe84efb..90fc4dea01 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -86,6 +86,7 @@ list(REMOVE_ITEM cocos2d_source_files "${CMAKE_CURRENT_SOURCE_DIR}/base/CCUserDefaultAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIVideoPlayerAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/ui/WebView.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/ui/WebViewImpl_android.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/LocalStorageAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventController.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventListenerController.cpp" diff --git a/cocos/ui/WebViewImpl_iOS.mm b/cocos/ui/WebViewImpl_iOS.mm index 8ef646eef9..559b3ba1ae 100644 --- a/cocos/ui/WebViewImpl_iOS.mm +++ b/cocos/ui/WebViewImpl_iOS.mm @@ -195,7 +195,7 @@ self.onJsCallback([url UTF8String]); return NO; } - if (self.shouldStartLoading) { + if (self.shouldStartLoading && url) { return self.shouldStartLoading([url UTF8String]); } return YES; @@ -211,7 +211,9 @@ - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { if (self.didFailLoading) { NSString *url = error.userInfo[NSURLErrorFailingURLStringErrorKey]; - self.didFailLoading([url UTF8String]); + if (url) { + self.didFailLoading([url UTF8String]); + } } } diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp index a21c2afba4..4b643fbd45 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.cpp @@ -125,7 +125,7 @@ bool WebViewTest::init() loadHTMLBtn->setPosition(Vec2(winSize/2) - Vec2( _webView->getContentSize().width/2 + loadHTMLBtn->getContentSize().width/2 + 10,0 )); loadHTMLBtn->addClickEventListener([=](Ref*){ - _webView->loadHTMLString("Hello World",""); + _webView->loadHTMLString("Hello World","text/html"); }); this->addChild(loadHTMLBtn); From e05f6bc8746dc8f4288ed5b2a4f5eba93a68bf54 Mon Sep 17 00:00:00 2001 From: lvlong Date: Wed, 27 Aug 2014 18:44:31 +0800 Subject: [PATCH 16/74] modify for compress --- cocos/3d/CCBundle3D.cpp | 67 +++++++++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 16 deletions(-) diff --git a/cocos/3d/CCBundle3D.cpp b/cocos/3d/CCBundle3D.cpp index b1a8020eec..8eb3fcbd91 100644 --- a/cocos/3d/CCBundle3D.cpp +++ b/cocos/3d/CCBundle3D.cpp @@ -1645,29 +1645,64 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) return false; } - Quaternion rotate; - if (_binaryReader.read(&rotate, 4, 4) != 4) + // transform flag + unsigned char transformFlag(0); + if (_version == "0.3") { - CCLOGINFO("Failed to read AnimationData: rotate '%s'.", _path.c_str()); - return false; + if (!_binaryReader.read(&transformFlag)) + { + CCLOGINFO("Failed to read AnimationData: transformFlag '%s'.", _path.c_str()); + return false; + } + } + + // rotation + bool hasRotate = true; + if (_version == "0.3") + hasRotate = transformFlag & 0x01; + + if (hasRotate) + { + Quaternion rotate; + if (_binaryReader.read(&rotate, 4, 4) != 4) + { + CCLOGINFO("Failed to read AnimationData: rotate '%s'.", _path.c_str()); + return false; + } + animationdata->_rotationKeys[boneName].push_back(Animation3DData::QuatKey(keytime, rotate)); } - animationdata->_rotationKeys[boneName].push_back(Animation3DData::QuatKey(keytime, rotate)); - Vec3 scale; - if (_binaryReader.read(&scale, 4, 3) != 3) + // scale + bool hasScale = true; + if (_version == "0.3") + hasScale = (transformFlag >> 1) & 0x01; + + if (hasScale) { - CCLOGINFO("Failed to read AnimationData: scale '%s'.", _path.c_str()); - return false; + Vec3 scale; + if (_binaryReader.read(&scale, 4, 3) != 3) + { + CCLOGINFO("Failed to read AnimationData: scale '%s'.", _path.c_str()); + return false; + } + animationdata->_scaleKeys[boneName].push_back(Animation3DData::Vec3Key(keytime, scale)); } - animationdata->_scaleKeys[boneName].push_back(Animation3DData::Vec3Key(keytime, scale)); - - Vec3 position; - if (_binaryReader.read(&position, 4, 3) != 3) + + // translation + bool hasTranslation = true; + if (_version == "0.3") + hasTranslation = (transformFlag >> 2) & 0x01; + + if (hasTranslation) { - CCLOGINFO("Failed to read AnimationData: position '%s'.", _path.c_str()); - return false; + Vec3 position; + if (_binaryReader.read(&position, 4, 3) != 3) + { + CCLOGINFO("Failed to read AnimationData: position '%s'.", _path.c_str()); + return false; + } + animationdata->_translationKeys[boneName].push_back(Animation3DData::Vec3Key(keytime, position)); } - animationdata->_translationKeys[boneName].push_back(Animation3DData::Vec3Key(keytime, position)); } } return true; From ba8bed8ed9821fa89e9a610b40a83bae11ff637f Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Wed, 27 Aug 2014 22:12:07 +0800 Subject: [PATCH 17/74] Adjust android.mk for cocos2d and related module --- cocos/editor-support/cocosbuilder/Android.mk | 4 +++- cocos/editor-support/cocostudio/Android.mk | 5 +++-- cocos/ui/Android.mk | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cocos/editor-support/cocosbuilder/Android.mk b/cocos/editor-support/cocosbuilder/Android.mk index 36089ec055..7e63551308 100644 --- a/cocos/editor-support/cocosbuilder/Android.mk +++ b/cocos/editor-support/cocosbuilder/Android.mk @@ -38,8 +38,10 @@ $(LOCAL_PATH)/../../ \ $(LOCAL_PATH)/../../platform/android \ $(LOCAL_PATH)/../../editor-support -LOCAL_STATIC_LIBRARIES := cocos2dx_static + LOCAL_STATIC_LIBRARIES := cocos_extension_static include $(BUILD_STATIC_LIBRARY) +$(call import-module,extensions) + diff --git a/cocos/editor-support/cocostudio/Android.mk b/cocos/editor-support/cocostudio/Android.mk index f4ffa5dcbd..c6acea9f9e 100644 --- a/cocos/editor-support/cocostudio/Android.mk +++ b/cocos/editor-support/cocostudio/Android.mk @@ -75,8 +75,9 @@ LOCAL_CFLAGS += -fexceptions LOCAL_STATIC_LIBRARIES := cocos_ui_static LOCAL_STATIC_LIBRARIES += cocosdenshion_static -LOCAL_STATIC_LIBRARIES += cocos_extension_static -LOCAL_STATIC_LIBRARIES += cocos2dx_static include $(BUILD_STATIC_LIBRARY) +$(call import-module,ui) +$(call import-module,audio/android) + diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index cabe2e9e8a..637042d16b 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -42,8 +42,9 @@ $(LOCAL_PATH)/../.. \ $(LOCAL_PATH)/../editor-support \ $(LOCAL_PATH)/../platform/android -LOCAL_STATIC_LIBRARIES := cocos2dx_static -LOCAL_STATIC_LIBRARIES += cocos_extension_static + +LOCAL_STATIC_LIBRARIES := cocos_extension_static +LOCAL_STATIC_LIBRARIES += cocos2dx_static include $(BUILD_STATIC_LIBRARY) From 928208f4807e83bd070e251c044c4fee1dcfe362 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Wed, 27 Aug 2014 23:26:08 +0800 Subject: [PATCH 18/74] Adjust android.mk for cocos2d and related module --- cocos/3d/Android.mk | 2 +- cocos/Android.mk | 34 ++++++++++++-------- cocos/editor-support/cocosbuilder/Android.mk | 3 -- cocos/editor-support/cocostudio/Android.mk | 4 +-- cocos/editor-support/spine/Android.mk | 2 +- cocos/storage/local-storage/Android.mk | 2 +- cocos/ui/Android.mk | 2 +- extensions/Android.mk | 2 +- 8 files changed, 28 insertions(+), 23 deletions(-) diff --git a/cocos/3d/Android.mk b/cocos/3d/Android.mk index d67b36b107..0a9d859a27 100644 --- a/cocos/3d/Android.mk +++ b/cocos/3d/Android.mk @@ -28,6 +28,6 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/../../external \ $(LOCAL_PATH)/../platform/android -LOCAL_STATIC_LIBRARIES := cocos2dx_static +LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/Android.mk b/cocos/Android.mk index 88a955af29..2a25ece24b 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -2,9 +2,9 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := cocos2dx_static +LOCAL_MODULE := cocos2dx_internal_static -LOCAL_MODULE_FILENAME := libcocos2d +LOCAL_MODULE_FILENAME := libcocos2dxinternal LOCAL_SRC_FILES := \ cocos2d.cpp \ @@ -216,18 +216,7 @@ LOCAL_STATIC_LIBRARIES += cocos_png_static LOCAL_STATIC_LIBRARIES += cocos_jpeg_static LOCAL_STATIC_LIBRARIES += cocos_tiff_static LOCAL_STATIC_LIBRARIES += cocos_webp_static -LOCAL_STATIC_LIBRARIES += cocos3d_static -LOCAL_STATIC_LIBRARIES += cocosdenshion_static -LOCAL_STATIC_LIBRARIES += cocosbuilder_static -LOCAL_STATIC_LIBRARIES += cocostudio_static -LOCAL_STATIC_LIBRARIES += spine_static -LOCAL_STATIC_LIBRARIES += cocos_network_static -LOCAL_STATIC_LIBRARIES += cocos_ui_static -LOCAL_STATIC_LIBRARIES += cocos_extension_static -LOCAL_STATIC_LIBRARIES += box2d_static LOCAL_STATIC_LIBRARIES += chipmunk_static -LOCAL_STATIC_LIBRARIES += cocos_curl_static -LOCAL_STATIC_LIBRARIES += libwebsockets_static LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dxandroid_static @@ -239,6 +228,25 @@ LOCAL_EXPORT_CPPFLAGS := -Wno-deprecated-declarations -Wno-extern-c-compat include $(BUILD_STATIC_LIBRARY) +#============================================================== + +include $(CLEAR_VARS) + +LOCAL_MODULE := cocos2dx_static + +LOCAL_MODULE_FILENAME := libcocos2d + +LOCAL_STATIC_LIBRARIES := cocostudio_static +LOCAL_STATIC_LIBRARIES += cocos3d_static +LOCAL_STATIC_LIBRARIES += cocosbuilder_static +LOCAL_STATIC_LIBRARIES += spine_static +LOCAL_STATIC_LIBRARIES += cocos_network_static +LOCAL_STATIC_LIBRARIES += box2d_static +LOCAL_STATIC_LIBRARIES += chipmunk_static + +include $(BUILD_STATIC_LIBRARY) +#============================================================== + $(call import-module,freetype2/prebuilt/android) $(call import-module,chipmunk) $(call import-module,platform/android) diff --git a/cocos/editor-support/cocosbuilder/Android.mk b/cocos/editor-support/cocosbuilder/Android.mk index 7e63551308..2045dde31d 100644 --- a/cocos/editor-support/cocosbuilder/Android.mk +++ b/cocos/editor-support/cocosbuilder/Android.mk @@ -42,6 +42,3 @@ $(LOCAL_PATH)/../../editor-support LOCAL_STATIC_LIBRARIES := cocos_extension_static include $(BUILD_STATIC_LIBRARY) - -$(call import-module,extensions) - diff --git a/cocos/editor-support/cocostudio/Android.mk b/cocos/editor-support/cocostudio/Android.mk index c6acea9f9e..a5d80e2bf2 100644 --- a/cocos/editor-support/cocostudio/Android.mk +++ b/cocos/editor-support/cocostudio/Android.mk @@ -75,9 +75,9 @@ LOCAL_CFLAGS += -fexceptions LOCAL_STATIC_LIBRARIES := cocos_ui_static LOCAL_STATIC_LIBRARIES += cocosdenshion_static +LOCAL_STATIC_LIBRARIES += cocos_extension_static +LOCAL_STATIC_LIBRARIES += cocos2dx_internal_static include $(BUILD_STATIC_LIBRARY) -$(call import-module,ui) -$(call import-module,audio/android) diff --git a/cocos/editor-support/spine/Android.mk b/cocos/editor-support/spine/Android.mk index f49532d9c8..118f45c52e 100644 --- a/cocos/editor-support/spine/Android.mk +++ b/cocos/editor-support/spine/Android.mk @@ -37,6 +37,6 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \ $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/../../platform/android -LOCAL_STATIC_LIBRARIES := cocos2dx_static +LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/storage/local-storage/Android.mk b/cocos/storage/local-storage/Android.mk index 3a7a2604ee..65a29778fd 100644 --- a/cocos/storage/local-storage/Android.mk +++ b/cocos/storage/local-storage/Android.mk @@ -17,7 +17,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. LOCAL_CFLAGS += -Wno-psabi LOCAL_EXPORT_CFLAGS += -Wno-psabi -LOCAL_STATIC_LIBRARIES := cocos2dx_static +LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index 637042d16b..420b22fa2e 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -44,7 +44,7 @@ $(LOCAL_PATH)/../platform/android LOCAL_STATIC_LIBRARIES := cocos_extension_static -LOCAL_STATIC_LIBRARIES += cocos2dx_static +LOCAL_STATIC_LIBRARIES += cocos2dx_internal_static include $(BUILD_STATIC_LIBRARY) diff --git a/extensions/Android.mk b/extensions/Android.mk index 04fed90e66..89877aa54d 100644 --- a/extensions/Android.mk +++ b/extensions/Android.mk @@ -29,7 +29,7 @@ GUI/CCScrollView/CCTableViewCell.cpp \ physics-nodes/CCPhysicsDebugNode.cpp \ physics-nodes/CCPhysicsSprite.cpp -LOCAL_STATIC_LIBRARIES := cocos2dx_static +LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static LOCAL_STATIC_LIBRARIES += cocos_curl_static LOCAL_STATIC_LIBRARIES += box2d_static From 7baf873bf64772f84d4339f80f8a8bf07a9126a3 Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 28 Aug 2014 17:03:29 +0800 Subject: [PATCH 19/74] remove unneeded includes --- build/cocos2d_libs.xcodeproj/project.pbxproj | 8 ------- cocos/2d/CCAnimation.cpp | 2 -- cocos/2d/CCAnimation.h | 3 +-- cocos/2d/CCAnimationCache.cpp | 4 ---- cocos/2d/CCClippingNode.cpp | 7 ++---- cocos/2d/CCComponent.cpp | 1 - cocos/2d/CCComponentContainer.cpp | 2 +- cocos/2d/CCFastTMXLayer.cpp | 11 +++------- cocos/2d/CCFastTMXLayer.h | 10 +++------ cocos/2d/CCFastTMXTiledMap.cpp | 9 ++------ cocos/2d/CCMenuItem.cpp | 4 +--- cocos/2d/CCMotionStreak.cpp | 5 +---- cocos/2d/CCMotionStreak.h | 10 ++------- cocos/2d/CCNodeGrid.cpp | 4 ---- cocos/2d/CCParallaxNode.cpp | 2 +- cocos/2d/CCParticleBatchNode.cpp | 13 ++--------- cocos/2d/CCParticleExamples.cpp | 1 - cocos/2d/CCParticleSystem.cpp | 7 +----- cocos/2d/CCParticleSystem.h | 1 - cocos/2d/CCParticleSystemQuad.cpp | 15 +++++-------- cocos/2d/CCParticleSystemQuad.h | 2 +- cocos/2d/CCProgressTimer.cpp | 23 +------------------- cocos/2d/CCProgressTimer.h | 10 +++------ cocos/2d/CCRenderTexture.cpp | 10 --------- cocos/2d/CCSprite.cpp | 14 ------------ cocos/2d/CCSprite.h | 7 +----- cocos/2d/CCSpriteBatchNode.cpp | 13 ----------- cocos/2d/CCSpriteBatchNode.h | 1 - cocos/2d/CCSpriteFrame.h | 1 - cocos/2d/CCSpriteFrameCache.cpp | 5 +++-- cocos/2d/CCSpriteFrameCache.h | 8 +++---- cocos/2d/CCTMXLayer.cpp | 6 ----- cocos/2d/CCTMXLayer.h | 4 +--- cocos/2d/CCTMXObjectGroup.cpp | 2 +- cocos/2d/CCTMXTiledMap.cpp | 8 +++---- cocos/2d/CCTMXTiledMap.h | 3 +-- cocos/2d/CCTMXXMLParser.cpp | 6 ++--- cocos/2d/CCTextFieldTTF.cpp | 2 +- cocos/2d/CCTileMapAtlas.cpp | 5 ++--- cocos/2d/CCTileMapAtlas.h | 2 +- cocos/3d/CCAnimate3D.cpp | 3 --- cocos/3d/CCAnimate3D.h | 6 +---- cocos/3d/CCAnimation3D.cpp | 2 -- cocos/3d/CCAnimation3D.h | 3 +-- cocos/3d/CCAnimationCurve.h | 2 -- 45 files changed, 51 insertions(+), 216 deletions(-) diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 1dce556650..83811cdcbb 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -3345,13 +3345,6 @@ name = "text-input-node"; sourceTree = ""; }; - 1A5702CC180BCE410088DEC7 /* textures */ = { - isa = PBXGroup; - children = ( - ); - name = textures; - sourceTree = ""; - }; 1A5702DF180BCE610088DEC7 /* tilemap-parallax-nodes */ = { isa = PBXGroup; children = ( @@ -4483,7 +4476,6 @@ 1A570275180BCC840088DEC7 /* sprite-nodes */, 1A57029A180BCD4F0088DEC7 /* support */, 1A5702BC180BCE0A0088DEC7 /* text-input-node */, - 1A5702CC180BCE410088DEC7 /* textures */, 1A5702DF180BCE610088DEC7 /* tilemap-parallax-nodes */, ); name = 2d; diff --git a/cocos/2d/CCAnimation.cpp b/cocos/2d/CCAnimation.cpp index 69683e1fed..ba84b43024 100644 --- a/cocos/2d/CCAnimation.cpp +++ b/cocos/2d/CCAnimation.cpp @@ -25,10 +25,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "2d/CCAnimation.h" -#include "2d/CCSpriteFrame.h" #include "renderer/CCTextureCache.h" #include "renderer/CCTexture2D.h" -#include "base/ccMacros.h" #include "base/CCDirector.h" NS_CC_BEGIN diff --git a/cocos/2d/CCAnimation.h b/cocos/2d/CCAnimation.h index 32e4cd56c4..39b35e8f63 100644 --- a/cocos/2d/CCAnimation.h +++ b/cocos/2d/CCAnimation.h @@ -30,9 +30,8 @@ THE SOFTWARE. #include "base/CCPlatformConfig.h" #include "base/CCRef.h" #include "base/CCValue.h" -#include "math/CCGeometry.h" -#include "2d/CCSpriteFrame.h" #include "base/CCVector.h" +#include "2d/CCSpriteFrame.h" #include diff --git a/cocos/2d/CCAnimationCache.cpp b/cocos/2d/CCAnimationCache.cpp index 04389ae3ff..613abe6f8b 100644 --- a/cocos/2d/CCAnimationCache.cpp +++ b/cocos/2d/CCAnimationCache.cpp @@ -25,12 +25,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "2d/CCAnimationCache.h" -#include "base/ccMacros.h" -#include "2d/CCAnimation.h" -#include "2d/CCSpriteFrame.h" #include "2d/CCSpriteFrameCache.h" #include "platform/CCFileUtils.h" -#include "deprecated/CCString.h" using namespace std; diff --git a/cocos/2d/CCClippingNode.cpp b/cocos/2d/CCClippingNode.cpp index 653a70cacc..c1da57d627 100644 --- a/cocos/2d/CCClippingNode.cpp +++ b/cocos/2d/CCClippingNode.cpp @@ -26,14 +26,11 @@ */ #include "2d/CCClippingNode.h" -#include "renderer/CCGLProgram.h" -#include "renderer/CCGLProgramCache.h" #include "2d/CCDrawingPrimitives.h" +#include "renderer/CCGLProgramCache.h" +#include "renderer/CCRenderer.h" #include "base/CCDirector.h" -#include "renderer/CCRenderer.h" -#include "renderer/CCGroupCommand.h" -#include "renderer/CCCustomCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCComponent.cpp b/cocos/2d/CCComponent.cpp index 4d629be8c1..34c0d19c01 100644 --- a/cocos/2d/CCComponent.cpp +++ b/cocos/2d/CCComponent.cpp @@ -23,7 +23,6 @@ THE SOFTWARE. ****************************************************************************/ #include "2d/CCComponent.h" -#include "base/CCScriptSupport.h" NS_CC_BEGIN diff --git a/cocos/2d/CCComponentContainer.cpp b/cocos/2d/CCComponentContainer.cpp index 95834c0f62..544b3d8077 100644 --- a/cocos/2d/CCComponentContainer.cpp +++ b/cocos/2d/CCComponentContainer.cpp @@ -25,7 +25,7 @@ THE SOFTWARE. #include "2d/CCComponentContainer.h" #include "2d/CCComponent.h" -#include "base/CCDirector.h" +#include "2d/CCNode.h" NS_CC_BEGIN diff --git a/cocos/2d/CCFastTMXLayer.cpp b/cocos/2d/CCFastTMXLayer.cpp index 6e3db5c6df..24423db28e 100644 --- a/cocos/2d/CCFastTMXLayer.cpp +++ b/cocos/2d/CCFastTMXLayer.cpp @@ -34,20 +34,15 @@ THE SOFTWARE. It was rewritten again, and only a small part of the original HK ideas/code remains in this implementation */ -#include "CCFastTMXLayer.h" -#include "CCTMXXMLParser.h" -#include "CCFastTMXTiledMap.h" +#include "2d/CCFastTMXLayer.h" +#include "2d/CCFastTMXTiledMap.h" #include "2d/CCSprite.h" #include "renderer/CCTextureCache.h" #include "renderer/CCGLProgramCache.h" #include "renderer/ccGLStateCache.h" -#include "renderer/CCGLProgram.h" -#include "base/CCDirector.h" -#include "base/CCConfiguration.h" #include "renderer/CCRenderer.h" +#include "base/CCDirector.h" #include "deprecated/CCString.h" -#include "renderer/CCGLProgramStateCache.h" -#include NS_CC_BEGIN namespace experimental { diff --git a/cocos/2d/CCFastTMXLayer.h b/cocos/2d/CCFastTMXLayer.h index db1e0b7e3a..d5c2000609 100644 --- a/cocos/2d/CCFastTMXLayer.h +++ b/cocos/2d/CCFastTMXLayer.h @@ -27,15 +27,11 @@ THE SOFTWARE. #ifndef __CC_FAST_TMX_LAYER_H__ #define __CC_FAST_TMX_LAYER_H__ -#include "CCTMXObjectGroup.h" -#include "CCTMXXMLParser.h" -#include "CCNode.h" -#include "renderer/CCCustomCommand.h" -#include "renderer/CCQuadCommand.h" -#include "renderer/CCPrimitiveCommand.h" - #include #include +#include "2d/CCNode.h" +#include "2d/CCTMXXMLParser.h" +#include "renderer/CCPrimitiveCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCFastTMXTiledMap.cpp b/cocos/2d/CCFastTMXTiledMap.cpp index 154bcdd5b8..9dbb5c2c9b 100644 --- a/cocos/2d/CCFastTMXTiledMap.cpp +++ b/cocos/2d/CCFastTMXTiledMap.cpp @@ -24,13 +24,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCFastTMXTiledMap.h" - -#include - -#include "CCTMXXMLParser.h" -#include "CCFastTMXLayer.h" -#include "CCSprite.h" +#include "2d/CCFastTMXTiledMap.h" +#include "2d/CCFastTMXLayer.h" #include "deprecated/CCString.h" NS_CC_BEGIN diff --git a/cocos/2d/CCMenuItem.cpp b/cocos/2d/CCMenuItem.cpp index db5ddccfc0..c35f70ee05 100644 --- a/cocos/2d/CCMenuItem.cpp +++ b/cocos/2d/CCMenuItem.cpp @@ -28,12 +28,10 @@ THE SOFTWARE. #include "2d/CCMenuItem.h" #include "2d/CCActionInterval.h" #include "2d/CCSprite.h" -#include "CCLabelAtlas.h" +#include "2d/CCLabelAtlas.h" #include "2d/CCLabel.h" -#include "base/CCScriptSupport.h" #include "deprecated/CCString.h" #include -#include #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #pragma GCC diagnostic ignored "-Wdeprecated-declarations" diff --git a/cocos/2d/CCMotionStreak.cpp b/cocos/2d/CCMotionStreak.cpp index a9a227e356..13b360c5bd 100644 --- a/cocos/2d/CCMotionStreak.cpp +++ b/cocos/2d/CCMotionStreak.cpp @@ -26,13 +26,10 @@ THE SOFTWARE. #include "2d/CCMotionStreak.h" #include "math/CCVertex.h" -#include "base/ccMacros.h" #include "base/CCDirector.h" #include "renderer/CCTextureCache.h" #include "renderer/ccGLStateCache.h" -#include "renderer/CCGLProgram.h" -#include "renderer/CCGLProgramState.h" -#include "renderer/CCCustomCommand.h" +#include "renderer/CCTexture2D.h" #include "renderer/CCRenderer.h" NS_CC_BEGIN diff --git a/cocos/2d/CCMotionStreak.h b/cocos/2d/CCMotionStreak.h index 951c4def21..97ab7c749f 100644 --- a/cocos/2d/CCMotionStreak.h +++ b/cocos/2d/CCMotionStreak.h @@ -27,16 +27,13 @@ THE SOFTWARE. #define __CCMOTION_STREAK_H__ #include "base/CCProtocols.h" -#include "renderer/CCTexture2D.h" -#include "base/ccTypes.h" #include "2d/CCNode.h" #include "renderer/CCCustomCommand.h" -#ifdef EMSCRIPTEN -#include "CCGLBufferedNode.h" -#endif // EMSCRIPTEN NS_CC_BEGIN +class Texture2D; + /** * @addtogroup misc_nodes * @{ @@ -46,9 +43,6 @@ NS_CC_BEGIN Creates a trailing path. */ class CC_DLL MotionStreak : public Node, public TextureProtocol -#ifdef EMSCRIPTEN -, public GLBufferedNode -#endif // EMSCRIPTEN { public: /** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename */ diff --git a/cocos/2d/CCNodeGrid.cpp b/cocos/2d/CCNodeGrid.cpp index 985b950ed2..eb42030199 100644 --- a/cocos/2d/CCNodeGrid.cpp +++ b/cocos/2d/CCNodeGrid.cpp @@ -24,11 +24,7 @@ #include "2d/CCNodeGrid.h" #include "2d/CCGrid.h" - -#include "renderer/CCGroupCommand.h" #include "renderer/CCRenderer.h" -#include "renderer/CCCustomCommand.h" - NS_CC_BEGIN diff --git a/cocos/2d/CCParallaxNode.cpp b/cocos/2d/CCParallaxNode.cpp index 3631453e60..b20b35d806 100644 --- a/cocos/2d/CCParallaxNode.cpp +++ b/cocos/2d/CCParallaxNode.cpp @@ -24,7 +24,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCParallaxNode.h" +#include "2d/CCParallaxNode.h" #include "base/ccCArray.h" NS_CC_BEGIN diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index dd27e08acb..ce7e2a0bb7 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -30,22 +30,13 @@ #include "2d/CCParticleBatchNode.h" -#include "renderer/CCTextureAtlas.h" #include "2d/CCGrid.h" #include "2d/CCParticleSystem.h" -#include "platform/CCFileUtils.h" -#include "base/CCProfiling.h" -#include "base/ccConfig.h" -#include "base/ccMacros.h" -#include "base/base64.h" -#include "base/ZipUtils.h" #include "renderer/CCTextureCache.h" -#include "renderer/CCGLProgramState.h" -#include "renderer/CCGLProgram.h" -#include "renderer/ccGLStateCache.h" #include "renderer/CCQuadCommand.h" #include "renderer/CCRenderer.h" - +#include "renderer/CCTextureAtlas.h" +#include "deprecated/CCString.h" NS_CC_BEGIN diff --git a/cocos/2d/CCParticleExamples.cpp b/cocos/2d/CCParticleExamples.cpp index 11f72ea467..a4387b9ef8 100644 --- a/cocos/2d/CCParticleExamples.cpp +++ b/cocos/2d/CCParticleExamples.cpp @@ -26,7 +26,6 @@ THE SOFTWARE. ****************************************************************************/ #include "2d/CCParticleExamples.h" -#include "platform/CCImage.h" #include "base/CCDirector.h" #include "base/firePngData.h" #include "renderer/CCTextureCache.h" diff --git a/cocos/2d/CCParticleSystem.cpp b/cocos/2d/CCParticleSystem.cpp index f18fcec6d8..b53a8e41db 100644 --- a/cocos/2d/CCParticleSystem.cpp +++ b/cocos/2d/CCParticleSystem.cpp @@ -48,16 +48,11 @@ THE SOFTWARE. #include "2d/CCParticleBatchNode.h" #include "renderer/CCTextureAtlas.h" -#include "platform/CCFileUtils.h" -#include "platform/CCImage.h" -#include "base/ccTypes.h" #include "base/base64.h" #include "base/ZipUtils.h" #include "base/CCDirector.h" -#include "base/CCProfiling.h" #include "renderer/CCTextureCache.h" - -#include "CCGL.h" +#include "deprecated/CCString.h" using namespace std; diff --git a/cocos/2d/CCParticleSystem.h b/cocos/2d/CCParticleSystem.h index 55d85c3446..58627ee488 100644 --- a/cocos/2d/CCParticleSystem.h +++ b/cocos/2d/CCParticleSystem.h @@ -30,7 +30,6 @@ THE SOFTWARE. #include "base/CCProtocols.h" #include "2d/CCNode.h" #include "base/CCValue.h" -#include "deprecated/CCString.h" NS_CC_BEGIN diff --git a/cocos/2d/CCParticleSystemQuad.cpp b/cocos/2d/CCParticleSystemQuad.cpp index 392f3b6783..bac6027836 100644 --- a/cocos/2d/CCParticleSystemQuad.cpp +++ b/cocos/2d/CCParticleSystemQuad.cpp @@ -26,26 +26,21 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCGL.h" + #include "2d/CCParticleSystemQuad.h" #include "2d/CCSpriteFrame.h" #include "2d/CCParticleBatchNode.h" #include "renderer/CCTextureAtlas.h" +#include "renderer/ccGLStateCache.h" +#include "renderer/CCRenderer.h" #include "base/CCDirector.h" #include "base/CCEventType.h" #include "base/CCConfiguration.h" -#include "math/TransformUtils.h" -#include "renderer/CCGLProgramState.h" -#include "renderer/ccGLStateCache.h" -#include "renderer/CCGLProgram.h" -#include "renderer/CCRenderer.h" -#include "renderer/CCQuadCommand.h" -#include "renderer/CCCustomCommand.h" - -// extern #include "base/CCEventListenerCustom.h" #include "base/CCEventDispatcher.h" +#include "deprecated/CCString.h" + NS_CC_BEGIN ParticleSystemQuad::ParticleSystemQuad() diff --git a/cocos/2d/CCParticleSystemQuad.h b/cocos/2d/CCParticleSystemQuad.h index 73386f152d..918707cb9f 100644 --- a/cocos/2d/CCParticleSystemQuad.h +++ b/cocos/2d/CCParticleSystemQuad.h @@ -28,7 +28,7 @@ THE SOFTWARE. #ifndef __CC_PARTICLE_SYSTEM_QUAD_H__ #define __CC_PARTICLE_SYSTEM_QUAD_H__ -#include "CCParticleSystem.h" +#include "2d/CCParticleSystem.h" #include "renderer/CCQuadCommand.h" NS_CC_BEGIN diff --git a/cocos/2d/CCProgressTimer.cpp b/cocos/2d/CCProgressTimer.cpp index 498da87487..d0acb1ee5b 100644 --- a/cocos/2d/CCProgressTimer.cpp +++ b/cocos/2d/CCProgressTimer.cpp @@ -27,17 +27,9 @@ THE SOFTWARE. #include "base/ccMacros.h" #include "base/CCDirector.h" -#include "2d/CCDrawingPrimitives.h" -#include "renderer/CCTextureCache.h" -#include "renderer/CCGLProgram.h" -#include "renderer/CCGLProgramState.h" +#include "2d/CCSprite.h" #include "renderer/ccGLStateCache.h" #include "renderer/CCRenderer.h" -#include "renderer/CCCustomCommand.h" -#include "math/TransformUtils.h" - -// extern -#include NS_CC_BEGIN @@ -512,22 +504,9 @@ void ProgressTimer::onDraw(const Mat4 &transform, uint32_t flags) GL::bindTexture2D( _sprite->getTexture()->getName() ); -#ifdef EMSCRIPTEN - setGLBufferData((void*) _vertexData, (_vertexDataCount * sizeof(V2F_C4B_T2F)), 0); - - int offset = 0; - glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid*)offset); - - offset += sizeof(Vec2); - glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(V2F_C4B_T2F), (GLvoid*)offset); - - offset += sizeof(Color4B); - glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid*)offset); -#else glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(_vertexData[0]) , &_vertexData[0].vertices); glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(_vertexData[0]), &_vertexData[0].texCoords); glVertexAttribPointer( GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(_vertexData[0]), &_vertexData[0].colors); -#endif // EMSCRIPTEN if(_type == Type::RADIAL) { diff --git a/cocos/2d/CCProgressTimer.h b/cocos/2d/CCProgressTimer.h index a687c396f8..061712efe3 100644 --- a/cocos/2d/CCProgressTimer.h +++ b/cocos/2d/CCProgressTimer.h @@ -26,14 +26,13 @@ THE SOFTWARE. #ifndef __MISC_NODE_CCPROGRESS_TIMER_H__ #define __MISC_NODE_CCPROGRESS_TIMER_H__ -#include "2d/CCSprite.h" #include "renderer/CCCustomCommand.h" -#ifdef EMSCRIPTEN -#include "CCGLBufferedNode.h" -#endif // EMSCRIPTEN +#include "2d/CCNode.h" NS_CC_BEGIN +class Sprite; + /** * @addtogroup misc_nodes * @{ @@ -46,9 +45,6 @@ NS_CC_BEGIN @since v0.99.1 */ class CC_DLL ProgressTimer : public Node -#ifdef EMSCRIPTEN -, public GLBufferedNode -#endif // EMSCRIPTEN { public: /** Types of progress diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index 1d4457bd7b..16b589d8cd 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -27,23 +27,13 @@ THE SOFTWARE. #include "2d/CCRenderTexture.h" #include "base/ccUtils.h" -#include "platform/CCImage.h" #include "platform/CCFileUtils.h" -#include "2d/CCGrid.h" #include "base/CCEventType.h" #include "base/CCConfiguration.h" -#include "base/CCConfiguration.h" #include "base/CCDirector.h" #include "base/CCEventListenerCustom.h" #include "base/CCEventDispatcher.h" -#include "renderer/CCGLProgram.h" -#include "renderer/ccGLStateCache.h" -#include "renderer/CCTextureCache.h" #include "renderer/CCRenderer.h" -#include "renderer/CCGroupCommand.h" -#include "renderer/CCCustomCommand.h" - -#include "CCGL.h" NS_CC_BEGIN diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 6bd4ff58e0..6d6a96b16f 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -27,28 +27,14 @@ THE SOFTWARE. #include "2d/CCSprite.h" -#include -#include - #include "2d/CCSpriteBatchNode.h" -#include "2d/CCAnimation.h" #include "2d/CCAnimationCache.h" #include "2d/CCSpriteFrame.h" #include "2d/CCSpriteFrameCache.h" -#include "2d/CCDrawingPrimitives.h" #include "renderer/CCTextureCache.h" #include "renderer/CCTexture2D.h" -#include "renderer/CCGLProgramState.h" -#include "renderer/ccGLStateCache.h" -#include "renderer/CCGLProgram.h" #include "renderer/CCRenderer.h" -#include "base/CCProfiling.h" #include "base/CCDirector.h" -#include "base/CCDirector.h" -#include "base/ccConfig.h" -#include "math/CCGeometry.h" -#include "math/CCAffineTransform.h" -#include "math/TransformUtils.h" #include "deprecated/CCString.h" diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index b3006f4483..a4e75c334c 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -28,15 +28,10 @@ THE SOFTWARE. #ifndef __SPRITE_NODE_CCSPRITE_H__ #define __SPRITE_NODE_CCSPRITE_H__ +#include #include "2d/CCNode.h" #include "base/CCProtocols.h" #include "renderer/CCTextureAtlas.h" -#include "base/ccTypes.h" -#include -#ifdef EMSCRIPTEN -#include "CCGLBufferedNode.h" -#endif // EMSCRIPTEN -#include "physics/CCPhysicsBody.h" #include "renderer/CCQuadCommand.h" #include "renderer/CCCustomCommand.h" diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index 318b0ed7a6..adf6c8db03 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -27,24 +27,11 @@ THE SOFTWARE. ****************************************************************************/ #include "2d/CCSpriteBatchNode.h" - -#include - #include "2d/CCSprite.h" -#include "2d/CCGrid.h" -#include "2d/CCDrawingPrimitives.h" -#include "2d/CCLayer.h" -#include "2d/CCScene.h" -#include "base/ccConfig.h" #include "base/CCDirector.h" -#include "base/CCProfiling.h" #include "renderer/CCTextureCache.h" -#include "renderer/CCGLProgramState.h" -#include "renderer/CCGLProgram.h" -#include "renderer/ccGLStateCache.h" #include "renderer/CCRenderer.h" #include "renderer/CCQuadCommand.h" -#include "math/TransformUtils.h" #include "deprecated/CCString.h" // For StringUtils::format diff --git a/cocos/2d/CCSpriteBatchNode.h b/cocos/2d/CCSpriteBatchNode.h index d544d0472e..6e7af1664b 100644 --- a/cocos/2d/CCSpriteBatchNode.h +++ b/cocos/2d/CCSpriteBatchNode.h @@ -33,7 +33,6 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "base/CCProtocols.h" -#include "base/ccMacros.h" #include "renderer/CCTextureAtlas.h" #include "renderer/CCBatchCommand.h" diff --git a/cocos/2d/CCSpriteFrame.h b/cocos/2d/CCSpriteFrame.h index bf214ff653..05cd279482 100644 --- a/cocos/2d/CCSpriteFrame.h +++ b/cocos/2d/CCSpriteFrame.h @@ -29,7 +29,6 @@ THE SOFTWARE. #define __SPRITE_CCSPRITE_FRAME_H__ #include "2d/CCNode.h" -#include "base/CCProtocols.h" #include "base/CCRef.h" #include "math/CCGeometry.h" diff --git a/cocos/2d/CCSpriteFrameCache.cpp b/cocos/2d/CCSpriteFrameCache.cpp index 85f06a36d3..6ba2817e7e 100644 --- a/cocos/2d/CCSpriteFrameCache.cpp +++ b/cocos/2d/CCSpriteFrameCache.cpp @@ -31,14 +31,15 @@ THE SOFTWARE. #include -#include "2d/CCSpriteFrame.h" + #include "2d/CCSprite.h" #include "platform/CCFileUtils.h" #include "base/CCNS.h" #include "base/ccMacros.h" #include "base/CCDirector.h" +#include "renderer/CCTexture2D.h" #include "renderer/CCTextureCache.h" -#include "math/TransformUtils.h" + #include "deprecated/CCString.h" diff --git a/cocos/2d/CCSpriteFrameCache.h b/cocos/2d/CCSpriteFrameCache.h index b0e5b1f391..0722ba860a 100644 --- a/cocos/2d/CCSpriteFrameCache.h +++ b/cocos/2d/CCSpriteFrameCache.h @@ -34,19 +34,17 @@ THE SOFTWARE. * To create sprite frames and texture atlas, use this tool: * http://zwoptex.zwopple.com/ */ - +#include +#include #include "2d/CCSpriteFrame.h" -#include "renderer/CCTexture2D.h" #include "base/CCRef.h" #include "base/CCValue.h" #include "base/CCMap.h" -#include -#include - NS_CC_BEGIN class Sprite; +class Texture2D; /** * @addtogroup sprite_nodes diff --git a/cocos/2d/CCTMXLayer.cpp b/cocos/2d/CCTMXLayer.cpp index a305e9f661..0fd515424a 100644 --- a/cocos/2d/CCTMXLayer.cpp +++ b/cocos/2d/CCTMXLayer.cpp @@ -26,16 +26,10 @@ THE SOFTWARE. ****************************************************************************/ #include "2d/CCTMXLayer.h" - -#include "2d/CCTMXXMLParser.h" #include "2d/CCTMXTiledMap.h" #include "2d/CCSprite.h" -#include "base/ccCArray.h" #include "base/CCDirector.h" #include "renderer/CCTextureCache.h" -#include "renderer/CCGLProgramState.h" -#include "renderer/CCGLProgram.h" - #include "deprecated/CCString.h" // For StringUtils::format NS_CC_BEGIN diff --git a/cocos/2d/CCTMXLayer.h b/cocos/2d/CCTMXLayer.h index 2ab316b90e..470abc0f10 100644 --- a/cocos/2d/CCTMXLayer.h +++ b/cocos/2d/CCTMXLayer.h @@ -27,10 +27,8 @@ THE SOFTWARE. #ifndef __CCTMX_LAYER_H__ #define __CCTMX_LAYER_H__ -#include "CCTMXObjectGroup.h" -#include "CCAtlasNode.h" #include "2d/CCSpriteBatchNode.h" -#include "CCTMXXMLParser.h" +#include "2d/CCTMXXMLParser.h" #include "base/ccCArray.h" NS_CC_BEGIN diff --git a/cocos/2d/CCTMXObjectGroup.cpp b/cocos/2d/CCTMXObjectGroup.cpp index 6b2a55af32..ff83c41bbf 100644 --- a/cocos/2d/CCTMXObjectGroup.cpp +++ b/cocos/2d/CCTMXObjectGroup.cpp @@ -25,7 +25,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCTMXObjectGroup.h" +#include "2d/CCTMXObjectGroup.h" #include "base/ccMacros.h" NS_CC_BEGIN diff --git a/cocos/2d/CCTMXTiledMap.cpp b/cocos/2d/CCTMXTiledMap.cpp index 0559a22203..610a3db326 100644 --- a/cocos/2d/CCTMXTiledMap.cpp +++ b/cocos/2d/CCTMXTiledMap.cpp @@ -24,14 +24,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCTMXTiledMap.h" -#include "CCTMXXMLParser.h" -#include "CCTMXLayer.h" +#include "2d/CCTMXTiledMap.h" +#include "2d/CCTMXXMLParser.h" +#include "2d/CCTMXLayer.h" #include "2d/CCSprite.h" #include "deprecated/CCString.h" // For StringUtils::format -#include - NS_CC_BEGIN // implementation TMXTiledMap diff --git a/cocos/2d/CCTMXTiledMap.h b/cocos/2d/CCTMXTiledMap.h index a4cbda3b64..1951002324 100644 --- a/cocos/2d/CCTMXTiledMap.h +++ b/cocos/2d/CCTMXTiledMap.h @@ -28,12 +28,11 @@ THE SOFTWARE. #define __CCTMX_TILE_MAP_H__ #include "2d/CCNode.h" -#include "CCTMXObjectGroup.h" +#include "2d/CCTMXObjectGroup.h" #include "base/CCValue.h" NS_CC_BEGIN -class TMXObjectGroup; class TMXLayer; class TMXLayerInfo; class TMXTilesetInfo; diff --git a/cocos/2d/CCTMXXMLParser.cpp b/cocos/2d/CCTMXXMLParser.cpp index 396c73260b..be4eb662fb 100644 --- a/cocos/2d/CCTMXXMLParser.cpp +++ b/cocos/2d/CCTMXXMLParser.cpp @@ -26,12 +26,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#include "2d/CCTMXXMLParser.h" #include #include -#include "CCTMXXMLParser.h" -#include "CCTMXTiledMap.h" -#include "base/ccMacros.h" -#include "platform/CCFileUtils.h" +#include "2d/CCTMXTiledMap.h" #include "base/ZipUtils.h" #include "base/base64.h" #include "base/CCDirector.h" diff --git a/cocos/2d/CCTextFieldTTF.cpp b/cocos/2d/CCTextFieldTTF.cpp index 2bc51e86b5..1a8ed91c01 100644 --- a/cocos/2d/CCTextFieldTTF.cpp +++ b/cocos/2d/CCTextFieldTTF.cpp @@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCTextFieldTTF.h" +#include "2d/CCTextFieldTTF.h" #include "base/CCDirector.h" diff --git a/cocos/2d/CCTileMapAtlas.cpp b/cocos/2d/CCTileMapAtlas.cpp index a3d070ed69..78b1f7b670 100644 --- a/cocos/2d/CCTileMapAtlas.cpp +++ b/cocos/2d/CCTileMapAtlas.cpp @@ -24,14 +24,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCTileMapAtlas.h" +#include "2d/CCTileMapAtlas.h" #include "platform/CCFileUtils.h" #include "renderer/CCTextureAtlas.h" #include "base/TGAlib.h" -#include "base/ccConfig.h" #include "base/CCDirector.h" #include "deprecated/CCString.h" -#include + NS_CC_BEGIN diff --git a/cocos/2d/CCTileMapAtlas.h b/cocos/2d/CCTileMapAtlas.h index 7ac9382f3c..dc7eef3734 100644 --- a/cocos/2d/CCTileMapAtlas.h +++ b/cocos/2d/CCTileMapAtlas.h @@ -27,7 +27,7 @@ THE SOFTWARE. #ifndef __CCTILE_MAP_ATLAS__ #define __CCTILE_MAP_ATLAS__ -#include "CCAtlasNode.h" +#include "2d/CCAtlasNode.h" #include "base/CCValue.h" NS_CC_BEGIN diff --git a/cocos/3d/CCAnimate3D.cpp b/cocos/3d/CCAnimate3D.cpp index 00cd4cd9ca..11f71d6a09 100644 --- a/cocos/3d/CCAnimate3D.cpp +++ b/cocos/3d/CCAnimate3D.cpp @@ -23,12 +23,9 @@ ****************************************************************************/ #include "3d/CCAnimate3D.h" -#include "3d/CCAnimation3D.h" #include "3d/CCSprite3D.h" #include "3d/CCSkeleton3D.h" #include "3d/CCMeshSkin.h" - -#include "base/ccMacros.h" #include "platform/CCFileUtils.h" NS_CC_BEGIN diff --git a/cocos/3d/CCAnimate3D.h b/cocos/3d/CCAnimate3D.h index d6d8152bb2..a1c79adefd 100644 --- a/cocos/3d/CCAnimate3D.h +++ b/cocos/3d/CCAnimate3D.h @@ -28,17 +28,13 @@ #include #include "3d/CCAnimation3D.h" - +#include "3d/3dExport.h" #include "base/ccMacros.h" #include "base/CCRef.h" -#include "base/ccTypes.h" -#include "base/CCPlatformMacros.h" #include "2d/CCActionInterval.h" -#include "3d/3dExport.h" NS_CC_BEGIN -class Animation3D; class Bone3D; /** * Animate3D, Animates a Sprite3D given with an Animation3D diff --git a/cocos/3d/CCAnimation3D.cpp b/cocos/3d/CCAnimation3D.cpp index 97e6489fa3..8ef889f106 100644 --- a/cocos/3d/CCAnimation3D.cpp +++ b/cocos/3d/CCAnimation3D.cpp @@ -24,8 +24,6 @@ #include "3d/CCAnimation3D.h" #include "3d/CCBundle3D.h" - -#include "base/ccMacros.h" #include "platform/CCFileUtils.h" NS_CC_BEGIN diff --git a/cocos/3d/CCAnimation3D.h b/cocos/3d/CCAnimation3D.h index 006506d018..3be514be6e 100644 --- a/cocos/3d/CCAnimation3D.h +++ b/cocos/3d/CCAnimation3D.h @@ -31,8 +31,7 @@ #include "base/ccMacros.h" #include "base/CCRef.h" -#include "base/ccTypes.h" -#include "CCBundle3DData.h" +#include "3d/CCBundle3DData.h" #include "3d/3dExport.h" NS_CC_BEGIN diff --git a/cocos/3d/CCAnimationCurve.h b/cocos/3d/CCAnimationCurve.h index 8458ba787a..0f2b9eb0c4 100644 --- a/cocos/3d/CCAnimationCurve.h +++ b/cocos/3d/CCAnimationCurve.h @@ -24,10 +24,8 @@ #ifndef __CCANIMATIONCURVE_H__ #define __CCANIMATIONCURVE_H__ -#include #include -#include "base/ccTypes.h" #include "base/CCPlatformMacros.h" #include "base/CCRef.h" #include "math/CCMath.h" From 50a2cb2b86fb4dd98861d04b716e31a18faee46f Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 28 Aug 2014 17:32:23 +0800 Subject: [PATCH 20/74] remove unneeded includes --- cocos/2d/CCFastTMXTiledMap.h | 1 - cocos/2d/CCTMXXMLParser.h | 2 +- cocos/3d/CCAttachNode.cpp | 6 ------ cocos/3d/CCAttachNode.h | 6 ------ cocos/3d/CCBundle3D.h | 12 ++---------- cocos/3d/CCMesh.cpp | 17 ++--------------- cocos/3d/CCMesh.h | 6 ++---- cocos/3d/CCMeshSkin.cpp | 5 +---- cocos/3d/CCMeshSkin.h | 9 ++------- 9 files changed, 10 insertions(+), 54 deletions(-) diff --git a/cocos/2d/CCFastTMXTiledMap.h b/cocos/2d/CCFastTMXTiledMap.h index 07a544a775..4b3fe2a81b 100644 --- a/cocos/2d/CCFastTMXTiledMap.h +++ b/cocos/2d/CCFastTMXTiledMap.h @@ -32,7 +32,6 @@ THE SOFTWARE. NS_CC_BEGIN -class TMXObjectGroup; class TMXLayerInfo; class TMXTilesetInfo; class TMXMapInfo; diff --git a/cocos/2d/CCTMXXMLParser.h b/cocos/2d/CCTMXXMLParser.h index dde1c4f535..6c011a25c2 100644 --- a/cocos/2d/CCTMXXMLParser.h +++ b/cocos/2d/CCTMXXMLParser.h @@ -33,13 +33,13 @@ THE SOFTWARE. #include "platform/CCSAXParser.h" #include "base/CCVector.h" #include "base/CCValue.h" +#include "2d/CCTMXObjectGroup.h" // needed for Vector for binding #include NS_CC_BEGIN class TMXLayerInfo; -class TMXObjectGroup; class TMXTilesetInfo; /** @file diff --git a/cocos/3d/CCAttachNode.cpp b/cocos/3d/CCAttachNode.cpp index 3d0f575d30..ee53d03d9d 100644 --- a/cocos/3d/CCAttachNode.cpp +++ b/cocos/3d/CCAttachNode.cpp @@ -25,12 +25,6 @@ #include "3d/CCAttachNode.h" #include "3d/CCSkeleton3D.h" -#include "2d/CCNode.h" - -#include "base/CCDirector.h" -#include "base/CCPlatformMacros.h" -#include "base/ccMacros.h" - NS_CC_BEGIN AttachNode* AttachNode::create(Bone3D* attachBone) diff --git a/cocos/3d/CCAttachNode.h b/cocos/3d/CCAttachNode.h index ed67bca143..57013cceb6 100644 --- a/cocos/3d/CCAttachNode.h +++ b/cocos/3d/CCAttachNode.h @@ -25,14 +25,8 @@ #ifndef __CCATTACHNODE_H__ #define __CCATTACHNODE_H__ -#include - -#include "base/CCVector.h" -#include "base/ccTypes.h" -#include "base/CCProtocols.h" #include "math/CCMath.h" #include "2d/CCNode.h" -#include "renderer/CCMeshCommand.h" #include "3d/3dExport.h" NS_CC_BEGIN diff --git a/cocos/3d/CCBundle3D.h b/cocos/3d/CCBundle3D.h index 6388e14ad6..bd100d6d7a 100644 --- a/cocos/3d/CCBundle3D.h +++ b/cocos/3d/CCBundle3D.h @@ -25,18 +25,10 @@ #ifndef __CCBUNDLE3D_H__ #define __CCBUNDLE3D_H__ -#include -#include - #include "3d/CCBundle3DData.h" - -#include "base/ccMacros.h" -#include "base/CCRef.h" -#include "base/ccTypes.h" - -#include "json/document.h" -#include "CCBundleReader.h" #include "3d/3dExport.h" +#include "3d/CCBundleReader.h" +#include "json/document.h" NS_CC_BEGIN class Animation3D; diff --git a/cocos/3d/CCMesh.cpp b/cocos/3d/CCMesh.cpp index 9b4d825f8d..92d855a6cd 100644 --- a/cocos/3d/CCMesh.cpp +++ b/cocos/3d/CCMesh.cpp @@ -22,26 +22,13 @@ THE SOFTWARE. ****************************************************************************/ -#include -#include -#include -#include - #include "3d/CCMesh.h" #include "3d/CCMeshSkin.h" +#include "3d/CCSkeleton3D.h" #include "3d/CCMeshVertexIndexData.h" - -#include "base/ccMacros.h" -#include "base/CCEventCustom.h" -#include "base/CCEventListenerCustom.h" #include "base/CCEventDispatcher.h" -#include "base/CCEventType.h" -#include "base/CCDirector.h" -#include "renderer/ccGLStateCache.h" -#include "renderer/CCTexture2D.h" #include "renderer/CCTextureCache.h" -#include "renderer/CCGLProgramCache.h" - +#include "renderer/CCGLProgramState.h" using namespace std; diff --git a/cocos/3d/CCMesh.h b/cocos/3d/CCMesh.h index 5080d74f48..c55f949460 100644 --- a/cocos/3d/CCMesh.h +++ b/cocos/3d/CCMesh.h @@ -26,17 +26,13 @@ #define __CCMESH_H__ #include -#include #include "3d/CCBundle3DData.h" #include "3d/CCAABB.h" #include "3d/3dExport.h" #include "base/CCRef.h" -#include "base/ccTypes.h" #include "math/CCMath.h" -#include "renderer/CCGLProgram.h" -#include "renderer/CCGLProgramState.h" #include "renderer/CCMeshCommand.h" NS_CC_BEGIN @@ -44,6 +40,8 @@ NS_CC_BEGIN class Texture2D; class MeshSkin; class MeshIndexData; +class GLProgramState; +class GLProgram; /** * Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on */ diff --git a/cocos/3d/CCMeshSkin.cpp b/cocos/3d/CCMeshSkin.cpp index 3387de9da5..6966178b9a 100644 --- a/cocos/3d/CCMeshSkin.cpp +++ b/cocos/3d/CCMeshSkin.cpp @@ -25,10 +25,7 @@ #include "3d/CCMeshSkin.h" #include "3d/CCSkeleton3D.h" #include "3d/CCBundle3D.h" - -#include "base/ccMacros.h" -#include "base/CCPlatformMacros.h" -#include "platform/CCFileUtils.h" +#include "3d/CCSkeleton3D.h" NS_CC_BEGIN diff --git a/cocos/3d/CCMeshSkin.h b/cocos/3d/CCMeshSkin.h index 6442c3401a..edc2cdfc75 100644 --- a/cocos/3d/CCMeshSkin.h +++ b/cocos/3d/CCMeshSkin.h @@ -25,17 +25,12 @@ #ifndef __CCMESHSKIN_H__ #define __CCMESHSKIN_H__ -#include - #include "3d/CCBundle3DData.h" -#include "3d/CCSkeleton3D.h" - -#include "base/ccMacros.h" +#include "3d/3dExport.h" #include "base/CCRef.h" #include "base/CCVector.h" -#include "base/ccTypes.h" #include "math/CCMath.h" -#include "3d/3dExport.h" + NS_CC_BEGIN From 7c870cfcc17cf0fbd972e04d544faa3f48fdfc78 Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Fri, 29 Aug 2014 09:50:26 +0800 Subject: [PATCH 21/74] fix skew matrix bug --- cocos/2d/CCNode.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 887ab70cbf..4ac0373528 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1672,10 +1672,14 @@ const Mat4& Node::getNodeToParentTransform() const // If skew is needed, apply skew and then anchor point if (needsSkewMatrix) { - Mat4 skewMatrix(1, (float)tanf(CC_DEGREES_TO_RADIANS(_skewY)), 0, 0, - (float)tanf(CC_DEGREES_TO_RADIANS(_skewX)), 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1); + float skewMatArray[16] = + { + 1, (float)tanf(CC_DEGREES_TO_RADIANS(_skewY)), 0, 0, + (float)tanf(CC_DEGREES_TO_RADIANS(_skewX)), 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + }; + Mat4 skewMatrix(skewMatArray); _transform = _transform * skewMatrix; From 528f4b5c0ce8100bf6d92fd6cd3f07d4ea590aa2 Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Fri, 29 Aug 2014 10:06:44 +0800 Subject: [PATCH 22/74] fix TextureAtlas drawNumberofQuads bug --- cocos/renderer/CCTextureAtlas.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/renderer/CCTextureAtlas.cpp b/cocos/renderer/CCTextureAtlas.cpp index b60c47bc92..a1c721011f 100644 --- a/cocos/renderer/CCTextureAtlas.cpp +++ b/cocos/renderer/CCTextureAtlas.cpp @@ -625,9 +625,9 @@ void TextureAtlas::drawNumberOfQuads(ssize_t numberOfQuads, ssize_t start) // glBufferData(GL_ARRAY_BUFFER, sizeof(quads_[0]) * (n-start), &quads_[start], GL_DYNAMIC_DRAW); // option 3: orphaning + glMapBuffer - glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * (numberOfQuads-start), nullptr, GL_DYNAMIC_DRAW); + glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * _capacity, nullptr, GL_DYNAMIC_DRAW); void *buf = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); - memcpy(buf, _quads, sizeof(_quads[0])* (numberOfQuads-start)); + memcpy(buf, _quads, sizeof(_quads[0])* _totalQuads); glUnmapBuffer(GL_ARRAY_BUFFER); glBindBuffer(GL_ARRAY_BUFFER, 0); @@ -661,7 +661,7 @@ void TextureAtlas::drawNumberOfQuads(ssize_t numberOfQuads, ssize_t start) // XXX: update is done in draw... perhaps it should be done in a timer if (_dirty) { - glBufferSubData(GL_ARRAY_BUFFER, sizeof(_quads[0])*start, sizeof(_quads[0]) * numberOfQuads , &_quads[start] ); + glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(_quads[0]) * _totalQuads , &_quads[0] ); _dirty = false; } From 892c8d4455c882d9e88530a800427ec23e5567a0 Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 29 Aug 2014 10:24:30 +0800 Subject: [PATCH 23/74] add gin0606 as AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 93f56e9cbd..2740fd5bfc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -918,6 +918,7 @@ Developers: Fix video scale issue in iOS Fix iOS VideoPlayer memory leak Added c++11 random library support + Added WebView widget which supports iOS and Android billtt Fixed a bug that Node::setScale(float) may not work properly From 5a1e0601a72b41815442dfab4e864f44fc2c38ff Mon Sep 17 00:00:00 2001 From: lvlong Date: Fri, 29 Aug 2014 10:43:26 +0800 Subject: [PATCH 24/74] Code Standards --- cocos/3d/CCBundle3D.cpp | 178 +++++++++++++++++------------------- cocos/3d/CCBundleReader.cpp | 59 ++++++------ cocos/3d/CCBundleReader.h | 8 +- 3 files changed, 120 insertions(+), 125 deletions(-) diff --git a/cocos/3d/CCBundle3D.cpp b/cocos/3d/CCBundle3D.cpp index 8eb3fcbd91..0d05427dbd 100644 --- a/cocos/3d/CCBundle3D.cpp +++ b/cocos/3d/CCBundle3D.cpp @@ -201,7 +201,7 @@ bool Bundle3D::load(const std::string& path) } else { - CCLOGINFO("%s is invalid file formate", path); + CCLOG("%s is invalid file formate", path.c_str()); } ret?(_path = path):(_path = ""); @@ -376,7 +376,7 @@ bool Bundle3D::loadMeshDatas(MeshDatas& meshdatas) { return loadMeshDatasBinary_0_2(meshdatas); } - else if(_version == "0.3") + else// if(_version == "0.3") { return loadMeshDatasBinary(meshdatas); } @@ -391,7 +391,7 @@ bool Bundle3D::loadMeshDatas(MeshDatas& meshdatas) { return loadMeshDataJson_0_2(meshdatas); } - else if(_version == "0.3") + else// if(_version == "0.3") { return loadMeshDatasJson(meshdatas); } @@ -405,7 +405,7 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas) unsigned int meshSize = 0; if (_binaryReader.read(&meshSize, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } for(int i = 0; i < meshSize ; i++ ) @@ -415,7 +415,7 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas) // read mesh data if (_binaryReader.read(&attribSize, 4, 1) != 1 || attribSize < 1) { - CCLOGINFO("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } meshData->attribCount = attribSize; @@ -426,7 +426,7 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas) unsigned int vSize; if (_binaryReader.read(&vSize, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: usage or size '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: usage or size '%s'.", _path.c_str()); return false; } std::string type = _binaryReader.readString(); @@ -440,14 +440,14 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas) // Read vertex data if (_binaryReader.read(&vertexSizeInFloat, 4, 1) != 1 || vertexSizeInFloat == 0) { - CCLOGINFO("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); return false; } meshData->vertex.resize(vertexSizeInFloat); if (_binaryReader.read(&meshData->vertex[0], 4, vertexSizeInFloat) != vertexSizeInFloat) { - CCLOGINFO("Failed to read meshdata: vertex element '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: vertex element '%s'.", _path.c_str()); return false; } @@ -463,13 +463,13 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas) unsigned int nIndexCount; if (_binaryReader.read(&nIndexCount, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); return false; } indexArray.resize(nIndexCount); if (_binaryReader.read(&indexArray[0], 2, nIndexCount) != nIndexCount) { - CCLOGINFO("Failed to read meshdata: indices '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: indices '%s'.", _path.c_str()); return false; } meshData->subMeshIndices.push_back(indexArray); @@ -492,7 +492,7 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas) unsigned int attribSize=0; if (_binaryReader.read(&attribSize, 4, 1) != 1 || attribSize < 1) { - CCLOGINFO("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } enum @@ -514,7 +514,7 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas) unsigned int vUsage, vSize; if (_binaryReader.read(&vUsage, 4, 1) != 1 || _binaryReader.read(&vSize, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: usage or size '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: usage or size '%s'.", _path.c_str()); return false; } @@ -550,14 +550,14 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas) // Read vertex data if (_binaryReader.read(&meshdata->vertexSizeInFloat, 4, 1) != 1 || meshdata->vertexSizeInFloat == 0) { - CCLOGINFO("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); return false; } meshdata->vertex.resize(meshdata->vertexSizeInFloat); if (_binaryReader.read(&meshdata->vertex[0], 4, meshdata->vertexSizeInFloat) != meshdata->vertexSizeInFloat) { - CCLOGINFO("Failed to read meshdata: vertex element '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: vertex element '%s'.", _path.c_str()); return false; } @@ -568,7 +568,7 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas) unsigned int nIndexCount; if (_binaryReader.read(&nIndexCount, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); return false; } @@ -576,7 +576,7 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas) indices.resize(nIndexCount); if (_binaryReader.read(&indices[0], 2, nIndexCount) != nIndexCount) { - CCLOGINFO("Failed to read meshdata: indices '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: indices '%s'.", _path.c_str()); return false; } @@ -600,7 +600,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) unsigned int attribSize=0; if (_binaryReader.read(&attribSize, 4, 1) != 1 || attribSize < 1) { - CCLOGINFO("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } enum @@ -622,7 +622,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) unsigned int vUsage, vSize; if (_binaryReader.read(&vUsage, 4, 1) != 1 || _binaryReader.read(&vSize, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: usage or size '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: usage or size '%s'.", _path.c_str()); return false; } @@ -658,14 +658,14 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) // Read vertex data if (_binaryReader.read(&meshdata->vertexSizeInFloat, 4, 1) != 1 || meshdata->vertexSizeInFloat == 0) { - CCLOGINFO("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); return false; } meshdata->vertex.resize(meshdata->vertexSizeInFloat); if (_binaryReader.read(&meshdata->vertex[0], 4, meshdata->vertexSizeInFloat) != meshdata->vertexSizeInFloat) { - CCLOGINFO("Failed to read meshdata: vertex element '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: vertex element '%s'.", _path.c_str()); return false; } @@ -673,7 +673,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) unsigned int submeshCount; if (_binaryReader.read(&submeshCount, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: submeshCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: submeshCount '%s'.", _path.c_str()); return false; } @@ -682,7 +682,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) unsigned int nIndexCount; if (_binaryReader.read(&nIndexCount, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); return false; } @@ -690,7 +690,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) indices.resize(nIndexCount); if (_binaryReader.read(&indices[0], 2, nIndexCount) != nIndexCount) { - CCLOGINFO("Failed to read meshdata: indices '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: indices '%s'.", _path.c_str()); return false; } @@ -823,7 +823,7 @@ bool Bundle3D::loadMaterials(MaterialDatas& materialdatas) { return loadMaterialsBinary_0_2(materialdatas); } - else if (_version == "0.3") + else// if (_version == "0.3") { return loadMaterialsBinary(materialdatas); } @@ -838,7 +838,7 @@ bool Bundle3D::loadMaterials(MaterialDatas& materialdatas) { return loadMaterialDataJson_0_2(materialdatas); } - else if (_version == "0.3") + else// if (_version == "0.3") { return loadMaterialsJson(materialdatas); } @@ -866,13 +866,13 @@ bool Bundle3D::loadMaterialsBinary(MaterialDatas& materialdatas) textureData.id = _binaryReader.readString(); if (textureData.id.empty()) { - CCLOGINFO("Failed to read Materialdata: texturePath is empty '%s'.", textureID.c_str()); + CCLOG("Failed to read Materialdata: texturePath is empty '%s'.", textureData.id.c_str()); return false; } std::string texturePath = _binaryReader.readString(); if (texturePath.empty()) { - CCLOGINFO("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); + CCLOG("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); return false; } @@ -898,7 +898,7 @@ bool Bundle3D::loadMaterialsBinary_0_1(MaterialDatas& materialdatas) std::string texturePath = _binaryReader.readString(); if (texturePath.empty()) { - CCLOGINFO("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); + CCLOG("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); return false; } @@ -926,7 +926,7 @@ bool Bundle3D::loadMaterialsBinary_0_2(MaterialDatas& materialdatas) std::string texturePath = _binaryReader.readString(); if (texturePath.empty()) { - CCLOGINFO("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); + CCLOG("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); return false; } @@ -987,7 +987,11 @@ bool Bundle3D::loadJson(const std::string& path) } const rapidjson::Value& mash_data_array = _jsonReader[VERSION]; - _version = mash_data_array.GetString(); + if (mash_data_array.IsArray()) // Compatible with the old version + _version = "1.2"; + else + _version = mash_data_array.GetString(); + return true; } @@ -1251,7 +1255,7 @@ bool Bundle3D::loadBinary(const std::string& path) if (_binaryBuffer->isNull()) { clear(); - CCLOGINFO(false, "Failed to read file: %s", path.c_str()); + CCLOG("warning: Failed to read file: %s", path.c_str()); return false; } @@ -1264,14 +1268,14 @@ bool Bundle3D::loadBinary(const std::string& path) if (_binaryReader.read(sig, 1, 4) != 4 || memcmp(sig, identifier, 4) != 0) { clear(); - CCLOGINFO(false, "Invalid identifier: %s", path.c_str()); + CCLOG("warning: Invalid identifier: %s", path.c_str()); return false; } // Read version unsigned char ver[2]; if (_binaryReader.read(ver, 1, 2)!= 2){ - CCLOG("Failed to read version:"); + CCLOG("warning: Failed to read version:"); return false; } @@ -1283,7 +1287,7 @@ bool Bundle3D::loadBinary(const std::string& path) if (_binaryReader.read(&_referenceCount, 4, 1) != 1) { clear(); - CCLOGINFO("Failed to read ref table size '%s'.", path.c_str()); + CCLOG("warning: Failed to read ref table size '%s'.", path.c_str()); return false; } @@ -1297,7 +1301,7 @@ bool Bundle3D::loadBinary(const std::string& path) _binaryReader.read(&_references[i].offset, 4, 1) != 1) { clear(); - CCLOGINFO("Failed to read ref number %d for bundle '%s'.", i, path.c_str()); + CCLOG("Failed to read ref number %d for bundle '%s'.", (int)i, path.c_str()); CC_SAFE_DELETE_ARRAY(_references); return false; } @@ -1318,7 +1322,7 @@ bool Bundle3D::loadMeshDataBinary(MeshData* meshdata) } else { - CCLOGINFO(false, "Unsupported version of loadMeshDataBinary() : %s", _version); + CCLOG("Unsupported version of loadMeshDataBinary() : %s", _version.c_str()); return false; } } @@ -1331,7 +1335,7 @@ bool Bundle3D::loadMeshDataBinary_0_1(MeshData* meshdata) // read mesh data if (_binaryReader.read(&meshdata->attribCount, 4, 1) != 1 || meshdata->attribCount < 1) { - CCLOGINFO("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } @@ -1341,7 +1345,7 @@ bool Bundle3D::loadMeshDataBinary_0_1(MeshData* meshdata) unsigned int vUsage, vSize; if (_binaryReader.read(&vUsage, 4, 1) != 1 || _binaryReader.read(&vSize, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: usage or size '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: usage or size '%s'.", _path.c_str()); return false; } @@ -1354,14 +1358,14 @@ bool Bundle3D::loadMeshDataBinary_0_1(MeshData* meshdata) // Read vertex data if (_binaryReader.read(&meshdata->vertexSizeInFloat, 4, 1) != 1 || meshdata->vertexSizeInFloat == 0) { - CCLOGINFO("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); return false; } meshdata->vertex.resize(meshdata->vertexSizeInFloat); if (_binaryReader.read(&meshdata->vertex[0], 4, meshdata->vertexSizeInFloat) != meshdata->vertexSizeInFloat) { - CCLOGINFO("Failed to read meshdata: vertex element '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: vertex element '%s'.", _path.c_str()); return false; } @@ -1374,7 +1378,7 @@ bool Bundle3D::loadMeshDataBinary_0_1(MeshData* meshdata) unsigned int nIndexCount; if (_binaryReader.read(&nIndexCount, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); return false; } @@ -1382,7 +1386,7 @@ bool Bundle3D::loadMeshDataBinary_0_1(MeshData* meshdata) indices.resize(nIndexCount); if (_binaryReader.read(&indices[0], 2, nIndexCount) != nIndexCount) { - CCLOGINFO("Failed to read meshdata: indices '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: indices '%s'.", _path.c_str()); return false; } @@ -1402,7 +1406,7 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) // read mesh data if (_binaryReader.read(&meshdata->attribCount, 4, 1) != 1 || meshdata->attribCount < 1) { - CCLOGINFO("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } @@ -1412,7 +1416,7 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) unsigned int vUsage, vSize; if (_binaryReader.read(&vUsage, 4, 1) != 1 || _binaryReader.read(&vSize, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: usage or size '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: usage or size '%s'.", _path.c_str()); return false; } @@ -1425,14 +1429,14 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) // Read vertex data if (_binaryReader.read(&meshdata->vertexSizeInFloat, 4, 1) != 1 || meshdata->vertexSizeInFloat == 0) { - CCLOGINFO("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); return false; } meshdata->vertex.resize(meshdata->vertexSizeInFloat); if (_binaryReader.read(&meshdata->vertex[0], 4, meshdata->vertexSizeInFloat) != meshdata->vertexSizeInFloat) { - CCLOGINFO("Failed to read meshdata: vertex element '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: vertex element '%s'.", _path.c_str()); return false; } @@ -1440,7 +1444,7 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) unsigned int submeshCount; if (_binaryReader.read(&submeshCount, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: submeshCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: submeshCount '%s'.", _path.c_str()); return false; } @@ -1449,7 +1453,7 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) unsigned int nIndexCount; if (_binaryReader.read(&nIndexCount, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); return false; } @@ -1457,7 +1461,7 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) indices.resize(nIndexCount); if (_binaryReader.read(&indices[0], 2, nIndexCount) != nIndexCount) { - CCLOGINFO("Failed to read meshdata: indices '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: indices '%s'.", _path.c_str()); return false; } @@ -1478,7 +1482,7 @@ bool Bundle3D::loadSkinDataBinary(SkinData* skindata) float bindShape[16]; if (!_binaryReader.readMatrix(bindShape)) { - CCLOGINFO("Failed to read SkinData: bindShape matrix '%s'.", _path.c_str()); + CCLOG("warning: Failed to read SkinData: bindShape matrix '%s'.", _path.c_str()); return false; } @@ -1486,7 +1490,7 @@ bool Bundle3D::loadSkinDataBinary(SkinData* skindata) unsigned int boneNum; if (!_binaryReader.read(&boneNum)) { - CCLOGINFO("Failed to read SkinData: boneNum '%s'.", _path.c_str()); + CCLOG("Failed to read SkinData: boneNum '%s'.", _path.c_str()); return false; } @@ -1498,7 +1502,7 @@ bool Bundle3D::loadSkinDataBinary(SkinData* skindata) skindata->skinBoneNames.push_back(skinBoneName); if (!_binaryReader.readMatrix(bindpos)) { - CCLOGINFO("Failed to load SkinData: bindpos '%s'.", _path.c_str()); + CCLOG("Failed to load SkinData: bindpos '%s'.", _path.c_str()); return false; } skindata->inverseBindPoseMatrices.push_back(bindpos); @@ -1539,7 +1543,7 @@ bool Bundle3D::loadSkinDataBinary(SkinData* skindata) if (!_binaryReader.readMatrix(transform)) { - CCLOGINFO("Failed to load SkinData: transform '%s'.", _path.c_str()); + CCLOG("Failed to load SkinData: transform '%s'.", _path.c_str()); return false; } @@ -1584,7 +1588,7 @@ bool Bundle3D::loadMaterialDataBinary(MaterialData* materialdata) std::string texturePath = _binaryReader.readString(); if (texturePath.empty()) { - CCLOGINFO("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); + CCLOG("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); return false; } @@ -1600,11 +1604,11 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) if (!seekToFirstType(BUNDLE_TYPE_ANIMATIONS)) return false; unsigned int animNum=0; - if( _version == "0.3") + if( _version == "0.3"|| _version == "0.4") { if (!_binaryReader.read(&animNum)) { - CCLOGINFO("Failed to read AnimationData: animNum '%s'.", _path.c_str()); + CCLOG("Failed to read AnimationData: animNum '%s'.", _path.c_str()); return false; } } @@ -1612,14 +1616,14 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) if (!_binaryReader.read(&animationdata->_totalTime)) { - CCLOGINFO("Failed to read AnimationData: totalTime '%s'.", _path.c_str()); + CCLOG("Failed to read AnimationData: totalTime '%s'.", _path.c_str()); return false; } unsigned int nodeAnimationNum; if (!_binaryReader.read(&nodeAnimationNum)) { - CCLOGINFO("Failed to read AnimationData: animNum '%s'.", _path.c_str()); + CCLOG("Failed to read AnimationData: animNum '%s'.", _path.c_str()); return false; } for (unsigned int i = 0; i < nodeAnimationNum; ++i) @@ -1628,7 +1632,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) unsigned int keyframeNum; if (!_binaryReader.read(&keyframeNum)) { - CCLOGINFO("Failed to read AnimationData: keyframeNum '%s'.", _path.c_str()); + CCLOG("Failed to read AnimationData: keyframeNum '%s'.", _path.c_str()); return false; } @@ -1641,24 +1645,24 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) float keytime; if (!_binaryReader.read(&keytime)) { - CCLOGINFO("Failed to read AnimationData: keytime '%s'.", _path.c_str()); + CCLOG("Failed to read AnimationData: keytime '%s'.", _path.c_str()); return false; } // transform flag unsigned char transformFlag(0); - if (_version == "0.3") + if (_version == "0.4") { if (!_binaryReader.read(&transformFlag)) { - CCLOGINFO("Failed to read AnimationData: transformFlag '%s'.", _path.c_str()); + CCLOG("Failed to read AnimationData: transformFlag '%s'.", _path.c_str()); return false; } } // rotation bool hasRotate = true; - if (_version == "0.3") + if (_version == "0.4") hasRotate = transformFlag & 0x01; if (hasRotate) @@ -1666,7 +1670,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) Quaternion rotate; if (_binaryReader.read(&rotate, 4, 4) != 4) { - CCLOGINFO("Failed to read AnimationData: rotate '%s'.", _path.c_str()); + CCLOG("Failed to read AnimationData: rotate '%s'.", _path.c_str()); return false; } animationdata->_rotationKeys[boneName].push_back(Animation3DData::QuatKey(keytime, rotate)); @@ -1674,7 +1678,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) // scale bool hasScale = true; - if (_version == "0.3") + if (_version == "0.4") hasScale = (transformFlag >> 1) & 0x01; if (hasScale) @@ -1682,7 +1686,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) Vec3 scale; if (_binaryReader.read(&scale, 4, 3) != 3) { - CCLOGINFO("Failed to read AnimationData: scale '%s'.", _path.c_str()); + CCLOG("Failed to read AnimationData: scale '%s'.", _path.c_str()); return false; } animationdata->_scaleKeys[boneName].push_back(Animation3DData::Vec3Key(keytime, scale)); @@ -1690,7 +1694,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) // translation bool hasTranslation = true; - if (_version == "0.3") + if (_version == "0.4") hasTranslation = (transformFlag >> 2) & 0x01; if (hasTranslation) @@ -1698,7 +1702,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) Vec3 position; if (_binaryReader.read(&position, 4, 3) != 3) { - CCLOGINFO("Failed to read AnimationData: position '%s'.", _path.c_str()); + CCLOG("Failed to read AnimationData: position '%s'.", _path.c_str()); return false; } animationdata->_translationKeys[boneName].push_back(Animation3DData::Vec3Key(keytime, position)); @@ -1732,10 +1736,6 @@ bool Bundle3D::loadNodesJson(NodeDatas& nodedatas) NodeData* Bundle3D::parseNodesRecursivelyJson(const rapidjson::Value& jvalue) { NodeData* nodedata = new NodeData();; - //if (jvalue.HasMember(PARTS)) - // nodedata = new ModelNodeData(); - //else - //nodedata = new NodeData(); // id nodedata->id = jvalue[ID].GetString(); @@ -1767,7 +1767,7 @@ NodeData* Bundle3D::parseNodesRecursivelyJson(const rapidjson::Value& jvalue) if (modelnodedata->subMeshId == "" || modelnodedata->matrialId == "") { std::string err = "Node " + nodedata->id + " part is missing meshPartId or materialId"; - CCASSERT(false, err.c_str()); + CCLOG("warning: Node %s part is missing meshPartId or materialId", nodedata->id.c_str()); return nullptr; } @@ -1782,7 +1782,7 @@ NodeData* Bundle3D::parseNodesRecursivelyJson(const rapidjson::Value& jvalue) // node if (!bone.HasMember(NODE)) { - CCASSERT(false, "Bone node ID missing"); + CCLOG("warning: Bone node ID missing"); return nullptr; } @@ -1851,7 +1851,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) bool skeleton_; if (_binaryReader.read(&skeleton_, 1, 1) != 1) { - CCASSERT(false, "Failed to read is sleleton"); + CCLOG("warning: Failed to read is sleleton"); return nullptr; } if (skeleton_) @@ -1861,14 +1861,14 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) Mat4 transform; if (!_binaryReader.readMatrix(transform.m)) { - CCASSERT(false,"Failed to read transform matrix"); + CCLOG("warning: Failed to read transform matrix"); return nullptr; } // parts unsigned int partsSize = 0; if (_binaryReader.read(&partsSize, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: attribCount '%s'.", _path.c_str()); return nullptr; } @@ -1877,7 +1877,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) nodedata->transform = transform; if (partsSize > 0) { - for (rapidjson::SizeType i = 0; i < partsSize; i++) + for (unsigned int i = 0; i < partsSize; i++) { auto modelnodedata = new ModelData(); modelnodedata->subMeshId = _binaryReader.readString(); @@ -1894,13 +1894,13 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) unsigned int bonesSize = 0; if (_binaryReader.read(&bonesSize, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); return nullptr; } if (bonesSize > 0) { - for (rapidjson::SizeType j = 0; j < bonesSize; j++) + for (unsigned int j = 0; j < bonesSize; j++) { std::string name = _binaryReader.readString(); modelnodedata->bones.push_back(name); @@ -1917,7 +1917,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) unsigned int uvMapping = 0; if (_binaryReader.read(&uvMapping, 4, 1) != 1) { - CCLOGINFO("Failed to read nodedata: uvMapping '%s'.", _path.c_str()); + CCLOG("Failed to read nodedata: uvMapping '%s'.", _path.c_str()); return nullptr; } for( int j = 0 ;j < uvMapping ; j++ ) @@ -1925,7 +1925,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) unsigned int textureIndexSize=0; if (_binaryReader.read(&textureIndexSize, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); return nullptr; } for(int k =0; k < textureIndexSize ; k++ ) @@ -1940,22 +1940,16 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) nodedata->modelNodeDatas.push_back(modelnodedata); } } - //else - //{ - // nodedata = new NodeData(); - // nodedata->id = id; - // nodedata->transform = transform; - //} unsigned int childrenSize = 0; if (_binaryReader.read(&childrenSize, 4, 1) != 1) { - CCLOGINFO("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); return nullptr; } if (childrenSize > 0) { - for (rapidjson::SizeType i = 0; i < childrenSize; i++) + for (unsigned int i = 0; i < childrenSize; i++) { NodeData* tempdata = parseNodesRecursivelyBinary(skeleton); nodedata->children.push_back(tempdata); @@ -2004,7 +1998,7 @@ GLenum Bundle3D::parseGLType(const std::string& str) } else { - CCASSERT(false, "Wrong GL type"); + CCASSERT(false, "Invalid GL type"); return 0; } } @@ -2135,7 +2129,7 @@ Reference* Bundle3D::seekToFirstType(unsigned int type) // Found a match if (_binaryReader.seek(ref->offset, SEEK_SET) == false) { - CCLOGINFO("Failed to seek to object '%s' in bundle '%s'.", ref->id.c_str(), _path.c_str()); + CCLOG("Failed to seek to object '%s' in bundle '%s'.", ref->id.c_str(), _path.c_str()); return nullptr; } return ref; diff --git a/cocos/3d/CCBundleReader.cpp b/cocos/3d/CCBundleReader.cpp index 8570111e2c..2a35ebb3a0 100644 --- a/cocos/3d/CCBundleReader.cpp +++ b/cocos/3d/CCBundleReader.cpp @@ -29,9 +29,9 @@ NS_CC_BEGIN BundleReader::BundleReader() { - m_buffer = nullptr; - m_position = 0; - m_length = 0; + _buffer = nullptr; + _position = 0; + _length = 0; }; BundleReader::~BundleReader() @@ -39,41 +39,42 @@ BundleReader::~BundleReader() }; -void BundleReader::init(char* lpbuffer, ssize_t length) +void BundleReader::init(char* buffer, ssize_t length) { - m_position = 0; - m_buffer = lpbuffer; - m_length = length; + _position = 0; + _buffer = buffer; + _length = length; } ssize_t BundleReader::read(void* ptr, ssize_t size, ssize_t count) { - if (!m_buffer || eof()) + if (!_buffer || eof()) return 0; ssize_t validCount; - ssize_t validLength = m_length - m_position; + ssize_t validLength = _length - _position; ssize_t needLength = size*count; char* ptr1 = (char*)ptr; if(validLength <= needLength) { validCount = validLength/size; ssize_t readLength = size*validCount; - memcpy(ptr1,(char*)m_buffer+m_position,readLength); + memcpy(ptr1,(char*)_buffer+_position,readLength); ptr1 += readLength; - m_position += readLength; + _position += readLength; readLength = validLength - readLength; if(readLength>0) { - memcpy(ptr1,(char*)m_buffer+m_position,readLength); - m_position += readLength; + memcpy(ptr1,(char*)_buffer+_position,readLength); + _position += readLength; validCount+=1; } + CCLOG("warning: bundle reader out of range"); } else { - memcpy(ptr1,(char*)m_buffer+m_position,needLength); - m_position += needLength; + memcpy(ptr1,(char*)_buffer+_position,needLength); + _position += needLength; validCount = count; } @@ -82,19 +83,19 @@ ssize_t BundleReader::read(void* ptr, ssize_t size, ssize_t count) char* BundleReader::readLine(int num,char* line) { - if (!m_buffer) + if (!_buffer) return 0; - char* buffer = (char*)m_buffer+m_position; + char* buffer = (char*)_buffer+_position; char* p = line; char c; ssize_t readNum = 0; - while((c=*buffer) != 10 && readNum < (ssize_t)num && m_position < m_length) + while((c=*buffer) != 10 && readNum < (ssize_t)num && _position < _length) { *p = c; p++; buffer++; - m_position++; + _position++; readNum++; } *p = '\0'; @@ -104,7 +105,7 @@ char* BundleReader::readLine(int num,char* line) bool BundleReader::eof() { - if (!m_buffer) + if (!_buffer) return true; return ((ssize_t)tell()) >= length(); @@ -112,32 +113,32 @@ bool BundleReader::eof() ssize_t BundleReader::length() { - return m_length; + return _length; } ssize_t BundleReader::tell() { - if (!m_buffer) + if (!_buffer) return -1; - return m_position; + return _position; } bool BundleReader::seek(long int offset, int origin) { - if (!m_buffer) + if (!_buffer) return false; if(origin == SEEK_CUR) { - m_position += offset; + _position += offset; } else if(origin == SEEK_SET) { - m_position = offset; + _position = offset; } else if(origin == SEEK_END) { - m_position = m_length+offset; + _position = _length+offset; } else return false; @@ -147,9 +148,9 @@ bool BundleReader::seek(long int offset, int origin) bool BundleReader::rewind() { - if (m_buffer != nullptr) + if (_buffer != nullptr) { - m_position = 0; + _position = 0; return true; } return false; diff --git a/cocos/3d/CCBundleReader.h b/cocos/3d/CCBundleReader.h index d71e17f74d..b332fa4c80 100644 --- a/cocos/3d/CCBundleReader.h +++ b/cocos/3d/CCBundleReader.h @@ -55,7 +55,7 @@ public: * @param lpbuffer The data buffer pointer * @param length The data buffer size */ - void init(char* lpbuffer, ssize_t length); + void init(char* buffer, ssize_t length); /** * Reads an array of elements. @@ -112,9 +112,9 @@ public: bool readMatrix(float* m); private: - ssize_t m_position; - ssize_t m_length; - char* m_buffer; + ssize_t _position; + ssize_t _length; + char* _buffer; }; /** From 043acb2fd46bd42cdcded6bc0bf5bb97c3454f1f Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 29 Aug 2014 11:28:28 +0800 Subject: [PATCH 25/74] rename webview to UIWebView --- build/cocos2d_libs.xcodeproj/project.pbxproj | 40 +++++++++++-------- cocos/ui/Android.mk | 2 + cocos/ui/CocosGUI.h | 2 +- cocos/ui/{Webview-inl.h => UIWebView-inl.h} | 2 +- cocos/ui/{WebView.mm => UIWebView.cpp} | 4 +- cocos/ui/{WebView.h => UIWebView.h} | 0 cocos/ui/{WebView.cpp => UIWebView.mm} | 4 +- ..._android.cpp => UIWebViewImpl_android.cpp} | 4 +- ...Impl_android.h => UIWebViewImpl_android.h} | 0 ...{WebViewImpl_iOS.h => UIWebViewImpl_iOS.h} | 0 ...ebViewImpl_iOS.mm => UIWebViewImpl_iOS.mm} | 4 +- 11 files changed, 36 insertions(+), 26 deletions(-) rename cocos/ui/{Webview-inl.h => UIWebView-inl.h} (99%) rename cocos/ui/{WebView.mm => UIWebView.cpp} (95%) rename cocos/ui/{WebView.h => UIWebView.h} (100%) rename cocos/ui/{WebView.cpp => UIWebView.mm} (95%) rename cocos/ui/{WebViewImpl_android.cpp => UIWebViewImpl_android.cpp} (99%) rename cocos/ui/{WebViewImpl_android.h => UIWebViewImpl_android.h} (100%) rename cocos/ui/{WebViewImpl_iOS.h => UIWebViewImpl_iOS.h} (100%) rename cocos/ui/{WebViewImpl_iOS.mm => UIWebViewImpl_iOS.mm} (99%) diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index dfa251f9db..d171951a40 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1350,11 +1350,15 @@ 1ABA68B11888D700007D1BB4 /* CCFontCharMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */; }; 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; 1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; + 29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; + 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; + 29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; + 29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; + 29394CF419B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */; }; + 29394CF519B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */; }; + 29394CF619B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */; }; + 29394CF719B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */; }; 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; }; - 298D7F6819AC2EFD00FF096D /* WebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 298D7F6019AC2EFD00FF096D /* WebView.h */; }; - 298D7F6919AC2EFD00FF096D /* WebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F6119AC2EFD00FF096D /* WebView.mm */; }; - 298D7F6A19AC2EFD00FF096D /* WebViewImpl_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 298D7F6219AC2EFD00FF096D /* WebViewImpl_iOS.h */; }; - 298D7F6B19AC2EFD00FF096D /* WebViewImpl_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 298D7F6319AC2EFD00FF096D /* WebViewImpl_iOS.mm */; }; 299754F4193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; 299754F5193EC95400A54AC3 /* ObjectFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */; }; 299754F6193EC95400A54AC3 /* ObjectFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 299754F3193EC95400A54AC3 /* ObjectFactory.h */; }; @@ -2300,14 +2304,14 @@ 2905FA1318CF08D100240AA3 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = ""; }; 2905FA1418CF08D100240AA3 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = ""; }; 29080DEB191B82CE0066F8DF /* UIDeprecated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIDeprecated.h; sourceTree = ""; }; + 29394CEC19B01DBA00D2DE1A /* UIWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebView.h; sourceTree = ""; }; + 29394CED19B01DBA00D2DE1A /* UIWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebView.mm; sourceTree = ""; }; + 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebViewImpl_iOS.h; sourceTree = ""; }; + 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebViewImpl_iOS.mm; sourceTree = ""; }; 2958244919873D8E00F9746D /* UIScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScale9Sprite.cpp; sourceTree = ""; }; 2958244A19873D8E00F9746D /* UIScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScale9Sprite.h; sourceTree = ""; }; 2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = ""; }; 2986667918B1B079000E39CA /* CCTweenFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTweenFunction.h; sourceTree = ""; }; - 298D7F6019AC2EFD00FF096D /* WebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebView.h; sourceTree = ""; }; - 298D7F6119AC2EFD00FF096D /* WebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebView.mm; sourceTree = ""; }; - 298D7F6219AC2EFD00FF096D /* WebViewImpl_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebViewImpl_iOS.h; sourceTree = ""; }; - 298D7F6319AC2EFD00FF096D /* WebViewImpl_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewImpl_iOS.mm; sourceTree = ""; }; 299754F2193EC95400A54AC3 /* ObjectFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjectFactory.cpp; path = ../base/ObjectFactory.cpp; sourceTree = ""; }; 299754F3193EC95400A54AC3 /* ObjectFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectFactory.h; path = ../base/ObjectFactory.h; sourceTree = ""; }; 299CF1F919A434BC00C378C1 /* ccRandom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ccRandom.cpp; path = ../base/ccRandom.cpp; sourceTree = ""; }; @@ -4020,10 +4024,10 @@ 29CB8F521929D65500C841D6 /* experimental */ = { isa = PBXGroup; children = ( - 298D7F6019AC2EFD00FF096D /* WebView.h */, - 298D7F6119AC2EFD00FF096D /* WebView.mm */, - 298D7F6219AC2EFD00FF096D /* WebViewImpl_iOS.h */, - 298D7F6319AC2EFD00FF096D /* WebViewImpl_iOS.mm */, + 29394CEC19B01DBA00D2DE1A /* UIWebView.h */, + 29394CED19B01DBA00D2DE1A /* UIWebView.mm */, + 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */, + 29394CEF19B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm */, 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */, 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */, ); @@ -5043,6 +5047,7 @@ 1A570093180BC5A10088DEC7 /* CCActionTween.h in Headers */, 50ABBD4A1925AB0000A911A9 /* Mat4.h in Headers */, 15AE1A6919AAD40300C27E9E /* b2WorldCallbacks.h in Headers */, + 29394CF419B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */, 1A57009A180BC5C10088DEC7 /* CCAtlasNode.h in Headers */, 15AE190819AAD35000C27E9E /* CCDatas.h in Headers */, 1A5700A0180BC5D20088DEC7 /* CCNode.h in Headers */, @@ -5240,6 +5245,7 @@ 15AE191019AAD35000C27E9E /* CCInputDelegate.h in Headers */, 15AE184C19AAD30800C27E9E /* SimpleAudioEngine.h in Headers */, 50ABBDA11925AB4100A911A9 /* CCGroupCommand.h in Headers */, + 29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */, 15AE186519AAD31D00C27E9E /* CDOpenALSupport.h in Headers */, 15AE1B5C19AADA9900C27E9E /* UITextAtlas.h in Headers */, 1A5702FC180BCE750088DEC7 /* CCTMXXMLParser.h in Headers */, @@ -5473,7 +5479,6 @@ 15AE1A4019AAD3D500C27E9E /* b2Collision.h in Headers */, 5034CA40191D591100CE6051 /* ccShader_Position_uColor.vert in Headers */, 15AE184719AAD2F700C27E9E /* CCSprite3DMaterial.h in Headers */, - 298D7F6819AC2EFD00FF096D /* WebView.h in Headers */, 15AE1BFC19AAE01E00C27E9E /* CCControlUtils.h in Headers */, 15AE193519AAD35100C27E9E /* CCActionObject.h in Headers */, 15AE1AA919AAD40300C27E9E /* b2TimeStep.h in Headers */, @@ -5571,6 +5576,7 @@ 15AE1AB319AAD40300C27E9E /* b2CircleContact.h in Headers */, 5034CA2E191D591100CE6051 /* ccShader_PositionTextureA8Color.frag in Headers */, 15AE1A4F19AAD3D500C27E9E /* b2Shape.h in Headers */, + 29394CF519B01DBA00D2DE1A /* UIWebViewImpl_iOS.h in Headers */, 50ABBD5B1925AB0000A911A9 /* Vec2.h in Headers */, 50ABBD411925AB0000A911A9 /* CCMath.h in Headers */, 1A5701A0180BCB590088DEC7 /* CCFont.h in Headers */, @@ -5683,6 +5689,7 @@ 15AE1BAC19AADFDF00C27E9E /* UILayout.h in Headers */, 1A570230180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, 15AE1AF619AAD42500C27E9E /* chipmunk_ffi.h in Headers */, + 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */, 15AE18B419AAD33D00C27E9E /* CCBSelectorResolver.h in Headers */, B24AA988195A675C007B4522 /* CCFastTMXLayer.h in Headers */, 15AE1AB919AAD40300C27E9E /* b2EdgeAndCircleContact.h in Headers */, @@ -5848,7 +5855,6 @@ 15AE1B0919AAD42500C27E9E /* cpPolyShape.h in Headers */, 15AE193919AAD35100C27E9E /* CCArmatureAnimation.h in Headers */, 15AE1AA419AAD40300C27E9E /* b2ContactManager.h in Headers */, - 298D7F6A19AC2EFD00FF096D /* WebViewImpl_iOS.h in Headers */, B276EF601988D1D500CD400F /* CCVertexIndexData.h in Headers */, 50ABBD5F1925AB0000A911A9 /* Vec3.h in Headers */, 50ABBE921925AB6F00A911A9 /* CCPlatformMacros.h in Headers */, @@ -6136,6 +6142,7 @@ 15AE187A19AAD33D00C27E9E /* CCBAnimationManager.cpp in Sources */, 15AE1B6D19AADA9900C27E9E /* UIHelper.cpp in Sources */, 15AE1A8A19AAD40300C27E9E /* b2PulleyJoint.cpp in Sources */, + 29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */, 15AE1BD419AAE01E00C27E9E /* CCControlSaturationBrightnessPicker.cpp in Sources */, 1A57019D180BCB590088DEC7 /* CCFont.cpp in Sources */, 1A5701A1180BCB590088DEC7 /* CCFontAtlas.cpp in Sources */, @@ -6301,6 +6308,7 @@ 15AE196E19AAD35700C27E9E /* CCActionTimelineCache.cpp in Sources */, 50ABBEB31925AB6F00A911A9 /* CCUserDefault.mm in Sources */, 50ABBEB51925AB6F00A911A9 /* CCUserDefaultAndroid.cpp in Sources */, + 29394CF619B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */, 50ABBE831925AB6F00A911A9 /* ccFPSImages.c in Sources */, 15AE1B7019AADA9900C27E9E /* CocosGUI.cpp in Sources */, 15AE19D019AAD3A700C27E9E /* AttachmentLoader.cpp in Sources */, @@ -6644,6 +6652,7 @@ 50ABBD9C1925AB4100A911A9 /* ccGLStateCache.cpp in Sources */, 1A5701E7180BCB8C0088DEC7 /* CCTransition.cpp in Sources */, 15AE1AC019AAD40300C27E9E /* b2MotorJoint.cpp in Sources */, + 29394CF319B01DBA00D2DE1A /* UIWebView.mm in Sources */, 15AE18BD19AAD33D00C27E9E /* CCLabelBMFontLoader.cpp in Sources */, 50ABC01E1926664800A911A9 /* CCThread.cpp in Sources */, 15AE1B3A19AAD43700C27E9E /* cpBB.c in Sources */, @@ -6686,6 +6695,7 @@ 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, B24AA98A195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, 15AE18CE19AAD33D00C27E9E /* CCNodeLoader.cpp in Sources */, + 29394CF719B01DBA00D2DE1A /* UIWebViewImpl_iOS.mm in Sources */, 15AE1AC619AAD40300C27E9E /* b2GearJoint.cpp in Sources */, B24AA986195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */, 1A57022E180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */, @@ -6720,7 +6730,6 @@ 1A5702C9180BCE370088DEC7 /* CCTextFieldTTF.cpp in Sources */, 15AE1A0519AAD3A700C27E9E /* Bone.cpp in Sources */, 15AE1B3D19AAD43700C27E9E /* cpCollision.c in Sources */, - 298D7F6919AC2EFD00FF096D /* WebView.mm in Sources */, 15AE1C1719AAE2C700C27E9E /* CCPhysicsSprite.cpp in Sources */, 1A5702EB180BCE750088DEC7 /* CCTileMapAtlas.cpp in Sources */, 1A5702EF180BCE750088DEC7 /* CCTMXLayer.cpp in Sources */, @@ -6773,7 +6782,6 @@ 50ABBE5E1925AB6F00A911A9 /* CCEventListener.cpp in Sources */, 15AE1BC719AAE00000C27E9E /* AssetsManager.cpp in Sources */, 50ABBEA81925AB6F00A911A9 /* CCTouch.cpp in Sources */, - 298D7F6B19AC2EFD00FF096D /* WebViewImpl_iOS.mm in Sources */, 15AE1A9619AAD40300C27E9E /* b2Draw.cpp in Sources */, 503DD8E91926736A00CD74DD /* CCES2Renderer.m in Sources */, 5027253D190BF1B900AAF4ED /* cocos2d.cpp in Sources */, diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index 78bd2c4630..221315e578 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -31,6 +31,8 @@ UIRelativeBox.cpp \ UIVideoPlayerAndroid.cpp \ UIDeprecated.cpp \ UIScale9Sprite.cpp \ +UIWebView.cpp \ +UIWebViewImpl_android.cpp \ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/../editor-support diff --git a/cocos/ui/CocosGUI.h b/cocos/ui/CocosGUI.h index b4516a3512..04ce980bd5 100644 --- a/cocos/ui/CocosGUI.h +++ b/cocos/ui/CocosGUI.h @@ -47,7 +47,7 @@ THE SOFTWARE. #include "ui/UIRelativeBox.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #include "ui/UIVideoPlayer.h" -#include "ui/WebView.h" +#include "ui/UIWebView.h" #endif #include "ui/UIDeprecated.h" #include "ui/GUIExport.h" diff --git a/cocos/ui/Webview-inl.h b/cocos/ui/UIWebView-inl.h similarity index 99% rename from cocos/ui/Webview-inl.h rename to cocos/ui/UIWebView-inl.h index 835d6829bb..26e8eb369f 100644 --- a/cocos/ui/Webview-inl.h +++ b/cocos/ui/UIWebView-inl.h @@ -23,7 +23,7 @@ ****************************************************************************/ -#include "WebView.h" +#include "UIWebView.h" #include "platform/CCGLView.h" #include "base/CCDirector.h" #include "platform/CCFileUtils.h" diff --git a/cocos/ui/WebView.mm b/cocos/ui/UIWebView.cpp similarity index 95% rename from cocos/ui/WebView.mm rename to cocos/ui/UIWebView.cpp index c2a6b0c9da..07bb327b0f 100644 --- a/cocos/ui/WebView.mm +++ b/cocos/ui/UIWebView.cpp @@ -23,8 +23,8 @@ ****************************************************************************/ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#include "WebViewImpl_iOS.h" -#include "WebView-inl.h" +#include "UIWebViewImpl_android.h" +#include "UIWebView-inl.h" #endif diff --git a/cocos/ui/WebView.h b/cocos/ui/UIWebView.h similarity index 100% rename from cocos/ui/WebView.h rename to cocos/ui/UIWebView.h diff --git a/cocos/ui/WebView.cpp b/cocos/ui/UIWebView.mm similarity index 95% rename from cocos/ui/WebView.cpp rename to cocos/ui/UIWebView.mm index c8d4441d75..455fbb43e5 100644 --- a/cocos/ui/WebView.cpp +++ b/cocos/ui/UIWebView.mm @@ -23,8 +23,8 @@ ****************************************************************************/ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#include "WebViewImpl_android.h" -#include "WebView-inl.h" +#include "UIWebViewImpl_iOS.h" +#include "UIWebView-inl.h" #endif diff --git a/cocos/ui/WebViewImpl_android.cpp b/cocos/ui/UIWebViewImpl_android.cpp similarity index 99% rename from cocos/ui/WebViewImpl_android.cpp rename to cocos/ui/UIWebViewImpl_android.cpp index 514ddaf648..53abeb2aaa 100644 --- a/cocos/ui/WebViewImpl_android.cpp +++ b/cocos/ui/UIWebViewImpl_android.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "WebViewImpl_android.h" +#include "UIWebViewImpl_android.h" #include #include @@ -30,7 +30,7 @@ #include "jni/JniHelper.h" #include -#include "WebView.h" +#include "UIWebView.h" #include "platform/CCGLView.h" #include "base/CCDirector.h" #include "platform/CCFileUtils.h" diff --git a/cocos/ui/WebViewImpl_android.h b/cocos/ui/UIWebViewImpl_android.h similarity index 100% rename from cocos/ui/WebViewImpl_android.h rename to cocos/ui/UIWebViewImpl_android.h diff --git a/cocos/ui/WebViewImpl_iOS.h b/cocos/ui/UIWebViewImpl_iOS.h similarity index 100% rename from cocos/ui/WebViewImpl_iOS.h rename to cocos/ui/UIWebViewImpl_iOS.h diff --git a/cocos/ui/WebViewImpl_iOS.mm b/cocos/ui/UIWebViewImpl_iOS.mm similarity index 99% rename from cocos/ui/WebViewImpl_iOS.mm rename to cocos/ui/UIWebViewImpl_iOS.mm index 559b3ba1ae..116b116975 100644 --- a/cocos/ui/WebViewImpl_iOS.mm +++ b/cocos/ui/UIWebViewImpl_iOS.mm @@ -24,13 +24,13 @@ #if CC_TARGET_PLATFORM == CC_PLATFORM_IOS -#include "WebViewImpl_iOS.h" +#include "UIWebViewImpl_iOS.h" #include "renderer/CCRenderer.h" #include "CCDirector.h" #include "CCGLView.h" #include "CCEAGLView.h" #include "platform/CCFileUtils.h" -#include "ui/WebView.h" +#include "ui/UIWebView.h" @interface UIWebViewWrapper : NSObject @property (nonatomic) std::function shouldStartLoading; From cf0baef7c0ab8089825c425095d950301f8764f3 Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 29 Aug 2014 11:50:08 +0800 Subject: [PATCH 26/74] add web view javascript support --- .../android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java index 4229a21e0b..15a55841b7 100755 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java @@ -6,6 +6,7 @@ import java.net.URI; import android.annotation.SuppressLint; import android.content.Context; import android.util.Log; +import android.webkit.WebChromeClient; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.FrameLayout; @@ -42,6 +43,7 @@ public class Cocos2dxWebView extends WebView { } this.setWebViewClient(new Cocos2dxWebViewClient()); + this.setWebChromeClient(new WebChromeClient()); } public void setJavascriptInterfaceScheme(String scheme) { From 4c046336da2a31128718a4bfec612fe05d98e7be Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 29 Aug 2014 11:53:39 +0800 Subject: [PATCH 27/74] fix linux --- cocos/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index 90fc4dea01..c454b4f63a 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -85,8 +85,8 @@ list(REMOVE_ITEM cocos2d_source_files "${CMAKE_CURRENT_SOURCE_DIR}/base/CCController-android.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCUserDefaultAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIVideoPlayerAndroid.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/ui/WebView.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/ui/WebViewImpl_android.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIWebView.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/ui/UIWebViewImpl_android.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/LocalStorageAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventController.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventListenerController.cpp" From cbe61a4b73fb5f908b77dc1668b06b66acc71e08 Mon Sep 17 00:00:00 2001 From: lvlong Date: Fri, 29 Aug 2014 11:56:33 +0800 Subject: [PATCH 28/74] modify log --- cocos/3d/CCBundle3D.cpp | 122 ++++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/cocos/3d/CCBundle3D.cpp b/cocos/3d/CCBundle3D.cpp index a59ab7e7c7..d723c7507f 100644 --- a/cocos/3d/CCBundle3D.cpp +++ b/cocos/3d/CCBundle3D.cpp @@ -201,7 +201,7 @@ bool Bundle3D::load(const std::string& path) } else { - CCLOG("%s is invalid file formate", path.c_str()); + CCLOG("warning: %s is invalid file formate", path.c_str()); } ret?(_path = path):(_path = ""); @@ -302,7 +302,7 @@ bool Bundle3D::loadObj(MeshDatas& meshdatas, MaterialDatas& materialdatas, NodeD } return true; } - CCLOG("load %s file error: %s", fullPath.c_str(), ret.c_str()); + CCLOG("warning: load %s file error: %s", fullPath.c_str(), ret.c_str()); return false; } @@ -405,7 +405,7 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas) unsigned int meshSize = 0; if (_binaryReader.read(&meshSize, 4, 1) != 1) { - CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } for(int i = 0; i < meshSize ; i++ ) @@ -415,7 +415,7 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas) // read mesh data if (_binaryReader.read(&attribSize, 4, 1) != 1 || attribSize < 1) { - CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } meshData->attribCount = attribSize; @@ -426,7 +426,7 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas) unsigned int vSize; if (_binaryReader.read(&vSize, 4, 1) != 1) { - CCLOG("Failed to read meshdata: usage or size '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: usage or size '%s'.", _path.c_str()); return false; } std::string type = _binaryReader.readString(); @@ -440,14 +440,14 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas) // Read vertex data if (_binaryReader.read(&vertexSizeInFloat, 4, 1) != 1 || vertexSizeInFloat == 0) { - CCLOG("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); return false; } meshData->vertex.resize(vertexSizeInFloat); if (_binaryReader.read(&meshData->vertex[0], 4, vertexSizeInFloat) != vertexSizeInFloat) { - CCLOG("Failed to read meshdata: vertex element '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: vertex element '%s'.", _path.c_str()); return false; } @@ -463,13 +463,13 @@ bool Bundle3D::loadMeshDatasBinary(MeshDatas& meshdatas) unsigned int nIndexCount; if (_binaryReader.read(&nIndexCount, 4, 1) != 1) { - CCLOG("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); return false; } indexArray.resize(nIndexCount); if (_binaryReader.read(&indexArray[0], 2, nIndexCount) != nIndexCount) { - CCLOG("Failed to read meshdata: indices '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: indices '%s'.", _path.c_str()); return false; } meshData->subMeshIndices.push_back(indexArray); @@ -492,7 +492,7 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas) unsigned int attribSize=0; if (_binaryReader.read(&attribSize, 4, 1) != 1 || attribSize < 1) { - CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } enum @@ -514,7 +514,7 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas) unsigned int vUsage, vSize; if (_binaryReader.read(&vUsage, 4, 1) != 1 || _binaryReader.read(&vSize, 4, 1) != 1) { - CCLOG("Failed to read meshdata: usage or size '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: usage or size '%s'.", _path.c_str()); return false; } @@ -550,14 +550,14 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas) // Read vertex data if (_binaryReader.read(&meshdata->vertexSizeInFloat, 4, 1) != 1 || meshdata->vertexSizeInFloat == 0) { - CCLOG("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); return false; } meshdata->vertex.resize(meshdata->vertexSizeInFloat); if (_binaryReader.read(&meshdata->vertex[0], 4, meshdata->vertexSizeInFloat) != meshdata->vertexSizeInFloat) { - CCLOG("Failed to read meshdata: vertex element '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: vertex element '%s'.", _path.c_str()); return false; } @@ -568,7 +568,7 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas) unsigned int nIndexCount; if (_binaryReader.read(&nIndexCount, 4, 1) != 1) { - CCLOG("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); return false; } @@ -576,7 +576,7 @@ bool Bundle3D::loadMeshDatasBinary_0_1(MeshDatas& meshdatas) indices.resize(nIndexCount); if (_binaryReader.read(&indices[0], 2, nIndexCount) != nIndexCount) { - CCLOG("Failed to read meshdata: indices '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: indices '%s'.", _path.c_str()); return false; } @@ -600,7 +600,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) unsigned int attribSize=0; if (_binaryReader.read(&attribSize, 4, 1) != 1 || attribSize < 1) { - CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } enum @@ -622,7 +622,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) unsigned int vUsage, vSize; if (_binaryReader.read(&vUsage, 4, 1) != 1 || _binaryReader.read(&vSize, 4, 1) != 1) { - CCLOG("Failed to read meshdata: usage or size '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: usage or size '%s'.", _path.c_str()); return false; } @@ -658,14 +658,14 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) // Read vertex data if (_binaryReader.read(&meshdata->vertexSizeInFloat, 4, 1) != 1 || meshdata->vertexSizeInFloat == 0) { - CCLOG("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); return false; } meshdata->vertex.resize(meshdata->vertexSizeInFloat); if (_binaryReader.read(&meshdata->vertex[0], 4, meshdata->vertexSizeInFloat) != meshdata->vertexSizeInFloat) { - CCLOG("Failed to read meshdata: vertex element '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: vertex element '%s'.", _path.c_str()); return false; } @@ -673,7 +673,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) unsigned int submeshCount; if (_binaryReader.read(&submeshCount, 4, 1) != 1) { - CCLOG("Failed to read meshdata: submeshCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: submeshCount '%s'.", _path.c_str()); return false; } @@ -682,7 +682,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) unsigned int nIndexCount; if (_binaryReader.read(&nIndexCount, 4, 1) != 1) { - CCLOG("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); return false; } @@ -690,7 +690,7 @@ bool Bundle3D::loadMeshDatasBinary_0_2(MeshDatas& meshdatas) indices.resize(nIndexCount); if (_binaryReader.read(&indices[0], 2, nIndexCount) != nIndexCount) { - CCLOG("Failed to read meshdata: indices '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: indices '%s'.", _path.c_str()); return false; } @@ -866,13 +866,13 @@ bool Bundle3D::loadMaterialsBinary(MaterialDatas& materialdatas) textureData.id = _binaryReader.readString(); if (textureData.id.empty()) { - CCLOG("Failed to read Materialdata: texturePath is empty '%s'.", textureData.id.c_str()); + CCLOG("warning: Failed to read Materialdata: texturePath is empty '%s'.", textureData.id.c_str()); return false; } std::string texturePath = _binaryReader.readString(); if (texturePath.empty()) { - CCLOG("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); + CCLOG("warning: Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); return false; } @@ -898,7 +898,7 @@ bool Bundle3D::loadMaterialsBinary_0_1(MaterialDatas& materialdatas) std::string texturePath = _binaryReader.readString(); if (texturePath.empty()) { - CCLOG("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); + CCLOG("warning: Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); return false; } @@ -926,7 +926,7 @@ bool Bundle3D::loadMaterialsBinary_0_2(MaterialDatas& materialdatas) std::string texturePath = _binaryReader.readString(); if (texturePath.empty()) { - CCLOG("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); + CCLOG("warning: Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); return false; } @@ -1301,7 +1301,7 @@ bool Bundle3D::loadBinary(const std::string& path) _binaryReader.read(&_references[i].offset, 4, 1) != 1) { clear(); - CCLOG("Failed to read ref number %d for bundle '%s'.", (int)i, path.c_str()); + CCLOG("warning: Failed to read ref number %d for bundle '%s'.", (int)i, path.c_str()); CC_SAFE_DELETE_ARRAY(_references); return false; } @@ -1322,7 +1322,7 @@ bool Bundle3D::loadMeshDataBinary(MeshData* meshdata) } else { - CCLOG("Unsupported version of loadMeshDataBinary() : %s", _version.c_str()); + CCLOG("warning: Unsupported version of loadMeshDataBinary() : %s", _version.c_str()); return false; } } @@ -1335,7 +1335,7 @@ bool Bundle3D::loadMeshDataBinary_0_1(MeshData* meshdata) // read mesh data if (_binaryReader.read(&meshdata->attribCount, 4, 1) != 1 || meshdata->attribCount < 1) { - CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } @@ -1345,7 +1345,7 @@ bool Bundle3D::loadMeshDataBinary_0_1(MeshData* meshdata) unsigned int vUsage, vSize; if (_binaryReader.read(&vUsage, 4, 1) != 1 || _binaryReader.read(&vSize, 4, 1) != 1) { - CCLOG("Failed to read meshdata: usage or size '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: usage or size '%s'.", _path.c_str()); return false; } @@ -1358,14 +1358,14 @@ bool Bundle3D::loadMeshDataBinary_0_1(MeshData* meshdata) // Read vertex data if (_binaryReader.read(&meshdata->vertexSizeInFloat, 4, 1) != 1 || meshdata->vertexSizeInFloat == 0) { - CCLOG("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); return false; } meshdata->vertex.resize(meshdata->vertexSizeInFloat); if (_binaryReader.read(&meshdata->vertex[0], 4, meshdata->vertexSizeInFloat) != meshdata->vertexSizeInFloat) { - CCLOG("Failed to read meshdata: vertex element '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: vertex element '%s'.", _path.c_str()); return false; } @@ -1378,7 +1378,7 @@ bool Bundle3D::loadMeshDataBinary_0_1(MeshData* meshdata) unsigned int nIndexCount; if (_binaryReader.read(&nIndexCount, 4, 1) != 1) { - CCLOG("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); return false; } @@ -1386,7 +1386,7 @@ bool Bundle3D::loadMeshDataBinary_0_1(MeshData* meshdata) indices.resize(nIndexCount); if (_binaryReader.read(&indices[0], 2, nIndexCount) != nIndexCount) { - CCLOG("Failed to read meshdata: indices '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: indices '%s'.", _path.c_str()); return false; } @@ -1406,7 +1406,7 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) // read mesh data if (_binaryReader.read(&meshdata->attribCount, 4, 1) != 1 || meshdata->attribCount < 1) { - CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: attribCount '%s'.", _path.c_str()); return false; } @@ -1416,7 +1416,7 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) unsigned int vUsage, vSize; if (_binaryReader.read(&vUsage, 4, 1) != 1 || _binaryReader.read(&vSize, 4, 1) != 1) { - CCLOG("Failed to read meshdata: usage or size '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: usage or size '%s'.", _path.c_str()); return false; } @@ -1429,14 +1429,14 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) // Read vertex data if (_binaryReader.read(&meshdata->vertexSizeInFloat, 4, 1) != 1 || meshdata->vertexSizeInFloat == 0) { - CCLOG("Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: vertexSizeInFloat '%s'.", _path.c_str()); return false; } meshdata->vertex.resize(meshdata->vertexSizeInFloat); if (_binaryReader.read(&meshdata->vertex[0], 4, meshdata->vertexSizeInFloat) != meshdata->vertexSizeInFloat) { - CCLOG("Failed to read meshdata: vertex element '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: vertex element '%s'.", _path.c_str()); return false; } @@ -1444,7 +1444,7 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) unsigned int submeshCount; if (_binaryReader.read(&submeshCount, 4, 1) != 1) { - CCLOG("Failed to read meshdata: submeshCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: submeshCount '%s'.", _path.c_str()); return false; } @@ -1453,7 +1453,7 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) unsigned int nIndexCount; if (_binaryReader.read(&nIndexCount, 4, 1) != 1) { - CCLOG("Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: nIndexCount '%s'.", _path.c_str()); return false; } @@ -1461,7 +1461,7 @@ bool Bundle3D::loadMeshDataBinary_0_2(MeshData* meshdata) indices.resize(nIndexCount); if (_binaryReader.read(&indices[0], 2, nIndexCount) != nIndexCount) { - CCLOG("Failed to read meshdata: indices '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: indices '%s'.", _path.c_str()); return false; } @@ -1490,7 +1490,7 @@ bool Bundle3D::loadSkinDataBinary(SkinData* skindata) unsigned int boneNum; if (!_binaryReader.read(&boneNum)) { - CCLOG("Failed to read SkinData: boneNum '%s'.", _path.c_str()); + CCLOG("warning: Failed to read SkinData: boneNum '%s'.", _path.c_str()); return false; } @@ -1502,7 +1502,7 @@ bool Bundle3D::loadSkinDataBinary(SkinData* skindata) skindata->skinBoneNames.push_back(skinBoneName); if (!_binaryReader.readMatrix(bindpos)) { - CCLOG("Failed to load SkinData: bindpos '%s'.", _path.c_str()); + CCLOG("warning: Failed to load SkinData: bindpos '%s'.", _path.c_str()); return false; } skindata->inverseBindPoseMatrices.push_back(bindpos); @@ -1543,7 +1543,7 @@ bool Bundle3D::loadSkinDataBinary(SkinData* skindata) if (!_binaryReader.readMatrix(transform)) { - CCLOG("Failed to load SkinData: transform '%s'.", _path.c_str()); + CCLOG("warning: Failed to load SkinData: transform '%s'.", _path.c_str()); return false; } @@ -1588,7 +1588,7 @@ bool Bundle3D::loadMaterialDataBinary(MaterialData* materialdata) std::string texturePath = _binaryReader.readString(); if (texturePath.empty()) { - CCLOG("Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); + CCLOG("warning: Failed to read Materialdata: texturePath is empty '%s'.", _path.c_str()); return false; } @@ -1608,7 +1608,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) { if (!_binaryReader.read(&animNum)) { - CCLOG("Failed to read AnimationData: animNum '%s'.", _path.c_str()); + CCLOG("warning: Failed to read AnimationData: animNum '%s'.", _path.c_str()); return false; } } @@ -1616,14 +1616,14 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) if (!_binaryReader.read(&animationdata->_totalTime)) { - CCLOG("Failed to read AnimationData: totalTime '%s'.", _path.c_str()); + CCLOG("warning: Failed to read AnimationData: totalTime '%s'.", _path.c_str()); return false; } unsigned int nodeAnimationNum; if (!_binaryReader.read(&nodeAnimationNum)) { - CCLOG("Failed to read AnimationData: animNum '%s'.", _path.c_str()); + CCLOG("warning: Failed to read AnimationData: animNum '%s'.", _path.c_str()); return false; } for (unsigned int i = 0; i < nodeAnimationNum; ++i) @@ -1632,7 +1632,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) unsigned int keyframeNum; if (!_binaryReader.read(&keyframeNum)) { - CCLOG("Failed to read AnimationData: keyframeNum '%s'.", _path.c_str()); + CCLOG("warning: Failed to read AnimationData: keyframeNum '%s'.", _path.c_str()); return false; } @@ -1645,7 +1645,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) float keytime; if (!_binaryReader.read(&keytime)) { - CCLOG("Failed to read AnimationData: keytime '%s'.", _path.c_str()); + CCLOG("warning: Failed to read AnimationData: keytime '%s'.", _path.c_str()); return false; } @@ -1655,7 +1655,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) { if (!_binaryReader.read(&transformFlag)) { - CCLOG("Failed to read AnimationData: transformFlag '%s'.", _path.c_str()); + CCLOG("warning: Failed to read AnimationData: transformFlag '%s'.", _path.c_str()); return false; } } @@ -1670,7 +1670,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) Quaternion rotate; if (_binaryReader.read(&rotate, 4, 4) != 4) { - CCLOG("Failed to read AnimationData: rotate '%s'.", _path.c_str()); + CCLOG("warning: Failed to read AnimationData: rotate '%s'.", _path.c_str()); return false; } animationdata->_rotationKeys[boneName].push_back(Animation3DData::QuatKey(keytime, rotate)); @@ -1686,7 +1686,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) Vec3 scale; if (_binaryReader.read(&scale, 4, 3) != 3) { - CCLOG("Failed to read AnimationData: scale '%s'.", _path.c_str()); + CCLOG("warning: Failed to read AnimationData: scale '%s'.", _path.c_str()); return false; } animationdata->_scaleKeys[boneName].push_back(Animation3DData::Vec3Key(keytime, scale)); @@ -1702,7 +1702,7 @@ bool Bundle3D::loadAnimationDataBinary(Animation3DData* animationdata) Vec3 position; if (_binaryReader.read(&position, 4, 3) != 3) { - CCLOG("Failed to read AnimationData: position '%s'.", _path.c_str()); + CCLOG("warning: Failed to read AnimationData: position '%s'.", _path.c_str()); return false; } animationdata->_translationKeys[boneName].push_back(Animation3DData::Vec3Key(keytime, position)); @@ -1825,7 +1825,7 @@ bool Bundle3D::loadNodesBinary(NodeDatas& nodedatas) unsigned int nodeSize = 0; if (_binaryReader.read(&nodeSize, 4, 1) != 1) { - CCASSERT(false, "Failed to read nodes"); + CCLOG("warning: Failed to read nodes"); return false; } @@ -1885,7 +1885,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) if (modelnodedata->subMeshId == "" || modelnodedata->matrialId == "") { std::string err = "Node " + nodedata->id + " part is missing meshPartId or materialId"; - CCASSERT(false, err.c_str()); + CCLOG("Node %s part is missing meshPartId or materialId", nodedata->id.c_str()); return nullptr; } @@ -1893,7 +1893,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) unsigned int bonesSize = 0; if (_binaryReader.read(&bonesSize, 4, 1) != 1) { - CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: attribCount '%s'.", _path.c_str()); return nullptr; } @@ -1916,7 +1916,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) unsigned int uvMapping = 0; if (_binaryReader.read(&uvMapping, 4, 1) != 1) { - CCLOG("Failed to read nodedata: uvMapping '%s'.", _path.c_str()); + CCLOG("warning: Failed to read nodedata: uvMapping '%s'.", _path.c_str()); return nullptr; } for( int j = 0 ;j < uvMapping ; j++ ) @@ -1924,7 +1924,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) unsigned int textureIndexSize=0; if (_binaryReader.read(&textureIndexSize, 4, 1) != 1) { - CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: attribCount '%s'.", _path.c_str()); return nullptr; } for(int k =0; k < textureIndexSize ; k++ ) @@ -1943,7 +1943,7 @@ NodeData* Bundle3D::parseNodesRecursivelyBinary(bool& skeleton) unsigned int childrenSize = 0; if (_binaryReader.read(&childrenSize, 4, 1) != 1) { - CCLOG("Failed to read meshdata: attribCount '%s'.", _path.c_str()); + CCLOG("warning: Failed to read meshdata: attribCount '%s'.", _path.c_str()); return nullptr; } if (childrenSize > 0) @@ -2128,7 +2128,7 @@ Reference* Bundle3D::seekToFirstType(unsigned int type) // Found a match if (_binaryReader.seek(ref->offset, SEEK_SET) == false) { - CCLOG("Failed to seek to object '%s' in bundle '%s'.", ref->id.c_str(), _path.c_str()); + CCLOG("warning: Failed to seek to object '%s' in bundle '%s'.", ref->id.c_str(), _path.c_str()); return nullptr; } return ref; From 496aad2fe7ca15ae0e5409d520c02b9986aeb195 Mon Sep 17 00:00:00 2001 From: lvlong Date: Fri, 29 Aug 2014 11:59:30 +0800 Subject: [PATCH 29/74] remove 0.3 branch logic --- cocos/3d/CCBundle3D.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/3d/CCBundle3D.cpp b/cocos/3d/CCBundle3D.cpp index d723c7507f..c28351046b 100644 --- a/cocos/3d/CCBundle3D.cpp +++ b/cocos/3d/CCBundle3D.cpp @@ -376,7 +376,7 @@ bool Bundle3D::loadMeshDatas(MeshDatas& meshdatas) { return loadMeshDatasBinary_0_2(meshdatas); } - else// if(_version == "0.3") + else { return loadMeshDatasBinary(meshdatas); } @@ -391,7 +391,7 @@ bool Bundle3D::loadMeshDatas(MeshDatas& meshdatas) { return loadMeshDataJson_0_2(meshdatas); } - else// if(_version == "0.3") + else { return loadMeshDatasJson(meshdatas); } @@ -823,7 +823,7 @@ bool Bundle3D::loadMaterials(MaterialDatas& materialdatas) { return loadMaterialsBinary_0_2(materialdatas); } - else// if (_version == "0.3") + else { return loadMaterialsBinary(materialdatas); } @@ -838,7 +838,7 @@ bool Bundle3D::loadMaterials(MaterialDatas& materialdatas) { return loadMaterialDataJson_0_2(materialdatas); } - else// if (_version == "0.3") + else { return loadMaterialsJson(materialdatas); } From ffd81d8b0f1a2c0e8e76060dd0bd651332e674ea Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 29 Aug 2014 13:43:42 +0800 Subject: [PATCH 30/74] [ci skip] --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 92e29182dc..ae0b7d74bc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ cocos2d-x-3.3?? ?? [NEW] ActionManager: added removeAllActionsByTag() [NEW] Node: added stopAllActionsByTag() + [NEW] UI: added `WebView` on iOS and Android [FIX] Node: create unneeded temple `Vec2` object in `setPosition(int, int)`, `setPositionX()` and `setPositionY()` From d0ac64b2e8a889dc2e1b8349aacd448acc0a6ec0 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Fri, 29 Aug 2014 05:43:47 +0000 Subject: [PATCH 31/74] [AUTO][ci skip]: updating cocos2dx_files.json --- templates/cocos2dx_files.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 0263e2997e..25d6d414cb 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -779,6 +779,8 @@ "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxTypefaces.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoHelper.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoView.java", + "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebView.java", + "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxWebViewHelper.java", "cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerAdapter.java", "cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerDelegate.java", "cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerUtils.java", @@ -1036,6 +1038,14 @@ "cocos/ui/UIVideoPlayer.h", "cocos/ui/UIVideoPlayerAndroid.cpp", "cocos/ui/UIVideoPlayerIOS.mm", + "cocos/ui/UIWebView-inl.h", + "cocos/ui/UIWebView.cpp", + "cocos/ui/UIWebView.h", + "cocos/ui/UIWebView.mm", + "cocos/ui/UIWebViewImpl_android.cpp", + "cocos/ui/UIWebViewImpl_android.h", + "cocos/ui/UIWebViewImpl_iOS.h", + "cocos/ui/UIWebViewImpl_iOS.mm", "cocos/ui/UIWidget.cpp", "cocos/ui/UIWidget.h", "cocos/ui/proj.wp8/libGUI.vcxproj", From 1b804345dc24a5886d35523ed3a021f3cee4939f Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Fri, 29 Aug 2014 13:56:37 +0800 Subject: [PATCH 32/74] Update bindings-generator submodule --- tools/bindings-generator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bindings-generator b/tools/bindings-generator index ee16f69272..2261f20019 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit ee16f692722f6bbb7d485032751f9b826ec9e926 +Subproject commit 2261f200192f2e5420093627e5624b4859823429 From 28de8459e4f3a733dc2acc2ff1e8452e249f7a47 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Fri, 29 Aug 2014 14:02:12 +0800 Subject: [PATCH 33/74] Update bindings-generator submodule --- tools/bindings-generator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bindings-generator b/tools/bindings-generator index 2261f20019..d72ee93b76 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit 2261f200192f2e5420093627e5624b4859823429 +Subproject commit d72ee93b769f7d26e545cd902192dde35d9044d8 From d7e9bf1fd27e3ceb83603cf873db1c620102cbcf Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Fri, 29 Aug 2014 15:14:30 +0800 Subject: [PATCH 34/74] Update bindings-generator submodule --- tools/bindings-generator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bindings-generator b/tools/bindings-generator index d72ee93b76..0ae16a2ebf 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit d72ee93b769f7d26e545cd902192dde35d9044d8 +Subproject commit 0ae16a2ebf6b8e6dc6150bf6d6366c20f7fb6062 From 6e6e7e161934f8416ad41bf7c39a39c731267c95 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Fri, 29 Aug 2014 15:22:51 +0800 Subject: [PATCH 35/74] Remove careless modification --- cocos/editor-support/cocostudio/Android.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/cocos/editor-support/cocostudio/Android.mk b/cocos/editor-support/cocostudio/Android.mk index a5d80e2bf2..a9b5b55439 100644 --- a/cocos/editor-support/cocostudio/Android.mk +++ b/cocos/editor-support/cocostudio/Android.mk @@ -80,4 +80,3 @@ LOCAL_STATIC_LIBRARIES += cocos2dx_internal_static include $(BUILD_STATIC_LIBRARY) - From 3679d66c8e356e5b08f24aae151285ce5ef0e7a3 Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 29 Aug 2014 15:39:52 +0800 Subject: [PATCH 36/74] remove unneeded includes --- cocos/2d/CCDrawNode.cpp | 1 + cocos/2d/CCFastTMXLayer.cpp | 1 + cocos/2d/CCFastTMXLayer.h | 1 + cocos/2d/CCFontFNT.cpp | 1 + cocos/2d/CCLayer.cpp | 1 + cocos/2d/CCMotionStreak.cpp | 1 + cocos/2d/CCNode.cpp | 1 + cocos/2d/CCTMXLayer.cpp | 1 + cocos/3d/CCMesh.cpp | 1 + cocos/3d/CCMeshVertexIndexData.h | 5 +- cocos/3d/CCObjLoader.cpp | 8 +- cocos/3d/CCRay.cpp | 4 +- cocos/3d/CCRay.h | 5 +- cocos/3d/CCSkeleton3D.cpp | 4 - cocos/3d/CCSkeleton3D.h | 9 +- cocos/3d/CCSprite3D.cpp | 2 +- cocos/3d/CCSprite3D.h | 6 +- cocos/3d/CCSprite3DMaterial.cpp | 8 +- cocos/3d/CCSprite3DMaterial.h | 5 - cocos/audio/include/SimpleAudioEngine.h | 4 - cocos/base/CCAutoreleasePool.h | 1 - cocos/base/CCCamera.cpp | 1 - cocos/base/CCCamera.h | 1 - cocos/base/CCConfiguration.cpp | 3 - cocos/base/CCController.cpp | 10 +- cocos/base/CCData.cpp | 4 - cocos/base/CCDirector.cpp | 8 +- cocos/base/CCDirector.h | 4 - cocos/base/CCEvent.h | 3 - cocos/base/CCEventCustom.cpp | 3 +- cocos/base/CCEventCustom.h | 1 + cocos/base/CCEventDispatcher.cpp | 6 +- cocos/base/CCEventDispatcher.h | 12 +- cocos/base/CCEventFocus.cpp | 2 +- cocos/base/CCEventFocus.h | 2 +- cocos/base/CCEventListener.cpp | 2 - cocos/base/CCEventListener.h | 7 +- cocos/base/CCEventListenerController.cpp | 6 +- cocos/base/CCEventListenerFocus.cpp | 6 +- cocos/base/CCEventListenerFocus.h | 2 +- cocos/base/CCEventListenerKeyboard.cpp | 1 - cocos/base/CCEventListenerTouch.cpp | 1 + cocos/base/CCEventListenerTouch.h | 3 +- cocos/base/CCEventTouch.cpp | 1 + cocos/base/CCEventTouch.h | 3 +- cocos/base/CCGameController.h | 6 +- cocos/base/CCProfiling.cpp | 2 - cocos/base/ObjectFactory.cpp | 2 +- cocos/base/ccCArray.cpp | 1 - cocos/base/ccUTF8.cpp | 2 +- .../cocosbuilder/CCBAnimationManager.cpp | 4 +- .../cocosbuilder/CCBAnimationManager.h | 1 + .../cocosbuilder/CCBFileLoader.h | 1 - cocos/editor-support/cocosbuilder/CCBReader.h | 1 + .../cocosbuilder/CCBSequenceProperty.cpp | 1 + .../cocosbuilder/CCBSequenceProperty.h | 3 +- .../ActionTimeline/CCActionTimeline.h | 2 +- .../ActionTimeline/CCActionTimelineCache.cpp | 5 +- .../ActionTimeline/CCActionTimelineCache.h | 4 +- .../cocostudio/ActionTimeline/CCFrame.cpp | 2 + .../cocostudio/ActionTimeline/CCFrame.h | 7 +- .../cocostudio/ActionTimeline/CCNodeReader.h | 3 +- .../cocostudio/CCActionManagerEx.cpp | 1 - .../cocostudio/CCActionNode.cpp | 1 - .../cocostudio/CCActionObject.cpp | 1 - .../editor-support/cocostudio/CCBatchNode.cpp | 1 - .../cocostudio/CCDataReaderHelper.h | 1 - .../cocostudio/CCSGUIReader.cpp | 1 - .../cocostudio/CCSpriteFrameCacheHelper.h | 1 - cocos/editor-support/cocostudio/CocoLoader.h | 5 - cocos/editor-support/cocostudio/TriggerBase.h | 1 - cocos/editor-support/cocostudio/TriggerMng.h | 1 - cocos/editor-support/cocostudio/TriggerObj.h | 3 +- cocos/editor-support/spine/spine-cocos2dx.h | 2 +- cocos/math/CCGeometry.h | 1 - cocos/network/WebSocket.cpp | 1 + cocos/network/WebSocket.h | 1 - cocos/platform/CCThread.h | 7 - cocos/renderer/CCBatchCommand.cpp | 1 + cocos/renderer/CCBatchCommand.h | 3 +- cocos/renderer/CCCustomCommand.h | 1 - cocos/renderer/CCGLProgram.cpp | 2 - cocos/renderer/CCGroupCommand.h | 1 - cocos/renderer/CCMeshCommand.cpp | 3 +- cocos/renderer/CCMeshCommand.h | 3 +- cocos/renderer/CCPrimitive.cpp | 1 + cocos/renderer/CCPrimitive.h | 2 + cocos/renderer/CCQuadCommand.cpp | 1 - cocos/renderer/CCQuadCommand.h | 1 - cocos/renderer/CCRenderCommandPool.h | 1 - cocos/renderer/CCTexture2D.h | 1 - cocos/renderer/CCVertexIndexBuffer.cpp | 1 + cocos/renderer/CCVertexIndexBuffer.h | 3 +- cocos/renderer/CCVertexIndexData.cpp | 3 +- cocos/renderer/CCVertexIndexData.h | 2 - .../lua-bindings/auto/api/ActionManager.lua | 8 +- .../scripting/lua-bindings/auto/api/Node.lua | 5 + .../auto/api/lua_cocos2dx_3d_auto_api.lua | 8 +- .../auto/api/lua_cocos2dx_auto_api.lua | 92 +- .../auto/lua_cocos2dx_3d_auto.cpp | 1962 +- .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 22853 ++++++++-------- .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 2 + .../GUI/CCScrollView/CCTableViewCell.cpp | 1 - extensions/assets-manager/AssetsManager.cpp | 5 +- extensions/assets-manager/AssetsManager.h | 2 +- 105 files changed, 12625 insertions(+), 12581 deletions(-) diff --git a/cocos/2d/CCDrawNode.cpp b/cocos/2d/CCDrawNode.cpp index 48fbf65664..4d7f7d7924 100644 --- a/cocos/2d/CCDrawNode.cpp +++ b/cocos/2d/CCDrawNode.cpp @@ -27,6 +27,7 @@ #include "base/CCConfiguration.h" #include "renderer/CCRenderer.h" #include "renderer/ccGLStateCache.h" +#include "renderer/CCGLProgramState.h" #include "base/CCDirector.h" #include "base/CCEventListenerCustom.h" #include "base/CCEventDispatcher.h" diff --git a/cocos/2d/CCFastTMXLayer.cpp b/cocos/2d/CCFastTMXLayer.cpp index 24423db28e..9f6868bb31 100644 --- a/cocos/2d/CCFastTMXLayer.cpp +++ b/cocos/2d/CCFastTMXLayer.cpp @@ -41,6 +41,7 @@ THE SOFTWARE. #include "renderer/CCGLProgramCache.h" #include "renderer/ccGLStateCache.h" #include "renderer/CCRenderer.h" +#include "renderer/CCVertexIndexBuffer.h" #include "base/CCDirector.h" #include "deprecated/CCString.h" diff --git a/cocos/2d/CCFastTMXLayer.h b/cocos/2d/CCFastTMXLayer.h index d5c2000609..14a984d598 100644 --- a/cocos/2d/CCFastTMXLayer.h +++ b/cocos/2d/CCFastTMXLayer.h @@ -32,6 +32,7 @@ THE SOFTWARE. #include "2d/CCNode.h" #include "2d/CCTMXXMLParser.h" #include "renderer/CCPrimitiveCommand.h" +#include "base/CCMap.h" NS_CC_BEGIN diff --git a/cocos/2d/CCFontFNT.cpp b/cocos/2d/CCFontFNT.cpp index b35d31a11d..5db49f735a 100644 --- a/cocos/2d/CCFontFNT.cpp +++ b/cocos/2d/CCFontFNT.cpp @@ -24,6 +24,7 @@ ****************************************************************************/ #include "2d/CCFontFNT.h" +#include #include "base/uthash.h" #include "2d/CCFontAtlas.h" #include "platform/CCFileUtils.h" diff --git a/cocos/2d/CCLayer.cpp b/cocos/2d/CCLayer.cpp index 061eccf842..363230eb8e 100644 --- a/cocos/2d/CCLayer.cpp +++ b/cocos/2d/CCLayer.cpp @@ -31,6 +31,7 @@ THE SOFTWARE. #include "platform/CCDevice.h" #include "renderer/CCRenderer.h" #include "renderer/ccGLStateCache.h" +#include "renderer/CCGLProgramState.h" #include "base/CCDirector.h" #include "base/CCEventDispatcher.h" #include "base/CCEventListenerTouch.h" diff --git a/cocos/2d/CCMotionStreak.cpp b/cocos/2d/CCMotionStreak.cpp index 13b360c5bd..4c9138a131 100644 --- a/cocos/2d/CCMotionStreak.cpp +++ b/cocos/2d/CCMotionStreak.cpp @@ -31,6 +31,7 @@ THE SOFTWARE. #include "renderer/ccGLStateCache.h" #include "renderer/CCTexture2D.h" #include "renderer/CCRenderer.h" +#include "renderer/CCGLProgramState.h" NS_CC_BEGIN diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index f1616fa25e..49ab060c9a 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -43,6 +43,7 @@ THE SOFTWARE. #include "2d/CCComponent.h" #include "2d/CCComponentContainer.h" #include "renderer/CCGLProgram.h" +#include "renderer/CCGLProgramState.h" #include "math/TransformUtils.h" #include "deprecated/CCString.h" diff --git a/cocos/2d/CCTMXLayer.cpp b/cocos/2d/CCTMXLayer.cpp index 0fd515424a..1157ca3acb 100644 --- a/cocos/2d/CCTMXLayer.cpp +++ b/cocos/2d/CCTMXLayer.cpp @@ -30,6 +30,7 @@ THE SOFTWARE. #include "2d/CCSprite.h" #include "base/CCDirector.h" #include "renderer/CCTextureCache.h" +#include "renderer/CCGLProgram.h" #include "deprecated/CCString.h" // For StringUtils::format NS_CC_BEGIN diff --git a/cocos/3d/CCMesh.cpp b/cocos/3d/CCMesh.cpp index 92d855a6cd..0c524e4af2 100644 --- a/cocos/3d/CCMesh.cpp +++ b/cocos/3d/CCMesh.cpp @@ -27,6 +27,7 @@ #include "3d/CCSkeleton3D.h" #include "3d/CCMeshVertexIndexData.h" #include "base/CCEventDispatcher.h" +#include "base/CCDirector.h" #include "renderer/CCTextureCache.h" #include "renderer/CCGLProgramState.h" diff --git a/cocos/3d/CCMeshVertexIndexData.h b/cocos/3d/CCMeshVertexIndexData.h index 677ec709cb..1c540b72c8 100644 --- a/cocos/3d/CCMeshVertexIndexData.h +++ b/cocos/3d/CCMeshVertexIndexData.h @@ -30,14 +30,15 @@ #include "3d/CCBundle3DData.h" #include "3d/CCAABB.h" +#include "3d/3dExport.h" #include "base/CCRef.h" -#include "base/ccTypes.h" +#include "base/CCVector.h" #include "math/CCMath.h" #include "renderer/CCGLProgram.h" #include "renderer/CCVertexIndexData.h" #include "renderer/CCVertexIndexBuffer.h" -#include "3d/3dExport.h" + NS_CC_BEGIN diff --git a/cocos/3d/CCObjLoader.cpp b/cocos/3d/CCObjLoader.cpp index 1ad3e446eb..7fb9b07576 100644 --- a/cocos/3d/CCObjLoader.cpp +++ b/cocos/3d/CCObjLoader.cpp @@ -16,17 +16,11 @@ // version 0.9.0: Initial // -#include -#include -#include +#include "CCObjLoader.h" -#include -#include -#include #include #include -#include "CCObjLoader.h" #include "platform/CCFileUtils.h" #include "base/ccUtils.h" diff --git a/cocos/3d/CCRay.cpp b/cocos/3d/CCRay.cpp index b8f6b1d56c..94189183d1 100755 --- a/cocos/3d/CCRay.cpp +++ b/cocos/3d/CCRay.cpp @@ -20,9 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "CCRay.h" -#include "CCAABB.h" -#include "CCOBB.h" +#include "3d/CCRay.h" NS_CC_BEGIN diff --git a/cocos/3d/CCRay.h b/cocos/3d/CCRay.h index d92d0ac06c..8c127a8198 100644 --- a/cocos/3d/CCRay.h +++ b/cocos/3d/CCRay.h @@ -25,10 +25,9 @@ #ifndef __CC_RAY_H_ #define __CC_RAY_H_ -#include "base/ccMacros.h" #include "math/CCMath.h" -#include "CCAABB.h" -#include "CCOBB.h" +#include "3d/CCAABB.h" +#include "3d/CCOBB.h" #include "3d/3dExport.h" NS_CC_BEGIN diff --git a/cocos/3d/CCSkeleton3D.cpp b/cocos/3d/CCSkeleton3D.cpp index 7733141535..f3dc240a47 100644 --- a/cocos/3d/CCSkeleton3D.cpp +++ b/cocos/3d/CCSkeleton3D.cpp @@ -23,11 +23,7 @@ ****************************************************************************/ #include "3d/CCSkeleton3D.h" -#include "3d/CCBundle3D.h" -#include "base/ccMacros.h" -#include "base/CCPlatformMacros.h" -#include "platform/CCFileUtils.h" NS_CC_BEGIN diff --git a/cocos/3d/CCSkeleton3D.h b/cocos/3d/CCSkeleton3D.h index aadd977967..26bb85c73b 100644 --- a/cocos/3d/CCSkeleton3D.h +++ b/cocos/3d/CCSkeleton3D.h @@ -25,16 +25,11 @@ #ifndef __CCSKELETON3D_H__ #define __CCSKELETON3D_H__ -#include - #include "3d/CCBundle3DData.h" - -#include "base/ccMacros.h" +#include "3d/3dExport.h" #include "base/CCRef.h" #include "base/CCVector.h" -#include "base/ccTypes.h" -#include "math/CCMath.h" -#include "3d/3dExport.h" + NS_CC_BEGIN diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index 5a70261fd5..8d289035ab 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -28,7 +28,7 @@ #include "3d/CCBundle3D.h" #include "3d/CCSprite3DMaterial.h" #include "3d/CCAttachNode.h" -#include "3d/CCSkeleton3D.h" +#include "3d/CCMesh.h" #include "base/CCDirector.h" #include "base/CCPlatformMacros.h" diff --git a/cocos/3d/CCSprite3D.h b/cocos/3d/CCSprite3D.h index ad3679d975..c7ab28893c 100644 --- a/cocos/3d/CCSprite3D.h +++ b/cocos/3d/CCSprite3D.h @@ -25,7 +25,6 @@ #ifndef __CCSPRITE3D_H__ #define __CCSPRITE3D_H__ -#include #include #include "base/CCVector.h" @@ -33,9 +32,9 @@ #include "base/CCProtocols.h" #include "2d/CCNode.h" #include "renderer/CCMeshCommand.h" +#include "3d/CCSkeleton3D.h" // need to include for lua-binding #include "3d/CCAABB.h" #include "3d/CCBundle3DData.h" -#include "3d/CCMesh.h" #include "3d/CCMeshVertexIndexData.h" #include "3d/3dExport.h" @@ -47,10 +46,7 @@ class Mesh; class Texture2D; class MeshSkin; class AttachNode; -class SubMeshState; -class Skeleton3D; struct NodeData; -class SubMesh; /** Sprite3D: A sprite can be loaded from 3D model files, .obj, .c3t, .c3b, then can be drawed as sprite */ class CC_3D_DLL Sprite3D : public Node, public BlendProtocol { diff --git a/cocos/3d/CCSprite3DMaterial.cpp b/cocos/3d/CCSprite3DMaterial.cpp index 5068ff8166..cbe2548136 100644 --- a/cocos/3d/CCSprite3DMaterial.cpp +++ b/cocos/3d/CCSprite3DMaterial.cpp @@ -24,13 +24,7 @@ #include "3d/CCSprite3DMaterial.h" -#include "platform/CCFileUtils.h" -#include "renderer/CCTextureCache.h" -#include "base/CCEventCustom.h" -#include "base/CCEventListenerCustom.h" -#include "base/CCEventDispatcher.h" -#include "base/CCEventType.h" -#include "base/CCDirector.h" +#include "renderer/CCTexture2D.h" NS_CC_BEGIN diff --git a/cocos/3d/CCSprite3DMaterial.h b/cocos/3d/CCSprite3DMaterial.h index 68705c5c52..bed804841c 100644 --- a/cocos/3d/CCSprite3DMaterial.h +++ b/cocos/3d/CCSprite3DMaterial.h @@ -28,14 +28,9 @@ #include #include #include "base/ccTypes.h" -#include "base/CCMap.h" NS_CC_BEGIN -class Sprite3D; -class Mesh; -class EventListenerCustom; -class EventCustom; class Texture2D; /** diff --git a/cocos/audio/include/SimpleAudioEngine.h b/cocos/audio/include/SimpleAudioEngine.h index 8eda5ddeb6..d57eed70e1 100644 --- a/cocos/audio/include/SimpleAudioEngine.h +++ b/cocos/audio/include/SimpleAudioEngine.h @@ -27,11 +27,7 @@ THE SOFTWARE. #ifndef _SIMPLE_AUDIO_ENGINE_H_ #define _SIMPLE_AUDIO_ENGINE_H_ -#include #include "Export.h" -#include -#include -#include #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) diff --git a/cocos/base/CCAutoreleasePool.h b/cocos/base/CCAutoreleasePool.h index 6d1134a77e..1408469edf 100644 --- a/cocos/base/CCAutoreleasePool.h +++ b/cocos/base/CCAutoreleasePool.h @@ -25,7 +25,6 @@ THE SOFTWARE. #ifndef __AUTORELEASEPOOL_H__ #define __AUTORELEASEPOOL_H__ -#include #include #include #include "base/CCRef.h" diff --git a/cocos/base/CCCamera.cpp b/cocos/base/CCCamera.cpp index feb537db8a..6067830fd1 100644 --- a/cocos/base/CCCamera.cpp +++ b/cocos/base/CCCamera.cpp @@ -25,7 +25,6 @@ #include "base/CCDirector.h" #include "platform/CCGLView.h" #include "2d/CCScene.h" -#include "2d/CCNode.h" NS_CC_BEGIN diff --git a/cocos/base/CCCamera.h b/cocos/base/CCCamera.h index 6825b14268..aa95b15064 100644 --- a/cocos/base/CCCamera.h +++ b/cocos/base/CCCamera.h @@ -24,7 +24,6 @@ THE SOFTWARE. #ifndef _CCCAMERA_H__ #define _CCCAMERA_H__ -#include "base/CCVector.h" #include "2d/CCNode.h" NS_CC_BEGIN diff --git a/cocos/base/CCConfiguration.cpp b/cocos/base/CCConfiguration.cpp index 5c9d9d0cae..17fbc075e5 100644 --- a/cocos/base/CCConfiguration.cpp +++ b/cocos/base/CCConfiguration.cpp @@ -25,9 +25,6 @@ THE SOFTWARE. ****************************************************************************/ #include "base/CCConfiguration.h" -#include -#include "base/ccMacros.h" -#include "base/ccConfig.h" #include "platform/CCFileUtils.h" NS_CC_BEGIN diff --git a/cocos/base/CCController.cpp b/cocos/base/CCController.cpp index cf3dc2050c..e326a7feec 100644 --- a/cocos/base/CCController.cpp +++ b/cocos/base/CCController.cpp @@ -23,15 +23,13 @@ THE SOFTWARE. ****************************************************************************/ -#include "CCController.h" +#include "base/CCController.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#include "ccMacros.h" -#include "CCEventDispatcher.h" -#include "CCEventController.h" -#include "CCEventListenerController.h" -#include "CCDirector.h" +#include "base/CCEventDispatcher.h" +#include "base/CCEventController.h" +#include "base/CCDirector.h" NS_CC_BEGIN diff --git a/cocos/base/CCData.cpp b/cocos/base/CCData.cpp index 3092202337..db4f639e95 100644 --- a/cocos/base/CCData.cpp +++ b/cocos/base/CCData.cpp @@ -24,10 +24,6 @@ ****************************************************************************/ #include "base/CCData.h" -#include "platform/CCCommon.h" -#include "base/ccMacros.h" - -#include NS_CC_BEGIN diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index bc69228f55..f14ddc988e 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -35,13 +35,14 @@ THE SOFTWARE. #include "2d/CCScene.h" #include "2d/CCSpriteFrameCache.h" #include "platform/CCFileUtils.h" -#include "platform/CCImage.h" + #include "2d/CCActionManager.h" #include "2d/CCFontFNT.h" #include "2d/CCFontAtlasCache.h" #include "2d/CCAnimationCache.h" #include "2d/CCTransition.h" #include "2d/CCFontFreeType.h" +#include "2d/CCLabelAtlas.h" #include "renderer/CCGLProgramCache.h" #include "renderer/CCGLProgramStateCache.h" #include "renderer/CCTextureCache.h" @@ -55,12 +56,9 @@ THE SOFTWARE. #include "base/CCEventDispatcher.h" #include "base/CCEventCustom.h" #include "base/CCConsole.h" -#include "base/CCTouch.h" #include "base/CCAutoreleasePool.h" -#include "base/CCProfiling.h" #include "base/CCConfiguration.h" -#include "base/CCNS.h" -#include "math/CCMath.h" + #include "CCApplication.h" #include "CCGLViewImpl.h" diff --git a/cocos/base/CCDirector.h b/cocos/base/CCDirector.h index c5ffd80e0a..6ef2950de1 100644 --- a/cocos/base/CCDirector.h +++ b/cocos/base/CCDirector.h @@ -31,12 +31,8 @@ THE SOFTWARE. #include "base/CCPlatformMacros.h" #include "base/CCRef.h" -#include "base/ccTypes.h" -#include "math/CCGeometry.h" #include "base/CCVector.h" #include "CCGL.h" -#include "2d/CCLabelAtlas.h" -#include "2d/CCScene.h" #include #include "math/CCMath.h" #include "platform/CCGLView.h" diff --git a/cocos/base/CCEvent.h b/cocos/base/CCEvent.h index fa2445d60a..14e13b5c3a 100644 --- a/cocos/base/CCEvent.h +++ b/cocos/base/CCEvent.h @@ -26,9 +26,6 @@ #ifndef __CCEVENT_H__ #define __CCEVENT_H__ -#include -#include - #include "base/CCRef.h" #include "base/CCPlatformMacros.h" diff --git a/cocos/base/CCEventCustom.cpp b/cocos/base/CCEventCustom.cpp index 8c0e7b5e8b..846f44f42e 100644 --- a/cocos/base/CCEventCustom.cpp +++ b/cocos/base/CCEventCustom.cpp @@ -23,8 +23,7 @@ ****************************************************************************/ #include "base/CCEventCustom.h" -#include "base/ccMacros.h" -#include +#include "base/CCEvent.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventCustom.h b/cocos/base/CCEventCustom.h index 00ea4555ed..8699d8cf62 100644 --- a/cocos/base/CCEventCustom.h +++ b/cocos/base/CCEventCustom.h @@ -25,6 +25,7 @@ #ifndef __cocos2d_libs__CCCustomEvent__ #define __cocos2d_libs__CCCustomEvent__ +#include #include "base/CCEvent.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventDispatcher.cpp b/cocos/base/CCEventDispatcher.cpp index b7706184fe..6ca69ed9a2 100644 --- a/cocos/base/CCEventDispatcher.cpp +++ b/cocos/base/CCEventDispatcher.cpp @@ -22,8 +22,8 @@ THE SOFTWARE. ****************************************************************************/ #include "base/CCEventDispatcher.h" -#include "base/CCEvent.h" -#include "base/CCEventTouch.h" +#include + #include "base/CCEventCustom.h" #include "base/CCEventListenerTouch.h" #include "base/CCEventListenerAcceleration.h" @@ -38,8 +38,6 @@ #include "base/CCDirector.h" #include "base/CCEventType.h" -#include - #define DUMP_LISTENER_ITEM_PRIORITY_INFO 0 diff --git a/cocos/base/CCEventDispatcher.h b/cocos/base/CCEventDispatcher.h index 249e39d23e..0c43ef1919 100644 --- a/cocos/base/CCEventDispatcher.h +++ b/cocos/base/CCEventDispatcher.h @@ -25,17 +25,17 @@ #ifndef __CC_EVENT_DISPATCHER_H__ #define __CC_EVENT_DISPATCHER_H__ +#include +#include +#include +#include +#include + #include "base/CCPlatformMacros.h" #include "base/CCEventListener.h" #include "base/CCEvent.h" #include "CCStdC.h" -#include -#include -#include -#include -#include - NS_CC_BEGIN class Event; diff --git a/cocos/base/CCEventFocus.cpp b/cocos/base/CCEventFocus.cpp index f1249576a2..442f72372c 100644 --- a/cocos/base/CCEventFocus.cpp +++ b/cocos/base/CCEventFocus.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "CCEventFocus.h" +#include "base/CCEventFocus.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventFocus.h b/cocos/base/CCEventFocus.h index c43399d446..100b207cbd 100644 --- a/cocos/base/CCEventFocus.h +++ b/cocos/base/CCEventFocus.h @@ -26,7 +26,7 @@ #ifndef __cocos2d_libs__CCEventFocus__ #define __cocos2d_libs__CCEventFocus__ -#include "CCEvent.h" +#include "base/CCEvent.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventListener.cpp b/cocos/base/CCEventListener.cpp index ca67dfbabd..0c7c32f598 100644 --- a/cocos/base/CCEventListener.cpp +++ b/cocos/base/CCEventListener.cpp @@ -22,9 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "base/CCConsole.h" #include "base/CCEventListener.h" -#include "platform/CCCommon.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventListener.h b/cocos/base/CCEventListener.h index 18a135515f..b316e335e9 100644 --- a/cocos/base/CCEventListener.h +++ b/cocos/base/CCEventListener.h @@ -25,13 +25,12 @@ #ifndef __CCEVENTLISTENER_H__ #define __CCEVENTLISTENER_H__ -#include "base/CCPlatformMacros.h" -#include "base/CCRef.h" - #include #include #include -#include + +#include "base/CCPlatformMacros.h" +#include "base/CCRef.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventListenerController.cpp b/cocos/base/CCEventListenerController.cpp index a83293b5b2..7d9b531d0d 100644 --- a/cocos/base/CCEventListenerController.cpp +++ b/cocos/base/CCEventListenerController.cpp @@ -23,9 +23,9 @@ THE SOFTWARE. ****************************************************************************/ -#include "CCEventListenerController.h" -#include "CCEventController.h" -#include "ccMacros.h" +#include "base/CCEventListenerController.h" +#include "base/CCEventController.h" +#include "base/ccMacros.h" #include "base/CCController.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventListenerFocus.cpp b/cocos/base/CCEventListenerFocus.cpp index 1fa42532d0..da32e6a1d1 100644 --- a/cocos/base/CCEventListenerFocus.cpp +++ b/cocos/base/CCEventListenerFocus.cpp @@ -23,9 +23,9 @@ THE SOFTWARE. ****************************************************************************/ -#include "CCEventListenerFocus.h" -#include "CCEventFocus.h" -#include "ccMacros.h" +#include "base/CCEventListenerFocus.h" +#include "base/CCEventFocus.h" +#include "base/ccMacros.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventListenerFocus.h b/cocos/base/CCEventListenerFocus.h index 300fdcdac8..00c78bb22d 100644 --- a/cocos/base/CCEventListenerFocus.h +++ b/cocos/base/CCEventListenerFocus.h @@ -26,7 +26,7 @@ #ifndef __cocos2d_libs__CCEventListenerFocus__ #define __cocos2d_libs__CCEventListenerFocus__ -#include "CCEventListener.h" +#include "base/CCEventListener.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventListenerKeyboard.cpp b/cocos/base/CCEventListenerKeyboard.cpp index 40135a384e..56f286fa61 100644 --- a/cocos/base/CCEventListenerKeyboard.cpp +++ b/cocos/base/CCEventListenerKeyboard.cpp @@ -24,7 +24,6 @@ ****************************************************************************/ #include "base/CCEventListenerKeyboard.h" -#include "base/CCEventKeyboard.h" #include "base/ccMacros.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventListenerTouch.cpp b/cocos/base/CCEventListenerTouch.cpp index 9cbc1bcb4a..3870826e96 100644 --- a/cocos/base/CCEventListenerTouch.cpp +++ b/cocos/base/CCEventListenerTouch.cpp @@ -25,6 +25,7 @@ #include "base/CCEventListenerTouch.h" #include "base/CCEventDispatcher.h" #include "base/CCEventTouch.h" +#include "base/CCTouch.h" #include diff --git a/cocos/base/CCEventListenerTouch.h b/cocos/base/CCEventListenerTouch.h index b125b8e95f..353c938e9d 100644 --- a/cocos/base/CCEventListenerTouch.h +++ b/cocos/base/CCEventListenerTouch.h @@ -27,12 +27,13 @@ #define __cocos2d_libs__CCTouchEventListener__ #include "base/CCEventListener.h" -#include "base/CCTouch.h" #include NS_CC_BEGIN +class Touch; + class CC_DLL EventListenerTouchOneByOne : public EventListener { public: diff --git a/cocos/base/CCEventTouch.cpp b/cocos/base/CCEventTouch.cpp index 3c78fb89aa..93632a7344 100644 --- a/cocos/base/CCEventTouch.cpp +++ b/cocos/base/CCEventTouch.cpp @@ -23,6 +23,7 @@ ****************************************************************************/ #include "base/CCEventTouch.h" +#include "base/CCTouch.h" NS_CC_BEGIN diff --git a/cocos/base/CCEventTouch.h b/cocos/base/CCEventTouch.h index 52bbbf9a2c..d4d5d9625b 100644 --- a/cocos/base/CCEventTouch.h +++ b/cocos/base/CCEventTouch.h @@ -26,11 +26,12 @@ #define __cocos2d_libs__TouchEvent__ #include "base/CCEvent.h" -#include "base/CCTouch.h" #include NS_CC_BEGIN +class Touch; + #define TOUCH_PERF_DEBUG 1 class CC_DLL EventTouch : public Event diff --git a/cocos/base/CCGameController.h b/cocos/base/CCGameController.h index 0aa4df4abb..fbc93bce17 100644 --- a/cocos/base/CCGameController.h +++ b/cocos/base/CCGameController.h @@ -26,8 +26,8 @@ #ifndef __cocos2d_libs__CCGameController__ #define __cocos2d_libs__CCGameController__ -#include "CCController.h" -#include "CCEventController.h" -#include "CCEventListenerController.h" +#include "base/CCController.h" +#include "base/CCEventController.h" +#include "base/CCEventListenerController.h" #endif /* defined(__cocos2d_libs__CCGameController__) */ diff --git a/cocos/base/CCProfiling.cpp b/cocos/base/CCProfiling.cpp index a97c0d70c6..ac91672106 100644 --- a/cocos/base/CCProfiling.cpp +++ b/cocos/base/CCProfiling.cpp @@ -25,8 +25,6 @@ THE SOFTWARE. ****************************************************************************/ #include "base/CCProfiling.h" -#include - using namespace std; NS_CC_BEGIN diff --git a/cocos/base/ObjectFactory.cpp b/cocos/base/ObjectFactory.cpp index 2d7cd7f8fd..1a14b14ce7 100644 --- a/cocos/base/ObjectFactory.cpp +++ b/cocos/base/ObjectFactory.cpp @@ -22,7 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include "ObjectFactory.h" +#include "base/ObjectFactory.h" NS_CC_BEGIN diff --git a/cocos/base/ccCArray.cpp b/cocos/base/ccCArray.cpp index a9a463e624..8be669f81f 100644 --- a/cocos/base/ccCArray.cpp +++ b/cocos/base/ccCArray.cpp @@ -25,7 +25,6 @@ THE SOFTWARE. ****************************************************************************/ #include "base/ccCArray.h" -#include "base/CCRef.h" #include "base/ccTypes.h" NS_CC_BEGIN diff --git a/cocos/base/ccUTF8.cpp b/cocos/base/ccUTF8.cpp index fd9514f4c9..e81b160dcf 100644 --- a/cocos/base/ccUTF8.cpp +++ b/cocos/base/ccUTF8.cpp @@ -23,7 +23,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "ccUTF8.h" +#include "base/ccUTF8.h" #include "platform/CCCommon.h" #include "base/CCConsole.h" #include "ConvertUTF.h" diff --git a/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp b/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp index eff4c54f19..dc57a03c0a 100644 --- a/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp +++ b/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp @@ -1,8 +1,6 @@ #include "CCBAnimationManager.h" -#include "CCBSequence.h" -#include "CCBSequenceProperty.h" + #include "CCBReader.h" -#include "CCBKeyframe.h" #include "CCNode+CCBRelativePositioning.h" #include "audio/include/SimpleAudioEngine.h" #include "CCBSelectorResolver.h" diff --git a/cocos/editor-support/cocosbuilder/CCBAnimationManager.h b/cocos/editor-support/cocosbuilder/CCBAnimationManager.h index 9d272d9585..d22d093153 100644 --- a/cocos/editor-support/cocosbuilder/CCBAnimationManager.h +++ b/cocos/editor-support/cocosbuilder/CCBAnimationManager.h @@ -8,6 +8,7 @@ #include "extensions/ExtensionMacros.h" #include "CCBSequence.h" +#include "CCBKeyframe.h" #include "CCBSequenceProperty.h" #include "extensions/GUI/CCControlExtension/CCControl.h" diff --git a/cocos/editor-support/cocosbuilder/CCBFileLoader.h b/cocos/editor-support/cocosbuilder/CCBFileLoader.h index 9876a62ead..1c5c9c87a5 100644 --- a/cocos/editor-support/cocosbuilder/CCBFileLoader.h +++ b/cocos/editor-support/cocosbuilder/CCBFileLoader.h @@ -2,7 +2,6 @@ #define _CCB_CCBFILELOADER_H_ #include "CCNodeLoader.h" -#include "CCBReader.h" namespace cocosbuilder { diff --git a/cocos/editor-support/cocosbuilder/CCBReader.h b/cocos/editor-support/cocosbuilder/CCBReader.h index f4a81b4437..d89b153c76 100644 --- a/cocos/editor-support/cocosbuilder/CCBReader.h +++ b/cocos/editor-support/cocosbuilder/CCBReader.h @@ -1,6 +1,7 @@ #ifndef _CCB_CCBREADER_H_ #define _CCB_CCBREADER_H_ +#include #include #include #include "2d/CCNode.h" diff --git a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp b/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp index fa74e33881..59240fad5b 100644 --- a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp +++ b/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp @@ -1,4 +1,5 @@ #include "CCBSequenceProperty.h" +#include "CCBKeyframe.h" using namespace cocos2d; using namespace std; diff --git a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h b/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h index b01c722bea..b460bc2dcf 100644 --- a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h +++ b/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h @@ -3,10 +3,11 @@ #include "base/CCRef.h" #include "base/CCVector.h" -#include "CCBKeyframe.h" namespace cocosbuilder { +class CCBKeyframe; + class CC_DLL CCBSequenceProperty : public cocos2d::Ref { public: diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.h b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.h index ae8427002b..321b1136fa 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimeline.h @@ -26,8 +26,8 @@ THE SOFTWARE. #define __CCTIMELINE_ACTION_H__ #include "CCTimeLine.h" -#include "renderer/CCRenderer.h" #include "cocostudio/CocosStudioExport.h" +#include "2d/CCAction.h" NS_TIMELINE_BEGIN diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp index 395b215a40..312aee2b6d 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp @@ -27,6 +27,9 @@ THE SOFTWARE. #include "CCFrame.h" #include "CCTimeLine.h" #include "CCActionTimeline.h" +#include "platform/CCFileUtils.h" +#include "2d/CCSpriteFrameCache.h" +#include "2d/CCSpriteFrame.h" using namespace cocos2d; @@ -130,7 +133,7 @@ ActionTimeline* ActionTimelineCache::createAction(const std::string& fileName) ActionTimeline* ActionTimelineCache::loadAnimationActionWithFile(const std::string& fileName) { // Read content from file - std::string fullPath = CCFileUtils::getInstance()->fullPathForFilename(fileName); + std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName); std::string contentStr = FileUtils::getInstance()->getStringFromFile(fullPath); return loadAnimationActionWithContent(fileName, contentStr); diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.h b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.h index c2b2ec4fe0..43953e7d75 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.h @@ -25,7 +25,9 @@ THE SOFTWARE. #ifndef __CCTIMELINE_ACTION_CACHE_H__ #define __CCTIMELINE_ACTION_CACHE_H__ -#include "cocos2d.h" +#include +#include "base/CCMap.h" + #include "cocostudio/DictionaryHelper.h" #include "CCTimelineMacro.h" #include "cocostudio/CocosStudioExport.h" diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp index fab94198ae..d0f698d419 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp @@ -25,6 +25,8 @@ THE SOFTWARE. #include "CCFrame.h" #include "CCTimeLine.h" #include "CCActionTimeline.h" +#include "2d/CCSpriteFrameCache.h" +#include "2d/CCSpriteFrame.h" USING_NS_CC; diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h index c0e28ec1a7..46022f7f0e 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.h @@ -25,10 +25,15 @@ THE SOFTWARE. #ifndef __CCFRAME_H__ #define __CCFRAME_H__ -#include "cocos2d.h" +#include +#include "base/CCRef.h" +#include "base/CCVector.h" +#include "2d/CCNode.h" +#include "2d/CCSprite.h" #include "CCTimelineMacro.h" #include "cocostudio/CocosStudioExport.h" + NS_TIMELINE_BEGIN class Timeline; diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCNodeReader.h b/cocos/editor-support/cocostudio/ActionTimeline/CCNodeReader.h index c45b99638c..28e358ab5e 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCNodeReader.h +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCNodeReader.h @@ -25,9 +25,10 @@ THE SOFTWARE. #ifndef __CC_NODE_CACHE_H__ #define __CC_NODE_CACHE_H__ +#include #include "cocostudio/DictionaryHelper.h" #include "cocostudio/CocosStudioExport.h" -#include "cocos2d.h" +#include "2d/CCNode.h" namespace cocostudio { diff --git a/cocos/editor-support/cocostudio/CCActionManagerEx.cpp b/cocos/editor-support/cocostudio/CCActionManagerEx.cpp index af4d80e855..91753ef118 100644 --- a/cocos/editor-support/cocostudio/CCActionManagerEx.cpp +++ b/cocos/editor-support/cocostudio/CCActionManagerEx.cpp @@ -23,7 +23,6 @@ THE SOFTWARE. ****************************************************************************/ #include "cocostudio/CCActionManagerEx.h" -#include "cocostudio/DictionaryHelper.h" #include "cocostudio/CocoLoader.h" using namespace cocos2d; diff --git a/cocos/editor-support/cocostudio/CCActionNode.cpp b/cocos/editor-support/cocostudio/CCActionNode.cpp index 20b5f929ac..d1dfa4f438 100644 --- a/cocos/editor-support/cocostudio/CCActionNode.cpp +++ b/cocos/editor-support/cocostudio/CCActionNode.cpp @@ -24,7 +24,6 @@ THE SOFTWARE. #include "cocostudio/CCActionNode.h" #include "cocostudio/CCActionFrameEasing.h" -#include "cocostudio/DictionaryHelper.h" #include "ui/UIWidget.h" #include "ui/UIHelper.h" #include "cocostudio/CocoLoader.h" diff --git a/cocos/editor-support/cocostudio/CCActionObject.cpp b/cocos/editor-support/cocostudio/CCActionObject.cpp index fbaabf7efe..653b5a705c 100644 --- a/cocos/editor-support/cocostudio/CCActionObject.cpp +++ b/cocos/editor-support/cocostudio/CCActionObject.cpp @@ -23,7 +23,6 @@ THE SOFTWARE. ****************************************************************************/ #include "cocostudio/CCActionObject.h" -#include "cocostudio/DictionaryHelper.h" #include "cocostudio/CocoLoader.h" #include "base/CCDirector.h" diff --git a/cocos/editor-support/cocostudio/CCBatchNode.cpp b/cocos/editor-support/cocostudio/CCBatchNode.cpp index 8edb034e4e..c8128748f3 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.cpp +++ b/cocos/editor-support/cocostudio/CCBatchNode.cpp @@ -23,7 +23,6 @@ THE SOFTWARE. ****************************************************************************/ #include "cocostudio/CCBatchNode.h" -#include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CCArmature.h" #include "cocostudio/CCSkin.h" diff --git a/cocos/editor-support/cocostudio/CCDataReaderHelper.h b/cocos/editor-support/cocostudio/CCDataReaderHelper.h index 4e8b941f5a..eb0330af3c 100644 --- a/cocos/editor-support/cocostudio/CCDataReaderHelper.h +++ b/cocos/editor-support/cocostudio/CCDataReaderHelper.h @@ -36,7 +36,6 @@ THE SOFTWARE. #include #include -#include #include #include #include diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index 79889233c7..0369186f4f 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -40,7 +40,6 @@ THE SOFTWARE. #include "WidgetReader/ScrollViewReader/ScrollViewReader.h" #include "WidgetReader/ListViewReader/ListViewReader.h" #include "cocostudio/CocoLoader.h" -#include "ui/CocosGUI.h" using namespace cocos2d; using namespace cocos2d::ui; diff --git a/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h b/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h index 6a98a8ead5..d0e6fa9585 100644 --- a/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h +++ b/cocos/editor-support/cocostudio/CCSpriteFrameCacheHelper.h @@ -27,7 +27,6 @@ THE SOFTWARE. #include "base/CCPlatformMacros.h" #include "cocostudio/CCArmatureDefine.h" #include "cocostudio/CocosStudioExport.h" -#include #include namespace cocostudio { diff --git a/cocos/editor-support/cocostudio/CocoLoader.h b/cocos/editor-support/cocostudio/CocoLoader.h index 29d0983e4d..52b603a764 100644 --- a/cocos/editor-support/cocostudio/CocoLoader.h +++ b/cocos/editor-support/cocostudio/CocoLoader.h @@ -25,11 +25,6 @@ #ifndef _COCOLOADER_H #define _COCOLOADER_H -#include -#include -#include -#include -#include "json/rapidjson.h" #include "json/document.h" #include "cocostudio/CocosStudioExport.h" diff --git a/cocos/editor-support/cocostudio/TriggerBase.h b/cocos/editor-support/cocostudio/TriggerBase.h index 31dc0c0308..6cce96776a 100755 --- a/cocos/editor-support/cocostudio/TriggerBase.h +++ b/cocos/editor-support/cocostudio/TriggerBase.h @@ -25,7 +25,6 @@ THE SOFTWARE. #ifndef __TRIGGEREVENT_H__ #define __TRIGGEREVENT_H__ -#include "cocos2d.h" #include "cocostudio/CocoStudio.h" #include "base/ObjectFactory.h" #include "TriggerObj.h" diff --git a/cocos/editor-support/cocostudio/TriggerMng.h b/cocos/editor-support/cocostudio/TriggerMng.h index 7d43eb5e74..bb996cbe6d 100755 --- a/cocos/editor-support/cocostudio/TriggerMng.h +++ b/cocos/editor-support/cocostudio/TriggerMng.h @@ -24,7 +24,6 @@ THE SOFTWARE. #ifndef __TRIGGERMNG_H__ #define __TRIGGERMNG_H__ -#include "cocos2d.h" #include "CocoStudio.h" namespace cocos2d { diff --git a/cocos/editor-support/cocostudio/TriggerObj.h b/cocos/editor-support/cocostudio/TriggerObj.h index 464c0d98f7..2373786581 100755 --- a/cocos/editor-support/cocostudio/TriggerObj.h +++ b/cocos/editor-support/cocostudio/TriggerObj.h @@ -25,9 +25,8 @@ THE SOFTWARE. #ifndef __TRIGGEROBJ_H__ #define __TRIGGEROBJ_H__ -#include "cocos2d.h" #include "CocoStudio.h" -#include +#include "base/CCVector.h" namespace cocos2d { class EventListenerCustom; diff --git a/cocos/editor-support/spine/spine-cocos2dx.h b/cocos/editor-support/spine/spine-cocos2dx.h index f0b597be4b..51d6f689ac 100644 --- a/cocos/editor-support/spine/spine-cocos2dx.h +++ b/cocos/editor-support/spine/spine-cocos2dx.h @@ -34,8 +34,8 @@ #ifndef SPINE_COCOS2DX_H_ #define SPINE_COCOS2DX_H_ -#include #include "cocos2d.h" +#include #include #include diff --git a/cocos/math/CCGeometry.h b/cocos/math/CCGeometry.h index 056f6939b9..1ea35bf059 100644 --- a/cocos/math/CCGeometry.h +++ b/cocos/math/CCGeometry.h @@ -27,7 +27,6 @@ THE SOFTWARE. #define __MATH_CCGEOMETRY_H__ #include -#include #include "base/CCPlatformMacros.h" #include "base/ccMacros.h" diff --git a/cocos/network/WebSocket.cpp b/cocos/network/WebSocket.cpp index 2ac99901bc..934b1e0c6a 100644 --- a/cocos/network/WebSocket.cpp +++ b/cocos/network/WebSocket.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/cocos/network/WebSocket.h b/cocos/network/WebSocket.h index 956a36a56c..5548ca50fa 100644 --- a/cocos/network/WebSocket.h +++ b/cocos/network/WebSocket.h @@ -32,7 +32,6 @@ #include "base/CCPlatformMacros.h" #include "CCStdC.h" -#include #include #include diff --git a/cocos/platform/CCThread.h b/cocos/platform/CCThread.h index f2c6453f9f..b9aa869af3 100644 --- a/cocos/platform/CCThread.h +++ b/cocos/platform/CCThread.h @@ -26,13 +26,7 @@ THE SOFTWARE. #ifndef __CC_PLATFORM_THREAD_H__ #define __CC_PLATFORM_THREAD_H__ -#include -#include -#include - -#include "platform/CCCommon.h" #include "base/CCPlatformMacros.h" -#include "base/CCDirector.h" NS_CC_BEGIN @@ -48,7 +42,6 @@ NS_CC_BEGIN class CC_DLL ThreadHelper { public: - friend DisplayLinkDirector; /** Create an autorelease pool for objective-c codes. * @js NA diff --git a/cocos/renderer/CCBatchCommand.cpp b/cocos/renderer/CCBatchCommand.cpp index af9fa47f40..1a7c7c8bef 100644 --- a/cocos/renderer/CCBatchCommand.cpp +++ b/cocos/renderer/CCBatchCommand.cpp @@ -27,6 +27,7 @@ #include "renderer/ccGLStateCache.h" #include "renderer/CCTextureAtlas.h" #include "renderer/CCTexture2D.h" +#include "renderer/CCGLProgram.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCBatchCommand.h b/cocos/renderer/CCBatchCommand.h index 05f94db160..90fa52e28d 100644 --- a/cocos/renderer/CCBatchCommand.h +++ b/cocos/renderer/CCBatchCommand.h @@ -26,12 +26,11 @@ #define _CC_BATCHCOMMAND_H_ #include "renderer/CCRenderCommand.h" -#include "renderer/CCGLProgram.h" -#include "CCRenderCommandPool.h" NS_CC_BEGIN class TextureAtlas; +class GLProgram; class CC_DLL BatchCommand : public RenderCommand { diff --git a/cocos/renderer/CCCustomCommand.h b/cocos/renderer/CCCustomCommand.h index f39dfd5331..e22750a4b8 100644 --- a/cocos/renderer/CCCustomCommand.h +++ b/cocos/renderer/CCCustomCommand.h @@ -27,7 +27,6 @@ #define _CC_CUSTOMCOMMAND_H_ #include "renderer/CCRenderCommand.h" -#include "renderer/CCRenderCommandPool.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCGLProgram.cpp b/cocos/renderer/CCGLProgram.cpp index 4b757c5b0f..9fcfbd75e5 100644 --- a/cocos/renderer/CCGLProgram.cpp +++ b/cocos/renderer/CCGLProgram.cpp @@ -33,11 +33,9 @@ THE SOFTWARE. #endif #include "base/CCDirector.h" -#include "base/ccMacros.h" #include "base/uthash.h" #include "renderer/ccGLStateCache.h" #include "platform/CCFileUtils.h" -#include "CCGL.h" #include "deprecated/CCString.h" diff --git a/cocos/renderer/CCGroupCommand.h b/cocos/renderer/CCGroupCommand.h index 4d1c3732cc..96fa8f70da 100644 --- a/cocos/renderer/CCGroupCommand.h +++ b/cocos/renderer/CCGroupCommand.h @@ -30,7 +30,6 @@ #include "base/CCRef.h" #include "CCRenderCommand.h" -#include "CCRenderCommandPool.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCMeshCommand.cpp b/cocos/renderer/CCMeshCommand.cpp index dbe69989d6..03fb342c5d 100644 --- a/cocos/renderer/CCMeshCommand.cpp +++ b/cocos/renderer/CCMeshCommand.cpp @@ -22,6 +22,7 @@ THE SOFTWARE. ****************************************************************************/ +#include "renderer/CCMeshCommand.h" #include "base/ccMacros.h" #include "base/CCConfiguration.h" #include "base/CCDirector.h" @@ -29,9 +30,7 @@ #include "base/CCEventListenerCustom.h" #include "base/CCEventDispatcher.h" #include "base/CCEventType.h" -#include "renderer/CCMeshCommand.h" #include "renderer/ccGLStateCache.h" -#include "renderer/CCGLProgram.h" #include "renderer/CCGLProgramState.h" #include "renderer/CCRenderer.h" #include "renderer/CCTextureAtlas.h" diff --git a/cocos/renderer/CCMeshCommand.h b/cocos/renderer/CCMeshCommand.h index d394aac366..094b735e6d 100644 --- a/cocos/renderer/CCMeshCommand.h +++ b/cocos/renderer/CCMeshCommand.h @@ -26,10 +26,9 @@ #define _CC_MESHCOMMAND_H_ #include -#include "CCRenderCommand.h" +#include "renderer/CCRenderCommand.h" #include "renderer/CCGLProgram.h" #include "math/CCMath.h" -#include "CCRenderCommandPool.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCPrimitive.cpp b/cocos/renderer/CCPrimitive.cpp index 357e61fa43..2e95043e57 100644 --- a/cocos/renderer/CCPrimitive.cpp +++ b/cocos/renderer/CCPrimitive.cpp @@ -23,6 +23,7 @@ ****************************************************************************/ #include "renderer/CCPrimitive.h" +#include "renderer/CCVertexIndexBuffer.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCPrimitive.h b/cocos/renderer/CCPrimitive.h index 83d3aef2b3..3e1ca419f0 100644 --- a/cocos/renderer/CCPrimitive.h +++ b/cocos/renderer/CCPrimitive.h @@ -29,6 +29,8 @@ NS_CC_BEGIN +class IndexBuffer; + class CC_DLL Primitive : public Ref { public: diff --git a/cocos/renderer/CCQuadCommand.cpp b/cocos/renderer/CCQuadCommand.cpp index d5cff627f6..ac52bb0f1a 100644 --- a/cocos/renderer/CCQuadCommand.cpp +++ b/cocos/renderer/CCQuadCommand.cpp @@ -27,7 +27,6 @@ #include "renderer/ccGLStateCache.h" #include "renderer/CCGLProgram.h" -#include "renderer/CCGLProgramState.h" #include "xxhash.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCQuadCommand.h b/cocos/renderer/CCQuadCommand.h index 5c731b784b..25e003b4a5 100644 --- a/cocos/renderer/CCQuadCommand.h +++ b/cocos/renderer/CCQuadCommand.h @@ -27,7 +27,6 @@ #include "renderer/CCRenderCommand.h" #include "renderer/CCGLProgramState.h" -#include "renderer/CCRenderCommandPool.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCRenderCommandPool.h b/cocos/renderer/CCRenderCommandPool.h index ccee61c5cc..de4c5e0201 100644 --- a/cocos/renderer/CCRenderCommandPool.h +++ b/cocos/renderer/CCRenderCommandPool.h @@ -26,7 +26,6 @@ #ifndef __CC_RENDERCOMMANDPOOL_H__ #define __CC_RENDERCOMMANDPOOL_H__ -#include #include #include "base/CCPlatformMacros.h" diff --git a/cocos/renderer/CCTexture2D.h b/cocos/renderer/CCTexture2D.h index 9944c2b163..ad73a85465 100644 --- a/cocos/renderer/CCTexture2D.h +++ b/cocos/renderer/CCTexture2D.h @@ -29,7 +29,6 @@ THE SOFTWARE. #include #include -#include #include "base/CCRef.h" #include "math/CCGeometry.h" diff --git a/cocos/renderer/CCVertexIndexBuffer.cpp b/cocos/renderer/CCVertexIndexBuffer.cpp index a3cf1ac967..ff8285078e 100644 --- a/cocos/renderer/CCVertexIndexBuffer.cpp +++ b/cocos/renderer/CCVertexIndexBuffer.cpp @@ -26,6 +26,7 @@ #include "base/CCEventType.h" #include "base/CCEventListenerCustom.h" #include "base/CCEventDispatcher.h" +#include "base/CCDirector.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCVertexIndexBuffer.h b/cocos/renderer/CCVertexIndexBuffer.h index ebc21b1537..6454c17cd1 100644 --- a/cocos/renderer/CCVertexIndexBuffer.h +++ b/cocos/renderer/CCVertexIndexBuffer.h @@ -25,8 +25,9 @@ #ifndef __CC_VERTEX_INDEX_BUFFER_H__ #define __CC_VERTEX_INDEX_BUFFER_H__ +#include #include "base/CCRef.h" -#include "base/CCDirector.h" +#include "CCGL.h" NS_CC_BEGIN diff --git a/cocos/renderer/CCVertexIndexData.cpp b/cocos/renderer/CCVertexIndexData.cpp index 9e0e163d09..6faa54a2a7 100644 --- a/cocos/renderer/CCVertexIndexData.cpp +++ b/cocos/renderer/CCVertexIndexData.cpp @@ -24,7 +24,8 @@ #include "renderer/CCVertexIndexData.h" #include "renderer/ccGLStateCache.h" -#include "base/CCEventDispatcher.h" +#include "renderer/CCVertexIndexBuffer.h" + NS_CC_BEGIN VertexData* VertexData::create() diff --git a/cocos/renderer/CCVertexIndexData.h b/cocos/renderer/CCVertexIndexData.h index 7af66da4cc..300e1d9feb 100644 --- a/cocos/renderer/CCVertexIndexData.h +++ b/cocos/renderer/CCVertexIndexData.h @@ -26,8 +26,6 @@ #define __CC_VERTEX_INDEX_DATA_H__ #include "base/CCRef.h" -#include "renderer/CCVertexIndexBuffer.h" -#include "base/CCMap.h" #include NS_CC_BEGIN diff --git a/cocos/scripting/lua-bindings/auto/api/ActionManager.lua b/cocos/scripting/lua-bindings/auto/api/ActionManager.lua index 28013accad..8597ac46f3 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionManager.lua @@ -38,6 +38,11 @@ -- @param self -- @param #float float +-------------------------------- +-- @function [parent=#ActionManager] pauseTarget +-- @param self +-- @param #cc.Node node + -------------------------------- -- @function [parent=#ActionManager] getNumberOfRunningActionsInTarget -- @param self @@ -60,8 +65,9 @@ -- @param #cc.Action action -------------------------------- --- @function [parent=#ActionManager] pauseTarget +-- @function [parent=#ActionManager] removeAllActionsByTag -- @param self +-- @param #int int -- @param #cc.Node node -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index 78ed3e036e..e97163ead5 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -614,6 +614,11 @@ -- @param self -- @return size_table#size_table ret (return value: size_table) +-------------------------------- +-- @function [parent=#Node] stopAllActionsByTag +-- @param self +-- @param #int int + -------------------------------- -- @function [parent=#Node] getColor -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua index 5f7bcabe55..99551a8c83 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua @@ -2,8 +2,8 @@ -- @module cc -------------------------------------------------------- --- the cc Mesh --- @field [parent=#cc] Mesh#Mesh Mesh preloaded module +-- the cc Skeleton3D +-- @field [parent=#cc] Skeleton3D#Skeleton3D Skeleton3D preloaded module -------------------------------------------------------- @@ -12,8 +12,8 @@ -------------------------------------------------------- --- the cc Skeleton3D --- @field [parent=#cc] Skeleton3D#Skeleton3D Skeleton3D preloaded module +-- the cc Mesh +-- @field [parent=#cc] Mesh#Mesh Mesh preloaded module -------------------------------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua index 92622ff8ba..0d6497c878 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua @@ -11,16 +11,6 @@ -- @field [parent=#cc] Console#Console Console preloaded module --------------------------------------------------------- --- the cc Texture2D --- @field [parent=#cc] Texture2D#Texture2D Texture2D preloaded module - - --------------------------------------------------------- --- the cc Touch --- @field [parent=#cc] Touch#Touch Touch preloaded module - - -------------------------------------------------------- -- the cc Event -- @field [parent=#cc] Event#Event Event preloaded module @@ -31,36 +21,6 @@ -- @field [parent=#cc] EventTouch#EventTouch EventTouch preloaded module --------------------------------------------------------- --- the cc EventKeyboard --- @field [parent=#cc] EventKeyboard#EventKeyboard EventKeyboard preloaded module - - --------------------------------------------------------- --- the cc Node --- @field [parent=#cc] Node#Node Node preloaded module - - --------------------------------------------------------- --- the cc GLProgramState --- @field [parent=#cc] GLProgramState#GLProgramState GLProgramState preloaded module - - --------------------------------------------------------- --- the cc AtlasNode --- @field [parent=#cc] AtlasNode#AtlasNode AtlasNode preloaded module - - --------------------------------------------------------- --- the cc LabelAtlas --- @field [parent=#cc] LabelAtlas#LabelAtlas LabelAtlas preloaded module - - --------------------------------------------------------- --- the cc Scene --- @field [parent=#cc] Scene#Scene Scene preloaded module - - -------------------------------------------------------- -- the cc GLView -- @field [parent=#cc] GLView#GLView GLView preloaded module @@ -91,6 +51,26 @@ -- @field [parent=#cc] UserDefault#UserDefault UserDefault preloaded module +-------------------------------------------------------- +-- the cc Texture2D +-- @field [parent=#cc] Texture2D#Texture2D Texture2D preloaded module + + +-------------------------------------------------------- +-- the cc Touch +-- @field [parent=#cc] Touch#Touch Touch preloaded module + + +-------------------------------------------------------- +-- the cc EventKeyboard +-- @field [parent=#cc] EventKeyboard#EventKeyboard EventKeyboard preloaded module + + +-------------------------------------------------------- +-- the cc Node +-- @field [parent=#cc] Node#Node Node preloaded module + + -------------------------------------------------------- -- the cc Camera -- @field [parent=#cc] Camera#Camera Camera preloaded module @@ -746,14 +726,24 @@ -- @field [parent=#cc] CatmullRomBy#CatmullRomBy CatmullRomBy preloaded module +-------------------------------------------------------- +-- the cc GLProgramState +-- @field [parent=#cc] GLProgramState#GLProgramState GLProgramState preloaded module + + +-------------------------------------------------------- +-- the cc AtlasNode +-- @field [parent=#cc] AtlasNode#AtlasNode AtlasNode preloaded module + + -------------------------------------------------------- -- the cc DrawNode -- @field [parent=#cc] DrawNode#DrawNode DrawNode preloaded module -------------------------------------------------------- --- the cc GLProgram --- @field [parent=#cc] GLProgram#GLProgram GLProgram preloaded module +-- the cc LabelAtlas +-- @field [parent=#cc] LabelAtlas#LabelAtlas LabelAtlas preloaded module -------------------------------------------------------- @@ -786,6 +776,11 @@ -- @field [parent=#cc] LayerMultiplex#LayerMultiplex LayerMultiplex preloaded module +-------------------------------------------------------- +-- the cc Scene +-- @field [parent=#cc] Scene#Scene Scene preloaded module + + -------------------------------------------------------- -- the cc TransitionEaseScene -- @field [parent=#cc] TransitionEaseScene#TransitionEaseScene TransitionEaseScene preloaded module @@ -1022,13 +1017,13 @@ -------------------------------------------------------- --- the cc Sprite --- @field [parent=#cc] Sprite#Sprite Sprite preloaded module +-- the cc ProgressTimer +-- @field [parent=#cc] ProgressTimer#ProgressTimer ProgressTimer preloaded module -------------------------------------------------------- --- the cc ProgressTimer --- @field [parent=#cc] ProgressTimer#ProgressTimer ProgressTimer preloaded module +-- the cc Sprite +-- @field [parent=#cc] Sprite#Sprite Sprite preloaded module -------------------------------------------------------- @@ -1131,6 +1126,11 @@ -- @field [parent=#cc] TiledGrid3D#TiledGrid3D TiledGrid3D preloaded module +-------------------------------------------------------- +-- the cc GLProgram +-- @field [parent=#cc] GLProgram#GLProgram GLProgram preloaded module + + -------------------------------------------------------- -- the cc GLProgramCache -- @field [parent=#cc] GLProgramCache#GLProgramCache GLProgramCache preloaded module diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 08c7fc576c..77190063f7 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -5,6 +5,987 @@ +int lua_cocos2dx_3d_Skeleton3D_getBoneByName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByName"); + if(!ok) + return 0; + cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getRootBone(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Skeleton3D:getRootBone"); + if(!ok) + return 0; + cocos2d::Bone3D* ret = cobj->getRootBone(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootBone",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateBoneMatrix(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:updateBoneMatrix",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getBoneByIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned int arg0; + + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByIndex"); + if(!ok) + return 0; + cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getRootCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getRootCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getBoneIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Bone3D* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); + if(!ok) + return 0; + int ret = cobj->getBoneIndex(arg0); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getBoneCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getBoneCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_3d_Skeleton3D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Skeleton3D)"); + return 0; +} + +int lua_register_cocos2dx_3d_Skeleton3D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Skeleton3D"); + tolua_cclass(tolua_S,"Skeleton3D","cc.Skeleton3D","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Skeleton3D"); + tolua_function(tolua_S,"getBoneByName",lua_cocos2dx_3d_Skeleton3D_getBoneByName); + tolua_function(tolua_S,"getRootBone",lua_cocos2dx_3d_Skeleton3D_getRootBone); + tolua_function(tolua_S,"updateBoneMatrix",lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix); + tolua_function(tolua_S,"getBoneByIndex",lua_cocos2dx_3d_Skeleton3D_getBoneByIndex); + tolua_function(tolua_S,"getRootCount",lua_cocos2dx_3d_Skeleton3D_getRootCount); + tolua_function(tolua_S,"getBoneIndex",lua_cocos2dx_3d_Skeleton3D_getBoneIndex); + tolua_function(tolua_S,"getBoneCount",lua_cocos2dx_3d_Skeleton3D_getBoneCount); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Skeleton3D).name(); + g_luaType[typeName] = "cc.Skeleton3D"; + g_typeCast["Skeleton3D"] = "cc.Skeleton3D"; + return 1; +} + +int lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFaceEnabled"); + if(!ok) + return 0; + cobj->setCullFaceEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFaceEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setTexture'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + + if (!ok) { break; } + cobj->setTexture(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:setTexture"); + + if (!ok) { break; } + cobj->setTexture(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setTexture",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_removeAllAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->removeAllAttachNode(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAllAttachNode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::BlendFunc arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; + if(!ok) + return 0; + cobj->setBlendFunc(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setBlendFunc",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMesh(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMesh'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Mesh* ret = cobj->getMesh(); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMesh",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMesh'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getBlendFunc(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + blendfunc_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getBlendFunc",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setCullFace(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned int arg0; + + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFace"); + if(!ok) + return 0; + cobj->setCullFace(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_removeAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:removeAttachNode"); + if(!ok) + return 0; + cobj->removeAttachNode(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAttachNode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMeshByIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Sprite3D:getMeshByIndex"); + if(!ok) + return 0; + cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMeshByName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getMeshByName"); + if(!ok) + return 0; + cocos2d::Mesh* ret = cobj->getMeshByName(arg0); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getSkeleton(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Skeleton3D* ret = cobj->getSkeleton(); + object_to_luaval(tolua_S, "cc.Skeleton3D",(cocos2d::Skeleton3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getSkeleton",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getAttachNode"); + if(!ok) + return 0; + cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); + object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getAttachNode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_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,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Sprite3D:create"); + if (!ok) { break; } + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); + if (!ok) { break; } + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); + object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + return 1; + } + } while (0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_3d_Sprite3D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Sprite3D)"); + return 0; +} + +int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Sprite3D"); + tolua_cclass(tolua_S,"Sprite3D","cc.Sprite3D","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"Sprite3D"); + tolua_function(tolua_S,"setCullFaceEnabled",lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled); + tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Sprite3D_setTexture); + tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_Sprite3D_removeAllAttachNode); + tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Sprite3D_setBlendFunc); + tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_Sprite3D_getMesh); + tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Sprite3D_getBlendFunc); + tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_Sprite3D_setCullFace); + tolua_function(tolua_S,"removeAttachNode",lua_cocos2dx_3d_Sprite3D_removeAttachNode); + tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_Sprite3D_getMeshByIndex); + tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_Sprite3D_getMeshByName); + tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_3d_Sprite3D_getSkeleton); + tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_Sprite3D_getAttachNode); + tolua_function(tolua_S,"create", lua_cocos2dx_3d_Sprite3D_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Sprite3D).name(); + g_luaType[typeName] = "cc.Sprite3D"; + g_typeCast["Sprite3D"] = "cc.Sprite3D"; + return 1; +} + int lua_cocos2dx_3d_Mesh_getMeshVertexAttribCount(lua_State* tolua_S) { int argc = 0; @@ -898,987 +1879,6 @@ int lua_register_cocos2dx_3d_Mesh(lua_State* tolua_S) return 1; } -int lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFaceEnabled"); - if(!ok) - return 0; - cobj->setCullFaceEnabled(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFaceEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - - if (!ok) { break; } - cobj->setTexture(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:setTexture"); - - if (!ok) { break; } - cobj->setTexture(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_removeAllAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->removeAllAttachNode(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAllAttachNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::BlendFunc arg0; - - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; - if(!ok) - return 0; - cobj->setBlendFunc(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setBlendFunc",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMesh(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMesh'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMesh(); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMesh",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMesh'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setCullFace(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFace"); - if(!ok) - return 0; - cobj->setCullFace(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_removeAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:removeAttachNode"); - if(!ok) - return 0; - cobj->removeAttachNode(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMeshByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Sprite3D:getMeshByIndex"); - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMeshByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getMeshByName"); - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMeshByName(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getSkeleton(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Skeleton3D* ret = cobj->getSkeleton(); - object_to_luaval(tolua_S, "cc.Skeleton3D",(cocos2d::Skeleton3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getSkeleton",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getAttachNode"); - if(!ok) - return 0; - cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); - object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_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,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Sprite3D:create"); - if (!ok) { break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); - if (!ok) { break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); - return 1; - } - } while (0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_3d_Sprite3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Sprite3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Sprite3D"); - tolua_cclass(tolua_S,"Sprite3D","cc.Sprite3D","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"Sprite3D"); - tolua_function(tolua_S,"setCullFaceEnabled",lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Sprite3D_setTexture); - tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_Sprite3D_removeAllAttachNode); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Sprite3D_setBlendFunc); - tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_Sprite3D_getMesh); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Sprite3D_getBlendFunc); - tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_Sprite3D_setCullFace); - tolua_function(tolua_S,"removeAttachNode",lua_cocos2dx_3d_Sprite3D_removeAttachNode); - tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_Sprite3D_getMeshByIndex); - tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_Sprite3D_getMeshByName); - tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_3d_Sprite3D_getSkeleton); - tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_Sprite3D_getAttachNode); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_Sprite3D_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Sprite3D).name(); - g_luaType[typeName] = "cc.Sprite3D"; - g_typeCast["Sprite3D"] = "cc.Sprite3D"; - return 1; -} - -int lua_cocos2dx_3d_Skeleton3D_getBoneByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByName"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getRootBone(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Skeleton3D:getRootBone"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getRootBone(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootBone",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateBoneMatrix(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:updateBoneMatrix",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByIndex"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getRootCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getRootCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Bone3D* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); - if(!ok) - return 0; - int ret = cobj->getBoneIndex(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getBoneCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_3d_Skeleton3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Skeleton3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Skeleton3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Skeleton3D"); - tolua_cclass(tolua_S,"Skeleton3D","cc.Skeleton3D","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Skeleton3D"); - tolua_function(tolua_S,"getBoneByName",lua_cocos2dx_3d_Skeleton3D_getBoneByName); - tolua_function(tolua_S,"getRootBone",lua_cocos2dx_3d_Skeleton3D_getRootBone); - tolua_function(tolua_S,"updateBoneMatrix",lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix); - tolua_function(tolua_S,"getBoneByIndex",lua_cocos2dx_3d_Skeleton3D_getBoneByIndex); - tolua_function(tolua_S,"getRootCount",lua_cocos2dx_3d_Skeleton3D_getRootCount); - tolua_function(tolua_S,"getBoneIndex",lua_cocos2dx_3d_Skeleton3D_getBoneIndex); - tolua_function(tolua_S,"getBoneCount",lua_cocos2dx_3d_Skeleton3D_getBoneCount); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Skeleton3D).name(); - g_luaType[typeName] = "cc.Skeleton3D"; - g_typeCast["Skeleton3D"] = "cc.Skeleton3D"; - return 1; -} - int lua_cocos2dx_3d_Animation3D_getDuration(lua_State* tolua_S) { int argc = 0; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 02ae6b060a..9e956b5000 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -364,1852 +364,6 @@ int lua_register_cocos2dx_Console(lua_State* tolua_S) return 1; } -int lua_cocos2dx_Texture2D_getMaxT(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getMaxT'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getMaxT(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getMaxT",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getMaxT'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getStringForFormat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getStringForFormat'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const char* ret = cobj->getStringForFormat(); - tolua_pushstring(tolua_S,(const char*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getStringForFormat",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getStringForFormat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_initWithImage(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_initWithImage'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - cocos2d::Image* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); - - if (!ok) { break; } - cocos2d::Texture2D::PixelFormat arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Texture2D:initWithImage"); - - if (!ok) { break; } - bool ret = cobj->initWithImage(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Image* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); - - if (!ok) { break; } - bool ret = cobj->initWithImage(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:initWithImage",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_initWithImage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getMaxS(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getMaxS'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getMaxS(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getMaxS",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getMaxS'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_releaseGLTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_releaseGLTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->releaseGLTexture(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:releaseGLTexture",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_releaseGLTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_hasPremultipliedAlpha(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_hasPremultipliedAlpha'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->hasPremultipliedAlpha(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:hasPremultipliedAlpha",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_hasPremultipliedAlpha'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getPixelsHigh(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelsHigh'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getPixelsHigh(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelsHigh",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelsHigh'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getBitsPerPixelForFormat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getBitsPerPixelForFormat'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Texture2D::PixelFormat arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Texture2D:getBitsPerPixelForFormat"); - - if (!ok) { break; } - unsigned int ret = cobj->getBitsPerPixelForFormat(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - unsigned int ret = cobj->getBitsPerPixelForFormat(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getBitsPerPixelForFormat",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getBitsPerPixelForFormat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned int ret = cobj->getName(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getName",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_initWithString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_initWithString'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - cocos2d::FontDefinition arg1; - ok &= luaval_to_fontdefinition(tolua_S, 3, &arg1, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 4) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::Size arg3; - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 5) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::Size arg3; - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::TextHAlignment arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 6) { - const char* arg0; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - double arg2; - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::Size arg3; - ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::TextHAlignment arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - cocos2d::TextVAlignment arg5; - ok &= luaval_to_int32(tolua_S, 7,(int *)&arg5, "cc.Texture2D:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4, arg5); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:initWithString",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_initWithString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setMaxT(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setMaxT'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Texture2D:setMaxT"); - if(!ok) - return 0; - cobj->setMaxT(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setMaxT",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setMaxT'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_drawInRect(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_drawInRect'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Rect arg0; - - ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Texture2D:drawInRect"); - if(!ok) - return 0; - cobj->drawInRect(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:drawInRect",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_drawInRect'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getContentSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getContentSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Size ret = cobj->getContentSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getContentSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getContentSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setAliasTexParameters(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setAliasTexParameters'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->setAliasTexParameters(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setAliasTexParameters",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setAliasTexParameters'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setAntiAliasTexParameters(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setAntiAliasTexParameters'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->setAntiAliasTexParameters(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setAntiAliasTexParameters",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setAntiAliasTexParameters'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_generateMipmap(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_generateMipmap'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->generateMipmap(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:generateMipmap",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_generateMipmap'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getDescription(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getDescription'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getDescription(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getDescription",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getDescription'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getPixelFormat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelFormat'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = (int)cobj->getPixelFormat(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelFormat",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelFormat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgram* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cobj->setGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getContentSizeInPixels(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getContentSizeInPixels'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Size& ret = cobj->getContentSizeInPixels(); - size_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getContentSizeInPixels",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getContentSizeInPixels'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getPixelsWide(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelsWide'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getPixelsWide(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelsWide",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelsWide'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_drawAtPoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_drawAtPoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Texture2D:drawAtPoint"); - if(!ok) - return 0; - cobj->drawAtPoint(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:drawAtPoint",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_drawAtPoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_getGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::GLProgram* ret = cobj->getGLProgram(); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getGLProgram",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_hasMipmaps(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_hasMipmaps'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->hasMipmaps(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:hasMipmaps",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_hasMipmaps'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setMaxS(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setMaxS'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Texture2D:setMaxS"); - if(!ok) - return 0; - cobj->setMaxS(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setMaxS",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setMaxS'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat(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,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::Texture2D::PixelFormat arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Texture2D:setDefaultAlphaPixelFormat"); - if(!ok) - return 0; - cocos2d::Texture2D::setDefaultAlphaPixelFormat(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Texture2D:setDefaultAlphaPixelFormat",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat(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,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - return 0; - int ret = (int)cocos2d::Texture2D::getDefaultAlphaPixelFormat(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Texture2D:getDefaultAlphaPixelFormat",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Texture2D_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Texture2D* 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::Texture2D(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Texture2D"); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:Texture2D",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Texture2D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Texture2D)"); - return 0; -} - -int lua_register_cocos2dx_Texture2D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Texture2D"); - tolua_cclass(tolua_S,"Texture2D","cc.Texture2D","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Texture2D"); - tolua_function(tolua_S,"new",lua_cocos2dx_Texture2D_constructor); - tolua_function(tolua_S,"getMaxT",lua_cocos2dx_Texture2D_getMaxT); - tolua_function(tolua_S,"getStringForFormat",lua_cocos2dx_Texture2D_getStringForFormat); - tolua_function(tolua_S,"initWithImage",lua_cocos2dx_Texture2D_initWithImage); - tolua_function(tolua_S,"getMaxS",lua_cocos2dx_Texture2D_getMaxS); - tolua_function(tolua_S,"releaseGLTexture",lua_cocos2dx_Texture2D_releaseGLTexture); - tolua_function(tolua_S,"hasPremultipliedAlpha",lua_cocos2dx_Texture2D_hasPremultipliedAlpha); - tolua_function(tolua_S,"getPixelsHigh",lua_cocos2dx_Texture2D_getPixelsHigh); - tolua_function(tolua_S,"getBitsPerPixelForFormat",lua_cocos2dx_Texture2D_getBitsPerPixelForFormat); - tolua_function(tolua_S,"getName",lua_cocos2dx_Texture2D_getName); - tolua_function(tolua_S,"initWithString",lua_cocos2dx_Texture2D_initWithString); - tolua_function(tolua_S,"setMaxT",lua_cocos2dx_Texture2D_setMaxT); - tolua_function(tolua_S,"drawInRect",lua_cocos2dx_Texture2D_drawInRect); - tolua_function(tolua_S,"getContentSize",lua_cocos2dx_Texture2D_getContentSize); - tolua_function(tolua_S,"setAliasTexParameters",lua_cocos2dx_Texture2D_setAliasTexParameters); - tolua_function(tolua_S,"setAntiAliasTexParameters",lua_cocos2dx_Texture2D_setAntiAliasTexParameters); - tolua_function(tolua_S,"generateMipmap",lua_cocos2dx_Texture2D_generateMipmap); - tolua_function(tolua_S,"getDescription",lua_cocos2dx_Texture2D_getDescription); - tolua_function(tolua_S,"getPixelFormat",lua_cocos2dx_Texture2D_getPixelFormat); - tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Texture2D_setGLProgram); - tolua_function(tolua_S,"getContentSizeInPixels",lua_cocos2dx_Texture2D_getContentSizeInPixels); - tolua_function(tolua_S,"getPixelsWide",lua_cocos2dx_Texture2D_getPixelsWide); - tolua_function(tolua_S,"drawAtPoint",lua_cocos2dx_Texture2D_drawAtPoint); - tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Texture2D_getGLProgram); - tolua_function(tolua_S,"hasMipmaps",lua_cocos2dx_Texture2D_hasMipmaps); - tolua_function(tolua_S,"setMaxS",lua_cocos2dx_Texture2D_setMaxS); - tolua_function(tolua_S,"setDefaultAlphaPixelFormat", lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat); - tolua_function(tolua_S,"getDefaultAlphaPixelFormat", lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Texture2D).name(); - g_luaType[typeName] = "cc.Texture2D"; - g_typeCast["Texture2D"] = "cc.Texture2D"; - return 1; -} - -int lua_cocos2dx_Touch_getPreviousLocationInView(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getPreviousLocationInView'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getPreviousLocationInView(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getPreviousLocationInView",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getPreviousLocationInView'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getLocation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getLocation(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getLocation",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getLocation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getDelta(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getDelta'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getDelta(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getDelta",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getDelta'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getStartLocationInView(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getStartLocationInView'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getStartLocationInView(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getStartLocationInView",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getStartLocationInView'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getStartLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getStartLocation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getStartLocation(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getStartLocation",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getStartLocation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getID(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getID'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getID(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getID",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getID'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_setTouchInfo(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_setTouchInfo'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - int arg0; - double arg1; - double arg2; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Touch:setTouchInfo"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Touch:setTouchInfo"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Touch:setTouchInfo"); - if(!ok) - return 0; - cobj->setTouchInfo(arg0, arg1, arg2); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:setTouchInfo",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_setTouchInfo'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getLocationInView(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getLocationInView'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getLocationInView(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getLocationInView",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getLocationInView'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_getPreviousLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getPreviousLocation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getPreviousLocation(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getPreviousLocation",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getPreviousLocation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Touch_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Touch* 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::Touch(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Touch"); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:Touch",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_Touch_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Touch)"); - return 0; -} - -int lua_register_cocos2dx_Touch(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Touch"); - tolua_cclass(tolua_S,"Touch","cc.Touch","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Touch"); - tolua_function(tolua_S,"new",lua_cocos2dx_Touch_constructor); - tolua_function(tolua_S,"getPreviousLocationInView",lua_cocos2dx_Touch_getPreviousLocationInView); - tolua_function(tolua_S,"getLocation",lua_cocos2dx_Touch_getLocation); - tolua_function(tolua_S,"getDelta",lua_cocos2dx_Touch_getDelta); - tolua_function(tolua_S,"getStartLocationInView",lua_cocos2dx_Touch_getStartLocationInView); - tolua_function(tolua_S,"getStartLocation",lua_cocos2dx_Touch_getStartLocation); - tolua_function(tolua_S,"getId",lua_cocos2dx_Touch_getID); - tolua_function(tolua_S,"setTouchInfo",lua_cocos2dx_Touch_setTouchInfo); - tolua_function(tolua_S,"getLocationInView",lua_cocos2dx_Touch_getLocationInView); - tolua_function(tolua_S,"getPreviousLocation",lua_cocos2dx_Touch_getPreviousLocation); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Touch).name(); - g_luaType[typeName] = "cc.Touch"; - g_typeCast["Touch"] = "cc.Touch"; - return 1; -} - int lua_cocos2dx_Event_isStopped(lua_State* tolua_S) { int argc = 0; @@ -2554,8325 +708,6 @@ int lua_register_cocos2dx_EventTouch(lua_State* tolua_S) return 1; } -int lua_cocos2dx_EventKeyboard_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::EventKeyboard* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::EventKeyboard::KeyCode arg0; - bool arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.EventKeyboard:EventKeyboard"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.EventKeyboard:EventKeyboard"); - if(!ok) - return 0; - cobj = new cocos2d::EventKeyboard(arg0, arg1); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventKeyboard"); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventKeyboard:EventKeyboard",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventKeyboard_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_EventKeyboard_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (EventKeyboard)"); - return 0; -} - -int lua_register_cocos2dx_EventKeyboard(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.EventKeyboard"); - tolua_cclass(tolua_S,"EventKeyboard","cc.EventKeyboard","cc.Event",nullptr); - - tolua_beginmodule(tolua_S,"EventKeyboard"); - tolua_function(tolua_S,"new",lua_cocos2dx_EventKeyboard_constructor); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::EventKeyboard).name(); - g_luaType[typeName] = "cc.EventKeyboard"; - g_typeCast["EventKeyboard"] = "cc.EventKeyboard"; - return 1; -} - -int lua_cocos2dx_Node_addChild(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_addChild'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Node:addChild"); - - if (!ok) { break; } - cobj->addChild(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - if (!ok) { break; } - cobj->addChild(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Node:addChild"); - - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.Node:addChild"); - - if (!ok) { break; } - cobj->addChild(arg0, arg1, arg2); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - cocos2d::Node* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Node:addChild"); - - if (!ok) { break; } - std::string arg2; - ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.Node:addChild"); - - if (!ok) { break; } - cobj->addChild(arg0, arg1, arg2); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:addChild",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_addChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeComponent(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeComponent'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Component* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0); - - if (!ok) { break; } - bool ret = cobj->removeComponent(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:removeComponent"); - - if (!ok) { break; } - bool ret = cobj->removeComponent(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeComponent",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeComponent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPhysicsBody(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPhysicsBody'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::PhysicsBody* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); - if(!ok) - return 0; - cobj->setPhysicsBody(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPhysicsBody",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPhysicsBody'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getDescription(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getDescription'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getDescription(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDescription",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDescription'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setRotationSkewY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setRotationSkewY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotationSkewY"); - if(!ok) - return 0; - cobj->setRotationSkewY(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotationSkewY",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotationSkewY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setOpacityModifyRGB(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setOpacityModifyRGB'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setOpacityModifyRGB"); - if(!ok) - return 0; - cobj->setOpacityModifyRGB(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOpacityModifyRGB",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOpacityModifyRGB'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setCascadeOpacityEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setCascadeOpacityEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setCascadeOpacityEnabled"); - if(!ok) - return 0; - cobj->setCascadeOpacityEnabled(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCascadeOpacityEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCascadeOpacityEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getChildren(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getChildren'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - const cocos2d::Vector& ret = cobj->getChildren(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cocos2d::Vector& ret = cobj->getChildren(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildren",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildren'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setOnExitCallback(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setOnExitCallback'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::function arg0; - - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; - if(!ok) - return 0; - cobj->setOnExitCallback(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOnExitCallback",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOnExitCallback'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_pause(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_pause'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->pause(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:pause",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_pause'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertToWorldSpaceAR(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertToWorldSpaceAR'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:convertToWorldSpaceAR"); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertToWorldSpaceAR(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToWorldSpaceAR",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToWorldSpaceAR'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isIgnoreAnchorPointForPosition(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isIgnoreAnchorPointForPosition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isIgnoreAnchorPointForPosition(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isIgnoreAnchorPointForPosition",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isIgnoreAnchorPointForPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getChildByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getChildByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:getChildByName"); - if(!ok) - return 0; - cocos2d::Node* ret = cobj->getChildByName(arg0); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_updateDisplayedOpacity(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_updateDisplayedOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - uint16_t arg0; - - ok &= luaval_to_uint16(tolua_S, 2,&arg0, "cc.Node:updateDisplayedOpacity"); - if(!ok) - return 0; - cobj->updateDisplayedOpacity(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateDisplayedOpacity",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateDisplayedOpacity'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getCameraMask(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getCameraMask'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned short ret = cobj->getCameraMask(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getCameraMask",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getCameraMask'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setRotation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setRotation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotation"); - if(!ok) - return 0; - cobj->setRotation(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotation",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setScaleZ(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setScaleZ'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleZ"); - if(!ok) - return 0; - cobj->setScaleZ(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleZ",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleZ'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setScaleY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setScaleY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleY"); - if(!ok) - return 0; - cobj->setScaleY(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleY",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setScaleX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setScaleX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleX"); - if(!ok) - return 0; - cobj->setScaleX(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleX",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setRotationSkewX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setRotationSkewX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotationSkewX"); - if(!ok) - return 0; - cobj->setRotationSkewX(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotationSkewX",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotationSkewX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::function arg0; - - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; - if(!ok) - return 0; - cobj->setonEnterTransitionDidFinishCallback(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setonEnterTransitionDidFinishCallback",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeAllComponents(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeAllComponents'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->removeAllComponents(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeAllComponents",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeAllComponents'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node__setLocalZOrder(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node__setLocalZOrder'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:_setLocalZOrder"); - if(!ok) - return 0; - cobj->_setLocalZOrder(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:_setLocalZOrder",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node__setLocalZOrder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setCameraMask(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setCameraMask'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned short arg0; - - ok &= luaval_to_ushort(tolua_S, 2, &arg0, "cc.Node:setCameraMask"); - if(!ok) - return 0; - cobj->setCameraMask(arg0); - return 0; - } - if (argc == 2) - { - unsigned short arg0; - bool arg1; - - ok &= luaval_to_ushort(tolua_S, 2, &arg0, "cc.Node:setCameraMask"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:setCameraMask"); - if(!ok) - return 0; - cobj->setCameraMask(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCameraMask",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCameraMask'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getTag(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getTag",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::GLProgram* ret = cobj->getGLProgram(); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGLProgram",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNodeToWorldTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToWorldTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Mat4 ret = cobj->getNodeToWorldTransform(); - mat4_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToWorldTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToWorldTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getPosition3D(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPosition3D'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec3 ret = cobj->getPosition3D(); - vec3_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPosition3D",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPosition3D'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeChild(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeChild'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - return 0; - cobj->removeChild(arg0); - return 0; - } - if (argc == 2) - { - cocos2d::Node* arg0; - bool arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChild"); - if(!ok) - return 0; - cobj->removeChild(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChild",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertToWorldSpace(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertToWorldSpace'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:convertToWorldSpace"); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertToWorldSpace(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToWorldSpace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToWorldSpace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScene(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScene'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Scene* ret = cobj->getScene(); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScene",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScene'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getEventDispatcher(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getEventDispatcher'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::EventDispatcher* ret = cobj->getEventDispatcher(); - object_to_luaval(tolua_S, "cc.EventDispatcher",(cocos2d::EventDispatcher*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getEventDispatcher",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getEventDispatcher'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setSkewX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setSkewX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setSkewX"); - if(!ok) - return 0; - cobj->setSkewX(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setSkewX",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setSkewX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setGLProgramState(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGLProgramState'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgramState* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgramState",&arg0); - if(!ok) - return 0; - cobj->setGLProgramState(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgramState",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgramState'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setOnEnterCallback(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setOnEnterCallback'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::function arg0; - - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; - if(!ok) - return 0; - cobj->setOnEnterCallback(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOnEnterCallback",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOnEnterCallback'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getOpacity(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - uint16_t ret = cobj->getOpacity(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOpacity",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOpacity'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setNormalizedPosition(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setNormalizedPosition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:setNormalizedPosition"); - if(!ok) - return 0; - cobj->setNormalizedPosition(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setNormalizedPosition",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setNormalizedPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setonExitTransitionDidStartCallback(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setonExitTransitionDidStartCallback'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::function arg0; - - do { - // Lambda binding for lua is not supported. - assert(false); - } while(0) - ; - if(!ok) - return 0; - cobj->setonExitTransitionDidStartCallback(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setonExitTransitionDidStartCallback",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setonExitTransitionDidStartCallback'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertTouchToNodeSpace(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertTouchToNodeSpace'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Touch* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertTouchToNodeSpace(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertTouchToNodeSpace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertTouchToNodeSpace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeAllChildrenWithCleanup(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeAllChildrenWithCleanup'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:removeAllChildrenWithCleanup"); - - if (!ok) { break; } - cobj->removeAllChildrenWithCleanup(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cobj->removeAllChildren(); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeAllChildren",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeAllChildrenWithCleanup'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNodeToParentAffineTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToParentAffineTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform(); - affinetransform_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentAffineTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToParentAffineTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isCascadeOpacityEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isCascadeOpacityEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isCascadeOpacityEnabled(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isCascadeOpacityEnabled",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isCascadeOpacityEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setParent(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setParent'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - return 0; - cobj->setParent(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setParent",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setParent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getName(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getName",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getRotation3D(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getRotation3D'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec3 ret = cobj->getRotation3D(); - vec3_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotation3D",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotation3D'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNodeToParentTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToParentTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Mat4& ret = cobj->getNodeToParentTransform(); - mat4_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToParentTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertTouchToNodeSpaceAR(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertTouchToNodeSpaceAR'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Touch* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertTouchToNodeSpaceAR(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertTouchToNodeSpaceAR",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertTouchToNodeSpaceAR'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertToNodeSpace(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertToNodeSpace'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:convertToNodeSpace"); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertToNodeSpace(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToNodeSpace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToNodeSpace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_resume(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_resume'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->resume(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:resume",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_resume'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getPhysicsBody(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPhysicsBody'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::PhysicsBody* ret = cobj->getPhysicsBody(); - object_to_luaval(tolua_S, "cc.PhysicsBody",(cocos2d::PhysicsBody*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPhysicsBody",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPhysicsBody'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPosition(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPosition'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPosition"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Node:setPosition"); - - if (!ok) { break; } - cobj->setPosition(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Vec2 arg0; - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:setPosition"); - - if (!ok) { break; } - cobj->setPosition(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPosition",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_stopActionByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_stopActionByTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:stopActionByTag"); - if(!ok) - return 0; - cobj->stopActionByTag(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopActionByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopActionByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_reorderChild(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_reorderChild'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Node* arg0; - int arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Node:reorderChild"); - if(!ok) - return 0; - cobj->reorderChild(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:reorderChild",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_reorderChild'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_ignoreAnchorPointForPosition(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_ignoreAnchorPointForPosition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:ignoreAnchorPointForPosition"); - if(!ok) - return 0; - cobj->ignoreAnchorPointForPosition(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:ignoreAnchorPointForPosition",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_ignoreAnchorPointForPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setSkewY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setSkewY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setSkewY"); - if(!ok) - return 0; - cobj->setSkewY(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setSkewY",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setSkewY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPositionZ(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPositionZ'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionZ"); - if(!ok) - return 0; - cobj->setPositionZ(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionZ",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionZ'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setRotation3D(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setRotation3D'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec3 arg0; - - ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Node:setRotation3D"); - if(!ok) - return 0; - cobj->setRotation3D(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotation3D",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotation3D'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPositionX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPositionX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionX"); - if(!ok) - return 0; - cobj->setPositionX(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionX",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setNodeToParentTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setNodeToParentTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Mat4 arg0; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Node:setNodeToParentTransform"); - if(!ok) - return 0; - cobj->setNodeToParentTransform(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setNodeToParentTransform",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setNodeToParentTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getAnchorPoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getAnchorPoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Vec2& ret = cobj->getAnchorPoint(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getAnchorPoint",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getAnchorPoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNumberOfRunningActions(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNumberOfRunningActions'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getNumberOfRunningActions(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNumberOfRunningActions",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNumberOfRunningActions'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_updateTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_updateTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateTransform(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgram* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cobj->setGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isVisible(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isVisible'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isVisible(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isVisible",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isVisible'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getChildrenCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getChildrenCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getChildrenCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildrenCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildrenCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_convertToNodeSpaceAR(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertToNodeSpaceAR'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:convertToNodeSpaceAR"); - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->convertToNodeSpaceAR(arg0); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToNodeSpaceAR",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToNodeSpaceAR'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_addComponent(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_addComponent'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Component* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0); - if(!ok) - return 0; - bool ret = cobj->addComponent(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:addComponent",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_addComponent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_runAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_runAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Action* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); - if(!ok) - return 0; - cocos2d::Action* ret = cobj->runAction(arg0); - object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:runAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_runAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isOpacityModifyRGB(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isOpacityModifyRGB'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isOpacityModifyRGB(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isOpacityModifyRGB",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isOpacityModifyRGB'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getRotation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getRotation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getRotation(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotation",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getAnchorPointInPoints(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getAnchorPointInPoints'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Vec2& ret = cobj->getAnchorPointInPoints(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getAnchorPointInPoints",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getAnchorPointInPoints'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_visit(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_visit'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - cobj->visit(); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - cocos2d::Renderer* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); - - if (!ok) { break; } - cocos2d::Mat4 arg1; - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Node:visit"); - - if (!ok) { break; } - unsigned int arg2; - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.Node:visit"); - - if (!ok) { break; } - cobj->visit(arg0, arg1, arg2); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:visit",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_visit'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeChildByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeChildByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:removeChildByName"); - if(!ok) - return 0; - cobj->removeChildByName(arg0); - return 0; - } - if (argc == 2) - { - std::string arg0; - bool arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:removeChildByName"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChildByName"); - if(!ok) - return 0; - cobj->removeChildByName(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChildByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChildByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getGLProgramState(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getGLProgramState'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cobj->getGLProgramState(); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGLProgramState",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGLProgramState'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setScheduler(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setScheduler'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Scheduler* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Scheduler",&arg0); - if(!ok) - return 0; - cobj->setScheduler(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScheduler",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScheduler'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_stopAllActions(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_stopAllActions'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->stopAllActions(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAllActions",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAllActions'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getSkewX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getSkewX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getSkewX(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getSkewX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getSkewX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getSkewY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getSkewY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getSkewY(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getSkewY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getSkewY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getDisplayedColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getDisplayedColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Color3B& ret = cobj->getDisplayedColor(); - color3b_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDisplayedColor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDisplayedColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getActionByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getActionByTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:getActionByTag"); - if(!ok) - return 0; - cocos2d::Action* ret = cobj->getActionByTag(arg0); - object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getActionByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getActionByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:setName"); - if(!ok) - return 0; - cobj->setName(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setAdditionalTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setAdditionalTransform'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::AffineTransform arg0; - ok &= luaval_to_affinetransform(tolua_S, 2, &arg0, "cc.Node:setAdditionalTransform"); - - if (!ok) { break; } - cobj->setAdditionalTransform(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Mat4* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Mat4",&arg0); - - if (!ok) { break; } - cobj->setAdditionalTransform(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setAdditionalTransform",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setAdditionalTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getDisplayedOpacity(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getDisplayedOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - uint16_t ret = cobj->getDisplayedOpacity(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDisplayedOpacity",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDisplayedOpacity'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getLocalZOrder(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getLocalZOrder'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getLocalZOrder(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getLocalZOrder",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getLocalZOrder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScheduler(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScheduler'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - const cocos2d::Scheduler* ret = cobj->getScheduler(); - object_to_luaval(tolua_S, "cc.Scheduler",(cocos2d::Scheduler*)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cocos2d::Scheduler* ret = cobj->getScheduler(); - object_to_luaval(tolua_S, "cc.Scheduler",(cocos2d::Scheduler*)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScheduler",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScheduler'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getParentToNodeAffineTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getParentToNodeAffineTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::AffineTransform ret = cobj->getParentToNodeAffineTransform(); - affinetransform_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParentToNodeAffineTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParentToNodeAffineTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getOrderOfArrival(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOrderOfArrival'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = cobj->getOrderOfArrival(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOrderOfArrival",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOrderOfArrival'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setActionManager(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setActionManager'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ActionManager* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.ActionManager",&arg0); - if(!ok) - return 0; - cobj->setActionManager(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setActionManager",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setActionManager'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Color3B arg0; - - ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.Node:setColor"); - if(!ok) - return 0; - cobj->setColor(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setColor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isRunning(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isRunning'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isRunning(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isRunning",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isRunning'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getParent(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getParent'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - const cocos2d::Node* ret = cobj->getParent(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cocos2d::Node* ret = cobj->getParent(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParent",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getPositionZ(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPositionZ'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getPositionZ(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionZ",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionZ'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getPositionY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPositionY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getPositionY(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getPositionX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPositionX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getPositionX(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeChildByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeChildByTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:removeChildByTag"); - if(!ok) - return 0; - cobj->removeChildByTag(arg0); - return 0; - } - if (argc == 2) - { - int arg0; - bool arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:removeChildByTag"); - - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChildByTag"); - if(!ok) - return 0; - cobj->removeChildByTag(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChildByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChildByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPositionY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPositionY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionY"); - if(!ok) - return 0; - cobj->setPositionY(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionY",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNodeToWorldAffineTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToWorldAffineTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::AffineTransform ret = cobj->getNodeToWorldAffineTransform(); - affinetransform_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToWorldAffineTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToWorldAffineTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_updateDisplayedColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_updateDisplayedColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Color3B arg0; - - ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.Node:updateDisplayedColor"); - if(!ok) - return 0; - cobj->updateDisplayedColor(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateDisplayedColor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateDisplayedColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setVisible(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setVisible'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setVisible"); - if(!ok) - return 0; - cobj->setVisible(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setVisible",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setVisible'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getParentToNodeTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getParentToNodeTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Mat4& ret = cobj->getParentToNodeTransform(); - mat4_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParentToNodeTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParentToNodeTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setGlobalZOrder(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGlobalZOrder'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setGlobalZOrder"); - if(!ok) - return 0; - cobj->setGlobalZOrder(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGlobalZOrder",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGlobalZOrder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setScale(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setScale'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScale"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Node:setScale"); - - if (!ok) { break; } - cobj->setScale(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - double arg0; - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScale"); - - if (!ok) { break; } - cobj->setScale(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScale",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScale'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getChildByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getChildByTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:getChildByTag"); - if(!ok) - return 0; - cocos2d::Node* ret = cobj->getChildByTag(arg0); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildByTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setOrderOfArrival(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setOrderOfArrival'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:setOrderOfArrival"); - if(!ok) - return 0; - cobj->setOrderOfArrival(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOrderOfArrival",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOrderOfArrival'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScaleZ(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScaleZ'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getScaleZ(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleZ",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleZ'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScaleY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScaleY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getScaleY(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScaleX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScaleX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getScaleX(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setLocalZOrder(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setLocalZOrder'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:setLocalZOrder"); - if(!ok) - return 0; - cobj->setLocalZOrder(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setLocalZOrder",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setLocalZOrder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getWorldToNodeAffineTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getWorldToNodeAffineTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::AffineTransform ret = cobj->getWorldToNodeAffineTransform(); - affinetransform_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getWorldToNodeAffineTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getWorldToNodeAffineTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setCascadeColorEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setCascadeColorEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setCascadeColorEnabled"); - if(!ok) - return 0; - cobj->setCascadeColorEnabled(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCascadeColorEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCascadeColorEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setOpacity(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - uint16_t arg0; - - ok &= luaval_to_uint16(tolua_S, 2,&arg0, "cc.Node:setOpacity"); - if(!ok) - return 0; - cobj->setOpacity(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOpacity",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOpacity'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_cleanup(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_cleanup'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->cleanup(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:cleanup",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_cleanup'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getComponent(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getComponent'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:getComponent"); - if(!ok) - return 0; - cocos2d::Component* ret = cobj->getComponent(arg0); - object_to_luaval(tolua_S, "cc.Component",(cocos2d::Component*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getComponent",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getComponent'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getContentSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getContentSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Size& ret = cobj->getContentSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getContentSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getContentSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getColor'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Color3B& ret = cobj->getColor(); - color3b_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getColor",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getBoundingBox(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getBoundingBox'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Rect ret = cobj->getBoundingBox(); - rect_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getBoundingBox",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getBoundingBox'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setEventDispatcher(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setEventDispatcher'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::EventDispatcher* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.EventDispatcher",&arg0); - if(!ok) - return 0; - cobj->setEventDispatcher(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setEventDispatcher",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setEventDispatcher'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getGlobalZOrder(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getGlobalZOrder'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getGlobalZOrder(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGlobalZOrder",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGlobalZOrder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_draw(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_draw'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - cobj->draw(); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - cocos2d::Renderer* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); - - if (!ok) { break; } - cocos2d::Mat4 arg1; - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Node:draw"); - - if (!ok) { break; } - unsigned int arg2; - ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.Node:draw"); - - if (!ok) { break; } - cobj->draw(arg0, arg1, arg2); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:draw",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_draw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setUserObject(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setUserObject'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Ref* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); - if(!ok) - return 0; - cobj->setUserObject(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setUserObject",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setUserObject'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_removeFromParentAndCleanup(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeFromParentAndCleanup'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:removeFromParentAndCleanup"); - - if (!ok) { break; } - cobj->removeFromParentAndCleanup(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cobj->removeFromParent(); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeFromParent",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeFromParentAndCleanup'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setPosition3D(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPosition3D'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec3 arg0; - - ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Node:setPosition3D"); - if(!ok) - return 0; - cobj->setPosition3D(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPosition3D",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPosition3D'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_update(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_update'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:update"); - if(!ok) - return 0; - cobj->update(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:update",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_update'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_sortAllChildren(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_sortAllChildren'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->sortAllChildren(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:sortAllChildren",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_sortAllChildren'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getWorldToNodeTransform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getWorldToNodeTransform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Mat4 ret = cobj->getWorldToNodeTransform(); - mat4_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getWorldToNodeTransform",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getWorldToNodeTransform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getScale(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScale'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getScale(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScale",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScale'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getNormalizedPosition(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNormalizedPosition'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::Vec2& ret = cobj->getNormalizedPosition(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNormalizedPosition",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNormalizedPosition'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getRotationSkewX(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getRotationSkewX'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getRotationSkewX(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotationSkewX",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotationSkewX'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getRotationSkewY(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getRotationSkewY'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getRotationSkewY(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotationSkewY",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotationSkewY'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_setTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:setTag"); - if(!ok) - return 0; - cobj->setTag(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setTag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_isCascadeColorEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isCascadeColorEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isCascadeColorEnabled(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isCascadeColorEnabled",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isCascadeColorEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_stopAction(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_stopAction'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Action* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); - if(!ok) - return 0; - cobj->stopAction(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAction",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAction'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_getActionManager(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getActionManager'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 0) { - const cocos2d::ActionManager* ret = cobj->getActionManager(); - object_to_luaval(tolua_S, "cc.ActionManager",(cocos2d::ActionManager*)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cocos2d::ActionManager* ret = cobj->getActionManager(); - object_to_luaval(tolua_S, "cc.ActionManager",(cocos2d::ActionManager*)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getActionManager",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getActionManager'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Node_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,"cc.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Node* ret = cocos2d::Node::create(); - object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Node:create",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_Node_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Node)"); - return 0; -} - -int lua_register_cocos2dx_Node(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Node"); - tolua_cclass(tolua_S,"Node","cc.Node","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Node"); - tolua_function(tolua_S,"addChild",lua_cocos2dx_Node_addChild); - tolua_function(tolua_S,"removeComponent",lua_cocos2dx_Node_removeComponent); - tolua_function(tolua_S,"setPhysicsBody",lua_cocos2dx_Node_setPhysicsBody); - tolua_function(tolua_S,"getDescription",lua_cocos2dx_Node_getDescription); - tolua_function(tolua_S,"setRotationSkewY",lua_cocos2dx_Node_setRotationSkewY); - tolua_function(tolua_S,"setOpacityModifyRGB",lua_cocos2dx_Node_setOpacityModifyRGB); - tolua_function(tolua_S,"setCascadeOpacityEnabled",lua_cocos2dx_Node_setCascadeOpacityEnabled); - tolua_function(tolua_S,"getChildren",lua_cocos2dx_Node_getChildren); - tolua_function(tolua_S,"setOnExitCallback",lua_cocos2dx_Node_setOnExitCallback); - tolua_function(tolua_S,"pause",lua_cocos2dx_Node_pause); - tolua_function(tolua_S,"convertToWorldSpaceAR",lua_cocos2dx_Node_convertToWorldSpaceAR); - tolua_function(tolua_S,"isIgnoreAnchorPointForPosition",lua_cocos2dx_Node_isIgnoreAnchorPointForPosition); - tolua_function(tolua_S,"getChildByName",lua_cocos2dx_Node_getChildByName); - tolua_function(tolua_S,"updateDisplayedOpacity",lua_cocos2dx_Node_updateDisplayedOpacity); - tolua_function(tolua_S,"getCameraMask",lua_cocos2dx_Node_getCameraMask); - tolua_function(tolua_S,"setRotation",lua_cocos2dx_Node_setRotation); - tolua_function(tolua_S,"setScaleZ",lua_cocos2dx_Node_setScaleZ); - tolua_function(tolua_S,"setScaleY",lua_cocos2dx_Node_setScaleY); - tolua_function(tolua_S,"setScaleX",lua_cocos2dx_Node_setScaleX); - tolua_function(tolua_S,"setRotationSkewX",lua_cocos2dx_Node_setRotationSkewX); - tolua_function(tolua_S,"setonEnterTransitionDidFinishCallback",lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback); - tolua_function(tolua_S,"removeAllComponents",lua_cocos2dx_Node_removeAllComponents); - tolua_function(tolua_S,"_setLocalZOrder",lua_cocos2dx_Node__setLocalZOrder); - tolua_function(tolua_S,"setCameraMask",lua_cocos2dx_Node_setCameraMask); - tolua_function(tolua_S,"getTag",lua_cocos2dx_Node_getTag); - tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Node_getGLProgram); - tolua_function(tolua_S,"getNodeToWorldTransform",lua_cocos2dx_Node_getNodeToWorldTransform); - tolua_function(tolua_S,"getPosition3D",lua_cocos2dx_Node_getPosition3D); - tolua_function(tolua_S,"removeChild",lua_cocos2dx_Node_removeChild); - tolua_function(tolua_S,"convertToWorldSpace",lua_cocos2dx_Node_convertToWorldSpace); - tolua_function(tolua_S,"getScene",lua_cocos2dx_Node_getScene); - tolua_function(tolua_S,"getEventDispatcher",lua_cocos2dx_Node_getEventDispatcher); - tolua_function(tolua_S,"setSkewX",lua_cocos2dx_Node_setSkewX); - tolua_function(tolua_S,"setGLProgramState",lua_cocos2dx_Node_setGLProgramState); - tolua_function(tolua_S,"setOnEnterCallback",lua_cocos2dx_Node_setOnEnterCallback); - tolua_function(tolua_S,"getOpacity",lua_cocos2dx_Node_getOpacity); - tolua_function(tolua_S,"setNormalizedPosition",lua_cocos2dx_Node_setNormalizedPosition); - tolua_function(tolua_S,"setonExitTransitionDidStartCallback",lua_cocos2dx_Node_setonExitTransitionDidStartCallback); - tolua_function(tolua_S,"convertTouchToNodeSpace",lua_cocos2dx_Node_convertTouchToNodeSpace); - tolua_function(tolua_S,"removeAllChildren",lua_cocos2dx_Node_removeAllChildrenWithCleanup); - tolua_function(tolua_S,"getNodeToParentAffineTransform",lua_cocos2dx_Node_getNodeToParentAffineTransform); - tolua_function(tolua_S,"isCascadeOpacityEnabled",lua_cocos2dx_Node_isCascadeOpacityEnabled); - tolua_function(tolua_S,"setParent",lua_cocos2dx_Node_setParent); - tolua_function(tolua_S,"getName",lua_cocos2dx_Node_getName); - tolua_function(tolua_S,"getRotation3D",lua_cocos2dx_Node_getRotation3D); - tolua_function(tolua_S,"getNodeToParentTransform",lua_cocos2dx_Node_getNodeToParentTransform); - tolua_function(tolua_S,"convertTouchToNodeSpaceAR",lua_cocos2dx_Node_convertTouchToNodeSpaceAR); - tolua_function(tolua_S,"convertToNodeSpace",lua_cocos2dx_Node_convertToNodeSpace); - tolua_function(tolua_S,"resume",lua_cocos2dx_Node_resume); - tolua_function(tolua_S,"getPhysicsBody",lua_cocos2dx_Node_getPhysicsBody); - tolua_function(tolua_S,"setPosition",lua_cocos2dx_Node_setPosition); - tolua_function(tolua_S,"stopActionByTag",lua_cocos2dx_Node_stopActionByTag); - tolua_function(tolua_S,"reorderChild",lua_cocos2dx_Node_reorderChild); - tolua_function(tolua_S,"ignoreAnchorPointForPosition",lua_cocos2dx_Node_ignoreAnchorPointForPosition); - tolua_function(tolua_S,"setSkewY",lua_cocos2dx_Node_setSkewY); - tolua_function(tolua_S,"setPositionZ",lua_cocos2dx_Node_setPositionZ); - tolua_function(tolua_S,"setRotation3D",lua_cocos2dx_Node_setRotation3D); - tolua_function(tolua_S,"setPositionX",lua_cocos2dx_Node_setPositionX); - tolua_function(tolua_S,"setNodeToParentTransform",lua_cocos2dx_Node_setNodeToParentTransform); - tolua_function(tolua_S,"getAnchorPoint",lua_cocos2dx_Node_getAnchorPoint); - tolua_function(tolua_S,"getNumberOfRunningActions",lua_cocos2dx_Node_getNumberOfRunningActions); - tolua_function(tolua_S,"updateTransform",lua_cocos2dx_Node_updateTransform); - tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Node_setGLProgram); - tolua_function(tolua_S,"isVisible",lua_cocos2dx_Node_isVisible); - tolua_function(tolua_S,"getChildrenCount",lua_cocos2dx_Node_getChildrenCount); - tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR); - tolua_function(tolua_S,"addComponent",lua_cocos2dx_Node_addComponent); - tolua_function(tolua_S,"runAction",lua_cocos2dx_Node_runAction); - tolua_function(tolua_S,"isOpacityModifyRGB",lua_cocos2dx_Node_isOpacityModifyRGB); - tolua_function(tolua_S,"getRotation",lua_cocos2dx_Node_getRotation); - tolua_function(tolua_S,"getAnchorPointInPoints",lua_cocos2dx_Node_getAnchorPointInPoints); - tolua_function(tolua_S,"visit",lua_cocos2dx_Node_visit); - tolua_function(tolua_S,"removeChildByName",lua_cocos2dx_Node_removeChildByName); - tolua_function(tolua_S,"getGLProgramState",lua_cocos2dx_Node_getGLProgramState); - tolua_function(tolua_S,"setScheduler",lua_cocos2dx_Node_setScheduler); - tolua_function(tolua_S,"stopAllActions",lua_cocos2dx_Node_stopAllActions); - tolua_function(tolua_S,"getSkewX",lua_cocos2dx_Node_getSkewX); - tolua_function(tolua_S,"getSkewY",lua_cocos2dx_Node_getSkewY); - tolua_function(tolua_S,"getDisplayedColor",lua_cocos2dx_Node_getDisplayedColor); - tolua_function(tolua_S,"getActionByTag",lua_cocos2dx_Node_getActionByTag); - tolua_function(tolua_S,"setName",lua_cocos2dx_Node_setName); - tolua_function(tolua_S,"setAdditionalTransform",lua_cocos2dx_Node_setAdditionalTransform); - tolua_function(tolua_S,"getDisplayedOpacity",lua_cocos2dx_Node_getDisplayedOpacity); - tolua_function(tolua_S,"getLocalZOrder",lua_cocos2dx_Node_getLocalZOrder); - tolua_function(tolua_S,"getScheduler",lua_cocos2dx_Node_getScheduler); - tolua_function(tolua_S,"getParentToNodeAffineTransform",lua_cocos2dx_Node_getParentToNodeAffineTransform); - tolua_function(tolua_S,"getOrderOfArrival",lua_cocos2dx_Node_getOrderOfArrival); - tolua_function(tolua_S,"setActionManager",lua_cocos2dx_Node_setActionManager); - tolua_function(tolua_S,"setColor",lua_cocos2dx_Node_setColor); - tolua_function(tolua_S,"isRunning",lua_cocos2dx_Node_isRunning); - tolua_function(tolua_S,"getParent",lua_cocos2dx_Node_getParent); - tolua_function(tolua_S,"getPositionZ",lua_cocos2dx_Node_getPositionZ); - tolua_function(tolua_S,"getPositionY",lua_cocos2dx_Node_getPositionY); - tolua_function(tolua_S,"getPositionX",lua_cocos2dx_Node_getPositionX); - tolua_function(tolua_S,"removeChildByTag",lua_cocos2dx_Node_removeChildByTag); - tolua_function(tolua_S,"setPositionY",lua_cocos2dx_Node_setPositionY); - tolua_function(tolua_S,"getNodeToWorldAffineTransform",lua_cocos2dx_Node_getNodeToWorldAffineTransform); - tolua_function(tolua_S,"updateDisplayedColor",lua_cocos2dx_Node_updateDisplayedColor); - tolua_function(tolua_S,"setVisible",lua_cocos2dx_Node_setVisible); - tolua_function(tolua_S,"getParentToNodeTransform",lua_cocos2dx_Node_getParentToNodeTransform); - tolua_function(tolua_S,"setGlobalZOrder",lua_cocos2dx_Node_setGlobalZOrder); - tolua_function(tolua_S,"setScale",lua_cocos2dx_Node_setScale); - tolua_function(tolua_S,"getChildByTag",lua_cocos2dx_Node_getChildByTag); - tolua_function(tolua_S,"setOrderOfArrival",lua_cocos2dx_Node_setOrderOfArrival); - tolua_function(tolua_S,"getScaleZ",lua_cocos2dx_Node_getScaleZ); - tolua_function(tolua_S,"getScaleY",lua_cocos2dx_Node_getScaleY); - tolua_function(tolua_S,"getScaleX",lua_cocos2dx_Node_getScaleX); - tolua_function(tolua_S,"setLocalZOrder",lua_cocos2dx_Node_setLocalZOrder); - tolua_function(tolua_S,"getWorldToNodeAffineTransform",lua_cocos2dx_Node_getWorldToNodeAffineTransform); - tolua_function(tolua_S,"setCascadeColorEnabled",lua_cocos2dx_Node_setCascadeColorEnabled); - tolua_function(tolua_S,"setOpacity",lua_cocos2dx_Node_setOpacity); - tolua_function(tolua_S,"cleanup",lua_cocos2dx_Node_cleanup); - tolua_function(tolua_S,"getComponent",lua_cocos2dx_Node_getComponent); - tolua_function(tolua_S,"getContentSize",lua_cocos2dx_Node_getContentSize); - tolua_function(tolua_S,"getColor",lua_cocos2dx_Node_getColor); - tolua_function(tolua_S,"getBoundingBox",lua_cocos2dx_Node_getBoundingBox); - tolua_function(tolua_S,"setEventDispatcher",lua_cocos2dx_Node_setEventDispatcher); - tolua_function(tolua_S,"getGlobalZOrder",lua_cocos2dx_Node_getGlobalZOrder); - tolua_function(tolua_S,"draw",lua_cocos2dx_Node_draw); - tolua_function(tolua_S,"setUserObject",lua_cocos2dx_Node_setUserObject); - tolua_function(tolua_S,"removeFromParent",lua_cocos2dx_Node_removeFromParentAndCleanup); - tolua_function(tolua_S,"setPosition3D",lua_cocos2dx_Node_setPosition3D); - tolua_function(tolua_S,"update",lua_cocos2dx_Node_update); - tolua_function(tolua_S,"sortAllChildren",lua_cocos2dx_Node_sortAllChildren); - tolua_function(tolua_S,"getWorldToNodeTransform",lua_cocos2dx_Node_getWorldToNodeTransform); - tolua_function(tolua_S,"getScale",lua_cocos2dx_Node_getScale); - tolua_function(tolua_S,"getNormalizedPosition",lua_cocos2dx_Node_getNormalizedPosition); - tolua_function(tolua_S,"getRotationSkewX",lua_cocos2dx_Node_getRotationSkewX); - tolua_function(tolua_S,"getRotationSkewY",lua_cocos2dx_Node_getRotationSkewY); - tolua_function(tolua_S,"setTag",lua_cocos2dx_Node_setTag); - tolua_function(tolua_S,"isCascadeColorEnabled",lua_cocos2dx_Node_isCascadeColorEnabled); - tolua_function(tolua_S,"stopAction",lua_cocos2dx_Node_stopAction); - tolua_function(tolua_S,"getActionManager",lua_cocos2dx_Node_getActionManager); - tolua_function(tolua_S,"create", lua_cocos2dx_Node_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Node).name(); - g_luaType[typeName] = "cc.Node"; - g_typeCast["Node"] = "cc.Node"; - return 1; -} - -int lua_cocos2dx_GLProgramState_setUniformTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - unsigned int arg1; - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - unsigned int arg1; - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformTexture",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformMat4(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformMat4'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cocos2d::Mat4 arg1; - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cobj->setUniformMat4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cocos2d::Mat4 arg1; - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cobj->setUniformMat4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformMat4",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformMat4'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_applyUniforms(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyUniforms'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->applyUniforms(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyUniforms",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyUniforms'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_applyGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Mat4 arg0; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgramState:applyGLProgram"); - if(!ok) - return 0; - cobj->applyGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getUniformCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getUniformCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getUniformCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getUniformCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getUniformCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_applyAttributes(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyAttributes'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->applyAttributes(); - return 0; - } - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLProgramState:applyAttributes"); - if(!ok) - return 0; - cobj->applyAttributes(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyAttributes",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyAttributes'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformFloat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformFloat'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - cobj->setUniformFloat(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - cobj->setUniformFloat(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformFloat",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformFloat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec3(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec3'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cocos2d::Vec3 arg1; - ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cobj->setUniformVec3(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cocos2d::Vec3 arg1; - ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cobj->setUniformVec3(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec3",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec3'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformInt(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformInt'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - cobj->setUniformInt(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - cobj->setUniformInt(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformInt",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformInt'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getVertexAttribCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getVertexAttribCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec4(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec4'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cocos2d::Vec4 arg1; - ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cobj->setUniformVec4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cocos2d::Vec4 arg1; - ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cobj->setUniformVec4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec4",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec4'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgram* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cobj->setGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec2(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec2'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cocos2d::Vec2 arg1; - ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cobj->setUniformVec2(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cocos2d::Vec2 arg1; - ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cobj->setUniformVec2(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec2",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec2'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getVertexAttribsFlags(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned int ret = cobj->getVertexAttribsFlags(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribsFlags",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_apply(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_apply'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Mat4 arg0; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgramState:apply"); - if(!ok) - return 0; - cobj->apply(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:apply",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_apply'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::GLProgram* ret = cobj->getGLProgram(); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getGLProgram",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::create(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:getOrCreateWithGLProgramName"); - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgramName",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram(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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgram(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgram",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_GLProgramState_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (GLProgramState)"); - return 0; -} - -int lua_register_cocos2dx_GLProgramState(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.GLProgramState"); - tolua_cclass(tolua_S,"GLProgramState","cc.GLProgramState","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"GLProgramState"); - tolua_function(tolua_S,"setUniformTexture",lua_cocos2dx_GLProgramState_setUniformTexture); - tolua_function(tolua_S,"setUniformMat4",lua_cocos2dx_GLProgramState_setUniformMat4); - tolua_function(tolua_S,"applyUniforms",lua_cocos2dx_GLProgramState_applyUniforms); - tolua_function(tolua_S,"applyGLProgram",lua_cocos2dx_GLProgramState_applyGLProgram); - tolua_function(tolua_S,"getUniformCount",lua_cocos2dx_GLProgramState_getUniformCount); - tolua_function(tolua_S,"applyAttributes",lua_cocos2dx_GLProgramState_applyAttributes); - tolua_function(tolua_S,"setUniformFloat",lua_cocos2dx_GLProgramState_setUniformFloat); - tolua_function(tolua_S,"setUniformVec3",lua_cocos2dx_GLProgramState_setUniformVec3); - tolua_function(tolua_S,"setUniformInt",lua_cocos2dx_GLProgramState_setUniformInt); - tolua_function(tolua_S,"getVertexAttribCount",lua_cocos2dx_GLProgramState_getVertexAttribCount); - tolua_function(tolua_S,"setUniformVec4",lua_cocos2dx_GLProgramState_setUniformVec4); - tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_GLProgramState_setGLProgram); - tolua_function(tolua_S,"setUniformVec2",lua_cocos2dx_GLProgramState_setUniformVec2); - tolua_function(tolua_S,"getVertexAttribsFlags",lua_cocos2dx_GLProgramState_getVertexAttribsFlags); - tolua_function(tolua_S,"apply",lua_cocos2dx_GLProgramState_apply); - tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_GLProgramState_getGLProgram); - tolua_function(tolua_S,"create", lua_cocos2dx_GLProgramState_create); - tolua_function(tolua_S,"getOrCreateWithGLProgramName", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName); - tolua_function(tolua_S,"getOrCreateWithGLProgram", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::GLProgramState).name(); - g_luaType[typeName] = "cc.GLProgramState"; - g_typeCast["GLProgramState"] = "cc.GLProgramState"; - return 1; -} - -int lua_cocos2dx_AtlasNode_updateAtlasValues(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateAtlasValues(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:updateAtlasValues",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_getTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Texture2D* ret = cobj->getTexture(); - object_to_luaval(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTexture",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_setTextureAtlas(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::TextureAtlas* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0); - if(!ok) - return 0; - cobj->setTextureAtlas(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTextureAtlas",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_getTextureAtlas(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); - object_to_luaval(tolua_S, "cc.TextureAtlas",(cocos2d::TextureAtlas*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTextureAtlas",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_getQuadsToDraw(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getQuadsToDraw(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getQuadsToDraw",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Texture2D* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - if(!ok) - return 0; - cobj->setTexture(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_setQuadsToDraw(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - ssize_t arg0; - - ok &= luaval_to_ssize(tolua_S, 2, &arg0, "cc.AtlasNode:setQuadsToDraw"); - if(!ok) - return 0; - cobj->setQuadsToDraw(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setQuadsToDraw",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_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,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 4) - { - std::string arg0; - int arg1; - int arg2; - int arg3; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AtlasNode:create"); - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.AtlasNode:create"); - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.AtlasNode:create"); - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.AtlasNode:create"); - if(!ok) - return 0; - cocos2d::AtlasNode* ret = cocos2d::AtlasNode::create(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.AtlasNode",(cocos2d::AtlasNode*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AtlasNode:create",argc, 4); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_AtlasNode_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (AtlasNode)"); - return 0; -} - -int lua_register_cocos2dx_AtlasNode(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.AtlasNode"); - tolua_cclass(tolua_S,"AtlasNode","cc.AtlasNode","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"AtlasNode"); - tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_AtlasNode_updateAtlasValues); - tolua_function(tolua_S,"getTexture",lua_cocos2dx_AtlasNode_getTexture); - tolua_function(tolua_S,"setTextureAtlas",lua_cocos2dx_AtlasNode_setTextureAtlas); - tolua_function(tolua_S,"getTextureAtlas",lua_cocos2dx_AtlasNode_getTextureAtlas); - tolua_function(tolua_S,"getQuadsToDraw",lua_cocos2dx_AtlasNode_getQuadsToDraw); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_AtlasNode_setTexture); - tolua_function(tolua_S,"setQuadsToDraw",lua_cocos2dx_AtlasNode_setQuadsToDraw); - tolua_function(tolua_S,"create", lua_cocos2dx_AtlasNode_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::AtlasNode).name(); - g_luaType[typeName] = "cc.AtlasNode"; - g_typeCast["AtlasNode"] = "cc.AtlasNode"; - return 1; -} - -int lua_cocos2dx_LabelAtlas_setString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* 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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_setString'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:setString"); - if(!ok) - return 0; - cobj->setString(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:setString",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_setString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_initWithString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* 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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_initWithString'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 5) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 5) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); - - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:initWithString",argc, 5); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_initWithString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_updateAtlasValues(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* 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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_updateAtlasValues'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateAtlasValues(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:updateAtlasValues",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_updateAtlasValues'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_getString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* 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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_getString'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const std::string& ret = cobj->getString(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:getString",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_getString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_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,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 5) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:create"); - if (!ok) { break; } - int arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:create"); - if (!ok) { break; } - int arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:create"); - if (!ok) { break; } - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1, arg2, arg3, arg4); - object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 0) - { - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(); - object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); - if (!ok) { break; } - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); - return 1; - } - } while (0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.LabelAtlas:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_LabelAtlas_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (LabelAtlas)"); - return 0; -} - -int lua_register_cocos2dx_LabelAtlas(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.LabelAtlas"); - tolua_cclass(tolua_S,"LabelAtlas","cc.LabelAtlas","cc.AtlasNode",nullptr); - - tolua_beginmodule(tolua_S,"LabelAtlas"); - tolua_function(tolua_S,"setString",lua_cocos2dx_LabelAtlas_setString); - tolua_function(tolua_S,"initWithString",lua_cocos2dx_LabelAtlas_initWithString); - tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_LabelAtlas_updateAtlasValues); - tolua_function(tolua_S,"getString",lua_cocos2dx_LabelAtlas_getString); - tolua_function(tolua_S,"_create", lua_cocos2dx_LabelAtlas_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::LabelAtlas).name(); - g_luaType[typeName] = "cc.LabelAtlas"; - g_typeCast["LabelAtlas"] = "cc.LabelAtlas"; - return 1; -} - -int lua_cocos2dx_Scene_getPhysicsWorld(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Scene* 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.Scene",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Scene*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scene_getPhysicsWorld'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::PhysicsWorld* ret = cobj->getPhysicsWorld(); - object_to_luaval(tolua_S, "cc.PhysicsWorld",(cocos2d::PhysicsWorld*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:getPhysicsWorld",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_getPhysicsWorld'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_Scene_createWithSize(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,"cc.Scene",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::Size arg0; - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.Scene:createWithSize"); - if(!ok) - return 0; - cocos2d::Scene* ret = cocos2d::Scene::createWithSize(arg0); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:createWithSize",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_createWithSize'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Scene_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,"cc.Scene",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Scene* ret = cocos2d::Scene::create(); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:create",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_Scene_createWithPhysics(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,"cc.Scene",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Scene* ret = cocos2d::Scene::createWithPhysics(); - object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:createWithPhysics",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_createWithPhysics'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_Scene_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Scene)"); - return 0; -} - -int lua_register_cocos2dx_Scene(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Scene"); - tolua_cclass(tolua_S,"Scene","cc.Scene","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"Scene"); - tolua_function(tolua_S,"getPhysicsWorld",lua_cocos2dx_Scene_getPhysicsWorld); - tolua_function(tolua_S,"createWithSize", lua_cocos2dx_Scene_createWithSize); - tolua_function(tolua_S,"create", lua_cocos2dx_Scene_create); - tolua_function(tolua_S,"createWithPhysics", lua_cocos2dx_Scene_createWithPhysics); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Scene).name(); - g_luaType[typeName] = "cc.Scene"; - g_typeCast["Scene"] = "cc.Scene"; - return 1; -} - int lua_cocos2dx_GLView_setFrameSize(lua_State* tolua_S) { int argc = 0; @@ -17736,6 +7571,8340 @@ int lua_register_cocos2dx_UserDefault(lua_State* tolua_S) return 1; } +int lua_cocos2dx_Texture2D_getMaxT(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getMaxT'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getMaxT(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getMaxT",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getMaxT'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getStringForFormat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getStringForFormat'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const char* ret = cobj->getStringForFormat(); + tolua_pushstring(tolua_S,(const char*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getStringForFormat",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getStringForFormat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_initWithImage(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_initWithImage'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::Image* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); + + if (!ok) { break; } + cocos2d::Texture2D::PixelFormat arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Texture2D:initWithImage"); + + if (!ok) { break; } + bool ret = cobj->initWithImage(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Image* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Image",&arg0); + + if (!ok) { break; } + bool ret = cobj->initWithImage(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:initWithImage",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_initWithImage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getMaxS(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getMaxS'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getMaxS(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getMaxS",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getMaxS'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_releaseGLTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_releaseGLTexture'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->releaseGLTexture(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:releaseGLTexture",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_releaseGLTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_hasPremultipliedAlpha(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_hasPremultipliedAlpha'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->hasPremultipliedAlpha(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:hasPremultipliedAlpha",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_hasPremultipliedAlpha'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getPixelsHigh(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelsHigh'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getPixelsHigh(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelsHigh",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelsHigh'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getBitsPerPixelForFormat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getBitsPerPixelForFormat'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Texture2D::PixelFormat arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Texture2D:getBitsPerPixelForFormat"); + + if (!ok) { break; } + unsigned int ret = cobj->getBitsPerPixelForFormat(arg0); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + unsigned int ret = cobj->getBitsPerPixelForFormat(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getBitsPerPixelForFormat",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getBitsPerPixelForFormat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned int ret = cobj->getName(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getName",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_initWithString(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_initWithString'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + cocos2d::FontDefinition arg1; + ok &= luaval_to_fontdefinition(tolua_S, 3, &arg1, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 4) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::Size arg3; + ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 5) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::Size arg3; + ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::TextHAlignment arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 6) { + const char* arg0; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Texture2D:initWithString"); arg0 = arg0_tmp.c_str(); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + double arg2; + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::Size arg3; + ok &= luaval_to_size(tolua_S, 5, &arg3, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::TextHAlignment arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + cocos2d::TextVAlignment arg5; + ok &= luaval_to_int32(tolua_S, 7,(int *)&arg5, "cc.Texture2D:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4, arg5); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:initWithString",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_initWithString'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setMaxT(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setMaxT'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Texture2D:setMaxT"); + if(!ok) + return 0; + cobj->setMaxT(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setMaxT",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setMaxT'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_drawInRect(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_drawInRect'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Rect arg0; + + ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Texture2D:drawInRect"); + if(!ok) + return 0; + cobj->drawInRect(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:drawInRect",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_drawInRect'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getContentSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getContentSize'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Size ret = cobj->getContentSize(); + size_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getContentSize",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getContentSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setAliasTexParameters(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setAliasTexParameters'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->setAliasTexParameters(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setAliasTexParameters",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setAliasTexParameters'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setAntiAliasTexParameters(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setAntiAliasTexParameters'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->setAntiAliasTexParameters(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setAntiAliasTexParameters",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setAntiAliasTexParameters'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_generateMipmap(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_generateMipmap'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->generateMipmap(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:generateMipmap",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_generateMipmap'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getDescription(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getDescription'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getDescription(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getDescription",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getDescription'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getPixelFormat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelFormat'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cobj->getPixelFormat(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelFormat",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelFormat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgram* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cobj->setGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getContentSizeInPixels(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getContentSizeInPixels'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Size& ret = cobj->getContentSizeInPixels(); + size_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getContentSizeInPixels",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getContentSizeInPixels'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getPixelsWide(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getPixelsWide'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getPixelsWide(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getPixelsWide",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getPixelsWide'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_drawAtPoint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_drawAtPoint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Texture2D:drawAtPoint"); + if(!ok) + return 0; + cobj->drawAtPoint(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:drawAtPoint",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_drawAtPoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_getGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgram* ret = cobj->getGLProgram(); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getGLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_hasMipmaps(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_hasMipmaps'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->hasMipmaps(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:hasMipmaps",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_hasMipmaps'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setMaxS(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setMaxS'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Texture2D:setMaxS"); + if(!ok) + return 0; + cobj->setMaxS(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setMaxS",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setMaxS'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat(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,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Texture2D::PixelFormat arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Texture2D:setDefaultAlphaPixelFormat"); + if(!ok) + return 0; + cocos2d::Texture2D::setDefaultAlphaPixelFormat(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Texture2D:setDefaultAlphaPixelFormat",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat(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,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cocos2d::Texture2D::getDefaultAlphaPixelFormat(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Texture2D:getDefaultAlphaPixelFormat",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Texture2D_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Texture2D* 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::Texture2D(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Texture2D"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:Texture2D",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Texture2D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Texture2D)"); + return 0; +} + +int lua_register_cocos2dx_Texture2D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Texture2D"); + tolua_cclass(tolua_S,"Texture2D","cc.Texture2D","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Texture2D"); + tolua_function(tolua_S,"new",lua_cocos2dx_Texture2D_constructor); + tolua_function(tolua_S,"getMaxT",lua_cocos2dx_Texture2D_getMaxT); + tolua_function(tolua_S,"getStringForFormat",lua_cocos2dx_Texture2D_getStringForFormat); + tolua_function(tolua_S,"initWithImage",lua_cocos2dx_Texture2D_initWithImage); + tolua_function(tolua_S,"getMaxS",lua_cocos2dx_Texture2D_getMaxS); + tolua_function(tolua_S,"releaseGLTexture",lua_cocos2dx_Texture2D_releaseGLTexture); + tolua_function(tolua_S,"hasPremultipliedAlpha",lua_cocos2dx_Texture2D_hasPremultipliedAlpha); + tolua_function(tolua_S,"getPixelsHigh",lua_cocos2dx_Texture2D_getPixelsHigh); + tolua_function(tolua_S,"getBitsPerPixelForFormat",lua_cocos2dx_Texture2D_getBitsPerPixelForFormat); + tolua_function(tolua_S,"getName",lua_cocos2dx_Texture2D_getName); + tolua_function(tolua_S,"initWithString",lua_cocos2dx_Texture2D_initWithString); + tolua_function(tolua_S,"setMaxT",lua_cocos2dx_Texture2D_setMaxT); + tolua_function(tolua_S,"drawInRect",lua_cocos2dx_Texture2D_drawInRect); + tolua_function(tolua_S,"getContentSize",lua_cocos2dx_Texture2D_getContentSize); + tolua_function(tolua_S,"setAliasTexParameters",lua_cocos2dx_Texture2D_setAliasTexParameters); + tolua_function(tolua_S,"setAntiAliasTexParameters",lua_cocos2dx_Texture2D_setAntiAliasTexParameters); + tolua_function(tolua_S,"generateMipmap",lua_cocos2dx_Texture2D_generateMipmap); + tolua_function(tolua_S,"getDescription",lua_cocos2dx_Texture2D_getDescription); + tolua_function(tolua_S,"getPixelFormat",lua_cocos2dx_Texture2D_getPixelFormat); + tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Texture2D_setGLProgram); + tolua_function(tolua_S,"getContentSizeInPixels",lua_cocos2dx_Texture2D_getContentSizeInPixels); + tolua_function(tolua_S,"getPixelsWide",lua_cocos2dx_Texture2D_getPixelsWide); + tolua_function(tolua_S,"drawAtPoint",lua_cocos2dx_Texture2D_drawAtPoint); + tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Texture2D_getGLProgram); + tolua_function(tolua_S,"hasMipmaps",lua_cocos2dx_Texture2D_hasMipmaps); + tolua_function(tolua_S,"setMaxS",lua_cocos2dx_Texture2D_setMaxS); + tolua_function(tolua_S,"setDefaultAlphaPixelFormat", lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat); + tolua_function(tolua_S,"getDefaultAlphaPixelFormat", lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Texture2D).name(); + g_luaType[typeName] = "cc.Texture2D"; + g_typeCast["Texture2D"] = "cc.Texture2D"; + return 1; +} + +int lua_cocos2dx_Touch_getPreviousLocationInView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getPreviousLocationInView'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getPreviousLocationInView(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getPreviousLocationInView",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getPreviousLocationInView'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getLocation(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getLocation",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getDelta(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getDelta'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getDelta(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getDelta",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getDelta'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getStartLocationInView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getStartLocationInView'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getStartLocationInView(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getStartLocationInView",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getStartLocationInView'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getStartLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getStartLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getStartLocation(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getStartLocation",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getStartLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getID(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getID'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getID(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getID",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getID'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_setTouchInfo(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_setTouchInfo'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + int arg0; + double arg1; + double arg2; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Touch:setTouchInfo"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Touch:setTouchInfo"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Touch:setTouchInfo"); + if(!ok) + return 0; + cobj->setTouchInfo(arg0, arg1, arg2); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:setTouchInfo",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_setTouchInfo'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getLocationInView(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getLocationInView'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getLocationInView(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getLocationInView",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getLocationInView'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_getPreviousLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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.Touch",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Touch*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Touch_getPreviousLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getPreviousLocation(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:getPreviousLocation",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_getPreviousLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Touch_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Touch* 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::Touch(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Touch"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Touch:Touch",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Touch_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_Touch_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Touch)"); + return 0; +} + +int lua_register_cocos2dx_Touch(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Touch"); + tolua_cclass(tolua_S,"Touch","cc.Touch","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Touch"); + tolua_function(tolua_S,"new",lua_cocos2dx_Touch_constructor); + tolua_function(tolua_S,"getPreviousLocationInView",lua_cocos2dx_Touch_getPreviousLocationInView); + tolua_function(tolua_S,"getLocation",lua_cocos2dx_Touch_getLocation); + tolua_function(tolua_S,"getDelta",lua_cocos2dx_Touch_getDelta); + tolua_function(tolua_S,"getStartLocationInView",lua_cocos2dx_Touch_getStartLocationInView); + tolua_function(tolua_S,"getStartLocation",lua_cocos2dx_Touch_getStartLocation); + tolua_function(tolua_S,"getId",lua_cocos2dx_Touch_getID); + tolua_function(tolua_S,"setTouchInfo",lua_cocos2dx_Touch_setTouchInfo); + tolua_function(tolua_S,"getLocationInView",lua_cocos2dx_Touch_getLocationInView); + tolua_function(tolua_S,"getPreviousLocation",lua_cocos2dx_Touch_getPreviousLocation); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Touch).name(); + g_luaType[typeName] = "cc.Touch"; + g_typeCast["Touch"] = "cc.Touch"; + return 1; +} + +int lua_cocos2dx_EventKeyboard_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::EventKeyboard* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::EventKeyboard::KeyCode arg0; + bool arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.EventKeyboard:EventKeyboard"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.EventKeyboard:EventKeyboard"); + if(!ok) + return 0; + cobj = new cocos2d::EventKeyboard(arg0, arg1); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventKeyboard"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EventKeyboard:EventKeyboard",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventKeyboard_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_EventKeyboard_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EventKeyboard)"); + return 0; +} + +int lua_register_cocos2dx_EventKeyboard(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventKeyboard"); + tolua_cclass(tolua_S,"EventKeyboard","cc.EventKeyboard","cc.Event",nullptr); + + tolua_beginmodule(tolua_S,"EventKeyboard"); + tolua_function(tolua_S,"new",lua_cocos2dx_EventKeyboard_constructor); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::EventKeyboard).name(); + g_luaType[typeName] = "cc.EventKeyboard"; + g_typeCast["EventKeyboard"] = "cc.EventKeyboard"; + return 1; +} + +int lua_cocos2dx_Node_addChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_addChild'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Node:addChild"); + + if (!ok) { break; } + cobj->addChild(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + if (!ok) { break; } + cobj->addChild(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Node:addChild"); + + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.Node:addChild"); + + if (!ok) { break; } + cobj->addChild(arg0, arg1, arg2); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Node* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Node:addChild"); + + if (!ok) { break; } + std::string arg2; + ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.Node:addChild"); + + if (!ok) { break; } + cobj->addChild(arg0, arg1, arg2); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:addChild",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_addChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeComponent(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeComponent'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Component* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0); + + if (!ok) { break; } + bool ret = cobj->removeComponent(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:removeComponent"); + + if (!ok) { break; } + bool ret = cobj->removeComponent(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeComponent",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeComponent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPhysicsBody(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPhysicsBody'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::PhysicsBody* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.PhysicsBody",&arg0); + if(!ok) + return 0; + cobj->setPhysicsBody(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPhysicsBody",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPhysicsBody'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getDescription(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getDescription'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getDescription(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDescription",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDescription'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setRotationSkewY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setRotationSkewY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotationSkewY"); + if(!ok) + return 0; + cobj->setRotationSkewY(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotationSkewY",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotationSkewY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setOpacityModifyRGB(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setOpacityModifyRGB'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setOpacityModifyRGB"); + if(!ok) + return 0; + cobj->setOpacityModifyRGB(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOpacityModifyRGB",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOpacityModifyRGB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setCascadeOpacityEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setCascadeOpacityEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setCascadeOpacityEnabled"); + if(!ok) + return 0; + cobj->setCascadeOpacityEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCascadeOpacityEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCascadeOpacityEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getChildren(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getChildren'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + const cocos2d::Vector& ret = cobj->getChildren(); + ccvector_to_luaval(tolua_S, ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cocos2d::Vector& ret = cobj->getChildren(); + ccvector_to_luaval(tolua_S, ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildren",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildren'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setOnExitCallback(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setOnExitCallback'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setOnExitCallback(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOnExitCallback",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOnExitCallback'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_pause(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_pause'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->pause(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:pause",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_pause'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertToWorldSpaceAR(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertToWorldSpaceAR'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:convertToWorldSpaceAR"); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertToWorldSpaceAR(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToWorldSpaceAR",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToWorldSpaceAR'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isIgnoreAnchorPointForPosition(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isIgnoreAnchorPointForPosition'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isIgnoreAnchorPointForPosition(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isIgnoreAnchorPointForPosition",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isIgnoreAnchorPointForPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getChildByName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getChildByName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:getChildByName"); + if(!ok) + return 0; + cocos2d::Node* ret = cobj->getChildByName(arg0); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_updateDisplayedOpacity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_updateDisplayedOpacity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + uint16_t arg0; + + ok &= luaval_to_uint16(tolua_S, 2,&arg0, "cc.Node:updateDisplayedOpacity"); + if(!ok) + return 0; + cobj->updateDisplayedOpacity(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateDisplayedOpacity",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateDisplayedOpacity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getCameraMask(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getCameraMask'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned short ret = cobj->getCameraMask(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getCameraMask",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getCameraMask'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setRotation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setRotation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotation"); + if(!ok) + return 0; + cobj->setRotation(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotation",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setScaleZ(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setScaleZ'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleZ"); + if(!ok) + return 0; + cobj->setScaleZ(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleZ",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleZ'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setScaleY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setScaleY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleY"); + if(!ok) + return 0; + cobj->setScaleY(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleY",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setScaleX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setScaleX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScaleX"); + if(!ok) + return 0; + cobj->setScaleX(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScaleX",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScaleX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setRotationSkewX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setRotationSkewX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setRotationSkewX"); + if(!ok) + return 0; + cobj->setRotationSkewX(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotationSkewX",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotationSkewX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setonEnterTransitionDidFinishCallback(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setonEnterTransitionDidFinishCallback",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeAllComponents(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeAllComponents'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->removeAllComponents(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeAllComponents",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeAllComponents'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node__setLocalZOrder(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node__setLocalZOrder'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:_setLocalZOrder"); + if(!ok) + return 0; + cobj->_setLocalZOrder(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:_setLocalZOrder",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node__setLocalZOrder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setCameraMask(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setCameraMask'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned short arg0; + + ok &= luaval_to_ushort(tolua_S, 2, &arg0, "cc.Node:setCameraMask"); + if(!ok) + return 0; + cobj->setCameraMask(arg0); + return 0; + } + if (argc == 2) + { + unsigned short arg0; + bool arg1; + + ok &= luaval_to_ushort(tolua_S, 2, &arg0, "cc.Node:setCameraMask"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:setCameraMask"); + if(!ok) + return 0; + cobj->setCameraMask(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCameraMask",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCameraMask'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getTag(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getTag",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgram* ret = cobj->getGLProgram(); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNodeToWorldTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToWorldTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Mat4 ret = cobj->getNodeToWorldTransform(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToWorldTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToWorldTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getPosition3D(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPosition3D'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec3 ret = cobj->getPosition3D(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPosition3D",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPosition3D'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeChild'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + return 0; + cobj->removeChild(arg0); + return 0; + } + if (argc == 2) + { + cocos2d::Node* arg0; + bool arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChild"); + if(!ok) + return 0; + cobj->removeChild(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChild",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertToWorldSpace(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertToWorldSpace'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:convertToWorldSpace"); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertToWorldSpace(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToWorldSpace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToWorldSpace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScene(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScene'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Scene* ret = cobj->getScene(); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScene",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScene'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getEventDispatcher(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getEventDispatcher'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::EventDispatcher* ret = cobj->getEventDispatcher(); + object_to_luaval(tolua_S, "cc.EventDispatcher",(cocos2d::EventDispatcher*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getEventDispatcher",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getEventDispatcher'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setSkewX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setSkewX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setSkewX"); + if(!ok) + return 0; + cobj->setSkewX(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setSkewX",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setSkewX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setGLProgramState(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGLProgramState'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgramState* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgramState",&arg0); + if(!ok) + return 0; + cobj->setGLProgramState(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgramState",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgramState'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setOnEnterCallback(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setOnEnterCallback'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setOnEnterCallback(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOnEnterCallback",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOnEnterCallback'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getOpacity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOpacity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + uint16_t ret = cobj->getOpacity(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOpacity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOpacity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setNormalizedPosition(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setNormalizedPosition'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:setNormalizedPosition"); + if(!ok) + return 0; + cobj->setNormalizedPosition(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setNormalizedPosition",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setNormalizedPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setonExitTransitionDidStartCallback(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setonExitTransitionDidStartCallback'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::function arg0; + + do { + // Lambda binding for lua is not supported. + assert(false); + } while(0) + ; + if(!ok) + return 0; + cobj->setonExitTransitionDidStartCallback(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setonExitTransitionDidStartCallback",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setonExitTransitionDidStartCallback'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertTouchToNodeSpace(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertTouchToNodeSpace'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Touch* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertTouchToNodeSpace(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertTouchToNodeSpace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertTouchToNodeSpace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeAllChildrenWithCleanup(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeAllChildrenWithCleanup'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + bool arg0; + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:removeAllChildrenWithCleanup"); + + if (!ok) { break; } + cobj->removeAllChildrenWithCleanup(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cobj->removeAllChildren(); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeAllChildren",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeAllChildrenWithCleanup'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNodeToParentAffineTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToParentAffineTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform(); + affinetransform_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentAffineTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToParentAffineTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isCascadeOpacityEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isCascadeOpacityEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isCascadeOpacityEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isCascadeOpacityEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isCascadeOpacityEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setParent(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setParent'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + return 0; + cobj->setParent(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setParent",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setParent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getName(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getName",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getRotation3D(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getRotation3D'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec3 ret = cobj->getRotation3D(); + vec3_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotation3D",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotation3D'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNodeToParentTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToParentTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Mat4& ret = cobj->getNodeToParentTransform(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToParentTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertTouchToNodeSpaceAR(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertTouchToNodeSpaceAR'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Touch* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Touch",&arg0); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertTouchToNodeSpaceAR(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertTouchToNodeSpaceAR",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertTouchToNodeSpaceAR'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertToNodeSpace(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertToNodeSpace'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:convertToNodeSpace"); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertToNodeSpace(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToNodeSpace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToNodeSpace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_resume(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_resume'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->resume(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:resume",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_resume'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getPhysicsBody(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPhysicsBody'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::PhysicsBody* ret = cobj->getPhysicsBody(); + object_to_luaval(tolua_S, "cc.PhysicsBody",(cocos2d::PhysicsBody*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPhysicsBody",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPhysicsBody'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPosition(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPosition'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPosition"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Node:setPosition"); + + if (!ok) { break; } + cobj->setPosition(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Vec2 arg0; + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:setPosition"); + + if (!ok) { break; } + cobj->setPosition(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPosition",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_stopActionByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_stopActionByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:stopActionByTag"); + if(!ok) + return 0; + cobj->stopActionByTag(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopActionByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopActionByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_reorderChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_reorderChild'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::Node* arg0; + int arg1; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.Node:reorderChild"); + if(!ok) + return 0; + cobj->reorderChild(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:reorderChild",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_reorderChild'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_ignoreAnchorPointForPosition(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_ignoreAnchorPointForPosition'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:ignoreAnchorPointForPosition"); + if(!ok) + return 0; + cobj->ignoreAnchorPointForPosition(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:ignoreAnchorPointForPosition",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_ignoreAnchorPointForPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setSkewY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setSkewY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setSkewY"); + if(!ok) + return 0; + cobj->setSkewY(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setSkewY",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setSkewY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPositionZ(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPositionZ'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionZ"); + if(!ok) + return 0; + cobj->setPositionZ(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionZ",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionZ'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setRotation3D(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setRotation3D'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Node:setRotation3D"); + if(!ok) + return 0; + cobj->setRotation3D(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setRotation3D",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setRotation3D'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPositionX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPositionX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionX"); + if(!ok) + return 0; + cobj->setPositionX(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionX",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setNodeToParentTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setNodeToParentTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Mat4 arg0; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.Node:setNodeToParentTransform"); + if(!ok) + return 0; + cobj->setNodeToParentTransform(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setNodeToParentTransform",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setNodeToParentTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getAnchorPoint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getAnchorPoint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Vec2& ret = cobj->getAnchorPoint(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getAnchorPoint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getAnchorPoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNumberOfRunningActions(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNumberOfRunningActions'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getNumberOfRunningActions(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNumberOfRunningActions",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNumberOfRunningActions'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_updateTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_updateTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateTransform(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgram* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cobj->setGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isVisible(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isVisible'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isVisible(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isVisible",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isVisible'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getChildrenCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getChildrenCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getChildrenCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildrenCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildrenCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_convertToNodeSpaceAR(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_convertToNodeSpaceAR'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.Node:convertToNodeSpaceAR"); + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->convertToNodeSpaceAR(arg0); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:convertToNodeSpaceAR",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_convertToNodeSpaceAR'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_addComponent(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_addComponent'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Component* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Component",&arg0); + if(!ok) + return 0; + bool ret = cobj->addComponent(arg0); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:addComponent",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_addComponent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_runAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_runAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Action* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); + if(!ok) + return 0; + cocos2d::Action* ret = cobj->runAction(arg0); + object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:runAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_runAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isOpacityModifyRGB(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isOpacityModifyRGB'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isOpacityModifyRGB(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isOpacityModifyRGB",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isOpacityModifyRGB'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getRotation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getRotation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getRotation(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotation",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getAnchorPointInPoints(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getAnchorPointInPoints'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Vec2& ret = cobj->getAnchorPointInPoints(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getAnchorPointInPoints",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getAnchorPointInPoints'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_visit(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_visit'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + cobj->visit(); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Renderer* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Node:visit"); + + if (!ok) { break; } + unsigned int arg2; + ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.Node:visit"); + + if (!ok) { break; } + cobj->visit(arg0, arg1, arg2); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:visit",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_visit'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeChildByName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeChildByName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:removeChildByName"); + if(!ok) + return 0; + cobj->removeChildByName(arg0); + return 0; + } + if (argc == 2) + { + std::string arg0; + bool arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:removeChildByName"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChildByName"); + if(!ok) + return 0; + cobj->removeChildByName(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChildByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChildByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getGLProgramState(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getGLProgramState'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cobj->getGLProgramState(); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGLProgramState",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGLProgramState'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setScheduler(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setScheduler'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Scheduler* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Scheduler",&arg0); + if(!ok) + return 0; + cobj->setScheduler(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScheduler",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScheduler'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_stopAllActions(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_stopAllActions'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->stopAllActions(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAllActions",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAllActions'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getSkewX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getSkewX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getSkewX(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getSkewX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getSkewX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getSkewY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getSkewY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getSkewY(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getSkewY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getSkewY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getDisplayedColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getDisplayedColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Color3B& ret = cobj->getDisplayedColor(); + color3b_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDisplayedColor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDisplayedColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getActionByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getActionByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:getActionByTag"); + if(!ok) + return 0; + cocos2d::Action* ret = cobj->getActionByTag(arg0); + object_to_luaval(tolua_S, "cc.Action",(cocos2d::Action*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getActionByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getActionByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:setName"); + if(!ok) + return 0; + cobj->setName(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setAdditionalTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setAdditionalTransform'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::AffineTransform arg0; + ok &= luaval_to_affinetransform(tolua_S, 2, &arg0, "cc.Node:setAdditionalTransform"); + + if (!ok) { break; } + cobj->setAdditionalTransform(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + cocos2d::Mat4* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Mat4",&arg0); + + if (!ok) { break; } + cobj->setAdditionalTransform(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setAdditionalTransform",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setAdditionalTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getDisplayedOpacity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getDisplayedOpacity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + uint16_t ret = cobj->getDisplayedOpacity(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getDisplayedOpacity",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getDisplayedOpacity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getLocalZOrder(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getLocalZOrder'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getLocalZOrder(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getLocalZOrder",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getLocalZOrder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScheduler(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScheduler'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + const cocos2d::Scheduler* ret = cobj->getScheduler(); + object_to_luaval(tolua_S, "cc.Scheduler",(cocos2d::Scheduler*)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cocos2d::Scheduler* ret = cobj->getScheduler(); + object_to_luaval(tolua_S, "cc.Scheduler",(cocos2d::Scheduler*)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScheduler",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScheduler'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getParentToNodeAffineTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getParentToNodeAffineTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::AffineTransform ret = cobj->getParentToNodeAffineTransform(); + affinetransform_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParentToNodeAffineTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParentToNodeAffineTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getOrderOfArrival(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOrderOfArrival'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = cobj->getOrderOfArrival(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOrderOfArrival",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOrderOfArrival'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setActionManager(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setActionManager'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ActionManager* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.ActionManager",&arg0); + if(!ok) + return 0; + cobj->setActionManager(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setActionManager",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setActionManager'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Color3B arg0; + + ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.Node:setColor"); + if(!ok) + return 0; + cobj->setColor(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setColor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isRunning(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isRunning'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isRunning(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isRunning",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isRunning'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getParent(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getParent'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + const cocos2d::Node* ret = cobj->getParent(); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cocos2d::Node* ret = cobj->getParent(); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParent",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getPositionZ(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPositionZ'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getPositionZ(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionZ",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionZ'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getPositionY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPositionY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getPositionY(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getPositionX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPositionX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getPositionX(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPositionX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPositionX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeChildByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeChildByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:removeChildByTag"); + if(!ok) + return 0; + cobj->removeChildByTag(arg0); + return 0; + } + if (argc == 2) + { + int arg0; + bool arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:removeChildByTag"); + + ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.Node:removeChildByTag"); + if(!ok) + return 0; + cobj->removeChildByTag(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeChildByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeChildByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPositionY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPositionY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setPositionY"); + if(!ok) + return 0; + cobj->setPositionY(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPositionY",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPositionY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNodeToWorldAffineTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToWorldAffineTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::AffineTransform ret = cobj->getNodeToWorldAffineTransform(); + affinetransform_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToWorldAffineTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNodeToWorldAffineTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_updateDisplayedColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_updateDisplayedColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Color3B arg0; + + ok &= luaval_to_color3b(tolua_S, 2, &arg0, "cc.Node:updateDisplayedColor"); + if(!ok) + return 0; + cobj->updateDisplayedColor(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:updateDisplayedColor",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_updateDisplayedColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setVisible(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setVisible'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setVisible"); + if(!ok) + return 0; + cobj->setVisible(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setVisible",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setVisible'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getParentToNodeTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getParentToNodeTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Mat4& ret = cobj->getParentToNodeTransform(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getParentToNodeTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getParentToNodeTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setGlobalZOrder(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGlobalZOrder'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setGlobalZOrder"); + if(!ok) + return 0; + cobj->setGlobalZOrder(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGlobalZOrder",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGlobalZOrder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setScale(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setScale'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScale"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Node:setScale"); + + if (!ok) { break; } + cobj->setScale(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + double arg0; + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:setScale"); + + if (!ok) { break; } + cobj->setScale(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setScale",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setScale'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getChildByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getChildByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:getChildByTag"); + if(!ok) + return 0; + cocos2d::Node* ret = cobj->getChildByTag(arg0); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getChildByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getChildByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setOrderOfArrival(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setOrderOfArrival'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:setOrderOfArrival"); + if(!ok) + return 0; + cobj->setOrderOfArrival(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOrderOfArrival",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOrderOfArrival'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScaleZ(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScaleZ'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getScaleZ(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleZ",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleZ'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScaleY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScaleY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getScaleY(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScaleX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScaleX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getScaleX(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScaleX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScaleX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setLocalZOrder(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setLocalZOrder'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:setLocalZOrder"); + if(!ok) + return 0; + cobj->setLocalZOrder(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setLocalZOrder",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setLocalZOrder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getWorldToNodeAffineTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getWorldToNodeAffineTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::AffineTransform ret = cobj->getWorldToNodeAffineTransform(); + affinetransform_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getWorldToNodeAffineTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getWorldToNodeAffineTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setCascadeColorEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setCascadeColorEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:setCascadeColorEnabled"); + if(!ok) + return 0; + cobj->setCascadeColorEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setCascadeColorEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setCascadeColorEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setOpacity(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setOpacity'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + uint16_t arg0; + + ok &= luaval_to_uint16(tolua_S, 2,&arg0, "cc.Node:setOpacity"); + if(!ok) + return 0; + cobj->setOpacity(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setOpacity",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setOpacity'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_cleanup(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_cleanup'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->cleanup(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:cleanup",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_cleanup'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getComponent(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getComponent'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Node:getComponent"); + if(!ok) + return 0; + cocos2d::Component* ret = cobj->getComponent(arg0); + object_to_luaval(tolua_S, "cc.Component",(cocos2d::Component*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getComponent",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getComponent'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getContentSize(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getContentSize'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Size& ret = cobj->getContentSize(); + size_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getContentSize",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getContentSize'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_stopAllActionsByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_stopAllActionsByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:stopAllActionsByTag"); + if(!ok) + return 0; + cobj->stopAllActionsByTag(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAllActionsByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAllActionsByTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getColor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getColor'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Color3B& ret = cobj->getColor(); + color3b_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getColor",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getColor'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getBoundingBox(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getBoundingBox'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Rect ret = cobj->getBoundingBox(); + rect_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getBoundingBox",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getBoundingBox'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setEventDispatcher(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setEventDispatcher'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::EventDispatcher* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.EventDispatcher",&arg0); + if(!ok) + return 0; + cobj->setEventDispatcher(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setEventDispatcher",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setEventDispatcher'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getGlobalZOrder(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getGlobalZOrder'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getGlobalZOrder(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getGlobalZOrder",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getGlobalZOrder'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_draw(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_draw'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + cobj->draw(); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 3) { + cocos2d::Renderer* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Renderer",&arg0); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.Node:draw"); + + if (!ok) { break; } + unsigned int arg2; + ok &= luaval_to_uint32(tolua_S, 4,&arg2, "cc.Node:draw"); + + if (!ok) { break; } + cobj->draw(arg0, arg1, arg2); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:draw",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_draw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setUserObject(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setUserObject'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Ref* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Ref",&arg0); + if(!ok) + return 0; + cobj->setUserObject(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setUserObject",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setUserObject'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_removeFromParentAndCleanup(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_removeFromParentAndCleanup'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + bool arg0; + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Node:removeFromParentAndCleanup"); + + if (!ok) { break; } + cobj->removeFromParentAndCleanup(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cobj->removeFromParent(); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:removeFromParent",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_removeFromParentAndCleanup'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setPosition3D(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPosition3D'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec3 arg0; + + ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.Node:setPosition3D"); + if(!ok) + return 0; + cobj->setPosition3D(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPosition3D",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPosition3D'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_update(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_update'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Node:update"); + if(!ok) + return 0; + cobj->update(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:update",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_update'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_sortAllChildren(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_sortAllChildren'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->sortAllChildren(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:sortAllChildren",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_sortAllChildren'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getWorldToNodeTransform(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getWorldToNodeTransform'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Mat4 ret = cobj->getWorldToNodeTransform(); + mat4_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getWorldToNodeTransform",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getWorldToNodeTransform'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getScale(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getScale'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getScale(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getScale",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getScale'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getNormalizedPosition(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNormalizedPosition'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::Vec2& ret = cobj->getNormalizedPosition(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNormalizedPosition",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getNormalizedPosition'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getRotationSkewX(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getRotationSkewX'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getRotationSkewX(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotationSkewX",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotationSkewX'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getRotationSkewY(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getRotationSkewY'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getRotationSkewY(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getRotationSkewY",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getRotationSkewY'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_setTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:setTag"); + if(!ok) + return 0; + cobj->setTag(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setTag'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_isCascadeColorEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_isCascadeColorEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isCascadeColorEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:isCascadeColorEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_isCascadeColorEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_stopAction(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_stopAction'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Action* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Action",&arg0); + if(!ok) + return 0; + cobj->stopAction(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAction",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAction'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_getActionManager(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getActionManager'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 0) { + const cocos2d::ActionManager* ret = cobj->getActionManager(); + object_to_luaval(tolua_S, "cc.ActionManager",(cocos2d::ActionManager*)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cocos2d::ActionManager* ret = cobj->getActionManager(); + object_to_luaval(tolua_S, "cc.ActionManager",(cocos2d::ActionManager*)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getActionManager",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getActionManager'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Node_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,"cc.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Node* ret = cocos2d::Node::create(); + object_to_luaval(tolua_S, "cc.Node",(cocos2d::Node*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Node:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_Node_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Node)"); + return 0; +} + +int lua_register_cocos2dx_Node(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Node"); + tolua_cclass(tolua_S,"Node","cc.Node","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Node"); + tolua_function(tolua_S,"addChild",lua_cocos2dx_Node_addChild); + tolua_function(tolua_S,"removeComponent",lua_cocos2dx_Node_removeComponent); + tolua_function(tolua_S,"setPhysicsBody",lua_cocos2dx_Node_setPhysicsBody); + tolua_function(tolua_S,"getDescription",lua_cocos2dx_Node_getDescription); + tolua_function(tolua_S,"setRotationSkewY",lua_cocos2dx_Node_setRotationSkewY); + tolua_function(tolua_S,"setOpacityModifyRGB",lua_cocos2dx_Node_setOpacityModifyRGB); + tolua_function(tolua_S,"setCascadeOpacityEnabled",lua_cocos2dx_Node_setCascadeOpacityEnabled); + tolua_function(tolua_S,"getChildren",lua_cocos2dx_Node_getChildren); + tolua_function(tolua_S,"setOnExitCallback",lua_cocos2dx_Node_setOnExitCallback); + tolua_function(tolua_S,"pause",lua_cocos2dx_Node_pause); + tolua_function(tolua_S,"convertToWorldSpaceAR",lua_cocos2dx_Node_convertToWorldSpaceAR); + tolua_function(tolua_S,"isIgnoreAnchorPointForPosition",lua_cocos2dx_Node_isIgnoreAnchorPointForPosition); + tolua_function(tolua_S,"getChildByName",lua_cocos2dx_Node_getChildByName); + tolua_function(tolua_S,"updateDisplayedOpacity",lua_cocos2dx_Node_updateDisplayedOpacity); + tolua_function(tolua_S,"getCameraMask",lua_cocos2dx_Node_getCameraMask); + tolua_function(tolua_S,"setRotation",lua_cocos2dx_Node_setRotation); + tolua_function(tolua_S,"setScaleZ",lua_cocos2dx_Node_setScaleZ); + tolua_function(tolua_S,"setScaleY",lua_cocos2dx_Node_setScaleY); + tolua_function(tolua_S,"setScaleX",lua_cocos2dx_Node_setScaleX); + tolua_function(tolua_S,"setRotationSkewX",lua_cocos2dx_Node_setRotationSkewX); + tolua_function(tolua_S,"setonEnterTransitionDidFinishCallback",lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback); + tolua_function(tolua_S,"removeAllComponents",lua_cocos2dx_Node_removeAllComponents); + tolua_function(tolua_S,"_setLocalZOrder",lua_cocos2dx_Node__setLocalZOrder); + tolua_function(tolua_S,"setCameraMask",lua_cocos2dx_Node_setCameraMask); + tolua_function(tolua_S,"getTag",lua_cocos2dx_Node_getTag); + tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Node_getGLProgram); + tolua_function(tolua_S,"getNodeToWorldTransform",lua_cocos2dx_Node_getNodeToWorldTransform); + tolua_function(tolua_S,"getPosition3D",lua_cocos2dx_Node_getPosition3D); + tolua_function(tolua_S,"removeChild",lua_cocos2dx_Node_removeChild); + tolua_function(tolua_S,"convertToWorldSpace",lua_cocos2dx_Node_convertToWorldSpace); + tolua_function(tolua_S,"getScene",lua_cocos2dx_Node_getScene); + tolua_function(tolua_S,"getEventDispatcher",lua_cocos2dx_Node_getEventDispatcher); + tolua_function(tolua_S,"setSkewX",lua_cocos2dx_Node_setSkewX); + tolua_function(tolua_S,"setGLProgramState",lua_cocos2dx_Node_setGLProgramState); + tolua_function(tolua_S,"setOnEnterCallback",lua_cocos2dx_Node_setOnEnterCallback); + tolua_function(tolua_S,"getOpacity",lua_cocos2dx_Node_getOpacity); + tolua_function(tolua_S,"setNormalizedPosition",lua_cocos2dx_Node_setNormalizedPosition); + tolua_function(tolua_S,"setonExitTransitionDidStartCallback",lua_cocos2dx_Node_setonExitTransitionDidStartCallback); + tolua_function(tolua_S,"convertTouchToNodeSpace",lua_cocos2dx_Node_convertTouchToNodeSpace); + tolua_function(tolua_S,"removeAllChildren",lua_cocos2dx_Node_removeAllChildrenWithCleanup); + tolua_function(tolua_S,"getNodeToParentAffineTransform",lua_cocos2dx_Node_getNodeToParentAffineTransform); + tolua_function(tolua_S,"isCascadeOpacityEnabled",lua_cocos2dx_Node_isCascadeOpacityEnabled); + tolua_function(tolua_S,"setParent",lua_cocos2dx_Node_setParent); + tolua_function(tolua_S,"getName",lua_cocos2dx_Node_getName); + tolua_function(tolua_S,"getRotation3D",lua_cocos2dx_Node_getRotation3D); + tolua_function(tolua_S,"getNodeToParentTransform",lua_cocos2dx_Node_getNodeToParentTransform); + tolua_function(tolua_S,"convertTouchToNodeSpaceAR",lua_cocos2dx_Node_convertTouchToNodeSpaceAR); + tolua_function(tolua_S,"convertToNodeSpace",lua_cocos2dx_Node_convertToNodeSpace); + tolua_function(tolua_S,"resume",lua_cocos2dx_Node_resume); + tolua_function(tolua_S,"getPhysicsBody",lua_cocos2dx_Node_getPhysicsBody); + tolua_function(tolua_S,"setPosition",lua_cocos2dx_Node_setPosition); + tolua_function(tolua_S,"stopActionByTag",lua_cocos2dx_Node_stopActionByTag); + tolua_function(tolua_S,"reorderChild",lua_cocos2dx_Node_reorderChild); + tolua_function(tolua_S,"ignoreAnchorPointForPosition",lua_cocos2dx_Node_ignoreAnchorPointForPosition); + tolua_function(tolua_S,"setSkewY",lua_cocos2dx_Node_setSkewY); + tolua_function(tolua_S,"setPositionZ",lua_cocos2dx_Node_setPositionZ); + tolua_function(tolua_S,"setRotation3D",lua_cocos2dx_Node_setRotation3D); + tolua_function(tolua_S,"setPositionX",lua_cocos2dx_Node_setPositionX); + tolua_function(tolua_S,"setNodeToParentTransform",lua_cocos2dx_Node_setNodeToParentTransform); + tolua_function(tolua_S,"getAnchorPoint",lua_cocos2dx_Node_getAnchorPoint); + tolua_function(tolua_S,"getNumberOfRunningActions",lua_cocos2dx_Node_getNumberOfRunningActions); + tolua_function(tolua_S,"updateTransform",lua_cocos2dx_Node_updateTransform); + tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Node_setGLProgram); + tolua_function(tolua_S,"isVisible",lua_cocos2dx_Node_isVisible); + tolua_function(tolua_S,"getChildrenCount",lua_cocos2dx_Node_getChildrenCount); + tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR); + tolua_function(tolua_S,"addComponent",lua_cocos2dx_Node_addComponent); + tolua_function(tolua_S,"runAction",lua_cocos2dx_Node_runAction); + tolua_function(tolua_S,"isOpacityModifyRGB",lua_cocos2dx_Node_isOpacityModifyRGB); + tolua_function(tolua_S,"getRotation",lua_cocos2dx_Node_getRotation); + tolua_function(tolua_S,"getAnchorPointInPoints",lua_cocos2dx_Node_getAnchorPointInPoints); + tolua_function(tolua_S,"visit",lua_cocos2dx_Node_visit); + tolua_function(tolua_S,"removeChildByName",lua_cocos2dx_Node_removeChildByName); + tolua_function(tolua_S,"getGLProgramState",lua_cocos2dx_Node_getGLProgramState); + tolua_function(tolua_S,"setScheduler",lua_cocos2dx_Node_setScheduler); + tolua_function(tolua_S,"stopAllActions",lua_cocos2dx_Node_stopAllActions); + tolua_function(tolua_S,"getSkewX",lua_cocos2dx_Node_getSkewX); + tolua_function(tolua_S,"getSkewY",lua_cocos2dx_Node_getSkewY); + tolua_function(tolua_S,"getDisplayedColor",lua_cocos2dx_Node_getDisplayedColor); + tolua_function(tolua_S,"getActionByTag",lua_cocos2dx_Node_getActionByTag); + tolua_function(tolua_S,"setName",lua_cocos2dx_Node_setName); + tolua_function(tolua_S,"setAdditionalTransform",lua_cocos2dx_Node_setAdditionalTransform); + tolua_function(tolua_S,"getDisplayedOpacity",lua_cocos2dx_Node_getDisplayedOpacity); + tolua_function(tolua_S,"getLocalZOrder",lua_cocos2dx_Node_getLocalZOrder); + tolua_function(tolua_S,"getScheduler",lua_cocos2dx_Node_getScheduler); + tolua_function(tolua_S,"getParentToNodeAffineTransform",lua_cocos2dx_Node_getParentToNodeAffineTransform); + tolua_function(tolua_S,"getOrderOfArrival",lua_cocos2dx_Node_getOrderOfArrival); + tolua_function(tolua_S,"setActionManager",lua_cocos2dx_Node_setActionManager); + tolua_function(tolua_S,"setColor",lua_cocos2dx_Node_setColor); + tolua_function(tolua_S,"isRunning",lua_cocos2dx_Node_isRunning); + tolua_function(tolua_S,"getParent",lua_cocos2dx_Node_getParent); + tolua_function(tolua_S,"getPositionZ",lua_cocos2dx_Node_getPositionZ); + tolua_function(tolua_S,"getPositionY",lua_cocos2dx_Node_getPositionY); + tolua_function(tolua_S,"getPositionX",lua_cocos2dx_Node_getPositionX); + tolua_function(tolua_S,"removeChildByTag",lua_cocos2dx_Node_removeChildByTag); + tolua_function(tolua_S,"setPositionY",lua_cocos2dx_Node_setPositionY); + tolua_function(tolua_S,"getNodeToWorldAffineTransform",lua_cocos2dx_Node_getNodeToWorldAffineTransform); + tolua_function(tolua_S,"updateDisplayedColor",lua_cocos2dx_Node_updateDisplayedColor); + tolua_function(tolua_S,"setVisible",lua_cocos2dx_Node_setVisible); + tolua_function(tolua_S,"getParentToNodeTransform",lua_cocos2dx_Node_getParentToNodeTransform); + tolua_function(tolua_S,"setGlobalZOrder",lua_cocos2dx_Node_setGlobalZOrder); + tolua_function(tolua_S,"setScale",lua_cocos2dx_Node_setScale); + tolua_function(tolua_S,"getChildByTag",lua_cocos2dx_Node_getChildByTag); + tolua_function(tolua_S,"setOrderOfArrival",lua_cocos2dx_Node_setOrderOfArrival); + tolua_function(tolua_S,"getScaleZ",lua_cocos2dx_Node_getScaleZ); + tolua_function(tolua_S,"getScaleY",lua_cocos2dx_Node_getScaleY); + tolua_function(tolua_S,"getScaleX",lua_cocos2dx_Node_getScaleX); + tolua_function(tolua_S,"setLocalZOrder",lua_cocos2dx_Node_setLocalZOrder); + tolua_function(tolua_S,"getWorldToNodeAffineTransform",lua_cocos2dx_Node_getWorldToNodeAffineTransform); + tolua_function(tolua_S,"setCascadeColorEnabled",lua_cocos2dx_Node_setCascadeColorEnabled); + tolua_function(tolua_S,"setOpacity",lua_cocos2dx_Node_setOpacity); + tolua_function(tolua_S,"cleanup",lua_cocos2dx_Node_cleanup); + tolua_function(tolua_S,"getComponent",lua_cocos2dx_Node_getComponent); + tolua_function(tolua_S,"getContentSize",lua_cocos2dx_Node_getContentSize); + tolua_function(tolua_S,"stopAllActionsByTag",lua_cocos2dx_Node_stopAllActionsByTag); + tolua_function(tolua_S,"getColor",lua_cocos2dx_Node_getColor); + tolua_function(tolua_S,"getBoundingBox",lua_cocos2dx_Node_getBoundingBox); + tolua_function(tolua_S,"setEventDispatcher",lua_cocos2dx_Node_setEventDispatcher); + tolua_function(tolua_S,"getGlobalZOrder",lua_cocos2dx_Node_getGlobalZOrder); + tolua_function(tolua_S,"draw",lua_cocos2dx_Node_draw); + tolua_function(tolua_S,"setUserObject",lua_cocos2dx_Node_setUserObject); + tolua_function(tolua_S,"removeFromParent",lua_cocos2dx_Node_removeFromParentAndCleanup); + tolua_function(tolua_S,"setPosition3D",lua_cocos2dx_Node_setPosition3D); + tolua_function(tolua_S,"update",lua_cocos2dx_Node_update); + tolua_function(tolua_S,"sortAllChildren",lua_cocos2dx_Node_sortAllChildren); + tolua_function(tolua_S,"getWorldToNodeTransform",lua_cocos2dx_Node_getWorldToNodeTransform); + tolua_function(tolua_S,"getScale",lua_cocos2dx_Node_getScale); + tolua_function(tolua_S,"getNormalizedPosition",lua_cocos2dx_Node_getNormalizedPosition); + tolua_function(tolua_S,"getRotationSkewX",lua_cocos2dx_Node_getRotationSkewX); + tolua_function(tolua_S,"getRotationSkewY",lua_cocos2dx_Node_getRotationSkewY); + tolua_function(tolua_S,"setTag",lua_cocos2dx_Node_setTag); + tolua_function(tolua_S,"isCascadeColorEnabled",lua_cocos2dx_Node_isCascadeColorEnabled); + tolua_function(tolua_S,"stopAction",lua_cocos2dx_Node_stopAction); + tolua_function(tolua_S,"getActionManager",lua_cocos2dx_Node_getActionManager); + tolua_function(tolua_S,"create", lua_cocos2dx_Node_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Node).name(); + g_luaType[typeName] = "cc.Node"; + g_typeCast["Node"] = "cc.Node"; + return 1; +} + int lua_cocos2dx_Camera_getProjectionMatrix(lua_State* tolua_S) { int argc = 0; @@ -26338,6 +24507,52 @@ int lua_cocos2dx_ActionManager_update(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* 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.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + return 0; + cobj->pauseTarget(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:pauseTarget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_pauseTarget'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(lua_State* tolua_S) { int argc = 0; @@ -26523,7 +24738,7 @@ int lua_cocos2dx_ActionManager_removeAction(lua_State* tolua_S) return 0; } -int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) +int lua_cocos2dx_ActionManager_removeAllActionsByTag(lua_State* tolua_S) { int argc = 0; cocos2d::ActionManager* cobj = nullptr; @@ -26543,28 +24758,31 @@ int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; - if (argc == 1) + if (argc == 2) { - cocos2d::Node* arg0; + int arg0; + cocos2d::Node* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:removeAllActionsByTag"); + + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); if(!ok) return 0; - cobj->pauseTarget(arg0); + cobj->removeAllActionsByTag(arg0, arg1); return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:pauseTarget",argc, 1); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:removeAllActionsByTag",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_pauseTarget'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'.",&tolua_err); #endif return 0; @@ -26666,11 +24884,12 @@ int lua_register_cocos2dx_ActionManager(lua_State* tolua_S) tolua_function(tolua_S,"addAction",lua_cocos2dx_ActionManager_addAction); tolua_function(tolua_S,"resumeTarget",lua_cocos2dx_ActionManager_resumeTarget); tolua_function(tolua_S,"update",lua_cocos2dx_ActionManager_update); + tolua_function(tolua_S,"pauseTarget",lua_cocos2dx_ActionManager_pauseTarget); tolua_function(tolua_S,"getNumberOfRunningActionsInTarget",lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget); tolua_function(tolua_S,"removeAllActionsFromTarget",lua_cocos2dx_ActionManager_removeAllActionsFromTarget); tolua_function(tolua_S,"resumeTargets",lua_cocos2dx_ActionManager_resumeTargets); tolua_function(tolua_S,"removeAction",lua_cocos2dx_ActionManager_removeAction); - tolua_function(tolua_S,"pauseTarget",lua_cocos2dx_ActionManager_pauseTarget); + tolua_function(tolua_S,"removeAllActionsByTag",lua_cocos2dx_ActionManager_removeAllActionsByTag); tolua_function(tolua_S,"pauseAllRunningActions",lua_cocos2dx_ActionManager_pauseAllRunningActions); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::ActionManager).name(); @@ -33684,6 +31903,1389 @@ int lua_register_cocos2dx_CatmullRomBy(lua_State* tolua_S) return 1; } +int lua_cocos2dx_GLProgramState_setUniformTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformTexture'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + unsigned int arg1; + ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cocos2d::Texture2D* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cocos2d::Texture2D* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + unsigned int arg1; + ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformTexture",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformMat4(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformMat4'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cobj->setUniformMat4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cobj->setUniformMat4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformMat4",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformMat4'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_applyUniforms(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyUniforms'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->applyUniforms(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyUniforms",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyUniforms'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_applyGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Mat4 arg0; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgramState:applyGLProgram"); + if(!ok) + return 0; + cobj->applyGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getUniformCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getUniformCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getUniformCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getUniformCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getUniformCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_applyAttributes(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyAttributes'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->applyAttributes(); + return 0; + } + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLProgramState:applyAttributes"); + if(!ok) + return 0; + cobj->applyAttributes(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyAttributes",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyAttributes'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformFloat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformFloat'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + cobj->setUniformFloat(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + cobj->setUniformFloat(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformFloat",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformFloat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec3(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec3'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cobj->setUniformVec3(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cobj->setUniformVec3(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec3",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec3'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformInt(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformInt'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + cobj->setUniformInt(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + cobj->setUniformInt(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformInt",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformInt'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getVertexAttribCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getVertexAttribCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec4(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec4'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cocos2d::Vec4 arg1; + ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cobj->setUniformVec4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cocos2d::Vec4 arg1; + ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cobj->setUniformVec4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec4",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec4'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgram* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cobj->setGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec2(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec2'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cocos2d::Vec2 arg1; + ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cobj->setUniformVec2(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cocos2d::Vec2 arg1; + ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cobj->setUniformVec2(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec2",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec2'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getVertexAttribsFlags(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned int ret = cobj->getVertexAttribsFlags(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribsFlags",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_apply(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_apply'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Mat4 arg0; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgramState:apply"); + if(!ok) + return 0; + cobj->apply(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:apply",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_apply'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgram* ret = cobj->getGLProgram(); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getGLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::GLProgram* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::create(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:getOrCreateWithGLProgramName"); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgramName",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram(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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::GLProgram* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgram(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgram",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_GLProgramState_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (GLProgramState)"); + return 0; +} + +int lua_register_cocos2dx_GLProgramState(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.GLProgramState"); + tolua_cclass(tolua_S,"GLProgramState","cc.GLProgramState","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"GLProgramState"); + tolua_function(tolua_S,"setUniformTexture",lua_cocos2dx_GLProgramState_setUniformTexture); + tolua_function(tolua_S,"setUniformMat4",lua_cocos2dx_GLProgramState_setUniformMat4); + tolua_function(tolua_S,"applyUniforms",lua_cocos2dx_GLProgramState_applyUniforms); + tolua_function(tolua_S,"applyGLProgram",lua_cocos2dx_GLProgramState_applyGLProgram); + tolua_function(tolua_S,"getUniformCount",lua_cocos2dx_GLProgramState_getUniformCount); + tolua_function(tolua_S,"applyAttributes",lua_cocos2dx_GLProgramState_applyAttributes); + tolua_function(tolua_S,"setUniformFloat",lua_cocos2dx_GLProgramState_setUniformFloat); + tolua_function(tolua_S,"setUniformVec3",lua_cocos2dx_GLProgramState_setUniformVec3); + tolua_function(tolua_S,"setUniformInt",lua_cocos2dx_GLProgramState_setUniformInt); + tolua_function(tolua_S,"getVertexAttribCount",lua_cocos2dx_GLProgramState_getVertexAttribCount); + tolua_function(tolua_S,"setUniformVec4",lua_cocos2dx_GLProgramState_setUniformVec4); + tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_GLProgramState_setGLProgram); + tolua_function(tolua_S,"setUniformVec2",lua_cocos2dx_GLProgramState_setUniformVec2); + tolua_function(tolua_S,"getVertexAttribsFlags",lua_cocos2dx_GLProgramState_getVertexAttribsFlags); + tolua_function(tolua_S,"apply",lua_cocos2dx_GLProgramState_apply); + tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_GLProgramState_getGLProgram); + tolua_function(tolua_S,"create", lua_cocos2dx_GLProgramState_create); + tolua_function(tolua_S,"getOrCreateWithGLProgramName", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName); + tolua_function(tolua_S,"getOrCreateWithGLProgram", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::GLProgramState).name(); + g_luaType[typeName] = "cc.GLProgramState"; + g_typeCast["GLProgramState"] = "cc.GLProgramState"; + return 1; +} + +int lua_cocos2dx_AtlasNode_updateAtlasValues(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateAtlasValues(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:updateAtlasValues",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_getTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTexture'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Texture2D* ret = cobj->getTexture(); + object_to_luaval(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTexture",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_setTextureAtlas(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::TextureAtlas* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0); + if(!ok) + return 0; + cobj->setTextureAtlas(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTextureAtlas",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_getTextureAtlas(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); + object_to_luaval(tolua_S, "cc.TextureAtlas",(cocos2d::TextureAtlas*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTextureAtlas",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_getQuadsToDraw(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getQuadsToDraw(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getQuadsToDraw",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_setTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setTexture'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Texture2D* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + if(!ok) + return 0; + cobj->setTexture(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTexture",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_setQuadsToDraw(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + ssize_t arg0; + + ok &= luaval_to_ssize(tolua_S, 2, &arg0, "cc.AtlasNode:setQuadsToDraw"); + if(!ok) + return 0; + cobj->setQuadsToDraw(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setQuadsToDraw",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_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,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 4) + { + std::string arg0; + int arg1; + int arg2; + int arg3; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AtlasNode:create"); + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.AtlasNode:create"); + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.AtlasNode:create"); + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.AtlasNode:create"); + if(!ok) + return 0; + cocos2d::AtlasNode* ret = cocos2d::AtlasNode::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.AtlasNode",(cocos2d::AtlasNode*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AtlasNode:create",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_AtlasNode_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (AtlasNode)"); + return 0; +} + +int lua_register_cocos2dx_AtlasNode(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.AtlasNode"); + tolua_cclass(tolua_S,"AtlasNode","cc.AtlasNode","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"AtlasNode"); + tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_AtlasNode_updateAtlasValues); + tolua_function(tolua_S,"getTexture",lua_cocos2dx_AtlasNode_getTexture); + tolua_function(tolua_S,"setTextureAtlas",lua_cocos2dx_AtlasNode_setTextureAtlas); + tolua_function(tolua_S,"getTextureAtlas",lua_cocos2dx_AtlasNode_getTextureAtlas); + tolua_function(tolua_S,"getQuadsToDraw",lua_cocos2dx_AtlasNode_getQuadsToDraw); + tolua_function(tolua_S,"setTexture",lua_cocos2dx_AtlasNode_setTexture); + tolua_function(tolua_S,"setQuadsToDraw",lua_cocos2dx_AtlasNode_setQuadsToDraw); + tolua_function(tolua_S,"create", lua_cocos2dx_AtlasNode_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::AtlasNode).name(); + g_luaType[typeName] = "cc.AtlasNode"; + g_typeCast["AtlasNode"] = "cc.AtlasNode"; + return 1; +} + int lua_cocos2dx_DrawNode_drawQuadraticBezier(lua_State* tolua_S) { int argc = 0; @@ -34115,10 +33717,10 @@ int lua_register_cocos2dx_DrawNode(lua_State* tolua_S) return 1; } -int lua_cocos2dx_GLProgram_getFragmentShaderLog(lua_State* tolua_S) +int lua_cocos2dx_LabelAtlas_setString(lua_State* tolua_S) { int argc = 0; - cocos2d::GLProgram* cobj = nullptr; + cocos2d::LabelAtlas* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -34127,479 +33729,15 @@ int lua_cocos2dx_GLProgram_getFragmentShaderLog(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getFragmentShaderLog(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getFragmentShaderLog",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_initWithByteArrays(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithByteArrays'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - const char* arg0; - const char* arg1; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:initWithByteArrays"); arg0 = arg0_tmp.c_str(); - - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:initWithByteArrays"); arg1 = arg1_tmp.c_str(); - if(!ok) - return 0; - bool ret = cobj->initWithByteArrays(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithByteArrays",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithByteArrays'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_initWithFilenames(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithFilenames'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - std::string arg0; - std::string arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:initWithFilenames"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:initWithFilenames"); - if(!ok) - return 0; - bool ret = cobj->initWithFilenames(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithFilenames",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithFilenames'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_use(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_use'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->use(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:use",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_use'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_getVertexShaderLog(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getVertexShaderLog(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getVertexShaderLog",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_setUniformsForBuiltins(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Mat4 arg0; - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgram:setUniformsForBuiltins"); - - if (!ok) { break; } - cobj->setUniformsForBuiltins(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cobj->setUniformsForBuiltins(); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformsForBuiltins",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_updateUniforms(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_updateUniforms'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateUniforms(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:updateUniforms",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_updateUniforms'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_setUniformLocationWith1i(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - int arg0; - int arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWith1i"); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgram:setUniformLocationWith1i"); - if(!ok) - return 0; - cobj->setUniformLocationWith1i(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWith1i",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_reset(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_reset'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->reset(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:reset",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_reset'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_bindAttribLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_bindAttribLocation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - std::string arg0; - unsigned int arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:bindAttribLocation"); - - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgram:bindAttribLocation"); - if(!ok) - return 0; - cobj->bindAttribLocation(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:bindAttribLocation",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_bindAttribLocation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_getAttribLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getAttribLocation'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_setString'", nullptr); return 0; } #endif @@ -34609,27 +33747,129 @@ int lua_cocos2dx_GLProgram_getAttribLocation(lua_State* tolua_S) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:getAttribLocation"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:setString"); if(!ok) return 0; - int ret = cobj->getAttribLocation(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; + cobj->setString(arg0); + return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getAttribLocation",argc, 1); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:setString",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getAttribLocation'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_setString'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_GLProgram_link(lua_State* tolua_S) +int lua_cocos2dx_LabelAtlas_initWithString(lua_State* tolua_S) { int argc = 0; - cocos2d::GLProgram* cobj = nullptr; + cocos2d::LabelAtlas* 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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_initWithString'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 5) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg3; + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 5) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + cocos2d::Texture2D* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg3; + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:initWithString",argc, 5); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_initWithString'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_LabelAtlas_updateAtlasValues(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::LabelAtlas* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -34638,15 +33878,15 @@ int lua_cocos2dx_GLProgram_link(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_link'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_updateAtlasValues'", nullptr); return 0; } #endif @@ -34656,155 +33896,157 @@ int lua_cocos2dx_GLProgram_link(lua_State* tolua_S) { if(!ok) return 0; - bool ret = cobj->link(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; + cobj->updateAtlasValues(); + return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:link",argc, 0); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:updateAtlasValues",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_link'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_updateAtlasValues'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_GLProgram_createWithByteArrays(lua_State* tolua_S) +int lua_cocos2dx_LabelAtlas_getString(lua_State* tolua_S) { int argc = 0; + cocos2d::LabelAtlas* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif + #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; #endif - argc = lua_gettop(tolua_S) - 1; + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); - if (argc == 2) +#if COCOS2D_DEBUG >= 1 + if (!cobj) { - const char* arg0; - const char* arg1; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:createWithByteArrays"); arg0 = arg0_tmp.c_str(); - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:createWithByteArrays"); arg1 = arg1_tmp.c_str(); - if(!ok) - return 0; - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithByteArrays(arg0, arg1); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_getString'", nullptr); + return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithByteArrays",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithByteArrays'.",&tolua_err); #endif - return 0; -} -int lua_cocos2dx_GLProgram_createWithFilenames(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,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - std::string arg0; - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:createWithFilenames"); - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:createWithFilenames"); - if(!ok) - return 0; - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithFilenames(arg0, arg1); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithFilenames",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithFilenames'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgram_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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::GLProgram(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.GLProgram"); + const std::string& ret = cobj->getString(); + tolua_pushcppstring(tolua_S,ret); return 1; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:GLProgram",argc, 0); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:getString",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_constructor'.",&tolua_err); + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_getString'.",&tolua_err); #endif return 0; } - -static int lua_cocos2dx_GLProgram_finalize(lua_State* tolua_S) +int lua_cocos2dx_LabelAtlas_create(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (GLProgram)"); + 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,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 5) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:create"); + if (!ok) { break; } + int arg3; + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:create"); + if (!ok) { break; } + int arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:create"); + if (!ok) { break; } + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1, arg2, arg3, arg4); + object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 0) + { + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(); + object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); + if (!ok) { break; } + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); + return 1; + } + } while (0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.LabelAtlas:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_LabelAtlas_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (LabelAtlas)"); return 0; } -int lua_register_cocos2dx_GLProgram(lua_State* tolua_S) +int lua_register_cocos2dx_LabelAtlas(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.GLProgram"); - tolua_cclass(tolua_S,"GLProgram","cc.GLProgram","cc.Ref",nullptr); + tolua_usertype(tolua_S,"cc.LabelAtlas"); + tolua_cclass(tolua_S,"LabelAtlas","cc.LabelAtlas","cc.AtlasNode",nullptr); - tolua_beginmodule(tolua_S,"GLProgram"); - tolua_function(tolua_S,"new",lua_cocos2dx_GLProgram_constructor); - tolua_function(tolua_S,"getFragmentShaderLog",lua_cocos2dx_GLProgram_getFragmentShaderLog); - tolua_function(tolua_S,"initWithByteArrays",lua_cocos2dx_GLProgram_initWithByteArrays); - tolua_function(tolua_S,"initWithFilenames",lua_cocos2dx_GLProgram_initWithFilenames); - tolua_function(tolua_S,"use",lua_cocos2dx_GLProgram_use); - tolua_function(tolua_S,"getVertexShaderLog",lua_cocos2dx_GLProgram_getVertexShaderLog); - tolua_function(tolua_S,"setUniformsForBuiltins",lua_cocos2dx_GLProgram_setUniformsForBuiltins); - tolua_function(tolua_S,"updateUniforms",lua_cocos2dx_GLProgram_updateUniforms); - tolua_function(tolua_S,"setUniformLocationI32",lua_cocos2dx_GLProgram_setUniformLocationWith1i); - tolua_function(tolua_S,"reset",lua_cocos2dx_GLProgram_reset); - tolua_function(tolua_S,"bindAttribLocation",lua_cocos2dx_GLProgram_bindAttribLocation); - tolua_function(tolua_S,"getAttribLocation",lua_cocos2dx_GLProgram_getAttribLocation); - tolua_function(tolua_S,"link",lua_cocos2dx_GLProgram_link); - tolua_function(tolua_S,"createWithByteArrays", lua_cocos2dx_GLProgram_createWithByteArrays); - tolua_function(tolua_S,"createWithFilenames", lua_cocos2dx_GLProgram_createWithFilenames); + tolua_beginmodule(tolua_S,"LabelAtlas"); + tolua_function(tolua_S,"setString",lua_cocos2dx_LabelAtlas_setString); + tolua_function(tolua_S,"initWithString",lua_cocos2dx_LabelAtlas_initWithString); + tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_LabelAtlas_updateAtlasValues); + tolua_function(tolua_S,"getString",lua_cocos2dx_LabelAtlas_getString); + tolua_function(tolua_S,"_create", lua_cocos2dx_LabelAtlas_create); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::GLProgram).name(); - g_luaType[typeName] = "cc.GLProgram"; - g_typeCast["GLProgram"] = "cc.GLProgram"; + std::string typeName = typeid(cocos2d::LabelAtlas).name(); + g_luaType[typeName] = "cc.LabelAtlas"; + g_typeCast["LabelAtlas"] = "cc.LabelAtlas"; return 1; } @@ -39174,6 +38416,168 @@ int lua_register_cocos2dx_LayerMultiplex(lua_State* tolua_S) return 1; } +int lua_cocos2dx_Scene_getPhysicsWorld(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Scene* 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.Scene",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Scene*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scene_getPhysicsWorld'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::PhysicsWorld* ret = cobj->getPhysicsWorld(); + object_to_luaval(tolua_S, "cc.PhysicsWorld",(cocos2d::PhysicsWorld*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:getPhysicsWorld",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_getPhysicsWorld'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_Scene_createWithSize(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,"cc.Scene",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Size arg0; + ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.Scene:createWithSize"); + if(!ok) + return 0; + cocos2d::Scene* ret = cocos2d::Scene::createWithSize(arg0); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:createWithSize",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_createWithSize'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Scene_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,"cc.Scene",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Scene* ret = cocos2d::Scene::create(); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:create",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_Scene_createWithPhysics(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,"cc.Scene",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Scene* ret = cocos2d::Scene::createWithPhysics(); + object_to_luaval(tolua_S, "cc.Scene",(cocos2d::Scene*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Scene:createWithPhysics",argc, 0); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_createWithPhysics'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_Scene_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Scene)"); + return 0; +} + +int lua_register_cocos2dx_Scene(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Scene"); + tolua_cclass(tolua_S,"Scene","cc.Scene","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"Scene"); + tolua_function(tolua_S,"getPhysicsWorld",lua_cocos2dx_Scene_getPhysicsWorld); + tolua_function(tolua_S,"createWithSize", lua_cocos2dx_Scene_createWithSize); + tolua_function(tolua_S,"create", lua_cocos2dx_Scene_create); + tolua_function(tolua_S,"createWithPhysics", lua_cocos2dx_Scene_createWithPhysics); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Scene).name(); + g_luaType[typeName] = "cc.Scene"; + g_typeCast["Scene"] = "cc.Scene"; + return 1; +} + int lua_cocos2dx_TransitionEaseScene_easeActionWithAction(lua_State* tolua_S) { int argc = 0; @@ -45043,6 +44447,618 @@ int lua_register_cocos2dx_MotionStreak(lua_State* tolua_S) return 1; } +int lua_cocos2dx_ProgressTimer_isReverseDirection(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isReverseDirection(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:isReverseDirection",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setBarChangeRate(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setBarChangeRate"); + if(!ok) + return 0; + cobj->setBarChangeRate(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setBarChangeRate",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getPercentage(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getPercentage'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getPercentage(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getPercentage",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getPercentage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setSprite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setSprite'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Sprite* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + if(!ok) + return 0; + cobj->setSprite(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setSprite",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setSprite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getType'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cobj->getType(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getSprite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getSprite'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Sprite* ret = cobj->getSprite(); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getSprite",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getSprite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setMidpoint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setMidpoint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setMidpoint"); + if(!ok) + return 0; + cobj->setMidpoint(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setMidpoint",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setMidpoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getBarChangeRate(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getBarChangeRate(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getBarChangeRate",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setReverseDirection(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + bool arg0; + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); + + if (!ok) { break; } + cobj->setReverseDirection(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + bool arg0; + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); + + if (!ok) { break; } + cobj->setReverseProgress(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setReverseProgress",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getMidpoint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getMidpoint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getMidpoint(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getMidpoint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getMidpoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setPercentage(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setPercentage'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ProgressTimer:setPercentage"); + if(!ok) + return 0; + cobj->setPercentage(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setPercentage",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setPercentage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setType'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ProgressTimer::Type arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProgressTimer:setType"); + if(!ok) + return 0; + cobj->setType(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setType",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_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,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Sprite* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + if(!ok) + return 0; + cocos2d::ProgressTimer* ret = cocos2d::ProgressTimer::create(arg0); + object_to_luaval(tolua_S, "cc.ProgressTimer",(cocos2d::ProgressTimer*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ProgressTimer:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_ProgressTimer_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ProgressTimer)"); + return 0; +} + +int lua_register_cocos2dx_ProgressTimer(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ProgressTimer"); + tolua_cclass(tolua_S,"ProgressTimer","cc.ProgressTimer","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"ProgressTimer"); + tolua_function(tolua_S,"isReverseDirection",lua_cocos2dx_ProgressTimer_isReverseDirection); + tolua_function(tolua_S,"setBarChangeRate",lua_cocos2dx_ProgressTimer_setBarChangeRate); + tolua_function(tolua_S,"getPercentage",lua_cocos2dx_ProgressTimer_getPercentage); + tolua_function(tolua_S,"setSprite",lua_cocos2dx_ProgressTimer_setSprite); + tolua_function(tolua_S,"getType",lua_cocos2dx_ProgressTimer_getType); + tolua_function(tolua_S,"getSprite",lua_cocos2dx_ProgressTimer_getSprite); + tolua_function(tolua_S,"setMidpoint",lua_cocos2dx_ProgressTimer_setMidpoint); + tolua_function(tolua_S,"getBarChangeRate",lua_cocos2dx_ProgressTimer_getBarChangeRate); + tolua_function(tolua_S,"setReverseDirection",lua_cocos2dx_ProgressTimer_setReverseDirection); + tolua_function(tolua_S,"getMidpoint",lua_cocos2dx_ProgressTimer_getMidpoint); + tolua_function(tolua_S,"setPercentage",lua_cocos2dx_ProgressTimer_setPercentage); + tolua_function(tolua_S,"setType",lua_cocos2dx_ProgressTimer_setType); + tolua_function(tolua_S,"create", lua_cocos2dx_ProgressTimer_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ProgressTimer).name(); + g_luaType[typeName] = "cc.ProgressTimer"; + g_typeCast["ProgressTimer"] = "cc.ProgressTimer"; + return 1; +} + int lua_cocos2dx_Sprite_setSpriteFrame(lua_State* tolua_S) { int argc = 0; @@ -46446,618 +46462,6 @@ int lua_register_cocos2dx_Sprite(lua_State* tolua_S) return 1; } -int lua_cocos2dx_ProgressTimer_isReverseDirection(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isReverseDirection(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:isReverseDirection",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setBarChangeRate(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setBarChangeRate"); - if(!ok) - return 0; - cobj->setBarChangeRate(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setBarChangeRate",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getPercentage(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getPercentage'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getPercentage(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getPercentage",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getPercentage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setSprite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Sprite* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); - if(!ok) - return 0; - cobj->setSprite(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setSprite",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setSprite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getType(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getType'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = (int)cobj->getType(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getType",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getType'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getSprite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Sprite* ret = cobj->getSprite(); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getSprite",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getSprite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setMidpoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setMidpoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setMidpoint"); - if(!ok) - return 0; - cobj->setMidpoint(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setMidpoint",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setMidpoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getBarChangeRate(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getBarChangeRate(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getBarChangeRate",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setReverseDirection(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); - - if (!ok) { break; } - cobj->setReverseDirection(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); - - if (!ok) { break; } - cobj->setReverseProgress(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setReverseProgress",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getMidpoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getMidpoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getMidpoint(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getMidpoint",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getMidpoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setPercentage(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setPercentage'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ProgressTimer:setPercentage"); - if(!ok) - return 0; - cobj->setPercentage(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setPercentage",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setPercentage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setType(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setType'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ProgressTimer::Type arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProgressTimer:setType"); - if(!ok) - return 0; - cobj->setType(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setType",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setType'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_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,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); - if(!ok) - return 0; - cocos2d::ProgressTimer* ret = cocos2d::ProgressTimer::create(arg0); - object_to_luaval(tolua_S, "cc.ProgressTimer",(cocos2d::ProgressTimer*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ProgressTimer:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_ProgressTimer_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (ProgressTimer)"); - return 0; -} - -int lua_register_cocos2dx_ProgressTimer(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.ProgressTimer"); - tolua_cclass(tolua_S,"ProgressTimer","cc.ProgressTimer","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"ProgressTimer"); - tolua_function(tolua_S,"isReverseDirection",lua_cocos2dx_ProgressTimer_isReverseDirection); - tolua_function(tolua_S,"setBarChangeRate",lua_cocos2dx_ProgressTimer_setBarChangeRate); - tolua_function(tolua_S,"getPercentage",lua_cocos2dx_ProgressTimer_getPercentage); - tolua_function(tolua_S,"setSprite",lua_cocos2dx_ProgressTimer_setSprite); - tolua_function(tolua_S,"getType",lua_cocos2dx_ProgressTimer_getType); - tolua_function(tolua_S,"getSprite",lua_cocos2dx_ProgressTimer_getSprite); - tolua_function(tolua_S,"setMidpoint",lua_cocos2dx_ProgressTimer_setMidpoint); - tolua_function(tolua_S,"getBarChangeRate",lua_cocos2dx_ProgressTimer_getBarChangeRate); - tolua_function(tolua_S,"setReverseDirection",lua_cocos2dx_ProgressTimer_setReverseDirection); - tolua_function(tolua_S,"getMidpoint",lua_cocos2dx_ProgressTimer_getMidpoint); - tolua_function(tolua_S,"setPercentage",lua_cocos2dx_ProgressTimer_setPercentage); - tolua_function(tolua_S,"setType",lua_cocos2dx_ProgressTimer_setType); - tolua_function(tolua_S,"create", lua_cocos2dx_ProgressTimer_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::ProgressTimer).name(); - g_luaType[typeName] = "cc.ProgressTimer"; - g_typeCast["ProgressTimer"] = "cc.ProgressTimer"; - return 1; -} - int lua_cocos2dx_Image_hasPremultipliedAlpha(lua_State* tolua_S) { int argc = 0; @@ -56664,6 +56068,699 @@ int lua_register_cocos2dx_TiledGrid3D(lua_State* tolua_S) return 1; } +int lua_cocos2dx_GLProgram_getFragmentShaderLog(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getFragmentShaderLog(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getFragmentShaderLog",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_initWithByteArrays(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithByteArrays'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + const char* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:initWithByteArrays"); arg0 = arg0_tmp.c_str(); + + std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:initWithByteArrays"); arg1 = arg1_tmp.c_str(); + if(!ok) + return 0; + bool ret = cobj->initWithByteArrays(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithByteArrays",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithByteArrays'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_initWithFilenames(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithFilenames'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + std::string arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:initWithFilenames"); + + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:initWithFilenames"); + if(!ok) + return 0; + bool ret = cobj->initWithFilenames(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithFilenames",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithFilenames'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_use(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_use'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->use(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:use",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_use'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_getVertexShaderLog(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getVertexShaderLog(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getVertexShaderLog",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_setUniformsForBuiltins(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Mat4 arg0; + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgram:setUniformsForBuiltins"); + + if (!ok) { break; } + cobj->setUniformsForBuiltins(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cobj->setUniformsForBuiltins(); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformsForBuiltins",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_updateUniforms(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_updateUniforms'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateUniforms(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:updateUniforms",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_updateUniforms'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_setUniformLocationWith1i(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + int arg0; + int arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWith1i"); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgram:setUniformLocationWith1i"); + if(!ok) + return 0; + cobj->setUniformLocationWith1i(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWith1i",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_reset(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_reset'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->reset(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:reset",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_reset'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_bindAttribLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_bindAttribLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + unsigned int arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:bindAttribLocation"); + + ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgram:bindAttribLocation"); + if(!ok) + return 0; + cobj->bindAttribLocation(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:bindAttribLocation",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_bindAttribLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_getAttribLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getAttribLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:getAttribLocation"); + if(!ok) + return 0; + int ret = cobj->getAttribLocation(arg0); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getAttribLocation",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getAttribLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_link(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_link'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->link(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:link",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_link'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_createWithByteArrays(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,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + const char* arg0; + const char* arg1; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:createWithByteArrays"); arg0 = arg0_tmp.c_str(); + std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:createWithByteArrays"); arg1 = arg1_tmp.c_str(); + if(!ok) + return 0; + cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithByteArrays(arg0, arg1); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithByteArrays",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithByteArrays'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgram_createWithFilenames(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,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + std::string arg0; + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:createWithFilenames"); + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:createWithFilenames"); + if(!ok) + return 0; + cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithFilenames(arg0, arg1); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithFilenames",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithFilenames'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgram_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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::GLProgram(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.GLProgram"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:GLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_GLProgram_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (GLProgram)"); + return 0; +} + +int lua_register_cocos2dx_GLProgram(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.GLProgram"); + tolua_cclass(tolua_S,"GLProgram","cc.GLProgram","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"GLProgram"); + tolua_function(tolua_S,"new",lua_cocos2dx_GLProgram_constructor); + tolua_function(tolua_S,"getFragmentShaderLog",lua_cocos2dx_GLProgram_getFragmentShaderLog); + tolua_function(tolua_S,"initWithByteArrays",lua_cocos2dx_GLProgram_initWithByteArrays); + tolua_function(tolua_S,"initWithFilenames",lua_cocos2dx_GLProgram_initWithFilenames); + tolua_function(tolua_S,"use",lua_cocos2dx_GLProgram_use); + tolua_function(tolua_S,"getVertexShaderLog",lua_cocos2dx_GLProgram_getVertexShaderLog); + tolua_function(tolua_S,"setUniformsForBuiltins",lua_cocos2dx_GLProgram_setUniformsForBuiltins); + tolua_function(tolua_S,"updateUniforms",lua_cocos2dx_GLProgram_updateUniforms); + tolua_function(tolua_S,"setUniformLocationI32",lua_cocos2dx_GLProgram_setUniformLocationWith1i); + tolua_function(tolua_S,"reset",lua_cocos2dx_GLProgram_reset); + tolua_function(tolua_S,"bindAttribLocation",lua_cocos2dx_GLProgram_bindAttribLocation); + tolua_function(tolua_S,"getAttribLocation",lua_cocos2dx_GLProgram_getAttribLocation); + tolua_function(tolua_S,"link",lua_cocos2dx_GLProgram_link); + tolua_function(tolua_S,"createWithByteArrays", lua_cocos2dx_GLProgram_createWithByteArrays); + tolua_function(tolua_S,"createWithFilenames", lua_cocos2dx_GLProgram_createWithFilenames); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::GLProgram).name(); + g_luaType[typeName] = "cc.GLProgram"; + g_typeCast["GLProgram"] = "cc.GLProgram"; + return 1; +} + int lua_cocos2dx_GLProgramCache_addGLProgram(lua_State* tolua_S) { int argc = 0; @@ -64573,9 +64670,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_FiniteTimeAction(tolua_S); lua_register_cocos2dx_ActionInstant(tolua_S); lua_register_cocos2dx_Hide(tolua_S); - lua_register_cocos2dx_ParticleSystem(tolua_S); - lua_register_cocos2dx_ParticleSystemQuad(tolua_S); - lua_register_cocos2dx_ParticleSpiral(tolua_S); + lua_register_cocos2dx_Scheduler(tolua_S); lua_register_cocos2dx_GridBase(tolua_S); lua_register_cocos2dx_AnimationCache(tolua_S); lua_register_cocos2dx_ActionInterval(tolua_S); @@ -64589,21 +64684,23 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_EventListenerMouse(tolua_S); lua_register_cocos2dx_TransitionRotoZoom(tolua_S); lua_register_cocos2dx_Director(tolua_S); - lua_register_cocos2dx_Scheduler(tolua_S); + lua_register_cocos2dx_Texture2D(tolua_S); lua_register_cocos2dx_ActionEase(tolua_S); lua_register_cocos2dx_EaseElastic(tolua_S); lua_register_cocos2dx_EaseElasticOut(tolua_S); lua_register_cocos2dx_EaseQuadraticActionInOut(tolua_S); lua_register_cocos2dx_EaseBackOut(tolua_S); - lua_register_cocos2dx_Texture2D(tolua_S); lua_register_cocos2dx_TransitionSceneOriented(tolua_S); lua_register_cocos2dx_TransitionFlipX(tolua_S); + lua_register_cocos2dx_ParticleSystem(tolua_S); + lua_register_cocos2dx_ParticleSystemQuad(tolua_S); lua_register_cocos2dx_GridAction(tolua_S); lua_register_cocos2dx_TiledGrid3DAction(tolua_S); lua_register_cocos2dx_FadeOutTRTiles(tolua_S); lua_register_cocos2dx_FadeOutUpTiles(tolua_S); lua_register_cocos2dx_FadeOutDownTiles(tolua_S); lua_register_cocos2dx_StopGrid(tolua_S); + lua_register_cocos2dx_ParticleSpiral(tolua_S); lua_register_cocos2dx_SkewTo(tolua_S); lua_register_cocos2dx_SkewBy(tolua_S); lua_register_cocos2dx_EaseQuadraticActionOut(tolua_S); @@ -64614,7 +64711,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_Grid3DAction(tolua_S); lua_register_cocos2dx_FadeTo(tolua_S); lua_register_cocos2dx_FadeIn(tolua_S); - lua_register_cocos2dx_ShakyTiles3D(tolua_S); + lua_register_cocos2dx_GLProgramState(tolua_S); lua_register_cocos2dx_EventListenerCustom(tolua_S); lua_register_cocos2dx_FlipX3D(tolua_S); lua_register_cocos2dx_FlipY3D(tolua_S); @@ -64668,7 +64765,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_RepeatForever(tolua_S); lua_register_cocos2dx_Place(tolua_S); lua_register_cocos2dx_EventListenerAcceleration(tolua_S); - lua_register_cocos2dx_GLProgram(tolua_S); + lua_register_cocos2dx_TiledGrid3D(tolua_S); lua_register_cocos2dx_EaseBounceOut(tolua_S); lua_register_cocos2dx_RenderTexture(tolua_S); lua_register_cocos2dx_TintBy(tolua_S); @@ -64689,7 +64786,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TMXLayerInfo(tolua_S); lua_register_cocos2dx_EaseSineIn(tolua_S); lua_register_cocos2dx_EaseBounceIn(tolua_S); - lua_register_cocos2dx_TiledGrid3D(tolua_S); + lua_register_cocos2dx_GLProgram(tolua_S); lua_register_cocos2dx_ParticleGalaxy(tolua_S); lua_register_cocos2dx_Twirl(tolua_S); lua_register_cocos2dx_MenuItemLabel(tolua_S); @@ -64733,7 +64830,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_ScaleTo(tolua_S); lua_register_cocos2dx_Spawn(tolua_S); lua_register_cocos2dx_EaseQuarticActionInOut(tolua_S); - lua_register_cocos2dx_GLProgramState(tolua_S); + lua_register_cocos2dx_ShakyTiles3D(tolua_S); lua_register_cocos2dx_PageTurn3D(tolua_S); lua_register_cocos2dx_TransitionSlideInL(tolua_S); lua_register_cocos2dx_TransitionSlideInT(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index e4b2d6b037..4d85878dfc 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1558,6 +1558,8 @@ int register_all_cocos2dx(lua_State* tolua_S); + + diff --git a/extensions/GUI/CCScrollView/CCTableViewCell.cpp b/extensions/GUI/CCScrollView/CCTableViewCell.cpp index 3222775cbb..149179a347 100644 --- a/extensions/GUI/CCScrollView/CCTableViewCell.cpp +++ b/extensions/GUI/CCScrollView/CCTableViewCell.cpp @@ -24,7 +24,6 @@ ****************************************************************************/ #include "CCTableViewCell.h" -#include "base/ccCArray.h" NS_CC_EXT_BEGIN diff --git a/extensions/assets-manager/AssetsManager.cpp b/extensions/assets-manager/AssetsManager.cpp index bed33101ad..241243199b 100644 --- a/extensions/assets-manager/AssetsManager.cpp +++ b/extensions/assets-manager/AssetsManager.cpp @@ -22,7 +22,6 @@ THE SOFTWARE. ****************************************************************************/ #include "AssetsManager.h" -#include "cocos2d.h" #include #include @@ -37,6 +36,10 @@ #include #endif +#include "base/CCDirector.h" +#include "base/CCScheduler.h" +#include "base/CCUserDefault.h" +#include "platform/CCFileUtils.h" #include "unzip.h" diff --git a/extensions/assets-manager/AssetsManager.h b/extensions/assets-manager/AssetsManager.h index 7032d381a7..f8221883b7 100644 --- a/extensions/assets-manager/AssetsManager.h +++ b/extensions/assets-manager/AssetsManager.h @@ -29,7 +29,7 @@ #include -#include "cocos2d.h" +#include "2d/CCNode.h" #include "extensions/ExtensionMacros.h" #include "extensions/ExtensionExport.h" From 1dcdbca4e06a14705b8a467b6fe6ac7109fba583 Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 29 Aug 2014 15:54:20 +0800 Subject: [PATCH 37/74] revert lua-bindings --- .../lua-bindings/auto/api/ActionManager.lua | 8 +- .../scripting/lua-bindings/auto/api/Node.lua | 5 - .../auto/api/lua_cocos2dx_3d_auto_api.lua | 8 +- .../auto/api/lua_cocos2dx_auto_api.lua | 92 +- .../auto/lua_cocos2dx_3d_auto.cpp | 1962 ++++++++--------- .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 115 +- .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 2 - 7 files changed, 1041 insertions(+), 1151 deletions(-) diff --git a/cocos/scripting/lua-bindings/auto/api/ActionManager.lua b/cocos/scripting/lua-bindings/auto/api/ActionManager.lua index 8597ac46f3..28013accad 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionManager.lua @@ -38,11 +38,6 @@ -- @param self -- @param #float float --------------------------------- --- @function [parent=#ActionManager] pauseTarget --- @param self --- @param #cc.Node node - -------------------------------- -- @function [parent=#ActionManager] getNumberOfRunningActionsInTarget -- @param self @@ -65,9 +60,8 @@ -- @param #cc.Action action -------------------------------- --- @function [parent=#ActionManager] removeAllActionsByTag +-- @function [parent=#ActionManager] pauseTarget -- @param self --- @param #int int -- @param #cc.Node node -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index e97163ead5..78ed3e036e 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -614,11 +614,6 @@ -- @param self -- @return size_table#size_table ret (return value: size_table) --------------------------------- --- @function [parent=#Node] stopAllActionsByTag --- @param self --- @param #int int - -------------------------------- -- @function [parent=#Node] getColor -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua index 99551a8c83..5f7bcabe55 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua @@ -2,8 +2,8 @@ -- @module cc -------------------------------------------------------- --- the cc Skeleton3D --- @field [parent=#cc] Skeleton3D#Skeleton3D Skeleton3D preloaded module +-- the cc Mesh +-- @field [parent=#cc] Mesh#Mesh Mesh preloaded module -------------------------------------------------------- @@ -12,8 +12,8 @@ -------------------------------------------------------- --- the cc Mesh --- @field [parent=#cc] Mesh#Mesh Mesh preloaded module +-- the cc Skeleton3D +-- @field [parent=#cc] Skeleton3D#Skeleton3D Skeleton3D preloaded module -------------------------------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua index 0d6497c878..92622ff8ba 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua @@ -11,6 +11,16 @@ -- @field [parent=#cc] Console#Console Console preloaded module +-------------------------------------------------------- +-- the cc Texture2D +-- @field [parent=#cc] Texture2D#Texture2D Texture2D preloaded module + + +-------------------------------------------------------- +-- the cc Touch +-- @field [parent=#cc] Touch#Touch Touch preloaded module + + -------------------------------------------------------- -- the cc Event -- @field [parent=#cc] Event#Event Event preloaded module @@ -21,6 +31,36 @@ -- @field [parent=#cc] EventTouch#EventTouch EventTouch preloaded module +-------------------------------------------------------- +-- the cc EventKeyboard +-- @field [parent=#cc] EventKeyboard#EventKeyboard EventKeyboard preloaded module + + +-------------------------------------------------------- +-- the cc Node +-- @field [parent=#cc] Node#Node Node preloaded module + + +-------------------------------------------------------- +-- the cc GLProgramState +-- @field [parent=#cc] GLProgramState#GLProgramState GLProgramState preloaded module + + +-------------------------------------------------------- +-- the cc AtlasNode +-- @field [parent=#cc] AtlasNode#AtlasNode AtlasNode preloaded module + + +-------------------------------------------------------- +-- the cc LabelAtlas +-- @field [parent=#cc] LabelAtlas#LabelAtlas LabelAtlas preloaded module + + +-------------------------------------------------------- +-- the cc Scene +-- @field [parent=#cc] Scene#Scene Scene preloaded module + + -------------------------------------------------------- -- the cc GLView -- @field [parent=#cc] GLView#GLView GLView preloaded module @@ -51,26 +91,6 @@ -- @field [parent=#cc] UserDefault#UserDefault UserDefault preloaded module --------------------------------------------------------- --- the cc Texture2D --- @field [parent=#cc] Texture2D#Texture2D Texture2D preloaded module - - --------------------------------------------------------- --- the cc Touch --- @field [parent=#cc] Touch#Touch Touch preloaded module - - --------------------------------------------------------- --- the cc EventKeyboard --- @field [parent=#cc] EventKeyboard#EventKeyboard EventKeyboard preloaded module - - --------------------------------------------------------- --- the cc Node --- @field [parent=#cc] Node#Node Node preloaded module - - -------------------------------------------------------- -- the cc Camera -- @field [parent=#cc] Camera#Camera Camera preloaded module @@ -726,24 +746,14 @@ -- @field [parent=#cc] CatmullRomBy#CatmullRomBy CatmullRomBy preloaded module --------------------------------------------------------- --- the cc GLProgramState --- @field [parent=#cc] GLProgramState#GLProgramState GLProgramState preloaded module - - --------------------------------------------------------- --- the cc AtlasNode --- @field [parent=#cc] AtlasNode#AtlasNode AtlasNode preloaded module - - -------------------------------------------------------- -- the cc DrawNode -- @field [parent=#cc] DrawNode#DrawNode DrawNode preloaded module -------------------------------------------------------- --- the cc LabelAtlas --- @field [parent=#cc] LabelAtlas#LabelAtlas LabelAtlas preloaded module +-- the cc GLProgram +-- @field [parent=#cc] GLProgram#GLProgram GLProgram preloaded module -------------------------------------------------------- @@ -776,11 +786,6 @@ -- @field [parent=#cc] LayerMultiplex#LayerMultiplex LayerMultiplex preloaded module --------------------------------------------------------- --- the cc Scene --- @field [parent=#cc] Scene#Scene Scene preloaded module - - -------------------------------------------------------- -- the cc TransitionEaseScene -- @field [parent=#cc] TransitionEaseScene#TransitionEaseScene TransitionEaseScene preloaded module @@ -1017,13 +1022,13 @@ -------------------------------------------------------- --- the cc ProgressTimer --- @field [parent=#cc] ProgressTimer#ProgressTimer ProgressTimer preloaded module +-- the cc Sprite +-- @field [parent=#cc] Sprite#Sprite Sprite preloaded module -------------------------------------------------------- --- the cc Sprite --- @field [parent=#cc] Sprite#Sprite Sprite preloaded module +-- the cc ProgressTimer +-- @field [parent=#cc] ProgressTimer#ProgressTimer ProgressTimer preloaded module -------------------------------------------------------- @@ -1126,11 +1131,6 @@ -- @field [parent=#cc] TiledGrid3D#TiledGrid3D TiledGrid3D preloaded module --------------------------------------------------------- --- the cc GLProgram --- @field [parent=#cc] GLProgram#GLProgram GLProgram preloaded module - - -------------------------------------------------------- -- the cc GLProgramCache -- @field [parent=#cc] GLProgramCache#GLProgramCache GLProgramCache preloaded module diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 77190063f7..08c7fc576c 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -5,987 +5,6 @@ -int lua_cocos2dx_3d_Skeleton3D_getBoneByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByName"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getRootBone(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Skeleton3D:getRootBone"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getRootBone(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootBone",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateBoneMatrix(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:updateBoneMatrix",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByIndex"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getRootCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getRootCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Bone3D* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); - if(!ok) - return 0; - int ret = cobj->getBoneIndex(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getBoneCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_3d_Skeleton3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Skeleton3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Skeleton3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Skeleton3D"); - tolua_cclass(tolua_S,"Skeleton3D","cc.Skeleton3D","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Skeleton3D"); - tolua_function(tolua_S,"getBoneByName",lua_cocos2dx_3d_Skeleton3D_getBoneByName); - tolua_function(tolua_S,"getRootBone",lua_cocos2dx_3d_Skeleton3D_getRootBone); - tolua_function(tolua_S,"updateBoneMatrix",lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix); - tolua_function(tolua_S,"getBoneByIndex",lua_cocos2dx_3d_Skeleton3D_getBoneByIndex); - tolua_function(tolua_S,"getRootCount",lua_cocos2dx_3d_Skeleton3D_getRootCount); - tolua_function(tolua_S,"getBoneIndex",lua_cocos2dx_3d_Skeleton3D_getBoneIndex); - tolua_function(tolua_S,"getBoneCount",lua_cocos2dx_3d_Skeleton3D_getBoneCount); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Skeleton3D).name(); - g_luaType[typeName] = "cc.Skeleton3D"; - g_typeCast["Skeleton3D"] = "cc.Skeleton3D"; - return 1; -} - -int lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFaceEnabled"); - if(!ok) - return 0; - cobj->setCullFaceEnabled(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFaceEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - - if (!ok) { break; } - cobj->setTexture(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:setTexture"); - - if (!ok) { break; } - cobj->setTexture(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_removeAllAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->removeAllAttachNode(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAllAttachNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::BlendFunc arg0; - - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; - if(!ok) - return 0; - cobj->setBlendFunc(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setBlendFunc",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMesh(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMesh'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMesh(); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMesh",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMesh'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setCullFace(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFace"); - if(!ok) - return 0; - cobj->setCullFace(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_removeAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:removeAttachNode"); - if(!ok) - return 0; - cobj->removeAttachNode(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMeshByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Sprite3D:getMeshByIndex"); - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMeshByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getMeshByName"); - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMeshByName(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getSkeleton(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Skeleton3D* ret = cobj->getSkeleton(); - object_to_luaval(tolua_S, "cc.Skeleton3D",(cocos2d::Skeleton3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getSkeleton",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getAttachNode"); - if(!ok) - return 0; - cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); - object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_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,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Sprite3D:create"); - if (!ok) { break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); - if (!ok) { break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); - return 1; - } - } while (0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_3d_Sprite3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Sprite3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Sprite3D"); - tolua_cclass(tolua_S,"Sprite3D","cc.Sprite3D","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"Sprite3D"); - tolua_function(tolua_S,"setCullFaceEnabled",lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Sprite3D_setTexture); - tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_Sprite3D_removeAllAttachNode); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Sprite3D_setBlendFunc); - tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_Sprite3D_getMesh); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Sprite3D_getBlendFunc); - tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_Sprite3D_setCullFace); - tolua_function(tolua_S,"removeAttachNode",lua_cocos2dx_3d_Sprite3D_removeAttachNode); - tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_Sprite3D_getMeshByIndex); - tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_Sprite3D_getMeshByName); - tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_3d_Sprite3D_getSkeleton); - tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_Sprite3D_getAttachNode); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_Sprite3D_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Sprite3D).name(); - g_luaType[typeName] = "cc.Sprite3D"; - g_typeCast["Sprite3D"] = "cc.Sprite3D"; - return 1; -} - int lua_cocos2dx_3d_Mesh_getMeshVertexAttribCount(lua_State* tolua_S) { int argc = 0; @@ -1879,6 +898,987 @@ int lua_register_cocos2dx_3d_Mesh(lua_State* tolua_S) return 1; } +int lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFaceEnabled"); + if(!ok) + return 0; + cobj->setCullFaceEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFaceEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setTexture'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + + if (!ok) { break; } + cobj->setTexture(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:setTexture"); + + if (!ok) { break; } + cobj->setTexture(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setTexture",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_removeAllAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->removeAllAttachNode(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAllAttachNode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::BlendFunc arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; + if(!ok) + return 0; + cobj->setBlendFunc(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setBlendFunc",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMesh(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMesh'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Mesh* ret = cobj->getMesh(); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMesh",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMesh'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getBlendFunc(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + blendfunc_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getBlendFunc",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setCullFace(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned int arg0; + + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFace"); + if(!ok) + return 0; + cobj->setCullFace(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_removeAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:removeAttachNode"); + if(!ok) + return 0; + cobj->removeAttachNode(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAttachNode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMeshByIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Sprite3D:getMeshByIndex"); + if(!ok) + return 0; + cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMeshByName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getMeshByName"); + if(!ok) + return 0; + cocos2d::Mesh* ret = cobj->getMeshByName(arg0); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getSkeleton(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Skeleton3D* ret = cobj->getSkeleton(); + object_to_luaval(tolua_S, "cc.Skeleton3D",(cocos2d::Skeleton3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getSkeleton",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getAttachNode"); + if(!ok) + return 0; + cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); + object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getAttachNode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_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,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Sprite3D:create"); + if (!ok) { break; } + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); + if (!ok) { break; } + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); + object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + return 1; + } + } while (0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_3d_Sprite3D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Sprite3D)"); + return 0; +} + +int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Sprite3D"); + tolua_cclass(tolua_S,"Sprite3D","cc.Sprite3D","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"Sprite3D"); + tolua_function(tolua_S,"setCullFaceEnabled",lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled); + tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Sprite3D_setTexture); + tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_Sprite3D_removeAllAttachNode); + tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Sprite3D_setBlendFunc); + tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_Sprite3D_getMesh); + tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Sprite3D_getBlendFunc); + tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_Sprite3D_setCullFace); + tolua_function(tolua_S,"removeAttachNode",lua_cocos2dx_3d_Sprite3D_removeAttachNode); + tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_Sprite3D_getMeshByIndex); + tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_Sprite3D_getMeshByName); + tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_3d_Sprite3D_getSkeleton); + tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_Sprite3D_getAttachNode); + tolua_function(tolua_S,"create", lua_cocos2dx_3d_Sprite3D_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Sprite3D).name(); + g_luaType[typeName] = "cc.Sprite3D"; + g_typeCast["Sprite3D"] = "cc.Sprite3D"; + return 1; +} + +int lua_cocos2dx_3d_Skeleton3D_getBoneByName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByName"); + if(!ok) + return 0; + cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getRootBone(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Skeleton3D:getRootBone"); + if(!ok) + return 0; + cocos2d::Bone3D* ret = cobj->getRootBone(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootBone",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateBoneMatrix(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:updateBoneMatrix",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getBoneByIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned int arg0; + + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByIndex"); + if(!ok) + return 0; + cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getRootCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getRootCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getBoneIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Bone3D* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); + if(!ok) + return 0; + int ret = cobj->getBoneIndex(arg0); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getBoneCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getBoneCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_3d_Skeleton3D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Skeleton3D)"); + return 0; +} + +int lua_register_cocos2dx_3d_Skeleton3D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Skeleton3D"); + tolua_cclass(tolua_S,"Skeleton3D","cc.Skeleton3D","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Skeleton3D"); + tolua_function(tolua_S,"getBoneByName",lua_cocos2dx_3d_Skeleton3D_getBoneByName); + tolua_function(tolua_S,"getRootBone",lua_cocos2dx_3d_Skeleton3D_getRootBone); + tolua_function(tolua_S,"updateBoneMatrix",lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix); + tolua_function(tolua_S,"getBoneByIndex",lua_cocos2dx_3d_Skeleton3D_getBoneByIndex); + tolua_function(tolua_S,"getRootCount",lua_cocos2dx_3d_Skeleton3D_getRootCount); + tolua_function(tolua_S,"getBoneIndex",lua_cocos2dx_3d_Skeleton3D_getBoneIndex); + tolua_function(tolua_S,"getBoneCount",lua_cocos2dx_3d_Skeleton3D_getBoneCount); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Skeleton3D).name(); + g_luaType[typeName] = "cc.Skeleton3D"; + g_typeCast["Skeleton3D"] = "cc.Skeleton3D"; + return 1; +} + int lua_cocos2dx_3d_Animation3D_getDuration(lua_State* tolua_S) { int argc = 0; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 88054b0c75..02ae6b060a 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -7943,52 +7943,6 @@ int lua_cocos2dx_Node_getContentSize(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Node_stopAllActionsByTag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_stopAllActionsByTag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:stopAllActionsByTag"); - if(!ok) - return 0; - cobj->stopAllActionsByTag(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAllActionsByTag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAllActionsByTag'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Node_getColor(lua_State* tolua_S) { int argc = 0; @@ -9014,7 +8968,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"cleanup",lua_cocos2dx_Node_cleanup); tolua_function(tolua_S,"getComponent",lua_cocos2dx_Node_getComponent); tolua_function(tolua_S,"getContentSize",lua_cocos2dx_Node_getContentSize); - tolua_function(tolua_S,"stopAllActionsByTag",lua_cocos2dx_Node_stopAllActionsByTag); tolua_function(tolua_S,"getColor",lua_cocos2dx_Node_getColor); tolua_function(tolua_S,"getBoundingBox",lua_cocos2dx_Node_getBoundingBox); tolua_function(tolua_S,"setEventDispatcher",lua_cocos2dx_Node_setEventDispatcher); @@ -26385,52 +26338,6 @@ int lua_cocos2dx_ActionManager_update(lua_State* tolua_S) return 0; } -int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ActionManager* 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.ActionManager",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Node* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); - if(!ok) - return 0; - cobj->pauseTarget(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:pauseTarget",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_pauseTarget'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(lua_State* tolua_S) { int argc = 0; @@ -26616,7 +26523,7 @@ int lua_cocos2dx_ActionManager_removeAction(lua_State* tolua_S) return 0; } -int lua_cocos2dx_ActionManager_removeAllActionsByTag(lua_State* tolua_S) +int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) { int argc = 0; cocos2d::ActionManager* cobj = nullptr; @@ -26636,31 +26543,28 @@ int lua_cocos2dx_ActionManager_removeAllActionsByTag(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; - if (argc == 2) + if (argc == 1) { - int arg0; - cocos2d::Node* arg1; + cocos2d::Node* arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:removeAllActionsByTag"); - - ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); if(!ok) return 0; - cobj->removeAllActionsByTag(arg0, arg1); + cobj->pauseTarget(arg0); return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:removeAllActionsByTag",argc, 2); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:pauseTarget",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_pauseTarget'.",&tolua_err); #endif return 0; @@ -26762,12 +26666,11 @@ int lua_register_cocos2dx_ActionManager(lua_State* tolua_S) tolua_function(tolua_S,"addAction",lua_cocos2dx_ActionManager_addAction); tolua_function(tolua_S,"resumeTarget",lua_cocos2dx_ActionManager_resumeTarget); tolua_function(tolua_S,"update",lua_cocos2dx_ActionManager_update); - tolua_function(tolua_S,"pauseTarget",lua_cocos2dx_ActionManager_pauseTarget); tolua_function(tolua_S,"getNumberOfRunningActionsInTarget",lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget); tolua_function(tolua_S,"removeAllActionsFromTarget",lua_cocos2dx_ActionManager_removeAllActionsFromTarget); tolua_function(tolua_S,"resumeTargets",lua_cocos2dx_ActionManager_resumeTargets); tolua_function(tolua_S,"removeAction",lua_cocos2dx_ActionManager_removeAction); - tolua_function(tolua_S,"removeAllActionsByTag",lua_cocos2dx_ActionManager_removeAllActionsByTag); + tolua_function(tolua_S,"pauseTarget",lua_cocos2dx_ActionManager_pauseTarget); tolua_function(tolua_S,"pauseAllRunningActions",lua_cocos2dx_ActionManager_pauseAllRunningActions); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::ActionManager).name(); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 4d85878dfc..e4b2d6b037 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1558,8 +1558,6 @@ int register_all_cocos2dx(lua_State* tolua_S); - - From 8e51377f2dca717e9ecb8d81ed1264f785063249 Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Fri, 29 Aug 2014 16:00:04 +0800 Subject: [PATCH 38/74] fix primitive draw error --- cocos/renderer/CCPrimitive.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/renderer/CCPrimitive.cpp b/cocos/renderer/CCPrimitive.cpp index 357e61fa43..e7a896c1ad 100644 --- a/cocos/renderer/CCPrimitive.cpp +++ b/cocos/renderer/CCPrimitive.cpp @@ -86,7 +86,7 @@ bool Primitive::init(VertexData* verts, IndexBuffer* indices, int type) void Primitive::draw() { - if(_verts && _indices) + if(_verts) { _verts->use(); if(_indices!= nullptr) @@ -98,7 +98,7 @@ void Primitive::draw() } else { - glDrawArrays((GLenum)_type, _count, _start); + glDrawArrays((GLenum)_type, _start, _count); } glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); From 3b3747d518fa507d958bac31f7365097c578c5e7 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Fri, 29 Aug 2014 08:12:40 +0000 Subject: [PATCH 39/74] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/Action.lua | 33 +- .../lua-bindings/auto/api/ActionCamera.lua | 21 +- .../lua-bindings/auto/api/ActionEase.lua | 10 +- .../lua-bindings/auto/api/ActionFadeFrame.lua | 12 +- .../lua-bindings/auto/api/ActionFrame.lua | 33 +- .../lua-bindings/auto/api/ActionInstant.lua | 9 +- .../lua-bindings/auto/api/ActionInterval.lua | 14 +- .../lua-bindings/auto/api/ActionManager.lua | 50 +- .../lua-bindings/auto/api/ActionManagerEx.lua | 21 +- .../lua-bindings/auto/api/ActionMoveFrame.lua | 12 +- .../lua-bindings/auto/api/ActionObject.lua | 47 +- .../auto/api/ActionRotationFrame.lua | 11 +- .../auto/api/ActionScaleFrame.lua | 18 +- .../lua-bindings/auto/api/ActionTimeline.lua | 51 +- .../auto/api/ActionTimelineCache.lua | 17 +- .../auto/api/ActionTimelineData.lua | 7 +- .../lua-bindings/auto/api/ActionTintFrame.lua | 12 +- .../lua-bindings/auto/api/ActionTween.lua | 17 +- .../auto/api/AnchorPointFrame.lua | 7 +- .../lua-bindings/auto/api/Animate.lua | 11 +- .../lua-bindings/auto/api/Animate3D.lua | 25 +- .../lua-bindings/auto/api/Animation.lua | 46 +- .../lua-bindings/auto/api/Animation3D.lua | 6 +- .../lua-bindings/auto/api/AnimationCache.lua | 30 +- .../lua-bindings/auto/api/AnimationData.lua | 9 +- .../lua-bindings/auto/api/AnimationFrame.lua | 20 +- .../lua-bindings/auto/api/Application.lua | 11 +- .../lua-bindings/auto/api/Armature.lua | 72 ++- .../auto/api/ArmatureAnimation.lua | 71 ++- .../lua-bindings/auto/api/ArmatureData.lua | 9 +- .../auto/api/ArmatureDataManager.lua | 77 ++- .../auto/api/ArmatureDisplayData.lua | 2 + .../lua-bindings/auto/api/AssetsManager.lua | 34 +- .../lua-bindings/auto/api/AtlasNode.lua | 39 +- .../lua-bindings/auto/api/AttachNode.lua | 10 +- .../lua-bindings/auto/api/BaseData.lua | 6 +- .../lua-bindings/auto/api/BatchNode.lua | 18 +- .../lua-bindings/auto/api/BezierBy.lua | 8 +- .../lua-bindings/auto/api/BezierTo.lua | 5 +- .../scripting/lua-bindings/auto/api/Blink.lua | 14 +- .../scripting/lua-bindings/auto/api/Bone.lua | 85 +++- .../lua-bindings/auto/api/BoneData.lua | 9 +- .../lua-bindings/auto/api/Button.lua | 99 +++- .../auto/api/CCBAnimationManager.lua | 87 +++- .../lua-bindings/auto/api/CCBReader.lua | 45 +- .../lua-bindings/auto/api/CallFunc.lua | 10 +- .../lua-bindings/auto/api/Camera.lua | 59 ++- .../auto/api/CardinalSplineBy.lua | 9 +- .../auto/api/CardinalSplineTo.lua | 21 +- .../lua-bindings/auto/api/CatmullRomBy.lua | 7 +- .../lua-bindings/auto/api/CatmullRomTo.lua | 7 +- .../lua-bindings/auto/api/CheckBox.lua | 77 ++- .../lua-bindings/auto/api/ClippingNode.lua | 26 +- .../lua-bindings/auto/api/ColorFrame.lua | 14 +- .../lua-bindings/auto/api/ComAttribute.lua | 49 +- .../lua-bindings/auto/api/ComAudio.lua | 63 ++- .../lua-bindings/auto/api/ComController.lua | 11 +- .../lua-bindings/auto/api/ComRender.lua | 8 +- .../lua-bindings/auto/api/Component.lua | 17 +- .../lua-bindings/auto/api/Console.lua | 10 +- .../lua-bindings/auto/api/ContourData.lua | 6 +- .../lua-bindings/auto/api/Control.lua | 36 +- .../lua-bindings/auto/api/ControlButton.lua | 133 ++++- .../auto/api/ControlColourPicker.lua | 31 +- .../auto/api/ControlHuePicker.lua | 39 +- .../auto/api/ControlPotentiometer.lua | 83 ++-- .../api/ControlSaturationBrightnessPicker.lua | 21 +- .../lua-bindings/auto/api/ControlSlider.lua | 59 ++- .../lua-bindings/auto/api/ControlStepper.lua | 72 ++- .../lua-bindings/auto/api/ControlSwitch.lua | 55 +- .../lua-bindings/auto/api/Controller.lua | 26 +- .../lua-bindings/auto/api/DelayTime.lua | 8 +- .../lua-bindings/auto/api/Director.lua | 151 +++++- .../lua-bindings/auto/api/DisplayData.lua | 8 +- .../lua-bindings/auto/api/DisplayManager.lua | 48 +- .../lua-bindings/auto/api/DrawNode.lua | 61 ++- .../lua-bindings/auto/api/EaseBackIn.lua | 8 +- .../lua-bindings/auto/api/EaseBackInOut.lua | 8 +- .../lua-bindings/auto/api/EaseBackOut.lua | 8 +- .../auto/api/EaseBezierAction.lua | 17 +- .../lua-bindings/auto/api/EaseBounce.lua | 2 + .../lua-bindings/auto/api/EaseBounceIn.lua | 8 +- .../lua-bindings/auto/api/EaseBounceInOut.lua | 8 +- .../lua-bindings/auto/api/EaseBounceOut.lua | 8 +- .../auto/api/EaseCircleActionIn.lua | 8 +- .../auto/api/EaseCircleActionInOut.lua | 8 +- .../auto/api/EaseCircleActionOut.lua | 8 +- .../auto/api/EaseCubicActionIn.lua | 8 +- .../auto/api/EaseCubicActionInOut.lua | 8 +- .../auto/api/EaseCubicActionOut.lua | 8 +- .../lua-bindings/auto/api/EaseElastic.lua | 6 +- .../lua-bindings/auto/api/EaseElasticIn.lua | 9 +- .../auto/api/EaseElasticInOut.lua | 9 +- .../lua-bindings/auto/api/EaseElasticOut.lua | 9 +- .../auto/api/EaseExponentialIn.lua | 8 +- .../auto/api/EaseExponentialInOut.lua | 8 +- .../auto/api/EaseExponentialOut.lua | 8 +- .../lua-bindings/auto/api/EaseIn.lua | 10 +- .../lua-bindings/auto/api/EaseInOut.lua | 10 +- .../lua-bindings/auto/api/EaseOut.lua | 10 +- .../auto/api/EaseQuadraticActionIn.lua | 8 +- .../auto/api/EaseQuadraticActionInOut.lua | 8 +- .../auto/api/EaseQuadraticActionOut.lua | 8 +- .../auto/api/EaseQuarticActionIn.lua | 8 +- .../auto/api/EaseQuarticActionInOut.lua | 8 +- .../auto/api/EaseQuarticActionOut.lua | 8 +- .../auto/api/EaseQuinticActionIn.lua | 8 +- .../auto/api/EaseQuinticActionInOut.lua | 8 +- .../auto/api/EaseQuinticActionOut.lua | 8 +- .../lua-bindings/auto/api/EaseRateAction.lua | 6 +- .../lua-bindings/auto/api/EaseSineIn.lua | 8 +- .../lua-bindings/auto/api/EaseSineInOut.lua | 8 +- .../lua-bindings/auto/api/EaseSineOut.lua | 8 +- .../lua-bindings/auto/api/EditBox.lua | 94 +++- .../scripting/lua-bindings/auto/api/Event.lua | 7 + .../lua-bindings/auto/api/EventController.lua | 14 +- .../lua-bindings/auto/api/EventCustom.lua | 4 +- .../lua-bindings/auto/api/EventDispatcher.lua | 62 ++- .../lua-bindings/auto/api/EventFocus.lua | 5 +- .../lua-bindings/auto/api/EventFrame.lua | 7 +- .../lua-bindings/auto/api/EventKeyboard.lua | 5 +- .../lua-bindings/auto/api/EventListener.lua | 10 +- .../auto/api/EventListenerAcceleration.lua | 2 + .../auto/api/EventListenerController.lua | 3 + .../auto/api/EventListenerCustom.lua | 2 + .../auto/api/EventListenerFocus.lua | 2 + .../auto/api/EventListenerKeyboard.lua | 2 + .../auto/api/EventListenerMouse.lua | 2 + .../auto/api/EventListenerPhysicsContact.lua | 3 + .../EventListenerPhysicsContactWithBodies.lua | 11 +- .../EventListenerPhysicsContactWithGroup.lua | 9 +- .../EventListenerPhysicsContactWithShapes.lua | 11 +- .../auto/api/EventListenerTouchAllAtOnce.lua | 2 + .../auto/api/EventListenerTouchOneByOne.lua | 6 +- .../lua-bindings/auto/api/EventMouse.lua | 28 +- .../lua-bindings/auto/api/EventTouch.lua | 5 +- .../lua-bindings/auto/api/FadeIn.lua | 11 +- .../lua-bindings/auto/api/FadeOut.lua | 11 +- .../lua-bindings/auto/api/FadeOutBLTiles.lua | 11 +- .../auto/api/FadeOutDownTiles.lua | 11 +- .../lua-bindings/auto/api/FadeOutTRTiles.lua | 25 +- .../lua-bindings/auto/api/FadeOutUpTiles.lua | 16 +- .../lua-bindings/auto/api/FadeTo.lua | 13 +- .../lua-bindings/auto/api/FileUtils.lua | 212 ++++++-- .../auto/api/FiniteTimeAction.lua | 6 +- .../scripting/lua-bindings/auto/api/FlipX.lua | 8 +- .../lua-bindings/auto/api/FlipX3D.lua | 7 +- .../scripting/lua-bindings/auto/api/FlipY.lua | 8 +- .../lua-bindings/auto/api/FlipY3D.lua | 7 +- .../lua-bindings/auto/api/Follow.lua | 17 +- .../scripting/lua-bindings/auto/api/Frame.lua | 16 +- .../lua-bindings/auto/api/FrameData.lua | 5 +- .../lua-bindings/auto/api/GLProgram.lua | 53 +- .../lua-bindings/auto/api/GLProgramCache.lua | 13 +- .../lua-bindings/auto/api/GLProgramState.lua | 47 +- .../lua-bindings/auto/api/GLView.lua | 76 ++- .../lua-bindings/auto/api/GLViewImpl.lua | 15 +- .../lua-bindings/auto/api/GUIReader.lua | 15 +- .../lua-bindings/auto/api/Grid3D.lua | 10 +- .../lua-bindings/auto/api/Grid3DAction.lua | 2 + .../lua-bindings/auto/api/GridAction.lua | 6 +- .../lua-bindings/auto/api/GridBase.lua | 40 +- .../scripting/lua-bindings/auto/api/HBox.lua | 1 + .../lua-bindings/auto/api/Helper.lua | 30 +- .../scripting/lua-bindings/auto/api/Hide.lua | 6 +- .../scripting/lua-bindings/auto/api/Image.lua | 28 +- .../lua-bindings/auto/api/ImageView.lua | 31 +- .../auto/api/InnerActionFrame.lua | 11 +- .../lua-bindings/auto/api/JumpBy.lua | 17 +- .../lua-bindings/auto/api/JumpTiles3D.lua | 21 +- .../lua-bindings/auto/api/JumpTo.lua | 14 +- .../scripting/lua-bindings/auto/api/Label.lua | 195 +++++--- .../lua-bindings/auto/api/LabelAtlas.lua | 26 +- .../scripting/lua-bindings/auto/api/Layer.lua | 2 + .../lua-bindings/auto/api/LayerColor.lua | 27 +- .../lua-bindings/auto/api/LayerGradient.lua | 33 +- .../lua-bindings/auto/api/LayerMultiplex.lua | 10 +- .../lua-bindings/auto/api/Layout.lua | 106 +++- .../lua-bindings/auto/api/LayoutParameter.lua | 11 +- .../lua-bindings/auto/api/Lens3D.lua | 24 +- .../auto/api/LinearLayoutParameter.lua | 15 +- .../lua-bindings/auto/api/Liquid.lua | 21 +- .../lua-bindings/auto/api/ListView.lua | 72 ++- .../lua-bindings/auto/api/LoadingBar.lua | 41 +- .../scripting/lua-bindings/auto/api/Menu.lua | 30 +- .../lua-bindings/auto/api/MenuItem.lua | 10 +- .../lua-bindings/auto/api/MenuItemFont.lua | 24 +- .../lua-bindings/auto/api/MenuItemImage.lua | 9 +- .../lua-bindings/auto/api/MenuItemLabel.lua | 15 +- .../lua-bindings/auto/api/MenuItemSprite.lua | 17 +- .../lua-bindings/auto/api/MenuItemToggle.lua | 17 +- .../scripting/lua-bindings/auto/api/Mesh.lua | 28 +- .../lua-bindings/auto/api/MotionStreak.lua | 50 +- .../lua-bindings/auto/api/MoveBy.lua | 13 +- .../lua-bindings/auto/api/MoveTo.lua | 9 +- .../auto/api/MovementBoneData.lua | 9 +- .../lua-bindings/auto/api/MovementData.lua | 8 +- .../scripting/lua-bindings/auto/api/Node.lua | 470 +++++++++++++++--- .../lua-bindings/auto/api/NodeGrid.lua | 13 +- .../lua-bindings/auto/api/NodeReader.lua | 21 +- .../lua-bindings/auto/api/OrbitCamera.lua | 22 +- .../lua-bindings/auto/api/PageTurn3D.lua | 9 +- .../lua-bindings/auto/api/PageView.lua | 62 ++- .../lua-bindings/auto/api/ParallaxNode.lua | 29 +- .../auto/api/ParticleBatchNode.lua | 60 ++- .../auto/api/ParticleDisplayData.lua | 2 + .../auto/api/ParticleExplosion.lua | 4 +- .../lua-bindings/auto/api/ParticleFire.lua | 4 +- .../auto/api/ParticleFireworks.lua | 4 +- .../lua-bindings/auto/api/ParticleFlower.lua | 4 +- .../lua-bindings/auto/api/ParticleGalaxy.lua | 4 +- .../lua-bindings/auto/api/ParticleMeteor.lua | 4 +- .../lua-bindings/auto/api/ParticleRain.lua | 4 +- .../lua-bindings/auto/api/ParticleSmoke.lua | 4 +- .../lua-bindings/auto/api/ParticleSnow.lua | 4 +- .../lua-bindings/auto/api/ParticleSpiral.lua | 4 +- .../lua-bindings/auto/api/ParticleSun.lua | 4 +- .../lua-bindings/auto/api/ParticleSystem.lua | 205 ++++++-- .../auto/api/ParticleSystemQuad.lua | 22 +- .../lua-bindings/auto/api/PhysicsBody.lua | 190 +++++-- .../lua-bindings/auto/api/PhysicsContact.lua | 5 + .../auto/api/PhysicsContactPostSolve.lua | 3 + .../auto/api/PhysicsContactPreSolve.lua | 13 +- .../lua-bindings/auto/api/PhysicsJoint.lua | 23 +- .../auto/api/PhysicsJointDistance.lua | 13 +- .../auto/api/PhysicsJointFixed.lua | 7 +- .../auto/api/PhysicsJointGear.lua | 17 +- .../auto/api/PhysicsJointGroove.lua | 23 +- .../auto/api/PhysicsJointLimit.lua | 28 +- .../auto/api/PhysicsJointMotor.lua | 11 +- .../lua-bindings/auto/api/PhysicsJointPin.lua | 7 +- .../auto/api/PhysicsJointRatchet.lua | 21 +- .../auto/api/PhysicsJointRotaryLimit.lua | 16 +- .../auto/api/PhysicsJointRotarySpring.lua | 21 +- .../auto/api/PhysicsJointSpring.lua | 33 +- .../lua-bindings/auto/api/PhysicsShape.lua | 61 ++- .../lua-bindings/auto/api/PhysicsShapeBox.lua | 7 +- .../auto/api/PhysicsShapeCircle.lua | 20 +- .../auto/api/PhysicsShapeEdgeBox.lua | 8 +- .../auto/api/PhysicsShapeEdgeChain.lua | 2 + .../auto/api/PhysicsShapeEdgePolygon.lua | 2 + .../auto/api/PhysicsShapeEdgeSegment.lua | 12 +- .../auto/api/PhysicsShapePolygon.lua | 6 +- .../lua-bindings/auto/api/PhysicsWorld.lua | 52 +- .../scripting/lua-bindings/auto/api/Place.lua | 8 +- .../lua-bindings/auto/api/PositionFrame.lua | 18 +- .../lua-bindings/auto/api/ProgressFromTo.lua | 15 +- .../lua-bindings/auto/api/ProgressTimer.lua | 48 +- .../lua-bindings/auto/api/ProgressTo.lua | 13 +- .../lua-bindings/auto/api/ProtectedNode.lua | 58 ++- cocos/scripting/lua-bindings/auto/api/Ref.lua | 13 + .../lua-bindings/auto/api/RelativeBox.lua | 1 + .../auto/api/RelativeLayoutParameter.lua | 27 +- .../lua-bindings/auto/api/RemoveSelf.lua | 6 +- .../lua-bindings/auto/api/RenderTexture.lua | 97 ++-- .../lua-bindings/auto/api/Repeat.lua | 19 +- .../lua-bindings/auto/api/RepeatForever.lua | 16 +- .../lua-bindings/auto/api/ReuseGrid.lua | 8 +- .../lua-bindings/auto/api/RichElement.lua | 8 +- .../auto/api/RichElementCustomNode.lua | 19 +- .../auto/api/RichElementImage.lua | 19 +- .../lua-bindings/auto/api/RichElementText.lua | 27 +- .../lua-bindings/auto/api/RichText.lua | 24 +- .../lua-bindings/auto/api/Ripple3D.lua | 29 +- .../lua-bindings/auto/api/RotateBy.lua | 14 +- .../lua-bindings/auto/api/RotateTo.lua | 14 +- .../lua-bindings/auto/api/RotationFrame.lua | 10 +- .../auto/api/RotationSkewFrame.lua | 6 +- .../lua-bindings/auto/api/Scale9Sprite.lua | 103 ++-- .../lua-bindings/auto/api/ScaleBy.lua | 13 +- .../lua-bindings/auto/api/ScaleFrame.lua | 17 +- .../lua-bindings/auto/api/ScaleTo.lua | 16 +- .../scripting/lua-bindings/auto/api/Scene.lua | 15 +- .../lua-bindings/auto/api/SceneReader.lua | 16 +- .../lua-bindings/auto/api/Scheduler.lua | 10 +- .../lua-bindings/auto/api/ScrollView.lua | 150 ++++-- .../lua-bindings/auto/api/Sequence.lua | 9 +- .../lua-bindings/auto/api/Shaky3D.lua | 13 +- .../lua-bindings/auto/api/ShakyTiles3D.lua | 13 +- .../auto/api/ShatteredTiles3D.lua | 13 +- .../scripting/lua-bindings/auto/api/Show.lua | 6 +- .../lua-bindings/auto/api/ShuffleTiles.lua | 17 +- .../auto/api/SimpleAudioEngine.lua | 97 +++- .../lua-bindings/auto/api/Skeleton.lua | 18 +- .../lua-bindings/auto/api/Skeleton3D.lua | 15 +- .../auto/api/SkeletonAnimation.lua | 9 +- .../lua-bindings/auto/api/SkewBy.lua | 12 +- .../lua-bindings/auto/api/SkewFrame.lua | 14 +- .../lua-bindings/auto/api/SkewTo.lua | 15 +- .../scripting/lua-bindings/auto/api/Skin.lua | 24 +- .../lua-bindings/auto/api/Slider.lua | 88 +++- .../scripting/lua-bindings/auto/api/Spawn.lua | 9 +- .../scripting/lua-bindings/auto/api/Speed.lua | 23 +- .../lua-bindings/auto/api/SplitCols.lua | 12 +- .../lua-bindings/auto/api/SplitRows.lua | 12 +- .../lua-bindings/auto/api/Sprite.lua | 160 ++++-- .../lua-bindings/auto/api/Sprite3D.lua | 37 +- .../lua-bindings/auto/api/SpriteBatchNode.lua | 86 ++-- .../auto/api/SpriteDisplayData.lua | 5 +- .../lua-bindings/auto/api/SpriteFrame.lua | 47 +- .../auto/api/SpriteFrameCache.lua | 54 +- .../lua-bindings/auto/api/StopGrid.lua | 6 +- .../lua-bindings/auto/api/TMXLayer.lua | 66 ++- .../lua-bindings/auto/api/TMXLayerInfo.lua | 5 +- .../lua-bindings/auto/api/TMXMapInfo.lua | 75 ++- .../lua-bindings/auto/api/TMXObjectGroup.lua | 22 +- .../lua-bindings/auto/api/TMXTiledMap.lua | 40 +- .../lua-bindings/auto/api/TMXTilesetInfo.lua | 4 +- .../lua-bindings/auto/api/TableView.lua | 55 +- .../lua-bindings/auto/api/TableViewCell.lua | 7 +- .../lua-bindings/auto/api/TargetedAction.lua | 17 +- .../scripting/lua-bindings/auto/api/Text.lua | 67 ++- .../lua-bindings/auto/api/TextAtlas.lua | 35 +- .../lua-bindings/auto/api/TextBMFont.lua | 20 +- .../lua-bindings/auto/api/TextField.lua | 89 +++- .../lua-bindings/auto/api/Texture2D.lua | 80 ++- .../lua-bindings/auto/api/TextureCache.lua | 40 +- .../lua-bindings/auto/api/TextureData.lua | 9 +- .../lua-bindings/auto/api/TextureFrame.lua | 8 +- .../lua-bindings/auto/api/TileMapAtlas.lua | 32 +- .../lua-bindings/auto/api/TiledGrid3D.lua | 10 +- .../auto/api/TiledGrid3DAction.lua | 2 + .../lua-bindings/auto/api/Timeline.lua | 25 +- .../scripting/lua-bindings/auto/api/Timer.lua | 16 +- .../lua-bindings/auto/api/TintBy.lua | 17 +- .../lua-bindings/auto/api/TintTo.lua | 17 +- .../auto/api/ToggleVisibility.lua | 6 +- .../scripting/lua-bindings/auto/api/Touch.lua | 17 +- .../auto/api/TransitionCrossFade.lua | 9 +- .../auto/api/TransitionEaseScene.lua | 4 +- .../lua-bindings/auto/api/TransitionFade.lua | 4 +- .../auto/api/TransitionFadeBL.lua | 4 +- .../auto/api/TransitionFadeDown.lua | 4 +- .../auto/api/TransitionFadeTR.lua | 12 +- .../auto/api/TransitionFadeUp.lua | 4 +- .../auto/api/TransitionFlipAngular.lua | 6 +- .../lua-bindings/auto/api/TransitionFlipX.lua | 6 +- .../lua-bindings/auto/api/TransitionFlipY.lua | 6 +- .../auto/api/TransitionJumpZoom.lua | 3 +- .../auto/api/TransitionMoveInB.lua | 3 +- .../auto/api/TransitionMoveInL.lua | 7 +- .../auto/api/TransitionMoveInR.lua | 3 +- .../auto/api/TransitionMoveInT.lua | 3 +- .../auto/api/TransitionPageTurn.lua | 22 +- .../auto/api/TransitionProgress.lua | 3 +- .../auto/api/TransitionProgressHorizontal.lua | 3 +- .../auto/api/TransitionProgressInOut.lua | 3 +- .../auto/api/TransitionProgressOutIn.lua | 3 +- .../auto/api/TransitionProgressRadialCCW.lua | 3 +- .../auto/api/TransitionProgressRadialCW.lua | 3 +- .../auto/api/TransitionProgressVertical.lua | 3 +- .../auto/api/TransitionRotoZoom.lua | 3 +- .../lua-bindings/auto/api/TransitionScene.lua | 11 +- .../auto/api/TransitionSceneOriented.lua | 3 +- .../auto/api/TransitionShrinkGrow.lua | 6 +- .../auto/api/TransitionSlideInB.lua | 4 +- .../auto/api/TransitionSlideInL.lua | 7 +- .../auto/api/TransitionSlideInR.lua | 4 +- .../auto/api/TransitionSlideInT.lua | 4 +- .../auto/api/TransitionSplitCols.lua | 12 +- .../auto/api/TransitionSplitRows.lua | 4 +- .../auto/api/TransitionTurnOffTiles.lua | 11 +- .../auto/api/TransitionZoomFlipAngular.lua | 6 +- .../auto/api/TransitionZoomFlipX.lua | 6 +- .../auto/api/TransitionZoomFlipY.lua | 6 +- .../lua-bindings/auto/api/TurnOffTiles.lua | 19 +- .../scripting/lua-bindings/auto/api/Tween.lua | 39 +- .../scripting/lua-bindings/auto/api/Twirl.lua | 27 +- .../lua-bindings/auto/api/UserDefault.lua | 55 +- .../scripting/lua-bindings/auto/api/VBox.lua | 1 + .../lua-bindings/auto/api/VideoPlayer.lua | 36 +- .../lua-bindings/auto/api/VisibleFrame.lua | 7 +- .../scripting/lua-bindings/auto/api/Waves.lua | 25 +- .../lua-bindings/auto/api/Waves3D.lua | 21 +- .../lua-bindings/auto/api/WavesTiles3D.lua | 21 +- .../lua-bindings/auto/api/Widget.lua | 180 +++++-- .../lua-bindings/auto/api/ZOrderFrame.lua | 7 +- .../auto/lua_cocos2dx_3d_auto.cpp | 6 +- .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 3 +- .../auto/lua_cocos2dx_spine_auto.cpp | 3 +- 380 files changed, 6963 insertions(+), 2424 deletions(-) diff --git a/cocos/scripting/lua-bindings/auto/api/Action.lua b/cocos/scripting/lua-bindings/auto/api/Action.lua index 9502801e63..6d28c6c257 100644 --- a/cocos/scripting/lua-bindings/auto/api/Action.lua +++ b/cocos/scripting/lua-bindings/auto/api/Action.lua @@ -5,65 +5,86 @@ -- @parent_module cc -------------------------------- +-- called before the action start. It will also set the target. -- @function [parent=#Action] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- Set the original target, since target can be nil.
+-- Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method.
+-- The target is 'assigned', it is not 'retained'.
+-- since v0.8.2 -- @function [parent=#Action] setOriginalTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node originalTarget -------------------------------- +-- returns a clone of action -- @function [parent=#Action] clone -- @param self -- @return Action#Action ret (return value: cc.Action) -------------------------------- +-- -- @function [parent=#Action] getOriginalTarget -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- called after the action has finished. It will set the 'target' to nil.
+-- IMPORTANT: You should never call "[action stop]" manually. Instead, use: "target->stopAction(action);" -- @function [parent=#Action] stop -- @param self -------------------------------- +-- called once per frame. time a value between 0 and 1
+-- For example:
+-- - 0 means that the action just started
+-- - 0.5 means that the action is in the middle
+-- - 1 means that the action is over -- @function [parent=#Action] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#Action] getTarget -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- called every frame with it's delta time. DON'T override unless you know what you are doing. -- @function [parent=#Action] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Action] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- -- @function [parent=#Action] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- The action will modify the target properties. -- @function [parent=#Action] setTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- return true if the action has finished -- @function [parent=#Action] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- returns a new action that performs the exactly the reverse action -- @function [parent=#Action] reverse -- @param self -- @return Action#Action ret (return value: cc.Action) diff --git a/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua b/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua index 00beabfed2..673fbf6160 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua @@ -9,51 +9,60 @@ -- @overload self, vec3_table -- @function [parent=#ActionCamera] setEye -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y +-- @param #float z -------------------------------- +-- -- @function [parent=#ActionCamera] getEye -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- +-- -- @function [parent=#ActionCamera] setUp -- @param self --- @param #vec3_table vec3 +-- @param #vec3_table up -------------------------------- +-- -- @function [parent=#ActionCamera] getCenter -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- +-- -- @function [parent=#ActionCamera] setCenter -- @param self --- @param #vec3_table vec3 +-- @param #vec3_table center -------------------------------- +-- -- @function [parent=#ActionCamera] getUp -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- +-- -- @function [parent=#ActionCamera] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ActionCamera] clone -- @param self -- @return ActionCamera#ActionCamera ret (return value: cc.ActionCamera) -------------------------------- +-- -- @function [parent=#ActionCamera] reverse -- @param self -- @return ActionCamera#ActionCamera ret (return value: cc.ActionCamera) -------------------------------- +-- js ctor -- @function [parent=#ActionCamera] ActionCamera -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionEase.lua b/cocos/scripting/lua-bindings/auto/api/ActionEase.lua index b5b1ea0bd5..88463b5be3 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionEase.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionEase.lua @@ -5,32 +5,38 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ActionEase] getInnerAction -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#ActionEase] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ActionEase] clone -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) -------------------------------- +-- -- @function [parent=#ActionEase] stop -- @param self -------------------------------- +-- -- @function [parent=#ActionEase] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) -------------------------------- +-- -- @function [parent=#ActionEase] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua index f713688bf5..7727f649b5 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua @@ -5,22 +5,30 @@ -- @parent_module ccs -------------------------------- +-- Gets the fade action opacity.
+-- return the fade action opacity. -- @function [parent=#ActionFadeFrame] getOpacity -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Gets the ActionInterval of ActionFrame.
+-- parame duration the duration time of ActionFrame
+-- return ActionInterval -- @function [parent=#ActionFadeFrame] getAction -- @param self --- @param #float float +-- @param #float duration -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- Changes the fade action opacity.
+-- param opacity the fade action opacity -- @function [parent=#ActionFadeFrame] setOpacity -- @param self --- @param #int int +-- @param #int opacity -------------------------------- +-- Default constructor -- @function [parent=#ActionFadeFrame] ActionFadeFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua index 1be2073a67..0a2637cb6c 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua @@ -9,56 +9,75 @@ -- @overload self, float -- @function [parent=#ActionFrame] getAction -- @param self --- @param #float float --- @param #ccs.ActionFrame actionframe +-- @param #float duration +-- @param #ccs.ActionFrame srcFrame -- @return ActionInterval#ActionInterval ret (retunr value: cc.ActionInterval) -------------------------------- +-- Gets the type of action frame
+-- return the type of action frame -- @function [parent=#ActionFrame] getFrameType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Changes the time of action frame
+-- param fTime the time of action frame -- @function [parent=#ActionFrame] setFrameTime -- @param self --- @param #float float +-- @param #float fTime -------------------------------- +-- Changes the easing type.
+-- param easingType the easing type. -- @function [parent=#ActionFrame] setEasingType -- @param self --- @param #int int +-- @param #int easingType -------------------------------- +-- Gets the time of action frame
+-- return fTime the time of action frame -- @function [parent=#ActionFrame] getFrameTime -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets the index of action frame
+-- return the index of action frame -- @function [parent=#ActionFrame] getFrameIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Changes the type of action frame
+-- param frameType the type of action frame -- @function [parent=#ActionFrame] setFrameType -- @param self --- @param #int int +-- @param #int frameType -------------------------------- +-- Changes the index of action frame
+-- param index the index of action frame -- @function [parent=#ActionFrame] setFrameIndex -- @param self --- @param #int int +-- @param #int index -------------------------------- +-- Set the ActionInterval easing parameter.
+-- parame parameter the parameter for frame ease -- @function [parent=#ActionFrame] setEasingParameter -- @param self --- @param #array_table array +-- @param #array_table parameter -------------------------------- +-- Gets the easing type.
+-- return the easing type. -- @function [parent=#ActionFrame] getEasingType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Default constructor -- @function [parent=#ActionFrame] ActionFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua b/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua index 0d0fb165a6..0a539e808d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua @@ -5,28 +5,33 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ActionInstant] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#ActionInstant] clone -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) -------------------------------- +-- -- @function [parent=#ActionInstant] reverse -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) -------------------------------- +-- -- @function [parent=#ActionInstant] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ActionInstant] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua b/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua index a4cfe55038..e0351a5712 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua @@ -5,41 +5,49 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ActionInterval] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ActionInterval] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amp -------------------------------- +-- how many seconds had elapsed since the actions started to run. -- @function [parent=#ActionInterval] getElapsed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ActionInterval] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ActionInterval] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#ActionInterval] clone -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#ActionInterval] reverse -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#ActionInterval] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/ActionManager.lua b/cocos/scripting/lua-bindings/auto/api/ActionManager.lua index 8597ac46f3..9349a3e536 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionManager.lua @@ -5,77 +5,99 @@ -- @parent_module cc -------------------------------- +-- Gets an action given its tag an a target
+-- return the Action the with the given tag -- @function [parent=#ActionManager] getActionByTag -- @param self --- @param #int int --- @param #cc.Node node +-- @param #int tag +-- @param #cc.Node target -- @return Action#Action ret (return value: cc.Action) -------------------------------- +-- Removes an action given its tag and the target -- @function [parent=#ActionManager] removeActionByTag -- @param self --- @param #int int --- @param #cc.Node node +-- @param #int tag +-- @param #cc.Node target -------------------------------- +-- Removes all actions from all the targets. -- @function [parent=#ActionManager] removeAllActions -- @param self -------------------------------- +-- Adds an action with a target.
+-- If the target is already present, then the action will be added to the existing target.
+-- If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target.
+-- When the target is paused, the queued actions won't be 'ticked'. -- @function [parent=#ActionManager] addAction -- @param self -- @param #cc.Action action --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node target +-- @param #bool paused -------------------------------- +-- Resumes the target. All queued actions will be resumed. -- @function [parent=#ActionManager] resumeTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ActionManager] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- Pauses the target: all running actions and newly added actions will be paused. -- @function [parent=#ActionManager] pauseTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- Returns the numbers of actions that are running in a certain target.
+-- Composable actions are counted as 1 action. Example:
+-- - If you are running 1 Sequence of 7 actions, it will return 1.
+-- - If you are running 7 Sequences of 2 actions, it will return 7. -- @function [parent=#ActionManager] getNumberOfRunningActionsInTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -- @return long#long ret (return value: long) -------------------------------- +-- Removes all actions from a certain target.
+-- All the actions that belongs to the target will be removed. -- @function [parent=#ActionManager] removeAllActionsFromTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- Resume a set of targets (convenience function to reverse a pauseAllRunningActions call) -- @function [parent=#ActionManager] resumeTargets -- @param self --- @param #array_table array +-- @param #array_table targetsToResume -------------------------------- +-- Removes an action given an action reference. -- @function [parent=#ActionManager] removeAction -- @param self -- @param #cc.Action action -------------------------------- +-- Removes all actions given its tag and the target -- @function [parent=#ActionManager] removeAllActionsByTag -- @param self --- @param #int int --- @param #cc.Node node +-- @param #int tag +-- @param #cc.Node target -------------------------------- +-- Pauses all running actions, returning a list of targets whose actions were paused. -- @function [parent=#ActionManager] pauseAllRunningActions -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- js ctor -- @function [parent=#ActionManager] ActionManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua b/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua index 9d6a8e14b4..0be42e90d1 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua @@ -9,27 +9,38 @@ -- @overload self, char, char -- @function [parent=#ActionManagerEx] playActionByName -- @param self --- @param #char char --- @param #char char --- @param #cc.CallFunc callfunc +-- @param #char jsonName +-- @param #char actionName +-- @param #cc.CallFunc func -- @return ActionObject#ActionObject ret (retunr value: ccs.ActionObject) -------------------------------- +-- Gets an ActionObject with a name.
+-- param jsonName UI file name
+-- param actionName action name in the UI file.
+-- return ActionObject which named as the param name -- @function [parent=#ActionManagerEx] getActionByName -- @param self --- @param #char char --- @param #char char +-- @param #char jsonName +-- @param #char actionName -- @return ActionObject#ActionObject ret (return value: ccs.ActionObject) -------------------------------- +-- Release all actions. -- @function [parent=#ActionManagerEx] releaseActions -- @param self -------------------------------- +-- Purges ActionManager point.
+-- js purge
+-- lua destroyActionManager -- @function [parent=#ActionManagerEx] destroyInstance -- @param self -------------------------------- +-- Gets the static instance of ActionManager.
+-- js getInstance
+-- lua getInstance -- @function [parent=#ActionManagerEx] getInstance -- @param self -- @return ActionManagerEx#ActionManagerEx ret (return value: ccs.ActionManagerEx) diff --git a/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua index 3afb25896a..64a695be06 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua @@ -5,22 +5,30 @@ -- @parent_module ccs -------------------------------- +-- Changes the move action position.
+-- param the move action position. -- @function [parent=#ActionMoveFrame] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- Gets the ActionInterval of ActionFrame.
+-- parame duration the duration time of ActionFrame
+-- return ActionInterval -- @function [parent=#ActionMoveFrame] getAction -- @param self --- @param #float float +-- @param #float duration -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- Gets the move action position.
+-- return the move action position. -- @function [parent=#ActionMoveFrame] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Default constructor -- @function [parent=#ActionMoveFrame] ActionMoveFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionObject.lua b/cocos/scripting/lua-bindings/auto/api/ActionObject.lua index 93f6dec2ec..cd3a1a5bcf 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionObject.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionObject.lua @@ -5,35 +5,47 @@ -- @parent_module ccs -------------------------------- +-- Sets the current time of frame.
+-- param fTime the current time of frame -- @function [parent=#ActionObject] setCurrentTime -- @param self --- @param #float float +-- @param #float fTime -------------------------------- +-- Pause the action. -- @function [parent=#ActionObject] pause -- @param self -------------------------------- +-- Sets name for object
+-- param name name of object -- @function [parent=#ActionObject] setName -- @param self --- @param #char char +-- @param #char name -------------------------------- +-- Sets the time interval of frame.
+-- param fTime the time interval of frame -- @function [parent=#ActionObject] setUnitTime -- @param self --- @param #float float +-- @param #float fTime -------------------------------- +-- Gets the total time of frame.
+-- return the total time of frame -- @function [parent=#ActionObject] getTotalTime -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets name of object
+-- return name of object -- @function [parent=#ActionObject] getName -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- Stop the action. -- @function [parent=#ActionObject] stop -- @param self @@ -42,54 +54,71 @@ -- @overload self -- @function [parent=#ActionObject] play -- @param self --- @param #cc.CallFunc callfunc +-- @param #cc.CallFunc func -------------------------------- +-- Gets the current time of frame.
+-- return the current time of frame -- @function [parent=#ActionObject] getCurrentTime -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Removes a ActionNode which play the action.
+-- param node the ActionNode which play the action -- @function [parent=#ActionObject] removeActionNode -- @param self --- @param #ccs.ActionNode actionnode +-- @param #ccs.ActionNode node -------------------------------- +-- Gets if the action will loop play.
+-- return that if the action will loop play -- @function [parent=#ActionObject] getLoop -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Adds a ActionNode to play the action.
+-- param node the ActionNode which will play the action -- @function [parent=#ActionObject] addActionNode -- @param self --- @param #ccs.ActionNode actionnode +-- @param #ccs.ActionNode node -------------------------------- +-- Gets the time interval of frame.
+-- return the time interval of frame -- @function [parent=#ActionObject] getUnitTime -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Return if the action is playing.
+-- return true if the action is playing, false the otherwise -- @function [parent=#ActionObject] isPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ActionObject] updateToFrameByTime -- @param self --- @param #float float +-- @param #float fTime -------------------------------- +-- Sets if the action will loop play.
+-- param bLoop that if the action will loop play -- @function [parent=#ActionObject] setLoop -- @param self --- @param #bool bool +-- @param #bool bLoop -------------------------------- +-- -- @function [parent=#ActionObject] simulationActionUpdate -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- Default constructor -- @function [parent=#ActionObject] ActionObject -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua index 267c36c133..3e1cf8fb83 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua @@ -5,25 +5,30 @@ -- @parent_module ccs -------------------------------- +-- Changes rotate action rotation.
+-- param rotation rotate action rotation. -- @function [parent=#ActionRotationFrame] setRotation -- @param self --- @param #float float +-- @param #float rotation -------------------------------- -- @overload self, float, ccs.ActionFrame -- @overload self, float -- @function [parent=#ActionRotationFrame] getAction -- @param self --- @param #float float --- @param #ccs.ActionFrame actionframe +-- @param #float duration +-- @param #ccs.ActionFrame srcFrame -- @return ActionInterval#ActionInterval ret (retunr value: cc.ActionInterval) -------------------------------- +-- Gets the rotate action rotation.
+-- return the rotate action rotation. -- @function [parent=#ActionRotationFrame] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Default constructor -- @function [parent=#ActionRotationFrame] ActionRotationFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua index 99c0180572..f9f34cb2de 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua @@ -5,32 +5,44 @@ -- @parent_module ccs -------------------------------- +-- Changes the scale action scaleY.
+-- param rotation the scale action scaleY. -- @function [parent=#ActionScaleFrame] setScaleY -- @param self --- @param #float float +-- @param #float scaleY -------------------------------- +-- Changes the scale action scaleX.
+-- param the scale action scaleX. -- @function [parent=#ActionScaleFrame] setScaleX -- @param self --- @param #float float +-- @param #float scaleX -------------------------------- +-- Gets the scale action scaleY.
+-- return the the scale action scaleY. -- @function [parent=#ActionScaleFrame] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets the scale action scaleX.
+-- return the scale action scaleX. -- @function [parent=#ActionScaleFrame] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets the ActionInterval of ActionFrame.
+-- parame duration the duration time of ActionFrame
+-- return ActionInterval -- @function [parent=#ActionScaleFrame] getAction -- @param self --- @param #float float +-- @param #float duration -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- Default constructor -- @function [parent=#ActionScaleFrame] ActionScaleFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua b/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua index 5cc4299820..b04785700d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua @@ -5,79 +5,98 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ActionTimeline] getTimelines -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Get current frame. -- @function [parent=#ActionTimeline] getCurrentFrame -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Start frame index of this action -- @function [parent=#ActionTimeline] getStartFrame -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Pause the animation. -- @function [parent=#ActionTimeline] pause -- @param self -------------------------------- +-- Set ActionTimeline's frame event callback function -- @function [parent=#ActionTimeline] setFrameEventCallFunc -- @param self --- @param #function func +-- @param #function listener -------------------------------- +-- Resume the animation. -- @function [parent=#ActionTimeline] resume -- @param self -------------------------------- +-- -- @function [parent=#ActionTimeline] getDuration -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- add Timeline to ActionTimeline -- @function [parent=#ActionTimeline] addTimeline -- @param self -- @param #ccs.Timeline timeline -------------------------------- +-- End frame of this action.
+-- When action play to this frame, if action is not loop, then it will stop,
+-- or it will play from start frame again. -- @function [parent=#ActionTimeline] getEndFrame -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Set current frame index, this will cause action plays to this frame. -- @function [parent=#ActionTimeline] setCurrentFrame -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- Set the animation speed, this will speed up or slow down the speed. -- @function [parent=#ActionTimeline] setTimeSpeed -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- -- @function [parent=#ActionTimeline] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- duration of the whole action -- @function [parent=#ActionTimeline] setDuration -- @param self --- @param #int int +-- @param #int duration -------------------------------- +-- Get current animation speed. -- @function [parent=#ActionTimeline] getTimeSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Goto the specified frame index, and pause at this index.
+-- param startIndex The animation will pause at this index. -- @function [parent=#ActionTimeline] gotoFrameAndPause -- @param self --- @param #int int +-- @param #int startIndex -------------------------------- +-- Whether or not Action is playing. -- @function [parent=#ActionTimeline] isPlaying -- @param self -- @return bool#bool ret (return value: bool) @@ -89,51 +108,61 @@ -- @overload self, int, int, int, bool -- @function [parent=#ActionTimeline] gotoFrameAndPlay -- @param self --- @param #int int --- @param #int int --- @param #int int --- @param #bool bool +-- @param #int startIndex +-- @param #int endIndex +-- @param #int currentFrameIndex +-- @param #bool loop -------------------------------- +-- -- @function [parent=#ActionTimeline] removeTimeline -- @param self -- @param #ccs.Timeline timeline -------------------------------- +-- -- @function [parent=#ActionTimeline] clearFrameEventCallFunc -- @param self -------------------------------- +-- -- @function [parent=#ActionTimeline] create -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- -- @function [parent=#ActionTimeline] step -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- -- @function [parent=#ActionTimeline] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- Returns a clone of ActionTimeline -- @function [parent=#ActionTimeline] clone -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- Returns a reverse of ActionTimeline.
+-- Not implement yet. -- @function [parent=#ActionTimeline] reverse -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- -- @function [parent=#ActionTimeline] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ActionTimeline] ActionTimeline -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua b/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua index b983d8bdcf..77e46aa629 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua @@ -4,38 +4,45 @@ -- @parent_module ccs -------------------------------- +-- Clone a action with the specified name from the container. -- @function [parent=#ActionTimelineCache] createAction -- @param self --- @param #string str +-- @param #string fileName -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- -- @function [parent=#ActionTimelineCache] purge -- @param self -------------------------------- +-- -- @function [parent=#ActionTimelineCache] init -- @param self -------------------------------- +-- -- @function [parent=#ActionTimelineCache] loadAnimationActionWithContent -- @param self --- @param #string str --- @param #string str +-- @param #string fileName +-- @param #string content -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- -- @function [parent=#ActionTimelineCache] loadAnimationActionWithFile -- @param self --- @param #string str +-- @param #string fileName -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- Remove action with filename, and also remove other resource relate with this file -- @function [parent=#ActionTimelineCache] removeAction -- @param self --- @param #string str +-- @param #string fileName -------------------------------- +-- Destroys the singleton -- @function [parent=#ActionTimelineCache] destroyInstance -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua b/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua index bda764dad6..46806fa02f 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua @@ -5,19 +5,22 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ActionTimelineData] setActionTag -- @param self --- @param #int int +-- @param #int actionTag -------------------------------- +-- -- @function [parent=#ActionTimelineData] getActionTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ActionTimelineData] create -- @param self --- @param #int int +-- @param #int actionTag -- @return ActionTimelineData#ActionTimelineData ret (return value: ccs.ActionTimelineData) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua index e965b182c8..540cbad47d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua @@ -5,22 +5,30 @@ -- @parent_module ccs -------------------------------- +-- Gets the tint action color.
+-- return the tint action color. -- @function [parent=#ActionTintFrame] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Gets the ActionInterval of ActionFrame.
+-- parame duration the duration time of ActionFrame
+-- return ActionInterval -- @function [parent=#ActionTintFrame] getAction -- @param self --- @param #float float +-- @param #float duration -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- Changes the tint action color.
+-- param ccolor the tint action color -- @function [parent=#ActionTintFrame] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table ccolor -------------------------------- +-- Default constructor -- @function [parent=#ActionTintFrame] ActionTintFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTween.lua b/cocos/scripting/lua-bindings/auto/api/ActionTween.lua index 0ff2568643..f221754635 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTween.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTween.lua @@ -5,30 +5,35 @@ -- @parent_module cc -------------------------------- +-- creates an initializes the action with the property name (key), and the from and to parameters. -- @function [parent=#ActionTween] create -- @param self --- @param #float float --- @param #string str --- @param #float float --- @param #float float +-- @param #float duration +-- @param #string key +-- @param #float from +-- @param #float to -- @return ActionTween#ActionTween ret (return value: cc.ActionTween) -------------------------------- +-- -- @function [parent=#ActionTween] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ActionTween] clone -- @param self -- @return ActionTween#ActionTween ret (return value: cc.ActionTween) -------------------------------- +-- -- @function [parent=#ActionTween] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#ActionTween] reverse -- @param self -- @return ActionTween#ActionTween ret (return value: cc.ActionTween) diff --git a/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua b/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua index 1e4849c55d..4ad0e5ed07 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua @@ -5,26 +5,31 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#AnchorPointFrame] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -------------------------------- +-- -- @function [parent=#AnchorPointFrame] getAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#AnchorPointFrame] create -- @param self -- @return AnchorPointFrame#AnchorPointFrame ret (return value: ccs.AnchorPointFrame) -------------------------------- +-- -- @function [parent=#AnchorPointFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#AnchorPointFrame] AnchorPointFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Animate.lua b/cocos/scripting/lua-bindings/auto/api/Animate.lua index de15070b65..f3bf16dc52 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animate.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animate.lua @@ -12,38 +12,45 @@ -- @return Animation#Animation ret (retunr value: cc.Animation) -------------------------------- +-- sets the Animation object to be animated -- @function [parent=#Animate] setAnimation -- @param self -- @param #cc.Animation animation -------------------------------- +-- creates the action with an Animation and will restore the original frame when the animation is over -- @function [parent=#Animate] create -- @param self -- @param #cc.Animation animation -- @return Animate#Animate ret (return value: cc.Animate) -------------------------------- +-- -- @function [parent=#Animate] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Animate] clone -- @param self -- @return Animate#Animate ret (return value: cc.Animate) -------------------------------- +-- -- @function [parent=#Animate] stop -- @param self -------------------------------- +-- -- @function [parent=#Animate] reverse -- @param self -- @return Animate#Animate ret (return value: cc.Animate) -------------------------------- +-- -- @function [parent=#Animate] update -- @param self --- @param #float float +-- @param #float t return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua index f49ae32b24..7d8635c012 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Animate3D] setSpeed -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- -- @function [parent=#Animate3D] setWeight -- @param self --- @param #float float +-- @param #float weight -------------------------------- +-- get & set speed, negative speed means playing reverse -- @function [parent=#Animate3D] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get & set blend weight, weight must positive -- @function [parent=#Animate3D] getWeight -- @param self -- @return float#float ret (return value: float) @@ -29,34 +33,39 @@ -- @overload self, cc.Animation3D -- @function [parent=#Animate3D] create -- @param self --- @param #cc.Animation3D animation3d --- @param #float float --- @param #float float +-- @param #cc.Animation3D animation +-- @param #float fromTime +-- @param #float duration -- @return Animate3D#Animate3D ret (retunr value: cc.Animate3D) -------------------------------- +-- -- @function [parent=#Animate3D] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Animate3D] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Animate3D] clone -- @param self -- @return Animate3D#Animate3D ret (return value: cc.Animate3D) -------------------------------- +-- -- @function [parent=#Animate3D] reverse -- @param self -- @return Animate3D#Animate3D ret (return value: cc.Animate3D) -------------------------------- +-- -- @function [parent=#Animate3D] update -- @param self --- @param #float float +-- @param #float t return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Animation.lua b/cocos/scripting/lua-bindings/auto/api/Animation.lua index 43b1d28a90..4dc9976680 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animation.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animation.lua @@ -5,74 +5,93 @@ -- @parent_module cc -------------------------------- +-- Gets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... -- @function [parent=#Animation] getLoops -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- Adds a SpriteFrame to a Animation.
+-- The frame will be added with one "delay unit". -- @function [parent=#Animation] addSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame frame -------------------------------- +-- Sets whether to restore the original frame when animation finishes -- @function [parent=#Animation] setRestoreOriginalFrame -- @param self --- @param #bool bool +-- @param #bool restoreOriginalFrame -------------------------------- +-- -- @function [parent=#Animation] clone -- @param self -- @return Animation#Animation ret (return value: cc.Animation) -------------------------------- +-- Gets the duration in seconds of the whole animation. It is the result of totalDelayUnits * delayPerUnit -- @function [parent=#Animation] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Sets the array of AnimationFrames -- @function [parent=#Animation] setFrames -- @param self --- @param #array_table array +-- @param #array_table frames -------------------------------- +-- Gets the array of AnimationFrames -- @function [parent=#Animation] getFrames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Sets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... -- @function [parent=#Animation] setLoops -- @param self --- @param #unsigned int int +-- @param #unsigned int loops -------------------------------- +-- Sets the delay in seconds of the "delay unit" -- @function [parent=#Animation] setDelayPerUnit -- @param self --- @param #float float +-- @param #float delayPerUnit -------------------------------- +-- Adds a frame with an image filename. Internally it will create a SpriteFrame and it will add it.
+-- The frame will be added with one "delay unit".
+-- Added to facilitate the migration from v0.8 to v0.9. -- @function [parent=#Animation] addSpriteFrameWithFile -- @param self --- @param #string str +-- @param #string filename -------------------------------- +-- Gets the total Delay units of the Animation. -- @function [parent=#Animation] getTotalDelayUnits -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets the delay in seconds of the "delay unit" -- @function [parent=#Animation] getDelayPerUnit -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Checks whether to restore the original frame when animation finishes. -- @function [parent=#Animation] getRestoreOriginalFrame -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Adds a frame with a texture and a rect. Internally it will create a SpriteFrame and it will add it.
+-- The frame will be added with one "delay unit".
+-- Added to facilitate the migration from v0.8 to v0.9. -- @function [parent=#Animation] addSpriteFrameWithTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D pobTexture -- @param #rect_table rect -------------------------------- @@ -80,17 +99,18 @@ -- @overload self -- @function [parent=#Animation] create -- @param self --- @param #array_table array --- @param #float float --- @param #unsigned int int +-- @param #array_table arrayOfAnimationFrameNames +-- @param #float delayPerUnit +-- @param #unsigned int loops -- @return Animation#Animation ret (retunr value: cc.Animation) -------------------------------- +-- -- @function [parent=#Animation] createWithSpriteFrames -- @param self --- @param #array_table array --- @param #float float --- @param #unsigned int int +-- @param #array_table arrayOfSpriteFrameNames +-- @param #float delay +-- @param #unsigned int loops -- @return Animation#Animation ret (return value: cc.Animation) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Animation3D.lua b/cocos/scripting/lua-bindings/auto/api/Animation3D.lua index 7eacf8e403..c04f1611bf 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animation3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animation3D.lua @@ -5,15 +5,17 @@ -- @parent_module cc -------------------------------- +-- get duration -- @function [parent=#Animation3D] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- read all animation or only the animation with given animationName? animationName == "" read the first. -- @function [parent=#Animation3D] create -- @param self --- @param #string str --- @param #string str +-- @param #string filename +-- @param #string animationName -- @return Animation3D#Animation3D ret (return value: cc.Animation3D) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua b/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua index 34e8325086..4b8bab06a7 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua @@ -5,48 +5,66 @@ -- @parent_module cc -------------------------------- +-- Returns a Animation that was previously added.
+-- If the name is not found it will return nil.
+-- You should retain the returned copy if you are going to use it. -- @function [parent=#AnimationCache] getAnimation -- @param self --- @param #string str +-- @param #string name -- @return Animation#Animation ret (return value: cc.Animation) -------------------------------- +-- Adds a Animation with a name. -- @function [parent=#AnimationCache] addAnimation -- @param self -- @param #cc.Animation animation --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#AnimationCache] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Adds an animation from an NSDictionary
+-- Make sure that the frames were previously loaded in the SpriteFrameCache.
+-- param plist The path of the relative file,it use to find the plist path for load SpriteFrames.
+-- since v1.1 -- @function [parent=#AnimationCache] addAnimationsWithDictionary -- @param self --- @param #map_table map --- @param #string str +-- @param #map_table dictionary +-- @param #string plist -------------------------------- +-- Deletes a Animation from the cache. -- @function [parent=#AnimationCache] removeAnimation -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- Adds an animation from a plist file.
+-- Make sure that the frames were previously loaded in the SpriteFrameCache.
+-- since v1.1
+-- js addAnimations
+-- lua addAnimations -- @function [parent=#AnimationCache] addAnimationsWithFile -- @param self --- @param #string str +-- @param #string plist -------------------------------- +-- Purges the cache. It releases all the Animation objects and the shared instance. -- @function [parent=#AnimationCache] destroyInstance -- @param self -------------------------------- +-- Returns the shared instance of the Animation cache -- @function [parent=#AnimationCache] getInstance -- @param self -- @return AnimationCache#AnimationCache ret (return value: cc.AnimationCache) -------------------------------- +-- js ctor -- @function [parent=#AnimationCache] AnimationCache -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AnimationData.lua b/cocos/scripting/lua-bindings/auto/api/AnimationData.lua index f261470ff1..3ed39cf262 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnimationData.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnimationData.lua @@ -5,27 +5,32 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#AnimationData] getMovement -- @param self --- @param #string str +-- @param #string movementName -- @return MovementData#MovementData ret (return value: ccs.MovementData) -------------------------------- +-- -- @function [parent=#AnimationData] getMovementCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#AnimationData] addMovement -- @param self --- @param #ccs.MovementData movementdata +-- @param #ccs.MovementData movData -------------------------------- +-- -- @function [parent=#AnimationData] create -- @param self -- @return AnimationData#AnimationData ret (return value: ccs.AnimationData) -------------------------------- +-- js ctor -- @function [parent=#AnimationData] AnimationData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua b/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua index 9bdd79a93c..8a6609349b 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#AnimationFrame] setSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame frame -------------------------------- -- @overload self @@ -17,36 +18,43 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- +-- Sets the units of time the frame takes -- @function [parent=#AnimationFrame] setDelayUnits -- @param self --- @param #float float +-- @param #float delayUnits -------------------------------- +-- -- @function [parent=#AnimationFrame] clone -- @param self -- @return AnimationFrame#AnimationFrame ret (return value: cc.AnimationFrame) -------------------------------- +-- -- @function [parent=#AnimationFrame] getSpriteFrame -- @param self -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- +-- Gets the units of time the frame takes -- @function [parent=#AnimationFrame] getDelayUnits -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Sets user infomation -- @function [parent=#AnimationFrame] setUserInfo -- @param self --- @param #map_table map +-- @param #map_table userInfo -------------------------------- +-- Creates the animation frame with a spriteframe, number of delay units and a notification user info
+-- since 3.0 -- @function [parent=#AnimationFrame] create -- @param self --- @param #cc.SpriteFrame spriteframe --- @param #float float --- @param #map_table map +-- @param #cc.SpriteFrame spriteFrame +-- @param #float delayUnits +-- @param #map_table userInfo -- @return AnimationFrame#AnimationFrame ret (return value: cc.AnimationFrame) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Application.lua b/cocos/scripting/lua-bindings/auto/api/Application.lua index ed1bc8e3e4..f458be4bee 100644 --- a/cocos/scripting/lua-bindings/auto/api/Application.lua +++ b/cocos/scripting/lua-bindings/auto/api/Application.lua @@ -4,26 +4,35 @@ -- @parent_module cc -------------------------------- +-- brief Get target platform -- @function [parent=#Application] getTargetPlatform -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- brief Get current language iso 639-1 code
+-- return Current language iso 639-1 code -- @function [parent=#Application] getCurrentLanguageCode -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- brief Get current language config
+-- return Current language config -- @function [parent=#Application] getCurrentLanguage -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- brief Callback by Director to limit FPS.
+-- param interval The time, expressed in seconds, between current frame and next. -- @function [parent=#Application] setAnimationInterval -- @param self --- @param #double double +-- @param #double interval -------------------------------- +-- brief Get current application instance.
+-- return Current application instance pointer. -- @function [parent=#Application] getInstance -- @param self -- @return Application#Application ret (return value: cc.Application) diff --git a/cocos/scripting/lua-bindings/auto/api/Armature.lua b/cocos/scripting/lua-bindings/auto/api/Armature.lua index 3a64f91aad..6aa0fd389f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Armature.lua +++ b/cocos/scripting/lua-bindings/auto/api/Armature.lua @@ -5,55 +5,70 @@ -- @parent_module ccs -------------------------------- +-- Get a bone with the specified name
+-- param name The bone's name you want to get -- @function [parent=#Armature] getBone -- @param self --- @param #string str +-- @param #string name -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- +-- Change a bone's parent with the specified parent name.
+-- param bone The bone you want to change parent
+-- param parentName The new parent's name. -- @function [parent=#Armature] changeBoneParent -- @param self -- @param #ccs.Bone bone --- @param #string str +-- @param #string parentName -------------------------------- +-- -- @function [parent=#Armature] setAnimation -- @param self --- @param #ccs.ArmatureAnimation armatureanimation +-- @param #ccs.ArmatureAnimation animation -------------------------------- +-- -- @function [parent=#Armature] getBoneAtPoint -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- +-- -- @function [parent=#Armature] getArmatureTransformDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Armature] setVersion -- @param self --- @param #float float +-- @param #float version -------------------------------- +-- Set contentsize and Calculate anchor point. -- @function [parent=#Armature] updateOffsetPoint -- @param self -------------------------------- +-- -- @function [parent=#Armature] getParentBone -- @param self -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- +-- Remove a bone with the specified name. If recursion it will also remove child Bone recursionly.
+-- param bone The bone you want to remove
+-- param recursion Determine whether remove the bone's child recursion. -- @function [parent=#Armature] removeBone -- @param self -- @param #ccs.Bone bone --- @param #bool bool +-- @param #bool recursion -------------------------------- +-- -- @function [parent=#Armature] getBatchNode -- @param self -- @return BatchNode#BatchNode ret (return value: ccs.BatchNode) @@ -64,51 +79,63 @@ -- @overload self, string, ccs.Bone -- @function [parent=#Armature] init -- @param self --- @param #string str --- @param #ccs.Bone bone +-- @param #string name +-- @param #ccs.Bone parentBone -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Armature] setParentBone -- @param self --- @param #ccs.Bone bone +-- @param #ccs.Bone parentBone -------------------------------- +-- -- @function [parent=#Armature] drawContour -- @param self -------------------------------- +-- -- @function [parent=#Armature] setBatchNode -- @param self --- @param #ccs.BatchNode batchnode +-- @param #ccs.BatchNode batchNode -------------------------------- +-- -- @function [parent=#Armature] setArmatureData -- @param self --- @param #ccs.ArmatureData armaturedata +-- @param #ccs.ArmatureData armatureData -------------------------------- +-- Add a Bone to this Armature,
+-- param bone The Bone you want to add to Armature
+-- param parentName The parent Bone's name you want to add to . If it's nullptr, then set Armature to its parent -- @function [parent=#Armature] addBone -- @param self -- @param #ccs.Bone bone --- @param #string str +-- @param #string parentName -------------------------------- +-- -- @function [parent=#Armature] getArmatureData -- @param self -- @return ArmatureData#ArmatureData ret (return value: ccs.ArmatureData) -------------------------------- +-- -- @function [parent=#Armature] getVersion -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Armature] getAnimation -- @param self -- @return ArmatureAnimation#ArmatureAnimation ret (return value: ccs.ArmatureAnimation) -------------------------------- +-- Get Armature's bone dictionary
+-- return Armature's bone dictionary -- @function [parent=#Armature] getBoneDic -- @param self -- @return map_table#map_table ret (return value: map_table) @@ -119,43 +146,50 @@ -- @overload self, string, ccs.Bone -- @function [parent=#Armature] create -- @param self --- @param #string str --- @param #ccs.Bone bone +-- @param #string name +-- @param #ccs.Bone parentBone -- @return Armature#Armature ret (retunr value: ccs.Armature) -------------------------------- +-- -- @function [parent=#Armature] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -------------------------------- +-- -- @function [parent=#Armature] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#Armature] getAnchorPointInPoints -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Armature] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Armature] getNodeToParentTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- This boundingBox will calculate all bones' boundingBox every time -- @function [parent=#Armature] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- js ctor -- @function [parent=#Armature] Armature -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua index 66320119c5..6fdfc0e155 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua @@ -5,103 +5,140 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ArmatureAnimation] getSpeedScale -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Pause the Process -- @function [parent=#ArmatureAnimation] pause -- @param self -------------------------------- +-- Scale animation play speed.
+-- param animationScale Scale value -- @function [parent=#ArmatureAnimation] setSpeedScale -- @param self --- @param #float float +-- @param #float speedScale -------------------------------- +-- Init with a Armature
+-- param armature The Armature ArmatureAnimation will bind to -- @function [parent=#ArmatureAnimation] init -- @param self -- @param #ccs.Armature armature -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ArmatureAnimation] playWithIndexes -- @param self --- @param #array_table array --- @param #int int --- @param #bool bool +-- @param #array_table movementIndexes +-- @param #int durationTo +-- @param #bool loop -------------------------------- +-- Play animation by animation name.
+-- param animationName The animation name you want to play
+-- param durationTo The frames between two animation changing-over.
+-- It's meaning is changing to this animation need how many frames
+-- -1 : use the value from MovementData get from flash design panel
+-- param loop Whether the animation is loop
+-- loop < 0 : use the value from MovementData get from flash design panel
+-- loop = 0 : this animation is not loop
+-- loop > 0 : this animation is loop -- @function [parent=#ArmatureAnimation] play -- @param self --- @param #string str --- @param #int int --- @param #int int +-- @param #string animationName +-- @param #int durationTo +-- @param #int loop -------------------------------- +-- Go to specified frame and pause current movement. -- @function [parent=#ArmatureAnimation] gotoAndPause -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- Resume the Process -- @function [parent=#ArmatureAnimation] resume -- @param self -------------------------------- +-- Stop the Process -- @function [parent=#ArmatureAnimation] stop -- @param self -------------------------------- +-- -- @function [parent=#ArmatureAnimation] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#ArmatureAnimation] getAnimationData -- @param self -- @return AnimationData#AnimationData ret (return value: ccs.AnimationData) -------------------------------- +-- -- @function [parent=#ArmatureAnimation] playWithIndex -- @param self --- @param #int int --- @param #int int --- @param #int int +-- @param #int animationIndex +-- @param #int durationTo +-- @param #int loop -------------------------------- +-- Get current movementID
+-- return The name of current movement -- @function [parent=#ArmatureAnimation] getCurrentMovementID -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ArmatureAnimation] setAnimationData -- @param self --- @param #ccs.AnimationData animationdata +-- @param #ccs.AnimationData data -------------------------------- +-- Go to specified frame and play current movement.
+-- You need first switch to the movement you want to play, then call this function.
+-- example : playByIndex(0);
+-- gotoAndPlay(0);
+-- playByIndex(1);
+-- gotoAndPlay(0);
+-- gotoAndPlay(15); -- @function [parent=#ArmatureAnimation] gotoAndPlay -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- -- @function [parent=#ArmatureAnimation] playWithNames -- @param self --- @param #array_table array --- @param #int int --- @param #bool bool +-- @param #array_table movementNames +-- @param #int durationTo +-- @param #bool loop -------------------------------- +-- Get movement count -- @function [parent=#ArmatureAnimation] getMovementCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Create with a Armature
+-- param armature The Armature ArmatureAnimation will bind to -- @function [parent=#ArmatureAnimation] create -- @param self -- @param #ccs.Armature armature -- @return ArmatureAnimation#ArmatureAnimation ret (return value: ccs.ArmatureAnimation) -------------------------------- +-- js ctor -- @function [parent=#ArmatureAnimation] ArmatureAnimation -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua index d8558c9910..d22ae806e0 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua @@ -5,27 +5,32 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ArmatureData] addBoneData -- @param self --- @param #ccs.BoneData bonedata +-- @param #ccs.BoneData boneData -------------------------------- +-- -- @function [parent=#ArmatureData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ArmatureData] getBoneData -- @param self --- @param #string str +-- @param #string boneName -- @return BoneData#BoneData ret (return value: ccs.BoneData) -------------------------------- +-- -- @function [parent=#ArmatureData] create -- @param self -- @return ArmatureData#ArmatureData ret (return value: ccs.ArmatureData) -------------------------------- +-- js ctor -- @function [parent=#ArmatureData] ArmatureData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua index 8afaf2f804..690de6110a 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua @@ -5,110 +5,143 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ArmatureDataManager] getAnimationDatas -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- brief remove animation data
+-- param id the id of the animation data -- @function [parent=#ArmatureDataManager] removeAnimationData -- @param self --- @param #string str +-- @param #string id -------------------------------- +-- Add armature data
+-- param id The id of the armature data
+-- param armatureData ArmatureData * -- @function [parent=#ArmatureDataManager] addArmatureData -- @param self --- @param #string str --- @param #ccs.ArmatureData armaturedata --- @param #string str +-- @param #string id +-- @param #ccs.ArmatureData armatureData +-- @param #string configFilePath -------------------------------- -- @overload self, string, string, string -- @overload self, string -- @function [parent=#ArmatureDataManager] addArmatureFileInfo -- @param self --- @param #string str --- @param #string str --- @param #string str +-- @param #string imagePath +-- @param #string plistPath +-- @param #string configFilePath -------------------------------- +-- -- @function [parent=#ArmatureDataManager] removeArmatureFileInfo -- @param self --- @param #string str +-- @param #string configFilePath -------------------------------- +-- -- @function [parent=#ArmatureDataManager] getTextureDatas -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- brief get texture data
+-- param id the id of the texture data you want to get
+-- return TextureData * -- @function [parent=#ArmatureDataManager] getTextureData -- @param self --- @param #string str +-- @param #string id -- @return TextureData#TextureData ret (return value: ccs.TextureData) -------------------------------- +-- brief get armature data
+-- param id the id of the armature data you want to get
+-- return ArmatureData * -- @function [parent=#ArmatureDataManager] getArmatureData -- @param self --- @param #string str +-- @param #string id -- @return ArmatureData#ArmatureData ret (return value: ccs.ArmatureData) -------------------------------- +-- brief get animation data from _animationDatas(Dictionary)
+-- param id the id of the animation data you want to get
+-- return AnimationData * -- @function [parent=#ArmatureDataManager] getAnimationData -- @param self --- @param #string str +-- @param #string id -- @return AnimationData#AnimationData ret (return value: ccs.AnimationData) -------------------------------- +-- brief add animation data
+-- param id the id of the animation data
+-- return AnimationData * -- @function [parent=#ArmatureDataManager] addAnimationData -- @param self --- @param #string str --- @param #ccs.AnimationData animationdata --- @param #string str +-- @param #string id +-- @param #ccs.AnimationData animationData +-- @param #string configFilePath -------------------------------- +-- Init ArmatureDataManager -- @function [parent=#ArmatureDataManager] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief remove armature data
+-- param id the id of the armature data you want to get -- @function [parent=#ArmatureDataManager] removeArmatureData -- @param self --- @param #string str +-- @param #string id -------------------------------- +-- -- @function [parent=#ArmatureDataManager] getArmatureDatas -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- brief remove texture data
+-- param id the id of the texture data you want to get -- @function [parent=#ArmatureDataManager] removeTextureData -- @param self --- @param #string str +-- @param #string id -------------------------------- +-- brief add texture data
+-- param id the id of the texture data
+-- return TextureData * -- @function [parent=#ArmatureDataManager] addTextureData -- @param self --- @param #string str --- @param #ccs.TextureData texturedata --- @param #string str +-- @param #string id +-- @param #ccs.TextureData textureData +-- @param #string configFilePath -------------------------------- +-- brief Juge whether or not need auto load sprite file -- @function [parent=#ArmatureDataManager] isAutoLoadSpriteFile -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name -- @function [parent=#ArmatureDataManager] addSpriteFrameFromFile -- @param self --- @param #string str --- @param #string str --- @param #string str +-- @param #string plistPath +-- @param #string imagePath +-- @param #string configFilePath -------------------------------- +-- -- @function [parent=#ArmatureDataManager] destroyInstance -- @param self -------------------------------- +-- -- @function [parent=#ArmatureDataManager] getInstance -- @param self -- @return ArmatureDataManager#ArmatureDataManager ret (return value: ccs.ArmatureDataManager) diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua index 450e398de0..5fcd62e60d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua @@ -5,11 +5,13 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ArmatureDisplayData] create -- @param self -- @return ArmatureDisplayData#ArmatureDisplayData ret (return value: ccs.ArmatureDisplayData) -------------------------------- +-- js ctor -- @function [parent=#ArmatureDisplayData] ArmatureDisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua b/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua index 364244e06f..c5ae73f466 100644 --- a/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua @@ -5,75 +5,89 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#AssetsManager] setStoragePath -- @param self --- @param #char char +-- @param #char storagePath -------------------------------- +-- -- @function [parent=#AssetsManager] setPackageUrl -- @param self --- @param #char char +-- @param #char packageUrl -------------------------------- +-- -- @function [parent=#AssetsManager] checkUpdate -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#AssetsManager] getStoragePath -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#AssetsManager] update -- @param self -------------------------------- +-- @brief Sets connection time out in seconds -- @function [parent=#AssetsManager] setConnectionTimeout -- @param self --- @param #unsigned int int +-- @param #unsigned int timeout -------------------------------- +-- -- @function [parent=#AssetsManager] setVersionFileUrl -- @param self --- @param #char char +-- @param #char versionFileUrl -------------------------------- +-- -- @function [parent=#AssetsManager] getPackageUrl -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- @brief Gets connection time out in secondes -- @function [parent=#AssetsManager] getConnectionTimeout -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#AssetsManager] getVersion -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#AssetsManager] getVersionFileUrl -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#AssetsManager] deleteVersion -- @param self -------------------------------- +-- -- @function [parent=#AssetsManager] create -- @param self --- @param #char char --- @param #char char --- @param #char char --- @param #function func --- @param #function func --- @param #function func +-- @param #char packageUrl +-- @param #char versionFileUrl +-- @param #char storagePath +-- @param #function errorCallback +-- @param #function progressCallback +-- @param #function successCallback -- @return AssetsManager#AssetsManager ret (return value: cc.AssetsManager) -------------------------------- +-- -- @function [parent=#AssetsManager] AssetsManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua b/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua index d0a1fbd5b8..e035dc27a9 100644 --- a/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua @@ -5,78 +5,93 @@ -- @parent_module cc -------------------------------- +-- updates the Atlas (indexed vertex array).
+-- Shall be overridden in subclasses -- @function [parent=#AtlasNode] updateAtlasValues -- @param self -------------------------------- +-- -- @function [parent=#AtlasNode] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- -- @function [parent=#AtlasNode] setTextureAtlas -- @param self --- @param #cc.TextureAtlas textureatlas +-- @param #cc.TextureAtlas textureAtlas -------------------------------- +-- -- @function [parent=#AtlasNode] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- +-- -- @function [parent=#AtlasNode] getQuadsToDraw -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#AtlasNode] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- -- @function [parent=#AtlasNode] setQuadsToDraw -- @param self --- @param #long long +-- @param #long quadsToDraw -------------------------------- +-- creates a AtlasNode with an Atlas file the width and height of each item and the quantity of items to render -- @function [parent=#AtlasNode] create -- @param self --- @param #string str --- @param #int int --- @param #int int --- @param #int int +-- @param #string filename +-- @param #int tileWidth +-- @param #int tileHeight +-- @param #int itemsToRender -- @return AtlasNode#AtlasNode ret (return value: cc.AtlasNode) -------------------------------- +-- -- @function [parent=#AtlasNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#AtlasNode] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#AtlasNode] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- -- @function [parent=#AtlasNode] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#AtlasNode] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool isOpacityModifyRGB -------------------------------- +-- -- @function [parent=#AtlasNode] setOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity return nil diff --git a/cocos/scripting/lua-bindings/auto/api/AttachNode.lua b/cocos/scripting/lua-bindings/auto/api/AttachNode.lua index dca12cf579..e61a0d0d48 100644 --- a/cocos/scripting/lua-bindings/auto/api/AttachNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/AttachNode.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates an AttachNode
+-- param attachBone The bone to which the AttachNode is going to attach, the attacheBone must be a bone of the AttachNode's parent -- @function [parent=#AttachNode] create -- @param self --- @param #cc.Bone3D bone3d +-- @param #cc.Bone3D attachBone -- @return AttachNode#AttachNode ret (return value: cc.AttachNode) -------------------------------- +-- -- @function [parent=#AttachNode] getWorldToNodeTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- -- @function [parent=#AttachNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/BaseData.lua b/cocos/scripting/lua-bindings/auto/api/BaseData.lua index 2d2d36b6a1..78f4aafeff 100644 --- a/cocos/scripting/lua-bindings/auto/api/BaseData.lua +++ b/cocos/scripting/lua-bindings/auto/api/BaseData.lua @@ -5,21 +5,25 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#BaseData] getColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- +-- -- @function [parent=#BaseData] setColor -- @param self --- @param #color4b_table color4b +-- @param #color4b_table color -------------------------------- +-- -- @function [parent=#BaseData] create -- @param self -- @return BaseData#BaseData ret (return value: ccs.BaseData) -------------------------------- +-- js ctor -- @function [parent=#BaseData] BaseData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/BatchNode.lua b/cocos/scripting/lua-bindings/auto/api/BatchNode.lua index dfb42d2e5e..3e153863a9 100644 --- a/cocos/scripting/lua-bindings/auto/api/BatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/BatchNode.lua @@ -5,11 +5,13 @@ -- @parent_module ccs -------------------------------- +-- js NA -- @function [parent=#BatchNode] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#BatchNode] create -- @param self -- @return BatchNode#BatchNode ret (return value: ccs.BatchNode) @@ -19,21 +21,23 @@ -- @overload self, cc.Node, int, int -- @function [parent=#BatchNode] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node pChild +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#BatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#BatchNode] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup return nil diff --git a/cocos/scripting/lua-bindings/auto/api/BezierBy.lua b/cocos/scripting/lua-bindings/auto/api/BezierBy.lua index ed228fd60c..85dc00405e 100644 --- a/cocos/scripting/lua-bindings/auto/api/BezierBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/BezierBy.lua @@ -5,23 +5,27 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#BezierBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#BezierBy] clone -- @param self -- @return BezierBy#BezierBy ret (return value: cc.BezierBy) -------------------------------- +-- -- @function [parent=#BezierBy] reverse -- @param self -- @return BezierBy#BezierBy ret (return value: cc.BezierBy) -------------------------------- +-- -- @function [parent=#BezierBy] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/BezierTo.lua b/cocos/scripting/lua-bindings/auto/api/BezierTo.lua index 5bec1c1882..6499108d03 100644 --- a/cocos/scripting/lua-bindings/auto/api/BezierTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/BezierTo.lua @@ -5,16 +5,19 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#BezierTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#BezierTo] clone -- @param self -- @return BezierTo#BezierTo ret (return value: cc.BezierTo) -------------------------------- +-- -- @function [parent=#BezierTo] reverse -- @param self -- @return BezierTo#BezierTo ret (return value: cc.BezierTo) diff --git a/cocos/scripting/lua-bindings/auto/api/Blink.lua b/cocos/scripting/lua-bindings/auto/api/Blink.lua index 91bbeeee69..d63a7f8329 100644 --- a/cocos/scripting/lua-bindings/auto/api/Blink.lua +++ b/cocos/scripting/lua-bindings/auto/api/Blink.lua @@ -5,34 +5,40 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#Blink] create -- @param self --- @param #float float --- @param #int int +-- @param #float duration +-- @param #int blinks -- @return Blink#Blink ret (return value: cc.Blink) -------------------------------- +-- -- @function [parent=#Blink] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Blink] clone -- @param self -- @return Blink#Blink ret (return value: cc.Blink) -------------------------------- +-- -- @function [parent=#Blink] stop -- @param self -------------------------------- +-- -- @function [parent=#Blink] reverse -- @param self -- @return Blink#Blink ret (return value: cc.Blink) -------------------------------- +-- -- @function [parent=#Blink] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Bone.lua b/cocos/scripting/lua-bindings/auto/api/Bone.lua index 9b646e61db..99606c4270 100644 --- a/cocos/scripting/lua-bindings/auto/api/Bone.lua +++ b/cocos/scripting/lua-bindings/auto/api/Bone.lua @@ -5,163 +5,200 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#Bone] isTransformDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Bone] isIgnoreMovementBoneData -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Update zorder -- @function [parent=#Bone] updateZOrder -- @param self -------------------------------- +-- -- @function [parent=#Bone] getDisplayRenderNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#Bone] isBlendDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Add a child to this bone, and it will let this child call setParent(Bone *parent) function to set self to it's parent
+-- param child the child you want to add -- @function [parent=#Bone] addChildBone -- @param self --- @param #ccs.Bone bone +-- @param #ccs.Bone child -------------------------------- +-- -- @function [parent=#Bone] getWorldInfo -- @param self -- @return BaseData#BaseData ret (return value: ccs.BaseData) -------------------------------- +-- -- @function [parent=#Bone] getTween -- @param self -- @return Tween#Tween ret (return value: ccs.Tween) -------------------------------- +-- Get parent bone
+-- return parent bone -- @function [parent=#Bone] getParentBone -- @param self -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- +-- Update color to render display -- @function [parent=#Bone] updateColor -- @param self -------------------------------- +-- -- @function [parent=#Bone] setTransformDirty -- @param self --- @param #bool bool +-- @param #bool dirty -------------------------------- +-- -- @function [parent=#Bone] getDisplayRenderNodeType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Bone] removeDisplay -- @param self --- @param #int int +-- @param #int index -------------------------------- +-- -- @function [parent=#Bone] setBoneData -- @param self --- @param #ccs.BoneData bonedata +-- @param #ccs.BoneData boneData -------------------------------- -- @overload self, string -- @overload self -- @function [parent=#Bone] init -- @param self --- @param #string str +-- @param #string name -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- Set parent bone.
+-- If parent is NUll, then also remove this bone from armature.
+-- It will not set the Armature, if you want to add the bone to a Armature, you should use Armature::addBone(Bone *bone, const char* parentName).
+-- param parent the parent bone.
+-- nullptr : remove this bone from armature -- @function [parent=#Bone] setParentBone -- @param self --- @param #ccs.Bone bone +-- @param #ccs.Bone parent -------------------------------- -- @overload self, cc.Node, int -- @overload self, ccs.DisplayData, int -- @function [parent=#Bone] addDisplay -- @param self --- @param #ccs.DisplayData displaydata --- @param #int int +-- @param #ccs.DisplayData displayData +-- @param #int index -------------------------------- +-- Remove itself from its parent.
+-- param recursion whether or not to remove childBone's display -- @function [parent=#Bone] removeFromParent -- @param self --- @param #bool bool +-- @param #bool recursion -------------------------------- +-- -- @function [parent=#Bone] getColliderDetector -- @param self -- @return ColliderDetector#ColliderDetector ret (return value: ccs.ColliderDetector) -------------------------------- +-- -- @function [parent=#Bone] getChildArmature -- @param self -- @return Armature#Armature ret (return value: ccs.Armature) -------------------------------- +-- -- @function [parent=#Bone] getTweenData -- @param self -- @return FrameData#FrameData ret (return value: ccs.FrameData) -------------------------------- +-- -- @function [parent=#Bone] changeDisplayWithIndex -- @param self --- @param #int int --- @param #bool bool +-- @param #int index +-- @param #bool force -------------------------------- +-- -- @function [parent=#Bone] changeDisplayWithName -- @param self --- @param #string str --- @param #bool bool +-- @param #string name +-- @param #bool force -------------------------------- +-- -- @function [parent=#Bone] setArmature -- @param self -- @param #ccs.Armature armature -------------------------------- +-- -- @function [parent=#Bone] setBlendDirty -- @param self --- @param #bool bool +-- @param #bool dirty -------------------------------- +-- Removes a child Bone
+-- param bone the bone you want to remove -- @function [parent=#Bone] removeChildBone -- @param self -- @param #ccs.Bone bone --- @param #bool bool +-- @param #bool recursion -------------------------------- +-- -- @function [parent=#Bone] setChildArmature -- @param self --- @param #ccs.Armature armature +-- @param #ccs.Armature childArmature -------------------------------- +-- -- @function [parent=#Bone] getNodeToArmatureTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- -- @function [parent=#Bone] getDisplayManager -- @param self -- @return DisplayManager#DisplayManager ret (return value: ccs.DisplayManager) -------------------------------- +-- -- @function [parent=#Bone] getArmature -- @param self -- @return Armature#Armature ret (return value: ccs.Armature) -------------------------------- +-- -- @function [parent=#Bone] getBoneData -- @param self -- @return BoneData#BoneData ret (return value: ccs.BoneData) @@ -171,35 +208,41 @@ -- @overload self -- @function [parent=#Bone] create -- @param self --- @param #string str +-- @param #string name -- @return Bone#Bone ret (retunr value: ccs.Bone) -------------------------------- +-- -- @function [parent=#Bone] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor -------------------------------- +-- -- @function [parent=#Bone] setLocalZOrder -- @param self --- @param #int int +-- @param #int zOrder -------------------------------- +-- -- @function [parent=#Bone] getNodeToWorldTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- -- @function [parent=#Bone] update -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- -- @function [parent=#Bone] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- js ctor -- @function [parent=#Bone] Bone -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/BoneData.lua b/cocos/scripting/lua-bindings/auto/api/BoneData.lua index 2b4eea933a..7cc0750efb 100644 --- a/cocos/scripting/lua-bindings/auto/api/BoneData.lua +++ b/cocos/scripting/lua-bindings/auto/api/BoneData.lua @@ -5,27 +5,32 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#BoneData] getDisplayData -- @param self --- @param #int int +-- @param #int index -- @return DisplayData#DisplayData ret (return value: ccs.DisplayData) -------------------------------- +-- -- @function [parent=#BoneData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#BoneData] addDisplayData -- @param self --- @param #ccs.DisplayData displaydata +-- @param #ccs.DisplayData displayData -------------------------------- +-- -- @function [parent=#BoneData] create -- @param self -- @return BoneData#BoneData ret (return value: ccs.BoneData) -------------------------------- +-- js ctor -- @function [parent=#BoneData] BoneData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Button.lua b/cocos/scripting/lua-bindings/auto/api/Button.lua index b0212c1988..544762f02c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Button.lua +++ b/cocos/scripting/lua-bindings/auto/api/Button.lua @@ -5,168 +5,215 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#Button] getTitleText -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Button] setTitleFontSize -- @param self --- @param #float float +-- @param #float size -------------------------------- +-- Sets if button is using scale9 renderer.
+-- param true that using scale9 renderer, false otherwise. -- @function [parent=#Button] setScale9Enabled -- @param self --- @param #bool bool +-- @param #bool able -------------------------------- +-- brief Return a zoom scale -- @function [parent=#Button] getZoomScale -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Button] getCapInsetsDisabledRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Button] setTitleColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- Sets capinsets for button, if button is using scale9 renderer.
+-- param capInsets capinsets for button -- @function [parent=#Button] setCapInsetsDisabledRenderer -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Sets capinsets for button, if button is using scale9 renderer.
+-- param capInsets capinsets for button -- @function [parent=#Button] setCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Load dark state texture for button.
+-- param disabled dark state texture.
+-- param texType @see TextureResType -- @function [parent=#Button] loadTextureDisabled -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string disabled +-- @param #int texType -------------------------------- +-- -- @function [parent=#Button] setTitleText -- @param self --- @param #string str +-- @param #string text -------------------------------- +-- Sets capinsets for button, if button is using scale9 renderer.
+-- param capInsets capinsets for button -- @function [parent=#Button] setCapInsetsNormalRenderer -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Load selected state texture for button.
+-- param selected selected state texture.
+-- param texType @see TextureResType -- @function [parent=#Button] loadTexturePressed -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string selected +-- @param #int texType -------------------------------- +-- -- @function [parent=#Button] setTitleFontName -- @param self --- @param #string str +-- @param #string fontName -------------------------------- +-- -- @function [parent=#Button] getCapInsetsNormalRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Button] getCapInsetsPressedRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Load textures for button.
+-- param normal normal state texture name.
+-- param selected selected state texture name.
+-- param disabled disabled state texture name.
+-- param texType @see TextureResType -- @function [parent=#Button] loadTextures -- @param self --- @param #string str --- @param #string str --- @param #string str --- @param #int texturerestype +-- @param #string normal +-- @param #string selected +-- @param #string disabled +-- @param #int texType -------------------------------- +-- -- @function [parent=#Button] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Load normal state texture for button.
+-- param normal normal state texture.
+-- param texType @see TextureResType -- @function [parent=#Button] loadTextureNormal -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string normal +-- @param #int texType -------------------------------- +-- Sets capinsets for button, if button is using scale9 renderer.
+-- param capInsets capinsets for button -- @function [parent=#Button] setCapInsetsPressedRenderer -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- -- @function [parent=#Button] getTitleFontSize -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Button] getTitleFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Button] getTitleColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Changes if button can be clicked zoom effect.
+-- param true that can be clicked zoom effect, false otherwise. -- @function [parent=#Button] setPressedActionEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- When user pressed the button, the button will zoom to a scale.
+-- The final scale of the button equals (button original scale + _zoomScale) -- @function [parent=#Button] setZoomScale -- @param self --- @param #float float +-- @param #float scale -------------------------------- -- @overload self, string, string, string, int -- @overload self -- @function [parent=#Button] create -- @param self --- @param #string str --- @param #string str --- @param #string str --- @param #int texturerestype +-- @param #string normalImage +-- @param #string selectedImage +-- @param #string disableImage +-- @param #int texType -- @return Button#Button ret (retunr value: ccui.Button) -------------------------------- +-- -- @function [parent=#Button] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#Button] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#Button] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Button] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Button] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- Default constructor -- @function [parent=#Button] Button -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua b/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua index 1238d0c551..eddeeae1bd 100644 --- a/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua @@ -5,197 +5,234 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#CCBAnimationManager] moveAnimationsFromNode -- @param self --- @param #cc.Node node --- @param #cc.Node node +-- @param #cc.Node fromNode +-- @param #cc.Node toNode -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setAutoPlaySequenceId -- @param self --- @param #int int +-- @param #int autoPlaySequenceId -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentCallbackNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] actionForSoundChannel -- @param self --- @param #cc.CCBSequenceProperty ccbsequenceproperty +-- @param #cc.CCBSequenceProperty channel -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setBaseValue -- @param self -- @param #cc.Value value --- @param #cc.Node node --- @param #string str +-- @param #cc.Node pNode +-- @param #string propName -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentOutletNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getLastCompletedSequenceName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setRootNode -- @param self --- @param #cc.Node node +-- @param #cc.Node pRootNode -------------------------------- +-- -- @function [parent=#CCBAnimationManager] runAnimationsForSequenceNamedTweenDuration -- @param self --- @param #char char --- @param #float float +-- @param #char pName +-- @param #float fTweenDuration -------------------------------- +-- -- @function [parent=#CCBAnimationManager] addDocumentOutletName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getSequences -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getRootContainerSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setDocumentControllerName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setObject -- @param self --- @param #cc.Ref ref --- @param #cc.Node node --- @param #string str +-- @param #cc.Ref obj +-- @param #cc.Node pNode +-- @param #string propName -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getContainerSize -- @param self --- @param #cc.Node node +-- @param #cc.Node pNode -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] actionForCallbackChannel -- @param self --- @param #cc.CCBSequenceProperty ccbsequenceproperty +-- @param #cc.CCBSequenceProperty channel -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentOutletNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] addDocumentCallbackControlEvents -- @param self --- @param #int eventtype +-- @param #int eventType -------------------------------- +-- -- @function [parent=#CCBAnimationManager] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getKeyframeCallbacks -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentCallbackControlEvents -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setRootContainerSize -- @param self --- @param #size_table size +-- @param #size_table rootContainerSize -------------------------------- +-- -- @function [parent=#CCBAnimationManager] runAnimationsForSequenceIdTweenDuration -- @param self --- @param #int int --- @param #float float +-- @param #int nSeqId +-- @param #float fTweenDuraiton -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getRunningSequenceName -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getAutoPlaySequenceId -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] addDocumentCallbackName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getRootNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] addDocumentOutletNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getSequenceDuration -- @param self --- @param #char char +-- @param #char pSequenceName -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] addDocumentCallbackNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#CCBAnimationManager] runAnimationsForSequenceNamed -- @param self --- @param #char char +-- @param #char pName -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getSequenceId -- @param self --- @param #char char +-- @param #char pSequenceName -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentCallbackNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setSequences -- @param self --- @param #array_table array +-- @param #array_table seq -------------------------------- +-- -- @function [parent=#CCBAnimationManager] debug -- @param self -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentControllerName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- js ctor -- @function [parent=#CCBAnimationManager] CCBAnimationManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CCBReader.lua b/cocos/scripting/lua-bindings/auto/api/CCBReader.lua index b6fe92d042..78fba9b128 100644 --- a/cocos/scripting/lua-bindings/auto/api/CCBReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/CCBReader.lua @@ -5,101 +5,122 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#CCBReader] addOwnerOutletName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#CCBReader] getOwnerCallbackNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBReader] addDocumentCallbackControlEvents -- @param self --- @param #int eventtype +-- @param #int eventType -------------------------------- +-- -- @function [parent=#CCBReader] setCCBRootPath -- @param self --- @param #char char +-- @param #char ccbRootPath -------------------------------- +-- -- @function [parent=#CCBReader] addOwnerOutletNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#CCBReader] getOwnerCallbackNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBReader] readSoundKeyframesForSeq -- @param self --- @param #cc.CCBSequence ccbsequence +-- @param #cc.CCBSequence seq -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CCBReader] getCCBRootPath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#CCBReader] getOwnerCallbackControlEvents -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBReader] getOwnerOutletNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBReader] readUTF8 -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#CCBReader] addOwnerCallbackControlEvents -- @param self --- @param #int eventtype +-- @param #int type -------------------------------- +-- -- @function [parent=#CCBReader] getOwnerOutletNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- js setActionManager
+-- lua setActionManager -- @function [parent=#CCBReader] setAnimationManager -- @param self --- @param #cc.CCBAnimationManager ccbanimationmanager +-- @param #cc.CCBAnimationManager pAnimationManager -------------------------------- +-- -- @function [parent=#CCBReader] readCallbackKeyframesForSeq -- @param self --- @param #cc.CCBSequence ccbsequence +-- @param #cc.CCBSequence seq -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CCBReader] getAnimationManagersForNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBReader] getNodesWithAnimationManagers -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- js getActionManager
+-- lua getActionManager -- @function [parent=#CCBReader] getAnimationManager -- @param self -- @return CCBAnimationManager#CCBAnimationManager ret (return value: cc.CCBAnimationManager) -------------------------------- +-- -- @function [parent=#CCBReader] setResolutionScale -- @param self --- @param #float float +-- @param #float scale -------------------------------- -- @overload self, cc.CCBReader @@ -107,9 +128,9 @@ -- @overload self -- @function [parent=#CCBReader] CCBReader -- @param self --- @param #cc.NodeLoaderLibrary nodeloaderlibrary --- @param #cc.CCBMemberVariableAssigner ccbmembervariableassigner --- @param #cc.CCBSelectorResolver ccbselectorresolver --- @param #cc.NodeLoaderListener nodeloaderlistener +-- @param #cc.NodeLoaderLibrary pNodeLoaderLibrary +-- @param #cc.CCBMemberVariableAssigner pCCBMemberVariableAssigner +-- @param #cc.CCBSelectorResolver pCCBSelectorResolver +-- @param #cc.NodeLoaderListener pNodeLoaderListener return nil diff --git a/cocos/scripting/lua-bindings/auto/api/CallFunc.lua b/cocos/scripting/lua-bindings/auto/api/CallFunc.lua index f45623fe4b..678814b81e 100644 --- a/cocos/scripting/lua-bindings/auto/api/CallFunc.lua +++ b/cocos/scripting/lua-bindings/auto/api/CallFunc.lua @@ -5,30 +5,36 @@ -- @parent_module cc -------------------------------- +-- executes the callback -- @function [parent=#CallFunc] execute -- @param self -------------------------------- +-- -- @function [parent=#CallFunc] getTargetCallback -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#CallFunc] setTargetCallback -- @param self --- @param #cc.Ref ref +-- @param #cc.Ref sel -------------------------------- +-- -- @function [parent=#CallFunc] clone -- @param self -- @return CallFunc#CallFunc ret (return value: cc.CallFunc) -------------------------------- +-- -- @function [parent=#CallFunc] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#CallFunc] reverse -- @param self -- @return CallFunc#CallFunc ret (return value: cc.CallFunc) diff --git a/cocos/scripting/lua-bindings/auto/api/Camera.lua b/cocos/scripting/lua-bindings/auto/api/Camera.lua index af10889528..8f80b80254 100644 --- a/cocos/scripting/lua-bindings/auto/api/Camera.lua +++ b/cocos/scripting/lua-bindings/auto/api/Camera.lua @@ -5,79 +5,108 @@ -- @parent_module cc -------------------------------- +-- Gets the camera's projection matrix.
+-- return The camera projection matrix. -- @function [parent=#Camera] getProjectionMatrix -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- get view projection matrix -- @function [parent=#Camera] getViewProjectionMatrix -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- Gets the camera's view matrix.
+-- return The camera view matrix. -- @function [parent=#Camera] getViewMatrix -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- get & set Camera flag -- @function [parent=#Camera] getCameraFlag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Gets the type of camera.
+-- return The camera type. -- @function [parent=#Camera] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Creates a view matrix based on the specified input parameters.
+-- param eyePosition The eye position.
+-- param targetPosition The target's center position.
+-- param up The up vector.
+-- param dst A matrix to store the result in. -- @function [parent=#Camera] lookAt -- @param self --- @param #vec3_table vec3 --- @param #vec3_table vec3 +-- @param #vec3_table target +-- @param #vec3_table up -------------------------------- +-- -- @function [parent=#Camera] setCameraFlag -- @param self --- @param #int cameraflag +-- @param #int flag -------------------------------- +-- Convert the specified point of viewport from screenspace coordinate into the worldspace coordinate. -- @function [parent=#Camera] unproject -- @param self --- @param #size_table size --- @param #vec3_table vec3 --- @param #vec3_table vec3 +-- @param #size_table viewport +-- @param #vec3_table src +-- @param #vec3_table dst -------------------------------- +-- create default camera, the camera type depends on Director::getProjection -- @function [parent=#Camera] create -- @param self -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- +-- Creates a perspective camera.
+-- param fieldOfView The field of view for the perspective camera (normally in the range of 40-60 degrees).
+-- param aspectRatio The aspect ratio of the camera (normally the width of the viewport divided by the height of the viewport).
+-- param nearPlane The near plane distance.
+-- param farPlane The far plane distance. -- @function [parent=#Camera] createPerspective -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float fieldOfView +-- @param #float aspectRatio +-- @param #float nearPlane +-- @param #float farPlane -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- +-- Creates an orthographic camera.
+-- param zoomX The zoom factor along the X-axis of the orthographic projection (the width of the ortho projection).
+-- param zoomY The zoom factor along the Y-axis of the orthographic projection (the height of the ortho projection).
+-- param aspectRatio The aspect ratio of the orthographic projection.
+-- param nearPlane The near plane distance.
+-- param farPlane The far plane distance. -- @function [parent=#Camera] createOrthographic -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float zoomX +-- @param #float zoomY +-- @param #float nearPlane +-- @param #float farPlane -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- +-- -- @function [parent=#Camera] getVisitingCamera -- @param self -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- +-- Sets the position (X, Y, and Z) in its parent's coordinate system -- @function [parent=#Camera] setPosition3D -- @param self --- @param #vec3_table vec3 +-- @param #vec3_table position return nil diff --git a/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua b/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua index 48c898c9ba..cc0fd9ca76 100644 --- a/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua @@ -5,26 +5,31 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#CardinalSplineBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#CardinalSplineBy] clone -- @param self -- @return CardinalSplineBy#CardinalSplineBy ret (return value: cc.CardinalSplineBy) -------------------------------- +-- -- @function [parent=#CardinalSplineBy] updatePosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table newPos -------------------------------- +-- -- @function [parent=#CardinalSplineBy] reverse -- @param self -- @return CardinalSplineBy#CardinalSplineBy ret (return value: cc.CardinalSplineBy) -------------------------------- +-- -- @function [parent=#CardinalSplineBy] CardinalSplineBy -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua b/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua index fd5bcb141b..324ca3035f 100644 --- a/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua @@ -5,44 +5,53 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#CardinalSplineTo] getPoints -- @param self -- @return point_table#point_table ret (return value: point_table) -------------------------------- +-- -- @function [parent=#CardinalSplineTo] updatePosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table newPos -------------------------------- +-- initializes the action with a duration and an array of points -- @function [parent=#CardinalSplineTo] initWithDuration -- @param self --- @param #float float --- @param #point_table pointarray --- @param #float float +-- @param #float duration +-- @param #point_table points +-- @param #float tension -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CardinalSplineTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#CardinalSplineTo] clone -- @param self -- @return CardinalSplineTo#CardinalSplineTo ret (return value: cc.CardinalSplineTo) -------------------------------- +-- -- @function [parent=#CardinalSplineTo] reverse -- @param self -- @return CardinalSplineTo#CardinalSplineTo ret (return value: cc.CardinalSplineTo) -------------------------------- +-- -- @function [parent=#CardinalSplineTo] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- js NA
+-- lua NA -- @function [parent=#CardinalSplineTo] CardinalSplineTo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua b/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua index 3b82d8aae6..fda07cef71 100644 --- a/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua @@ -5,18 +5,21 @@ -- @parent_module cc -------------------------------- +-- initializes the action with a duration and an array of points -- @function [parent=#CatmullRomBy] initWithDuration -- @param self --- @param #float float --- @param #point_table pointarray +-- @param #float dt +-- @param #point_table points -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CatmullRomBy] clone -- @param self -- @return CatmullRomBy#CatmullRomBy ret (return value: cc.CatmullRomBy) -------------------------------- +-- -- @function [parent=#CatmullRomBy] reverse -- @param self -- @return CatmullRomBy#CatmullRomBy ret (return value: cc.CatmullRomBy) diff --git a/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua b/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua index 104e624774..c0fba61301 100644 --- a/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua @@ -5,18 +5,21 @@ -- @parent_module cc -------------------------------- +-- initializes the action with a duration and an array of points -- @function [parent=#CatmullRomTo] initWithDuration -- @param self --- @param #float float --- @param #point_table pointarray +-- @param #float dt +-- @param #point_table points -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CatmullRomTo] clone -- @param self -- @return CatmullRomTo#CatmullRomTo ret (return value: cc.CatmullRomTo) -------------------------------- +-- -- @function [parent=#CatmullRomTo] reverse -- @param self -- @return CatmullRomTo#CatmullRomTo ret (return value: cc.CatmullRomTo) diff --git a/cocos/scripting/lua-bindings/auto/api/CheckBox.lua b/cocos/scripting/lua-bindings/auto/api/CheckBox.lua index cdbab92888..3ef7cf5013 100644 --- a/cocos/scripting/lua-bindings/auto/api/CheckBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/CheckBox.lua @@ -5,94 +5,123 @@ -- @parent_module ccui -------------------------------- +-- Load backGroundSelected texture for checkbox.
+-- param backGroundSelected backGround selected state texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureBackGroundSelected -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string backGroundSelected +-- @param #int texType -------------------------------- +-- Load backGroundDisabled texture for checkbox.
+-- param backGroundDisabled backGroundDisabled texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureBackGroundDisabled -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string backGroundDisabled +-- @param #int texType -------------------------------- +-- -- @function [parent=#CheckBox] setSelected -- @param self --- @param #bool bool +-- @param #bool selected -------------------------------- +-- -- @function [parent=#CheckBox] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- Load cross texture for checkbox.
+-- param cross cross texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureFrontCross -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string +-- @param #int texType -------------------------------- +-- -- @function [parent=#CheckBox] isSelected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Load textures for checkbox.
+-- param backGround backGround texture.
+-- param backGroundSelected backGround selected state texture.
+-- param cross cross texture.
+-- param frontCrossDisabled cross dark state texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextures -- @param self --- @param #string str --- @param #string str --- @param #string str --- @param #string str --- @param #string str --- @param #int texturerestype +-- @param #string backGround +-- @param #string backGroundSelected +-- @param #string cross +-- @param #string backGroundDisabled +-- @param #string frontCrossDisabled +-- @param #int texType -------------------------------- +-- Load backGround texture for checkbox.
+-- param backGround backGround texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureBackGround -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string backGround +-- @param #int type -------------------------------- +-- Load frontCrossDisabled texture for checkbox.
+-- param frontCrossDisabled frontCrossDisabled texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureFrontCrossDisabled -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string frontCrossDisabled +-- @param #int texType -------------------------------- -- @overload self, string, string, string, string, string, int -- @overload self -- @function [parent=#CheckBox] create -- @param self --- @param #string str --- @param #string str --- @param #string str --- @param #string str --- @param #string str --- @param #int texturerestype +-- @param #string backGround +-- @param #string backGroundSeleted +-- @param #string cross +-- @param #string backGroundDisabled +-- @param #string frontCrossDisabled +-- @param #int texType -- @return CheckBox#CheckBox ret (retunr value: ccui.CheckBox) -------------------------------- +-- -- @function [parent=#CheckBox] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#CheckBox] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#CheckBox] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#CheckBox] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Default constructor -- @function [parent=#CheckBox] CheckBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua b/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua index f9ac0622a2..a8ac20c195 100644 --- a/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua @@ -5,48 +5,62 @@ -- @parent_module cc -------------------------------- +-- Inverted. If this is set to true,
+-- the stencil is inverted, so the content is drawn where the stencil is NOT drawn.
+-- This default to false. -- @function [parent=#ClippingNode] isInverted -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ClippingNode] setInverted -- @param self --- @param #bool bool +-- @param #bool inverted -------------------------------- +-- -- @function [parent=#ClippingNode] setStencil -- @param self --- @param #cc.Node node +-- @param #cc.Node stencil -------------------------------- +-- The alpha threshold.
+-- The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.
+-- Should be a float between 0 and 1.
+-- This default to 1 (so alpha test is disabled). -- @function [parent=#ClippingNode] getAlphaThreshold -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- The Node to use as a stencil to do the clipping.
+-- The stencil node will be retained.
+-- This default to nil. -- @function [parent=#ClippingNode] getStencil -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#ClippingNode] setAlphaThreshold -- @param self --- @param #float float +-- @param #float alphaThreshold -------------------------------- -- @overload self, cc.Node -- @overload self -- @function [parent=#ClippingNode] create -- @param self --- @param #cc.Node node +-- @param #cc.Node stencil -- @return ClippingNode#ClippingNode ret (retunr value: cc.ClippingNode) -------------------------------- +-- -- @function [parent=#ClippingNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua b/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua index ba3389570c..8d70edb97b 100644 --- a/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua @@ -5,41 +5,49 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ColorFrame] getAlpha -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- -- @function [parent=#ColorFrame] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#ColorFrame] setAlpha -- @param self --- @param #unsigned char char +-- @param #unsigned char alpha -------------------------------- +-- -- @function [parent=#ColorFrame] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- -- @function [parent=#ColorFrame] create -- @param self -- @return ColorFrame#ColorFrame ret (return value: ccs.ColorFrame) -------------------------------- +-- -- @function [parent=#ColorFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#ColorFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#ColorFrame] ColorFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua b/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua index ea707b9cd1..4924c02278 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua @@ -5,82 +5,95 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ComAttribute] getFloat -- @param self --- @param #string str --- @param #float float +-- @param #string key +-- @param #float def -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ComAttribute] getString -- @param self --- @param #string str --- @param #string str +-- @param #string key +-- @param #string def -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ComAttribute] setFloat -- @param self --- @param #string str --- @param #float float +-- @param #string key +-- @param #float value -------------------------------- +-- -- @function [parent=#ComAttribute] setString -- @param self --- @param #string str --- @param #string str +-- @param #string key +-- @param #string value -------------------------------- +-- -- @function [parent=#ComAttribute] getBool -- @param self --- @param #string str --- @param #bool bool +-- @param #string key +-- @param #bool def -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAttribute] setInt -- @param self --- @param #string str --- @param #int int +-- @param #string key +-- @param #int value -------------------------------- +-- -- @function [parent=#ComAttribute] parse -- @param self --- @param #string str +-- @param #string jsonFile -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAttribute] getInt -- @param self --- @param #string str --- @param #int int +-- @param #string key +-- @param #int def -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ComAttribute] setBool -- @param self --- @param #string str --- @param #bool bool +-- @param #string key +-- @param #bool value -------------------------------- +-- -- @function [parent=#ComAttribute] create -- @param self -- @return ComAttribute#ComAttribute ret (return value: ccs.ComAttribute) -------------------------------- +-- -- @function [parent=#ComAttribute] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#ComAttribute] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAttribute] serialize -- @param self --- @param #void void +-- @param #void r -- @return bool#bool ret (return value: bool) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ComAudio.lua b/cocos/scripting/lua-bindings/auto/api/ComAudio.lua index b7d19dbb4b..a79ab68966 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComAudio.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComAudio.lua @@ -5,35 +5,42 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ComAudio] stopAllEffects -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] getEffectsVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ComAudio] stopEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- -- @function [parent=#ComAudio] getBackgroundMusicVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ComAudio] willPlayBackgroundMusic -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAudio] setBackgroundMusicVolume -- @param self --- @param #float float +-- @param #float volume -------------------------------- +-- -- @function [parent=#ComAudio] end -- @param self @@ -42,34 +49,40 @@ -- @overload self, bool -- @function [parent=#ComAudio] stopBackgroundMusic -- @param self --- @param #bool bool +-- @param #bool bReleaseData -------------------------------- +-- -- @function [parent=#ComAudio] pauseBackgroundMusic -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] isBackgroundMusicPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAudio] isLoop -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAudio] resumeAllEffects -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] pauseAllEffects -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] preloadBackgroundMusic -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- -- @overload self, char @@ -77,8 +90,8 @@ -- @overload self -- @function [parent=#ComAudio] playBackgroundMusic -- @param self --- @param #char char --- @param #bool bool +-- @param #char pszFilePath +-- @param #bool bLoop -------------------------------- -- @overload self, char @@ -86,85 +99,101 @@ -- @overload self -- @function [parent=#ComAudio] playEffect -- @param self --- @param #char char --- @param #bool bool +-- @param #char pszFilePath +-- @param #bool bLoop -- @return unsigned int#unsigned int ret (retunr value: unsigned int) -------------------------------- +-- -- @function [parent=#ComAudio] preloadEffect -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- -- @function [parent=#ComAudio] setLoop -- @param self --- @param #bool bool +-- @param #bool bLoop -------------------------------- +-- -- @function [parent=#ComAudio] unloadEffect -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- -- @function [parent=#ComAudio] rewindBackgroundMusic -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] pauseEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- -- @function [parent=#ComAudio] resumeBackgroundMusic -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] setFile -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- -- @function [parent=#ComAudio] setEffectsVolume -- @param self --- @param #float float +-- @param #float volume -------------------------------- +-- -- @function [parent=#ComAudio] getFile -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#ComAudio] resumeEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- -- @function [parent=#ComAudio] create -- @param self -- @return ComAudio#ComAudio ret (return value: ccs.ComAudio) -------------------------------- +-- -- @function [parent=#ComAudio] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#ComAudio] setEnabled -- @param self --- @param #bool bool +-- @param #bool b -------------------------------- +-- -- @function [parent=#ComAudio] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAudio] serialize -- @param self --- @param #void void +-- @param #void r -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAudio] init -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/ComController.lua b/cocos/scripting/lua-bindings/auto/api/ComController.lua index 381558d96e..9eed2a6c57 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComController.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComController.lua @@ -5,36 +5,43 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ComController] create -- @param self -- @return ComController#ComController ret (return value: ccs.ComController) -------------------------------- +-- -- @function [parent=#ComController] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#ComController] setEnabled -- @param self --- @param #bool bool +-- @param #bool b -------------------------------- +-- -- @function [parent=#ComController] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComController] update -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- -- @function [parent=#ComController] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#ComController] ComController -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ComRender.lua b/cocos/scripting/lua-bindings/auto/api/ComRender.lua index 9c69bbac35..afc835a203 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComRender.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComRender.lua @@ -5,11 +5,13 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ComRender] setNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#ComRender] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) @@ -20,18 +22,20 @@ -- @function [parent=#ComRender] create -- @param self -- @param #cc.Node node --- @param #char char +-- @param #char comName -- @return ComRender#ComRender ret (retunr value: ccs.ComRender) -------------------------------- +-- -- @function [parent=#ComRender] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#ComRender] serialize -- @param self --- @param #void void +-- @param #void r -- @return bool#bool ret (return value: bool) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Component.lua b/cocos/scripting/lua-bindings/auto/api/Component.lua index 1c22bbb440..1f4132282b 100644 --- a/cocos/scripting/lua-bindings/auto/api/Component.lua +++ b/cocos/scripting/lua-bindings/auto/api/Component.lua @@ -5,46 +5,55 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Component] setEnabled -- @param self --- @param #bool bool +-- @param #bool b -------------------------------- +-- -- @function [parent=#Component] setName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#Component] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Component] update -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- -- @function [parent=#Component] getOwner -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#Component] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Component] setOwner -- @param self --- @param #cc.Node node +-- @param #cc.Node pOwner -------------------------------- +-- -- @function [parent=#Component] getName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Component] create -- @param self -- @return Component#Component ret (return value: cc.Component) diff --git a/cocos/scripting/lua-bindings/auto/api/Console.lua b/cocos/scripting/lua-bindings/auto/api/Console.lua index cdca8f4060..25abbbf30c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Console.lua +++ b/cocos/scripting/lua-bindings/auto/api/Console.lua @@ -5,24 +5,28 @@ -- @parent_module cc -------------------------------- +-- stops the Console. 'stop' will be called at destruction time as well -- @function [parent=#Console] stop -- @param self -------------------------------- +-- starts listening to specifed TCP port -- @function [parent=#Console] listenOnTCP -- @param self --- @param #int int +-- @param #int port -- @return bool#bool ret (return value: bool) -------------------------------- +-- starts listening to specifed file descriptor -- @function [parent=#Console] listenOnFileDescriptor -- @param self --- @param #int int +-- @param #int fd -- @return bool#bool ret (return value: bool) -------------------------------- +-- log something in the console -- @function [parent=#Console] log -- @param self --- @param #char char +-- @param #char buf return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ContourData.lua b/cocos/scripting/lua-bindings/auto/api/ContourData.lua index f1a46b0aa1..078b7483de 100644 --- a/cocos/scripting/lua-bindings/auto/api/ContourData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ContourData.lua @@ -5,21 +5,25 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ContourData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ContourData] addVertex -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table vertex -------------------------------- +-- -- @function [parent=#ContourData] create -- @param self -- @return ContourData#ContourData ret (return value: ccs.ContourData) -------------------------------- +-- js ctor -- @function [parent=#ContourData] ContourData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Control.lua b/cocos/scripting/lua-bindings/auto/api/Control.lua index 8e832134da..df1f899b52 100644 --- a/cocos/scripting/lua-bindings/auto/api/Control.lua +++ b/cocos/scripting/lua-bindings/auto/api/Control.lua @@ -5,53 +5,65 @@ -- @parent_module cc -------------------------------- +-- Tells whether the control is enabled. -- @function [parent=#Control] setEnabled -- @param self --- @param #bool bool +-- @param #bool bEnabled -------------------------------- +-- -- @function [parent=#Control] onTouchMoved -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- -- @function [parent=#Control] getState -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Control] onTouchEnded -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- Sends action messages for the given control events.
+-- param controlEvents A bitmask whose set flags specify the control events for
+-- which action messages are sent. See "CCControlEvent" for bitmask constants. -- @function [parent=#Control] sendActionsForControlEvents -- @param self --- @param #int eventtype +-- @param #int controlEvents -------------------------------- +-- A Boolean value that determines the control selected state. -- @function [parent=#Control] setSelected -- @param self --- @param #bool bool +-- @param #bool bSelected -------------------------------- +-- -- @function [parent=#Control] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Control] onTouchCancelled -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- Updates the control layout using its current internal state. -- @function [parent=#Control] needsLayout -- @param self -------------------------------- +-- -- @function [parent=#Control] onTouchBegan -- @param self -- @param #cc.Touch touch @@ -59,50 +71,64 @@ -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Control] hasVisibleParents -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Control] isSelected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns a boolean value that indicates whether a touch is inside the bounds
+-- of the receiver. The given touch must be relative to the world.
+-- param touch A Touch object that represents a touch.
+-- return Whether a touch is inside the receiver's rect. -- @function [parent=#Control] isTouchInside -- @param self -- @param #cc.Touch touch -- @return bool#bool ret (return value: bool) -------------------------------- +-- A Boolean value that determines whether the control is highlighted. -- @function [parent=#Control] setHighlighted -- @param self --- @param #bool bool +-- @param #bool bHighlighted -------------------------------- +-- Returns a point corresponding to the touh location converted into the
+-- control space coordinates.
+-- param touch A Touch object that represents a touch. -- @function [parent=#Control] getTouchLocation -- @param self -- @param #cc.Touch touch -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Control] isHighlighted -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Creates a Control object -- @function [parent=#Control] create -- @param self -- @return Control#Control ret (return value: cc.Control) -------------------------------- +-- -- @function [parent=#Control] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Control] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool bOpacityModifyRGB return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua index 005e6b28da..1d965170ff 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua @@ -5,102 +5,133 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlButton] isPushed -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlButton] setSelected -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Sets the title label to use for the specified state.
+-- If a property is not specified for a state, the default is to use
+-- the ButtonStateNormal value.
+-- param label The title label to use for the specified state.
+-- param state The state that uses the specified title. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setTitleLabelForState -- @param self --- @param #cc.Node node +-- @param #cc.Node label -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] setAdjustBackgroundImage -- @param self --- @param #bool bool +-- @param #bool adjustBackgroundImage -------------------------------- +-- -- @function [parent=#ControlButton] setHighlighted -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#ControlButton] setZoomOnTouchDown -- @param self --- @param #bool bool +-- @param #bool var -------------------------------- +-- Sets the title string to use for the specified state.
+-- If a property is not specified for a state, the default is to use
+-- the ButtonStateNormal value.
+-- param title The title string to use for the specified state.
+-- param state The state that uses the specified title. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setTitleForState -- @param self --- @param #string str +-- @param #string title -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] setLabelAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table var -------------------------------- +-- -- @function [parent=#ControlButton] getLabelAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ControlButton] getTitleTTFSizeForState -- @param self -- @param #int state -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlButton] setTitleTTFForState -- @param self --- @param #string str +-- @param #string fntFile -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] setTitleTTFSizeForState -- @param self --- @param #float float +-- @param #float size -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] setTitleLabel -- @param self --- @param #cc.Node node +-- @param #cc.Node var -------------------------------- +-- -- @function [parent=#ControlButton] setPreferredSize -- @param self --- @param #size_table size +-- @param #size_table var -------------------------------- +-- -- @function [parent=#ControlButton] getCurrentTitleColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#ControlButton] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Returns the background sprite used for a state.
+-- param state The state that uses the background sprite. Possible values are
+-- described in "CCControlState". -- @function [parent=#ControlButton] getBackgroundSpriteForState -- @param self -- @param #int state -- @return Scale9Sprite#Scale9Sprite ret (return value: cc.Scale9Sprite) -------------------------------- +-- -- @function [parent=#ControlButton] getHorizontalOrigin -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ControlButton] needsLayout -- @param self @@ -112,105 +143,145 @@ -- @return string#string ret (retunr value: string) -------------------------------- +-- -- @function [parent=#ControlButton] getScaleRatio -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlButton] getTitleTTFForState -- @param self -- @param #int state -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ControlButton] getBackgroundSprite -- @param self -- @return Scale9Sprite#Scale9Sprite ret (return value: cc.Scale9Sprite) -------------------------------- +-- Returns the title color used for a state.
+-- param state The state that uses the specified color. The values are described
+-- in "CCControlState".
+-- return The color of the title for the specified state. -- @function [parent=#ControlButton] getTitleColorForState -- @param self -- @param #int state -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Sets the color of the title to use for the specified state.
+-- param color The color of the title to use for the specified state.
+-- param state The state that uses the specified color. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setTitleColorForState -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -- @param #int state -------------------------------- +-- Adjust the background image. YES by default. If the property is set to NO, the
+-- background will use the prefered size of the background image. -- @function [parent=#ControlButton] doesAdjustBackgroundImage -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the background spriteFrame to use for the specified button state.
+-- param spriteFrame The background spriteFrame to use for the specified state.
+-- param state The state that uses the specified image. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setBackgroundSpriteFrameForState -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame spriteFrame -- @param #int state -------------------------------- +-- Sets the background sprite to use for the specified button state.
+-- param sprite The background sprite to use for the specified state.
+-- param state The state that uses the specified image. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setBackgroundSpriteForState -- @param self --- @param #cc.Scale9Sprite scale9sprite +-- @param #cc.Scale9Sprite sprite -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] setScaleRatio -- @param self --- @param #float float +-- @param #float var -------------------------------- +-- -- @function [parent=#ControlButton] setBackgroundSprite -- @param self --- @param #cc.Scale9Sprite scale9sprite +-- @param #cc.Scale9Sprite var -------------------------------- +-- -- @function [parent=#ControlButton] getTitleLabel -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#ControlButton] getPreferredSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#ControlButton] getVerticalMargin -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Returns the title label used for a state.
+-- param state The state that uses the title label. Possible values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] getTitleLabelForState -- @param self -- @param #int state -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#ControlButton] setMargins -- @param self --- @param #int int --- @param #int int +-- @param #int marginH +-- @param #int marginV -------------------------------- +-- Sets the font of the label, changes the label to a BMFont if neccessary.
+-- param fntFile The name of the font to change to
+-- param state The state that uses the specified fntFile. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setTitleBMFontForState -- @param self --- @param #string str +-- @param #string fntFile -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] getTitleBMFontForState -- @param self -- @param #int state -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ControlButton] getZoomOnTouchDown -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the title used for a state.
+-- param state The state that uses the title. Possible values are described in
+-- "CCControlState".
+-- return The title for the specified state. -- @function [parent=#ControlButton] getTitleForState -- @param self -- @param #int state @@ -223,50 +294,58 @@ -- @overload self, string, string, float -- @function [parent=#ControlButton] create -- @param self --- @param #string str --- @param #string str --- @param #float float +-- @param #string title +-- @param #string fontName +-- @param #float fontSize -- @return ControlButton#ControlButton ret (retunr value: cc.ControlButton) -------------------------------- +-- -- @function [parent=#ControlButton] onTouchMoved -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- -- @function [parent=#ControlButton] onTouchEnded -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- -- @function [parent=#ControlButton] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table -------------------------------- +-- -- @function [parent=#ControlButton] onTouchCancelled -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- -- @function [parent=#ControlButton] setOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char var -------------------------------- +-- -- @function [parent=#ControlButton] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- -- @function [parent=#ControlButton] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor -------------------------------- +-- -- @function [parent=#ControlButton] onTouchBegan -- @param self -- @param #cc.Touch touch diff --git a/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua index f7e3e3cbe2..b46d5e855b 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua @@ -5,68 +5,81 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlColourPicker] setEnabled -- @param self --- @param #bool bool +-- @param #bool bEnabled -------------------------------- +-- -- @function [parent=#ControlColourPicker] getHuePicker -- @param self -- @return ControlHuePicker#ControlHuePicker ret (return value: cc.ControlHuePicker) -------------------------------- +-- -- @function [parent=#ControlColourPicker] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table colorValue -------------------------------- +-- -- @function [parent=#ControlColourPicker] hueSliderValueChanged -- @param self --- @param #cc.Ref ref --- @param #int eventtype +-- @param #cc.Ref sender +-- @param #int controlEvent -------------------------------- +-- -- @function [parent=#ControlColourPicker] getcolourPicker -- @param self -- @return ControlSaturationBrightnessPicker#ControlSaturationBrightnessPicker ret (return value: cc.ControlSaturationBrightnessPicker) -------------------------------- +-- -- @function [parent=#ControlColourPicker] setBackground -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlColourPicker] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlColourPicker] setcolourPicker -- @param self --- @param #cc.ControlSaturationBrightnessPicker controlsaturationbrightnesspicker +-- @param #cc.ControlSaturationBrightnessPicker var -------------------------------- +-- -- @function [parent=#ControlColourPicker] colourSliderValueChanged -- @param self --- @param #cc.Ref ref --- @param #int eventtype +-- @param #cc.Ref sender +-- @param #int controlEvent -------------------------------- +-- -- @function [parent=#ControlColourPicker] setHuePicker -- @param self --- @param #cc.ControlHuePicker controlhuepicker +-- @param #cc.ControlHuePicker var -------------------------------- +-- -- @function [parent=#ControlColourPicker] getBackground -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlColourPicker] create -- @param self -- @return ControlColourPicker#ControlColourPicker ret (return value: cc.ControlColourPicker) -------------------------------- +-- js ctor -- @function [parent=#ControlColourPicker] ControlColourPicker -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua index bedc24c43a..d907f2c9dd 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua @@ -5,83 +5,98 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlHuePicker] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#ControlHuePicker] initWithTargetAndPos -- @param self --- @param #cc.Node node --- @param #vec2_table vec2 +-- @param #cc.Node target +-- @param #vec2_table pos -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlHuePicker] setHue -- @param self --- @param #float float +-- @param #float val -------------------------------- +-- -- @function [parent=#ControlHuePicker] getStartPos -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ControlHuePicker] getHue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlHuePicker] getSlider -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlHuePicker] setBackground -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlHuePicker] setHuePercentage -- @param self --- @param #float float +-- @param #float val -------------------------------- +-- -- @function [parent=#ControlHuePicker] getBackground -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlHuePicker] getHuePercentage -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlHuePicker] setSlider -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlHuePicker] create -- @param self --- @param #cc.Node node --- @param #vec2_table vec2 +-- @param #cc.Node target +-- @param #vec2_table pos -- @return ControlHuePicker#ControlHuePicker ret (return value: cc.ControlHuePicker) -------------------------------- +-- -- @function [parent=#ControlHuePicker] onTouchMoved -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlHuePicker] onTouchBegan -- @param self -- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Event pEvent -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#ControlHuePicker] ControlHuePicker -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua b/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua index 0df5064b16..a5581e6695 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua @@ -5,143 +5,170 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setPreviousLocation -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table var -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setValue -- @param self --- @param #float float +-- @param #float value -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getProgressTimer -- @param self -- @return ProgressTimer#ProgressTimer ret (return value: cc.ProgressTimer) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getMaximumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Returns the angle in degree between line1 and line2. -- @function [parent=#ControlPotentiometer] angleInDegreesBetweenLineFromPoint_toPoint_toLineFromPoint_toPoint -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #vec2_table beginLineA +-- @param #vec2_table endLineA +-- @param #vec2_table beginLineB +-- @param #vec2_table endLineB -- @return float#float ret (return value: float) -------------------------------- +-- Factorize the event dispath into these methods. -- @function [parent=#ControlPotentiometer] potentiometerBegan -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table location -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setMaximumValue -- @param self --- @param #float float +-- @param #float maximumValue -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getMinimumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setThumbSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getPreviousLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Returns the distance between the point1 and point2. -- @function [parent=#ControlPotentiometer] distanceBetweenPointAndPoint -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #vec2_table point1 +-- @param #vec2_table point2 -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] potentiometerEnded -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table location -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setProgressTimer -- @param self --- @param #cc.ProgressTimer progresstimer +-- @param #cc.ProgressTimer var -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setMinimumValue -- @param self --- @param #float float +-- @param #float minimumValue -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getThumbSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- Initializes a potentiometer with a track sprite and a progress bar.
+-- param trackSprite Sprite, that is used as a background.
+-- param progressTimer ProgressTimer, that is used as a progress bar. -- @function [parent=#ControlPotentiometer] initWithTrackSprite_ProgressTimer_ThumbSprite -- @param self --- @param #cc.Sprite sprite --- @param #cc.ProgressTimer progresstimer --- @param #cc.Sprite sprite +-- @param #cc.Sprite trackSprite +-- @param #cc.ProgressTimer progressTimer +-- @param #cc.Sprite thumbSprite -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] potentiometerMoved -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table location -------------------------------- +-- Creates potentiometer with a track filename and a progress filename. -- @function [parent=#ControlPotentiometer] create -- @param self --- @param #char char --- @param #char char --- @param #char char +-- @param #char backgroundFile +-- @param #char progressFile +-- @param #char thumbFile -- @return ControlPotentiometer#ControlPotentiometer ret (return value: cc.ControlPotentiometer) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] isTouchInside -- @param self -- @param #cc.Touch touch -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#ControlPotentiometer] onTouchMoved -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlPotentiometer] onTouchEnded -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlPotentiometer] onTouchBegan -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#ControlPotentiometer] ControlPotentiometer -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua index 83a6a99694..332012a086 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua @@ -5,60 +5,71 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getShadow -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] initWithTargetAndPos -- @param self --- @param #cc.Node node --- @param #vec2_table vec2 +-- @param #cc.Node target +-- @param #vec2_table pos -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getStartPos -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getOverlay -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getSlider -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getBackground -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getSaturation -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getBrightness -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] create -- @param self --- @param #cc.Node node --- @param #vec2_table vec2 +-- @param #cc.Node target +-- @param #vec2_table pos -- @return ControlSaturationBrightnessPicker#ControlSaturationBrightnessPicker ret (return value: cc.ControlSaturationBrightnessPicker) -------------------------------- +-- js ctor -- @function [parent=#ControlSaturationBrightnessPicker] ControlSaturationBrightnessPicker -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua b/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua index d192cf7a93..33e66b6ccf 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua @@ -5,76 +5,91 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlSlider] getSelectedThumbSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSlider] locationFromTouch -- @param self -- @param #cc.Touch touch -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ControlSlider] setSelectedThumbSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlSlider] setProgressSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlSlider] getMaximumAllowedValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSlider] getMinimumAllowedValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSlider] getMinimumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSlider] setThumbSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlSlider] setMinimumValue -- @param self --- @param #float float +-- @param #float val -------------------------------- +-- -- @function [parent=#ControlSlider] setMinimumAllowedValue -- @param self --- @param #float float +-- @param #float var -------------------------------- +-- -- @function [parent=#ControlSlider] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#ControlSlider] setValue -- @param self --- @param #float float +-- @param #float val -------------------------------- +-- -- @function [parent=#ControlSlider] setMaximumValue -- @param self --- @param #float float +-- @param #float val -------------------------------- +-- -- @function [parent=#ControlSlider] needsLayout -- @param self -------------------------------- +-- -- @function [parent=#ControlSlider] getBackgroundSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) @@ -84,47 +99,54 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite -- @function [parent=#ControlSlider] initWithSprites -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite +-- @param #cc.Sprite backgroundSprite +-- @param #cc.Sprite progressSprite +-- @param #cc.Sprite thumbSprite +-- @param #cc.Sprite selectedThumbSprite -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#ControlSlider] getMaximumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSlider] isTouchInside -- @param self -- @param #cc.Touch touch -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlSlider] getValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSlider] getThumbSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSlider] getProgressSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSlider] setBackgroundSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlSlider] setMaximumAllowedValue -- @param self --- @param #float float +-- @param #float var -------------------------------- -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite @@ -133,13 +155,14 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite -- @function [parent=#ControlSlider] create -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite +-- @param #cc.Sprite backgroundSprite +-- @param #cc.Sprite pogressSprite +-- @param #cc.Sprite thumbSprite +-- @param #cc.Sprite selectedThumbSprite -- @return ControlSlider#ControlSlider ret (retunr value: cc.ControlSlider) -------------------------------- +-- js ctor -- @function [parent=#ControlSlider] ControlSlider -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua b/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua index f7804e0d95..0e5009c367 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua @@ -5,138 +5,164 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlStepper] setMinusSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlStepper] getMinusLabel -- @param self -- @return Label#Label ret (return value: cc.Label) -------------------------------- +-- -- @function [parent=#ControlStepper] setWraps -- @param self --- @param #bool bool +-- @param #bool wraps -------------------------------- +-- -- @function [parent=#ControlStepper] isContinuous -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlStepper] getMinusSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- Update the layout of the stepper with the given touch location. -- @function [parent=#ControlStepper] updateLayoutUsingTouchLocation -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table location -------------------------------- +-- Set the numeric value of the stepper. If send is true, the Control::EventType::VALUE_CHANGED is sent. -- @function [parent=#ControlStepper] setValueWithSendingEvent -- @param self --- @param #double double --- @param #bool bool +-- @param #double value +-- @param #bool send -------------------------------- +-- -- @function [parent=#ControlStepper] getPlusLabel -- @param self -- @return Label#Label ret (return value: cc.Label) -------------------------------- +-- Stop the autorepeat. -- @function [parent=#ControlStepper] stopAutorepeat -- @param self -------------------------------- +-- -- @function [parent=#ControlStepper] setMinimumValue -- @param self --- @param #double double +-- @param #double minimumValue -------------------------------- +-- -- @function [parent=#ControlStepper] getPlusSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlStepper] setPlusSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlStepper] setMinusLabel -- @param self --- @param #cc.Label label +-- @param #cc.Label var -------------------------------- +-- -- @function [parent=#ControlStepper] setValue -- @param self --- @param #double double +-- @param #double value -------------------------------- +-- -- @function [parent=#ControlStepper] setStepValue -- @param self --- @param #double double +-- @param #double stepValue -------------------------------- +-- -- @function [parent=#ControlStepper] setMaximumValue -- @param self --- @param #double double +-- @param #double maximumValue -------------------------------- +-- -- @function [parent=#ControlStepper] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- Start the autorepeat increment/decrement. -- @function [parent=#ControlStepper] startAutorepeat -- @param self -------------------------------- +-- -- @function [parent=#ControlStepper] initWithMinusSpriteAndPlusSprite -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite +-- @param #cc.Sprite minusSprite +-- @param #cc.Sprite plusSprite -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlStepper] getValue -- @param self -- @return double#double ret (return value: double) -------------------------------- +-- -- @function [parent=#ControlStepper] setPlusLabel -- @param self --- @param #cc.Label label +-- @param #cc.Label var -------------------------------- +-- -- @function [parent=#ControlStepper] create -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite +-- @param #cc.Sprite minusSprite +-- @param #cc.Sprite plusSprite -- @return ControlStepper#ControlStepper ret (return value: cc.ControlStepper) -------------------------------- +-- -- @function [parent=#ControlStepper] onTouchMoved -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlStepper] onTouchEnded -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlStepper] onTouchBegan -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#ControlStepper] ControlStepper -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua b/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua index fdff4eddfa..e7841e64f2 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua @@ -5,19 +5,21 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlSwitch] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- -- @overload self, bool -- @overload self, bool, bool -- @function [parent=#ControlSwitch] setOn -- @param self --- @param #bool bool --- @param #bool bool +-- @param #bool isOn +-- @param #bool animated -------------------------------- +-- -- @function [parent=#ControlSwitch] isOn -- @param self -- @return bool#bool ret (return value: bool) @@ -27,20 +29,22 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite -- @function [parent=#ControlSwitch] initWithMaskSprite -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Label label --- @param #cc.Label label +-- @param #cc.Sprite maskSprite +-- @param #cc.Sprite onSprite +-- @param #cc.Sprite offSprite +-- @param #cc.Sprite thumbSprite +-- @param #cc.Label onLabel +-- @param #cc.Label offLabel -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#ControlSwitch] hasMoved -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlSwitch] locationFromTouch -- @param self -- @param #cc.Touch touch @@ -51,40 +55,45 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite, cc.Label, cc.Label -- @function [parent=#ControlSwitch] create -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Label label --- @param #cc.Label label +-- @param #cc.Sprite maskSprite +-- @param #cc.Sprite onSprite +-- @param #cc.Sprite offSprite +-- @param #cc.Sprite thumbSprite +-- @param #cc.Label onLabel +-- @param #cc.Label offLabel -- @return ControlSwitch#ControlSwitch ret (retunr value: cc.ControlSwitch) -------------------------------- +-- -- @function [parent=#ControlSwitch] onTouchMoved -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlSwitch] onTouchEnded -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlSwitch] onTouchCancelled -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlSwitch] onTouchBegan -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#ControlSwitch] ControlSwitch -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Controller.lua b/cocos/scripting/lua-bindings/auto/api/Controller.lua index 160b455817..25246a3bf9 100644 --- a/cocos/scripting/lua-bindings/auto/api/Controller.lua +++ b/cocos/scripting/lua-bindings/auto/api/Controller.lua @@ -4,48 +4,66 @@ -- @parent_module cc -------------------------------- +-- Activate receives key event from external key. e.g. back,menu.
+-- Controller receives only standard key which contained within enum Key by default.
+-- warning The API only work on the android platform for support diversified game controller.
+-- param externalKeyCode external key code
+-- param receive true if external key event on this controller should be receive, false otherwise. -- @function [parent=#Controller] receiveExternalKeyEvent -- @param self --- @param #int int --- @param #bool bool +-- @param #int externalKeyCode +-- @param #bool receive -------------------------------- +-- -- @function [parent=#Controller] getDeviceName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Controller] isConnected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Controller] getDeviceId -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Changes the tag that is used to identify the controller easily.
+-- param tag A integer that identifies the controller. -- @function [parent=#Controller] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- Returns a tag that is used to identify the controller easily.
+-- return An integer that identifies the controller. -- @function [parent=#Controller] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- To start discovering new controllers
+-- warning The API only work on the IOS platform.Empty implementation on Android -- @function [parent=#Controller] startDiscoveryController -- @param self -------------------------------- +-- End the discovery process
+-- warning The API only work on the IOS platform.Empty implementation on Android -- @function [parent=#Controller] stopDiscoveryController -- @param self -------------------------------- +-- Gets a controller with its tag
+-- param tag An identifier to find the controller. -- @function [parent=#Controller] getControllerByTag -- @param self --- @param #int int +-- @param #int tag -- @return Controller#Controller ret (return value: cc.Controller) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/DelayTime.lua b/cocos/scripting/lua-bindings/auto/api/DelayTime.lua index 958ac24a6a..295db25818 100644 --- a/cocos/scripting/lua-bindings/auto/api/DelayTime.lua +++ b/cocos/scripting/lua-bindings/auto/api/DelayTime.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#DelayTime] create -- @param self --- @param #float float +-- @param #float d -- @return DelayTime#DelayTime ret (return value: cc.DelayTime) -------------------------------- +-- -- @function [parent=#DelayTime] clone -- @param self -- @return DelayTime#DelayTime ret (return value: cc.DelayTime) -------------------------------- +-- -- @function [parent=#DelayTime] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#DelayTime] reverse -- @param self -- @return DelayTime#DelayTime ret (return value: cc.DelayTime) diff --git a/cocos/scripting/lua-bindings/auto/api/Director.lua b/cocos/scripting/lua-bindings/auto/api/Director.lua index 6d684c5988..63ea6f6367 100644 --- a/cocos/scripting/lua-bindings/auto/api/Director.lua +++ b/cocos/scripting/lua-bindings/auto/api/Director.lua @@ -4,307 +4,418 @@ -- @parent_module cc -------------------------------- +-- Pauses the running scene.
+-- The running scene will be _drawed_ but all scheduled timers will be paused
+-- While paused, the draw rate will be 4 FPS to reduce CPU consumption -- @function [parent=#Director] pause -- @param self -------------------------------- +-- Sets the EventDispatcher associated with this director
+-- since v3.0 -- @function [parent=#Director] setEventDispatcher -- @param self --- @param #cc.EventDispatcher eventdispatcher +-- @param #cc.EventDispatcher dispatcher -------------------------------- +-- Suspends the execution of the running scene, pushing it on the stack of suspended scenes.
+-- The new scene will be executed.
+-- Try to avoid big stacks of pushed scenes to reduce memory allocation.
+-- ONLY call it if there is a running scene. -- @function [parent=#Director] pushScene -- @param self -- @param #cc.Scene scene -------------------------------- +-- -- @function [parent=#Director] getDeltaTime -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Director] getContentScaleFactor -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- returns the size of the OpenGL view in pixels. -- @function [parent=#Director] getWinSizeInPixels -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Director] getConsole -- @param self -- @return Console#Console ret (return value: cc.Console) -------------------------------- +-- -- @function [parent=#Director] pushMatrix -- @param self --- @param #int matrix_stack_type +-- @param #int type -------------------------------- +-- sets the OpenGL default values -- @function [parent=#Director] setGLDefaultValues -- @param self -------------------------------- +-- Sets the ActionManager associated with this director
+-- since v2.0 -- @function [parent=#Director] setActionManager -- @param self --- @param #cc.ActionManager actionmanager +-- @param #cc.ActionManager actionManager -------------------------------- +-- enables/disables OpenGL alpha blending -- @function [parent=#Director] setAlphaBlending -- @param self --- @param #bool bool +-- @param #bool on -------------------------------- +-- Pops out all scenes from the stack until the root scene in the queue.
+-- This scene will replace the running one.
+-- Internally it will call `popToSceneStackLevel(1)` -- @function [parent=#Director] popToRootScene -- @param self -------------------------------- +-- -- @function [parent=#Director] loadMatrix -- @param self --- @param #int matrix_stack_type --- @param #mat4_table mat4 +-- @param #int type +-- @param #mat4_table mat -------------------------------- +-- This object will be visited after the main scene is visited.
+-- This object MUST implement the "visit" selector.
+-- Useful to hook a notification object, like Notifications (http:github.com/manucorporat/CCNotifications)
+-- since v0.99.5 -- @function [parent=#Director] getNotificationNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- returns the size of the OpenGL view in points. -- @function [parent=#Director] getWinSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Director] getTextureCache -- @param self -- @return TextureCache#TextureCache ret (return value: cc.TextureCache) -------------------------------- +-- Whether or not the replaced scene will receive the cleanup message.
+-- If the new scene is pushed, then the old scene won't receive the "cleanup" message.
+-- If the new scene replaces the old one, the it will receive the "cleanup" message.
+-- since v0.99.0 -- @function [parent=#Director] isSendCleanupToScene -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- returns visible origin of the OpenGL view in points. -- @function [parent=#Director] getVisibleOrigin -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Director] mainLoop -- @param self -------------------------------- +-- enables/disables OpenGL depth test -- @function [parent=#Director] setDepthTest -- @param self --- @param #bool bool +-- @param #bool on -------------------------------- +-- get Frame Rate -- @function [parent=#Director] getFrameRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- seconds per frame -- @function [parent=#Director] getSecondsPerFrame -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- converts an OpenGL coordinate to a UIKit coordinate
+-- Useful to convert node points to window points for calls such as glScissor -- @function [parent=#Director] convertToUI -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- sets the default values based on the Configuration info -- @function [parent=#Director] setDefaultValues -- @param self -------------------------------- +-- -- @function [parent=#Director] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the Scheduler associated with this director
+-- since v2.0 -- @function [parent=#Director] setScheduler -- @param self -- @param #cc.Scheduler scheduler -------------------------------- +-- The main loop is triggered again.
+-- Call this function only if [stopAnimation] was called earlier
+-- warning Don't call this function to start the main loop. To run the main loop call runWithScene -- @function [parent=#Director] startAnimation -- @param self -------------------------------- +-- Get the GLView, where everything is rendered
+-- js NA
+-- lua NA -- @function [parent=#Director] getOpenGLView -- @param self -- @return GLView#GLView ret (return value: cc.GLView) -------------------------------- +-- Get current running Scene. Director can only run one Scene at a time -- @function [parent=#Director] getRunningScene -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- Sets the glViewport -- @function [parent=#Director] setViewport -- @param self -------------------------------- +-- Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore.
+-- If you don't want to pause your animation call [pause] instead. -- @function [parent=#Director] stopAnimation -- @param self -------------------------------- +-- The size in pixels of the surface. It could be different than the screen size.
+-- High-res devices might have a higher surface size than the screen size.
+-- Only available when compiled using SDK >= 4.0.
+-- since v0.99.4 -- @function [parent=#Director] setContentScaleFactor -- @param self --- @param #float float +-- @param #float scaleFactor -------------------------------- +-- Pops out all scenes from the stack until it reaches `level`.
+-- If level is 0, it will end the director.
+-- If level is 1, it will pop all scenes until it reaches to root scene.
+-- If level is <= than the current stack level, it won't do anything. -- @function [parent=#Director] popToSceneStackLevel -- @param self --- @param #int int +-- @param #int level -------------------------------- +-- Resumes the paused scene
+-- The scheduled timers will be activated again.
+-- The "delta time" will be 0 (as if the game wasn't paused) -- @function [parent=#Director] resume -- @param self -------------------------------- +-- -- @function [parent=#Director] isNextDeltaTimeZero -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Ends the execution, releases the running scene.
+-- It doesn't remove the OpenGL view from its parent. You have to do it manually.
+-- lua endToLua -- @function [parent=#Director] end -- @param self -------------------------------- +-- -- @function [parent=#Director] setOpenGLView -- @param self --- @param #cc.GLView glview +-- @param #cc.GLView openGLView -------------------------------- +-- converts a UIKit coordinate to an OpenGL coordinate
+-- Useful to convert (multi) touch coordinates to the current layout (portrait or landscape) -- @function [parent=#Director] convertToGL -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Removes all cocos2d cached data.
+-- It will purge the TextureCache, SpriteFrameCache, LabelBMFont cache
+-- since v0.99.3 -- @function [parent=#Director] purgeCachedData -- @param self -------------------------------- +-- How many frames were called since the director started -- @function [parent=#Director] getTotalFrames -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- Enters the Director's main loop with the given Scene.
+-- Call it to run only your FIRST scene.
+-- Don't call it if there is already a running scene.
+-- It will call pushScene: and then it will call startAnimation -- @function [parent=#Director] runWithScene -- @param self -- @param #cc.Scene scene -------------------------------- +-- -- @function [parent=#Director] setNotificationNode -- @param self -- @param #cc.Node node -------------------------------- +-- Draw the scene.
+-- This method is called every frame. Don't call it manually. -- @function [parent=#Director] drawScene -- @param self -------------------------------- +-- / XXX: missing description -- @function [parent=#Director] getZEye -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Director] getMatrix -- @param self --- @param #int matrix_stack_type +-- @param #int type -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- Pops out a scene from the stack.
+-- This scene will replace the running one.
+-- The running scene will be deleted. If there are no more scenes in the stack the execution is terminated.
+-- ONLY call it if there is a running scene. -- @function [parent=#Director] popScene -- @param self -------------------------------- +-- Whether or not to display the FPS on the bottom-left corner -- @function [parent=#Director] isDisplayStats -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Director] setProjection -- @param self -- @param #int projection -------------------------------- +-- -- @function [parent=#Director] loadIdentityMatrix -- @param self --- @param #int matrix_stack_type +-- @param #int type -------------------------------- +-- -- @function [parent=#Director] setNextDeltaTimeZero -- @param self --- @param #bool bool +-- @param #bool nextDeltaTimeZero -------------------------------- +-- -- @function [parent=#Director] resetMatrixStack -- @param self -------------------------------- +-- -- @function [parent=#Director] popMatrix -- @param self --- @param #int matrix_stack_type +-- @param #int type -------------------------------- +-- returns visible size of the OpenGL view in points.
+-- the value is equal to getWinSize if don't invoke
+-- GLView::setDesignResolutionSize() -- @function [parent=#Director] getVisibleSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Gets the Scheduler associated with this director
+-- since v2.0 -- @function [parent=#Director] getScheduler -- @param self -- @return Scheduler#Scheduler ret (return value: cc.Scheduler) -------------------------------- +-- Set the FPS value. -- @function [parent=#Director] setAnimationInterval -- @param self --- @param #double double +-- @param #double interval -------------------------------- +-- Get the FPS value -- @function [parent=#Director] getAnimationInterval -- @param self -- @return double#double ret (return value: double) -------------------------------- +-- Whether or not the Director is paused -- @function [parent=#Director] isPaused -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Display the FPS on the bottom-left corner -- @function [parent=#Director] setDisplayStats -- @param self --- @param #bool bool +-- @param #bool displayStats -------------------------------- +-- Gets the EventDispatcher associated with this director
+-- since v3.0 -- @function [parent=#Director] getEventDispatcher -- @param self -- @return EventDispatcher#EventDispatcher ret (return value: cc.EventDispatcher) -------------------------------- +-- Replaces the running scene with a new one. The running scene is terminated.
+-- ONLY call it if there is a running scene. -- @function [parent=#Director] replaceScene -- @param self -- @param #cc.Scene scene -------------------------------- +-- -- @function [parent=#Director] multiplyMatrix -- @param self --- @param #int matrix_stack_type --- @param #mat4_table mat4 +-- @param #int type +-- @param #mat4_table mat -------------------------------- +-- Gets the ActionManager associated with this director
+-- since v2.0 -- @function [parent=#Director] getActionManager -- @param self -- @return ActionManager#ActionManager ret (return value: cc.ActionManager) -------------------------------- +-- returns a shared instance of the director -- @function [parent=#Director] getInstance -- @param self -- @return Director#Director ret (return value: cc.Director) diff --git a/cocos/scripting/lua-bindings/auto/api/DisplayData.lua b/cocos/scripting/lua-bindings/auto/api/DisplayData.lua index fc4a6c1930..772d00d704 100644 --- a/cocos/scripting/lua-bindings/auto/api/DisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/DisplayData.lua @@ -5,22 +5,26 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#DisplayData] copy -- @param self --- @param #ccs.DisplayData displaydata +-- @param #ccs.DisplayData displayData -------------------------------- +-- -- @function [parent=#DisplayData] changeDisplayToTexture -- @param self --- @param #string str +-- @param #string displayName -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#DisplayData] create -- @param self -- @return DisplayData#DisplayData ret (return value: ccs.DisplayData) -------------------------------- +-- js ctor -- @function [parent=#DisplayData] DisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua b/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua index 0739f44691..efbcde86af 100644 --- a/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua @@ -5,42 +5,50 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#DisplayManager] getDisplayRenderNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#DisplayManager] getAnchorPointInPoints -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#DisplayManager] getDisplayRenderNodeType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#DisplayManager] removeDisplay -- @param self --- @param #int int +-- @param #int index -------------------------------- +-- -- @function [parent=#DisplayManager] setForceChangeDisplay -- @param self --- @param #bool bool +-- @param #bool force -------------------------------- +-- -- @function [parent=#DisplayManager] init -- @param self -- @param #ccs.Bone bone -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#DisplayManager] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#DisplayManager] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) @@ -50,67 +58,85 @@ -- @overload self, ccs.DisplayData, int -- @function [parent=#DisplayManager] addDisplay -- @param self --- @param #ccs.DisplayData displaydata --- @param #int int +-- @param #ccs.DisplayData displayData +-- @param #int index -------------------------------- -- @overload self, float, float -- @overload self, vec2_table -- @function [parent=#DisplayManager] containPoint -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- Change display by index. You can just use this method to change display in the display list.
+-- The display list is just used for this bone, and it is the displays you may use in every frame.
+-- Note : if index is the same with prev index, the method will not effect
+-- param index The index of the display you want to change
+-- param force If true, then force change display to specified display, or current display will set to display index edit in the flash every key frame. -- @function [parent=#DisplayManager] changeDisplayWithIndex -- @param self --- @param #int int --- @param #bool bool +-- @param #int index +-- @param #bool force -------------------------------- +-- -- @function [parent=#DisplayManager] changeDisplayWithName -- @param self --- @param #string str --- @param #bool bool +-- @param #string name +-- @param #bool force -------------------------------- +-- -- @function [parent=#DisplayManager] isForceChangeDisplay -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#DisplayManager] getCurrentDisplayIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#DisplayManager] getAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#DisplayManager] getDecorativeDisplayList -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Determines if the display is visible
+-- see setVisible(bool)
+-- return true if the node is visible, false if the node is hidden. -- @function [parent=#DisplayManager] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets whether the display is visible
+-- The default value is true, a node is default to visible
+-- param visible true if the node is visible, false if the node is hidden. -- @function [parent=#DisplayManager] setVisible -- @param self --- @param #bool bool +-- @param #bool visible -------------------------------- +-- -- @function [parent=#DisplayManager] create -- @param self -- @param #ccs.Bone bone -- @return DisplayManager#DisplayManager ret (return value: ccs.DisplayManager) -------------------------------- +-- -- @function [parent=#DisplayManager] DisplayManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/DrawNode.lua b/cocos/scripting/lua-bindings/auto/api/DrawNode.lua index 381306a3a4..0e9687481b 100644 --- a/cocos/scripting/lua-bindings/auto/api/DrawNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/DrawNode.lua @@ -5,67 +5,76 @@ -- @parent_module cc -------------------------------- +-- draw a quadratic bezier curve with color and number of segments -- @function [parent=#DrawNode] drawQuadraticBezier -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #unsigned int int --- @param #color4f_table color4f +-- @param #vec2_table from +-- @param #vec2_table control +-- @param #vec2_table to +-- @param #unsigned int segments +-- @param #color4f_table color -------------------------------- +-- -- @function [parent=#DrawNode] onDraw -- @param self --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- Clear the geometry in the node's buffer. -- @function [parent=#DrawNode] clear -- @param self -------------------------------- +-- draw a triangle with color -- @function [parent=#DrawNode] drawTriangle -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #color4f_table color4f +-- @param #vec2_table p1 +-- @param #vec2_table p2 +-- @param #vec2_table p3 +-- @param #color4f_table color -------------------------------- +-- draw a dot at a position, with a given radius and color -- @function [parent=#DrawNode] drawDot -- @param self --- @param #vec2_table vec2 --- @param #float float --- @param #color4f_table color4f +-- @param #vec2_table pos +-- @param #float radius +-- @param #color4f_table color -------------------------------- +-- draw a cubic bezier curve with color and number of segments -- @function [parent=#DrawNode] drawCubicBezier -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #unsigned int int --- @param #color4f_table color4f +-- @param #vec2_table from +-- @param #vec2_table control1 +-- @param #vec2_table control2 +-- @param #vec2_table to +-- @param #unsigned int segments +-- @param #color4f_table color -------------------------------- +-- draw a segment with a radius and color -- @function [parent=#DrawNode] drawSegment -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #float float --- @param #color4f_table color4f +-- @param #vec2_table from +-- @param #vec2_table to +-- @param #float radius +-- @param #color4f_table color -------------------------------- +-- creates and initialize a DrawNode node -- @function [parent=#DrawNode] create -- @param self -- @return DrawNode#DrawNode ret (return value: cc.DrawNode) -------------------------------- +-- -- @function [parent=#DrawNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua index 850030d9c3..2186611bf2 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBackIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBackIn#EaseBackIn ret (return value: cc.EaseBackIn) -------------------------------- +-- -- @function [parent=#EaseBackIn] clone -- @param self -- @return EaseBackIn#EaseBackIn ret (return value: cc.EaseBackIn) -------------------------------- +-- -- @function [parent=#EaseBackIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBackIn] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua index 035aeedbfb..bf34e1c7a7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBackInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBackInOut#EaseBackInOut ret (return value: cc.EaseBackInOut) -------------------------------- +-- -- @function [parent=#EaseBackInOut] clone -- @param self -- @return EaseBackInOut#EaseBackInOut ret (return value: cc.EaseBackInOut) -------------------------------- +-- -- @function [parent=#EaseBackInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBackInOut] reverse -- @param self -- @return EaseBackInOut#EaseBackInOut ret (return value: cc.EaseBackInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua index c1bdda9357..4c277e7572 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBackOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBackOut#EaseBackOut ret (return value: cc.EaseBackOut) -------------------------------- +-- -- @function [parent=#EaseBackOut] clone -- @param self -- @return EaseBackOut#EaseBackOut ret (return value: cc.EaseBackOut) -------------------------------- +-- -- @function [parent=#EaseBackOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBackOut] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua b/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua index 5b800810aa..c04acabcb5 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua @@ -5,30 +5,35 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EaseBezierAction] setBezierParamer -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float p0 +-- @param #float p1 +-- @param #float p2 +-- @param #float p3 -------------------------------- +-- creates the action -- @function [parent=#EaseBezierAction] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBezierAction#EaseBezierAction ret (return value: cc.EaseBezierAction) -------------------------------- +-- -- @function [parent=#EaseBezierAction] clone -- @param self -- @return EaseBezierAction#EaseBezierAction ret (return value: cc.EaseBezierAction) -------------------------------- +-- -- @function [parent=#EaseBezierAction] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBezierAction] reverse -- @param self -- @return EaseBezierAction#EaseBezierAction ret (return value: cc.EaseBezierAction) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua index 037dce873b..bd2089568e 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EaseBounce] clone -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) -------------------------------- +-- -- @function [parent=#EaseBounce] reverse -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua index 0f7b0e7ea6..eb1e5bbd9d 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBounceIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBounceIn#EaseBounceIn ret (return value: cc.EaseBounceIn) -------------------------------- +-- -- @function [parent=#EaseBounceIn] clone -- @param self -- @return EaseBounceIn#EaseBounceIn ret (return value: cc.EaseBounceIn) -------------------------------- +-- -- @function [parent=#EaseBounceIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBounceIn] reverse -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua index e81ea374e4..740d3c8704 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBounceInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBounceInOut#EaseBounceInOut ret (return value: cc.EaseBounceInOut) -------------------------------- +-- -- @function [parent=#EaseBounceInOut] clone -- @param self -- @return EaseBounceInOut#EaseBounceInOut ret (return value: cc.EaseBounceInOut) -------------------------------- +-- -- @function [parent=#EaseBounceInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBounceInOut] reverse -- @param self -- @return EaseBounceInOut#EaseBounceInOut ret (return value: cc.EaseBounceInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua index 1dc028dfdd..64a284eede 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBounceOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBounceOut#EaseBounceOut ret (return value: cc.EaseBounceOut) -------------------------------- +-- -- @function [parent=#EaseBounceOut] clone -- @param self -- @return EaseBounceOut#EaseBounceOut ret (return value: cc.EaseBounceOut) -------------------------------- +-- -- @function [parent=#EaseBounceOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBounceOut] reverse -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua index 647f88bdd1..51b0b6490e 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCircleActionIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCircleActionIn#EaseCircleActionIn ret (return value: cc.EaseCircleActionIn) -------------------------------- +-- -- @function [parent=#EaseCircleActionIn] clone -- @param self -- @return EaseCircleActionIn#EaseCircleActionIn ret (return value: cc.EaseCircleActionIn) -------------------------------- +-- -- @function [parent=#EaseCircleActionIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCircleActionIn] reverse -- @param self -- @return EaseCircleActionIn#EaseCircleActionIn ret (return value: cc.EaseCircleActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua index bbe15b71c5..f879df09e5 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCircleActionInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCircleActionInOut#EaseCircleActionInOut ret (return value: cc.EaseCircleActionInOut) -------------------------------- +-- -- @function [parent=#EaseCircleActionInOut] clone -- @param self -- @return EaseCircleActionInOut#EaseCircleActionInOut ret (return value: cc.EaseCircleActionInOut) -------------------------------- +-- -- @function [parent=#EaseCircleActionInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCircleActionInOut] reverse -- @param self -- @return EaseCircleActionInOut#EaseCircleActionInOut ret (return value: cc.EaseCircleActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua index bc8c231259..1a9f175414 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCircleActionOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCircleActionOut#EaseCircleActionOut ret (return value: cc.EaseCircleActionOut) -------------------------------- +-- -- @function [parent=#EaseCircleActionOut] clone -- @param self -- @return EaseCircleActionOut#EaseCircleActionOut ret (return value: cc.EaseCircleActionOut) -------------------------------- +-- -- @function [parent=#EaseCircleActionOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCircleActionOut] reverse -- @param self -- @return EaseCircleActionOut#EaseCircleActionOut ret (return value: cc.EaseCircleActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua index 4320a97977..0e53d65c72 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCubicActionIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCubicActionIn#EaseCubicActionIn ret (return value: cc.EaseCubicActionIn) -------------------------------- +-- -- @function [parent=#EaseCubicActionIn] clone -- @param self -- @return EaseCubicActionIn#EaseCubicActionIn ret (return value: cc.EaseCubicActionIn) -------------------------------- +-- -- @function [parent=#EaseCubicActionIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCubicActionIn] reverse -- @param self -- @return EaseCubicActionIn#EaseCubicActionIn ret (return value: cc.EaseCubicActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua index adcc8e1bd2..fbbb49a273 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCubicActionInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCubicActionInOut#EaseCubicActionInOut ret (return value: cc.EaseCubicActionInOut) -------------------------------- +-- -- @function [parent=#EaseCubicActionInOut] clone -- @param self -- @return EaseCubicActionInOut#EaseCubicActionInOut ret (return value: cc.EaseCubicActionInOut) -------------------------------- +-- -- @function [parent=#EaseCubicActionInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCubicActionInOut] reverse -- @param self -- @return EaseCubicActionInOut#EaseCubicActionInOut ret (return value: cc.EaseCubicActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua index e09318698c..2250af3226 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCubicActionOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCubicActionOut#EaseCubicActionOut ret (return value: cc.EaseCubicActionOut) -------------------------------- +-- -- @function [parent=#EaseCubicActionOut] clone -- @param self -- @return EaseCubicActionOut#EaseCubicActionOut ret (return value: cc.EaseCubicActionOut) -------------------------------- +-- -- @function [parent=#EaseCubicActionOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCubicActionOut] reverse -- @param self -- @return EaseCubicActionOut#EaseCubicActionOut ret (return value: cc.EaseCubicActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua b/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua index 6d9f1190ab..aa8c965c02 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- set period of the wave in radians. -- @function [parent=#EaseElastic] setPeriod -- @param self --- @param #float float +-- @param #float fPeriod -------------------------------- +-- get period of the wave in radians. default is 0.3 -- @function [parent=#EaseElastic] getPeriod -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EaseElastic] clone -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) -------------------------------- +-- -- @function [parent=#EaseElastic] reverse -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua index b38769fd4d..be975202b7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua @@ -9,21 +9,24 @@ -- @overload self, cc.ActionInterval, float -- @function [parent=#EaseElasticIn] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float period -- @return EaseElasticIn#EaseElasticIn ret (retunr value: cc.EaseElasticIn) -------------------------------- +-- -- @function [parent=#EaseElasticIn] clone -- @param self -- @return EaseElasticIn#EaseElasticIn ret (return value: cc.EaseElasticIn) -------------------------------- +-- -- @function [parent=#EaseElasticIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseElasticIn] reverse -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua index 5d836c34ae..cae6e19b10 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua @@ -9,21 +9,24 @@ -- @overload self, cc.ActionInterval, float -- @function [parent=#EaseElasticInOut] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float period -- @return EaseElasticInOut#EaseElasticInOut ret (retunr value: cc.EaseElasticInOut) -------------------------------- +-- -- @function [parent=#EaseElasticInOut] clone -- @param self -- @return EaseElasticInOut#EaseElasticInOut ret (return value: cc.EaseElasticInOut) -------------------------------- +-- -- @function [parent=#EaseElasticInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseElasticInOut] reverse -- @param self -- @return EaseElasticInOut#EaseElasticInOut ret (return value: cc.EaseElasticInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua index a3a2498473..2b825cc636 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua @@ -9,21 +9,24 @@ -- @overload self, cc.ActionInterval, float -- @function [parent=#EaseElasticOut] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float period -- @return EaseElasticOut#EaseElasticOut ret (retunr value: cc.EaseElasticOut) -------------------------------- +-- -- @function [parent=#EaseElasticOut] clone -- @param self -- @return EaseElasticOut#EaseElasticOut ret (return value: cc.EaseElasticOut) -------------------------------- +-- -- @function [parent=#EaseElasticOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseElasticOut] reverse -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua index 75601c4396..21007fb6ee 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseExponentialIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseExponentialIn#EaseExponentialIn ret (return value: cc.EaseExponentialIn) -------------------------------- +-- -- @function [parent=#EaseExponentialIn] clone -- @param self -- @return EaseExponentialIn#EaseExponentialIn ret (return value: cc.EaseExponentialIn) -------------------------------- +-- -- @function [parent=#EaseExponentialIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseExponentialIn] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua index c3985a8546..a61ad52653 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseExponentialInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseExponentialInOut#EaseExponentialInOut ret (return value: cc.EaseExponentialInOut) -------------------------------- +-- -- @function [parent=#EaseExponentialInOut] clone -- @param self -- @return EaseExponentialInOut#EaseExponentialInOut ret (return value: cc.EaseExponentialInOut) -------------------------------- +-- -- @function [parent=#EaseExponentialInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseExponentialInOut] reverse -- @param self -- @return EaseExponentialInOut#EaseExponentialInOut ret (return value: cc.EaseExponentialInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua index e9a42c2a67..c434d595fd 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseExponentialOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseExponentialOut#EaseExponentialOut ret (return value: cc.EaseExponentialOut) -------------------------------- +-- -- @function [parent=#EaseExponentialOut] clone -- @param self -- @return EaseExponentialOut#EaseExponentialOut ret (return value: cc.EaseExponentialOut) -------------------------------- +-- -- @function [parent=#EaseExponentialOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseExponentialOut] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseIn.lua index 139d6a7a70..bda5e33379 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseIn.lua @@ -5,23 +5,27 @@ -- @parent_module cc -------------------------------- +-- Creates the action with the inner action and the rate parameter -- @function [parent=#EaseIn] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float rate -- @return EaseIn#EaseIn ret (return value: cc.EaseIn) -------------------------------- +-- -- @function [parent=#EaseIn] clone -- @param self -- @return EaseIn#EaseIn ret (return value: cc.EaseIn) -------------------------------- +-- -- @function [parent=#EaseIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseIn] reverse -- @param self -- @return EaseIn#EaseIn ret (return value: cc.EaseIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua index 965523b368..76491459b1 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua @@ -5,23 +5,27 @@ -- @parent_module cc -------------------------------- +-- Creates the action with the inner action and the rate parameter -- @function [parent=#EaseInOut] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float rate -- @return EaseInOut#EaseInOut ret (return value: cc.EaseInOut) -------------------------------- +-- -- @function [parent=#EaseInOut] clone -- @param self -- @return EaseInOut#EaseInOut ret (return value: cc.EaseInOut) -------------------------------- +-- -- @function [parent=#EaseInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseInOut] reverse -- @param self -- @return EaseInOut#EaseInOut ret (return value: cc.EaseInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseOut.lua index ec630b401d..3312ee56d7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseOut.lua @@ -5,23 +5,27 @@ -- @parent_module cc -------------------------------- +-- Creates the action with the inner action and the rate parameter -- @function [parent=#EaseOut] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float rate -- @return EaseOut#EaseOut ret (return value: cc.EaseOut) -------------------------------- +-- -- @function [parent=#EaseOut] clone -- @param self -- @return EaseOut#EaseOut ret (return value: cc.EaseOut) -------------------------------- +-- -- @function [parent=#EaseOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseOut] reverse -- @param self -- @return EaseOut#EaseOut ret (return value: cc.EaseOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua index 0eab085d84..56ef34210f 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuadraticActionIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuadraticActionIn#EaseQuadraticActionIn ret (return value: cc.EaseQuadraticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionIn] clone -- @param self -- @return EaseQuadraticActionIn#EaseQuadraticActionIn ret (return value: cc.EaseQuadraticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuadraticActionIn] reverse -- @param self -- @return EaseQuadraticActionIn#EaseQuadraticActionIn ret (return value: cc.EaseQuadraticActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua index 531d387b79..2e31d2c428 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuadraticActionInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuadraticActionInOut#EaseQuadraticActionInOut ret (return value: cc.EaseQuadraticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionInOut] clone -- @param self -- @return EaseQuadraticActionInOut#EaseQuadraticActionInOut ret (return value: cc.EaseQuadraticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuadraticActionInOut] reverse -- @param self -- @return EaseQuadraticActionInOut#EaseQuadraticActionInOut ret (return value: cc.EaseQuadraticActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua index e5b5f69955..a457f90723 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuadraticActionOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuadraticActionOut#EaseQuadraticActionOut ret (return value: cc.EaseQuadraticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionOut] clone -- @param self -- @return EaseQuadraticActionOut#EaseQuadraticActionOut ret (return value: cc.EaseQuadraticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuadraticActionOut] reverse -- @param self -- @return EaseQuadraticActionOut#EaseQuadraticActionOut ret (return value: cc.EaseQuadraticActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua index 9763da5cce..71d6b84792 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuarticActionIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuarticActionIn#EaseQuarticActionIn ret (return value: cc.EaseQuarticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuarticActionIn] clone -- @param self -- @return EaseQuarticActionIn#EaseQuarticActionIn ret (return value: cc.EaseQuarticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuarticActionIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuarticActionIn] reverse -- @param self -- @return EaseQuarticActionIn#EaseQuarticActionIn ret (return value: cc.EaseQuarticActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua index 49d5f23685..9edd4fe4bd 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuarticActionInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuarticActionInOut#EaseQuarticActionInOut ret (return value: cc.EaseQuarticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuarticActionInOut] clone -- @param self -- @return EaseQuarticActionInOut#EaseQuarticActionInOut ret (return value: cc.EaseQuarticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuarticActionInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuarticActionInOut] reverse -- @param self -- @return EaseQuarticActionInOut#EaseQuarticActionInOut ret (return value: cc.EaseQuarticActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua index c63c378424..c19781f8e7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuarticActionOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuarticActionOut#EaseQuarticActionOut ret (return value: cc.EaseQuarticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuarticActionOut] clone -- @param self -- @return EaseQuarticActionOut#EaseQuarticActionOut ret (return value: cc.EaseQuarticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuarticActionOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuarticActionOut] reverse -- @param self -- @return EaseQuarticActionOut#EaseQuarticActionOut ret (return value: cc.EaseQuarticActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua index a0ed09cfc3..49f216a67e 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuinticActionIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuinticActionIn#EaseQuinticActionIn ret (return value: cc.EaseQuinticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuinticActionIn] clone -- @param self -- @return EaseQuinticActionIn#EaseQuinticActionIn ret (return value: cc.EaseQuinticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuinticActionIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuinticActionIn] reverse -- @param self -- @return EaseQuinticActionIn#EaseQuinticActionIn ret (return value: cc.EaseQuinticActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua index 24231cae27..ecb66dde84 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuinticActionInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuinticActionInOut#EaseQuinticActionInOut ret (return value: cc.EaseQuinticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuinticActionInOut] clone -- @param self -- @return EaseQuinticActionInOut#EaseQuinticActionInOut ret (return value: cc.EaseQuinticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuinticActionInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuinticActionInOut] reverse -- @param self -- @return EaseQuinticActionInOut#EaseQuinticActionInOut ret (return value: cc.EaseQuinticActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua index b87c6d5fc2..3b44212159 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuinticActionOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuinticActionOut#EaseQuinticActionOut ret (return value: cc.EaseQuinticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuinticActionOut] clone -- @param self -- @return EaseQuinticActionOut#EaseQuinticActionOut ret (return value: cc.EaseQuinticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuinticActionOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuinticActionOut] reverse -- @param self -- @return EaseQuinticActionOut#EaseQuinticActionOut ret (return value: cc.EaseQuinticActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua b/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua index 2712d20ef1..4508d53990 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- set rate value for the actions -- @function [parent=#EaseRateAction] setRate -- @param self --- @param #float float +-- @param #float rate -------------------------------- +-- get rate value for the actions -- @function [parent=#EaseRateAction] getRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EaseRateAction] clone -- @param self -- @return EaseRateAction#EaseRateAction ret (return value: cc.EaseRateAction) -------------------------------- +-- -- @function [parent=#EaseRateAction] reverse -- @param self -- @return EaseRateAction#EaseRateAction ret (return value: cc.EaseRateAction) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua index fb85e63833..8f77dfde52 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseSineIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseSineIn#EaseSineIn ret (return value: cc.EaseSineIn) -------------------------------- +-- -- @function [parent=#EaseSineIn] clone -- @param self -- @return EaseSineIn#EaseSineIn ret (return value: cc.EaseSineIn) -------------------------------- +-- -- @function [parent=#EaseSineIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseSineIn] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua index d1f4828dca..0425c998db 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseSineInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseSineInOut#EaseSineInOut ret (return value: cc.EaseSineInOut) -------------------------------- +-- -- @function [parent=#EaseSineInOut] clone -- @param self -- @return EaseSineInOut#EaseSineInOut ret (return value: cc.EaseSineInOut) -------------------------------- +-- -- @function [parent=#EaseSineInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseSineInOut] reverse -- @param self -- @return EaseSineInOut#EaseSineInOut ret (return value: cc.EaseSineInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua index aae018e91f..b751bed6af 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseSineOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseSineOut#EaseSineOut ret (return value: cc.EaseSineOut) -------------------------------- +-- -- @function [parent=#EaseSineOut] clone -- @param self -- @return EaseSineOut#EaseSineOut ret (return value: cc.EaseSineOut) -------------------------------- +-- -- @function [parent=#EaseSineOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseSineOut] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EditBox.lua b/cocos/scripting/lua-bindings/auto/api/EditBox.lua index 35579ac4c8..7aae0b17ee 100644 --- a/cocos/scripting/lua-bindings/auto/api/EditBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/EditBox.lua @@ -5,129 +5,177 @@ -- @parent_module cc -------------------------------- +-- 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) -------------------------------- +-- Set the placeholder's font name.
+-- param pFontName The font name. -- @function [parent=#EditBox] setPlaceholderFontName -- @param self --- @param #char char +-- @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 char +-- @param #char pFontName -------------------------------- +-- Set the placeholder's font size.
+-- param fontSize The font size. -- @function [parent=#EditBox] setPlaceholderFontSize -- @param self --- @param #int int +-- @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 +-- @param #int inputMode -------------------------------- +-- 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 color3b +-- @param #color3b_table color -------------------------------- +-- Set the font color of the widget's text. -- @function [parent=#EditBox] setFontColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- Set the placeholder's font.
+-- param pFontName The font name.
+-- param fontSize The font size. -- @function [parent=#EditBox] setPlaceholderFont -- @param self --- @param #char char --- @param #int int +-- @param #char pFontName +-- @param #int fontSize -------------------------------- +-- Set the font size.
+-- param fontSize The font size. -- @function [parent=#EditBox] setFontSize -- @param self --- @param #int int +-- @param #int fontSize -------------------------------- +-- Init edit box with specified size. This method should be invoked right after constructor.
+-- param size The size of edit box. -- @function [parent=#EditBox] initWithSizeAndBackgroundSprite -- @param self -- @param #size_table size --- @param #cc.Scale9Sprite scale9sprite +-- @param #cc.Scale9Sprite pNormal9SpriteBg -- @return bool#bool ret (return 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 char +-- @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 keyboardreturntype +-- @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 +-- @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 char +-- @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 int +-- @param #int maxLength -------------------------------- +-- Set the font.
+-- param pFontName The font name.
+-- param fontSize The font size. -- @function [parent=#EditBox] setFont -- @param self --- @param #char char --- @param #int int +-- @param #char pFontName +-- @param #int fontSize -------------------------------- +-- create a edit box with size.
+-- return An autorelease pointer of EditBox, you don't need to release it only if you retain it again. -- @function [parent=#EditBox] create -- @param self -- @param #size_table size --- @param #cc.Scale9Sprite scale9sprite --- @param #cc.Scale9Sprite scale9sprite --- @param #cc.Scale9Sprite scale9sprite +-- @param #cc.Scale9Sprite pNormal9SpriteBg +-- @param #cc.Scale9Sprite pPressed9SpriteBg +-- @param #cc.Scale9Sprite pDisabled9SpriteBg -- @return EditBox#EditBox ret (return value: cc.EditBox) -------------------------------- +-- -- @function [parent=#EditBox] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchorPoint -------------------------------- +-- -- @function [parent=#EditBox] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#EditBox] setVisible -- @param self --- @param #bool bool +-- @param #bool visible -------------------------------- +-- -- @function [parent=#EditBox] setContentSize -- @param self -- @param #size_table size -------------------------------- +-- Constructor.
+-- js ctor -- @function [parent=#EditBox] EditBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Event.lua b/cocos/scripting/lua-bindings/auto/api/Event.lua index aebf35b831..62e8c8347e 100644 --- a/cocos/scripting/lua-bindings/auto/api/Event.lua +++ b/cocos/scripting/lua-bindings/auto/api/Event.lua @@ -5,21 +5,28 @@ -- @parent_module cc -------------------------------- +-- Checks whether the event has been stopped -- @function [parent=#Event] isStopped -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the event type -- @function [parent=#Event] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- @brief Gets current target of the event
+-- return The target with which the event associates.
+-- note It onlys be available when the event listener is associated with node.
+-- It returns 0 when the listener is associated with fixed priority. -- @function [parent=#Event] getCurrentTarget -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Stops propagation for current event -- @function [parent=#Event] stopPropagation -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/EventController.lua b/cocos/scripting/lua-bindings/auto/api/EventController.lua index e727158d6f..108baafc32 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventController.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventController.lua @@ -5,31 +5,37 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventController] getControllerEventType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#EventController] setConnectStatus -- @param self --- @param #bool bool +-- @param #bool isConnected -------------------------------- +-- -- @function [parent=#EventController] isConnected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#EventController] setKeyCode -- @param self --- @param #int int +-- @param #int keyCode -------------------------------- +-- -- @function [parent=#EventController] getController -- @param self -- @return Controller#Controller ret (return value: cc.Controller) -------------------------------- +-- -- @function [parent=#EventController] getKeyCode -- @param self -- @return int#int ret (return value: int) @@ -39,8 +45,8 @@ -- @overload self, int, cc.Controller, int -- @function [parent=#EventController] EventController -- @param self --- @param #int controllereventtype +-- @param #int type -- @param #cc.Controller controller --- @param #int int +-- @param #int keyCode return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventCustom.lua b/cocos/scripting/lua-bindings/auto/api/EventCustom.lua index 2f8ebe818d..645d85e0a7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventCustom.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventCustom.lua @@ -5,13 +5,15 @@ -- @parent_module cc -------------------------------- +-- Gets event name -- @function [parent=#EventCustom] getEventName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Constructor -- @function [parent=#EventCustom] EventCustom -- @param self --- @param #string str +-- @param #string eventName return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua b/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua index 84c8901a93..2db1cfbe9a 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua @@ -5,83 +5,111 @@ -- @parent_module cc -------------------------------- +-- Pauses all listeners which are associated the specified target. -- @function [parent=#EventDispatcher] pauseEventListenersForTarget -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node target +-- @param #bool recursive -------------------------------- +-- Adds a event listener for a specified event with the priority of scene graph.
+-- param listener The listener of a specified event.
+-- param node The priority of the listener is based on the draw order of this node.
+-- note The priority of scene graph will be fixed value 0. So the order of listener item
+-- in the vector will be ' <0, scene graph (0 priority), >0'. -- @function [parent=#EventDispatcher] addEventListenerWithSceneGraphPriority -- @param self --- @param #cc.EventListener eventlistener +-- @param #cc.EventListener listener -- @param #cc.Node node -------------------------------- +-- Whether to enable dispatching events -- @function [parent=#EventDispatcher] setEnabled -- @param self --- @param #bool bool +-- @param #bool isEnabled -------------------------------- +-- Adds a event listener for a specified event with the fixed priority.
+-- param listener The listener of a specified event.
+-- param fixedPriority The fixed priority of the listener.
+-- note A lower priority will be called before the ones that have a higher value.
+-- 0 priority is forbidden for fixed priority since it's used for scene graph based priority. -- @function [parent=#EventDispatcher] addEventListenerWithFixedPriority -- @param self --- @param #cc.EventListener eventlistener --- @param #int int +-- @param #cc.EventListener listener +-- @param #int fixedPriority -------------------------------- +-- Remove a listener
+-- param listener The specified event listener which needs to be removed. -- @function [parent=#EventDispatcher] removeEventListener -- @param self --- @param #cc.EventListener eventlistener +-- @param #cc.EventListener listener -------------------------------- +-- Resumes all listeners which are associated the specified target. -- @function [parent=#EventDispatcher] resumeEventListenersForTarget -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node target +-- @param #bool recursive -------------------------------- +-- Removes all listeners which are associated with the specified target. -- @function [parent=#EventDispatcher] removeEventListenersForTarget -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node target +-- @param #bool recursive -------------------------------- +-- Sets listener's priority with fixed value. -- @function [parent=#EventDispatcher] setPriority -- @param self --- @param #cc.EventListener eventlistener --- @param #int int +-- @param #cc.EventListener listener +-- @param #int fixedPriority -------------------------------- +-- Adds a Custom event listener.
+-- It will use a fixed priority of 1.
+-- return the generated event. Needed in order to remove the event from the dispather -- @function [parent=#EventDispatcher] addCustomEventListener -- @param self --- @param #string str --- @param #function func +-- @param #string eventName +-- @param #function callback -- @return EventListenerCustom#EventListenerCustom ret (return value: cc.EventListenerCustom) -------------------------------- +-- Dispatches the event
+-- Also removes all EventListeners marked for deletion from the
+-- event dispatcher list. -- @function [parent=#EventDispatcher] dispatchEvent -- @param self -- @param #cc.Event event -------------------------------- +-- Removes all listeners -- @function [parent=#EventDispatcher] removeAllEventListeners -- @param self -------------------------------- +-- Removes all custom listeners with the same event name -- @function [parent=#EventDispatcher] removeCustomEventListeners -- @param self --- @param #string str +-- @param #string customEventName -------------------------------- +-- Checks whether dispatching events is enabled -- @function [parent=#EventDispatcher] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Removes all listeners with the same event listener type -- @function [parent=#EventDispatcher] removeEventListenersForType -- @param self --- @param #int type +-- @param #int listenerType -------------------------------- +-- Constructor of EventDispatcher -- @function [parent=#EventDispatcher] EventDispatcher -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/EventFocus.lua b/cocos/scripting/lua-bindings/auto/api/EventFocus.lua index 3aa39d96ff..29c49daf43 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventFocus.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventFocus.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventFocus] EventFocus -- @param self --- @param #ccui.Widget widget --- @param #ccui.Widget widget +-- @param #ccui.Widget widgetLoseFocus +-- @param #ccui.Widget widgetGetFocus return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventFrame.lua b/cocos/scripting/lua-bindings/auto/api/EventFrame.lua index 2638ad42bc..67930d7f4c 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventFrame.lua @@ -5,26 +5,31 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#EventFrame] setEvent -- @param self --- @param #string str +-- @param #string event -------------------------------- +-- -- @function [parent=#EventFrame] getEvent -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#EventFrame] create -- @param self -- @return EventFrame#EventFrame ret (return value: ccs.EventFrame) -------------------------------- +-- -- @function [parent=#EventFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#EventFrame] EventFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua b/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua index 86f722ae6b..23861ac190 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventKeyboard] EventKeyboard -- @param self --- @param #int keycode --- @param #bool bool +-- @param #int keyCode +-- @param #bool isPressed return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventListener.lua b/cocos/scripting/lua-bindings/auto/api/EventListener.lua index 2bd1addba5..220f4b3901 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListener.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListener.lua @@ -5,21 +5,29 @@ -- @parent_module cc -------------------------------- +-- Enables or disables the listener
+-- note Only listeners with `enabled` state will be able to receive events.
+-- When an listener was initialized, it's enabled by default.
+-- An event listener can receive events when it is enabled and is not paused.
+-- paused state is always false when it is a fixed priority listener. -- @function [parent=#EventListener] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Clones the listener, its subclasses have to override this method. -- @function [parent=#EventListener] clone -- @param self -- @return EventListener#EventListener ret (return value: cc.EventListener) -------------------------------- +-- Checks whether the listener is enabled -- @function [parent=#EventListener] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Checks whether the listener is available. -- @function [parent=#EventListener] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua index 0ac7abb066..33760d7da4 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- / Overrides -- @function [parent=#EventListenerAcceleration] clone -- @param self -- @return EventListenerAcceleration#EventListenerAcceleration ret (return value: cc.EventListenerAcceleration) -------------------------------- +-- -- @function [parent=#EventListenerAcceleration] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua index 338b93fcd1..362d380c5b 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua @@ -5,16 +5,19 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerController] create -- @param self -- @return EventListenerController#EventListenerController ret (return value: cc.EventListenerController) -------------------------------- +-- -- @function [parent=#EventListenerController] clone -- @param self -- @return EventListenerController#EventListenerController ret (return value: cc.EventListenerController) -------------------------------- +-- / Overrides -- @function [parent=#EventListenerController] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua index c8d4281472..c634a11605 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerCustom] clone -- @param self -- @return EventListenerCustom#EventListenerCustom ret (return value: cc.EventListenerCustom) -------------------------------- +-- / Overrides -- @function [parent=#EventListenerCustom] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua index 038a145fa7..7e6c399722 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- / Overrides -- @function [parent=#EventListenerFocus] clone -- @param self -- @return EventListenerFocus#EventListenerFocus ret (return value: cc.EventListenerFocus) -------------------------------- +-- -- @function [parent=#EventListenerFocus] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua index ff9594630a..9c8fcc5110 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- / Overrides -- @function [parent=#EventListenerKeyboard] clone -- @param self -- @return EventListenerKeyboard#EventListenerKeyboard ret (return value: cc.EventListenerKeyboard) -------------------------------- +-- -- @function [parent=#EventListenerKeyboard] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua index fc04e71698..4015a24615 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- / Overrides -- @function [parent=#EventListenerMouse] clone -- @param self -- @return EventListenerMouse#EventListenerMouse ret (return value: cc.EventListenerMouse) -------------------------------- +-- -- @function [parent=#EventListenerMouse] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua index 5c9d1e6fc5..02039547f8 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua @@ -5,16 +5,19 @@ -- @parent_module cc -------------------------------- +-- create the listener -- @function [parent=#EventListenerPhysicsContact] create -- @param self -- @return EventListenerPhysicsContact#EventListenerPhysicsContact ret (return value: cc.EventListenerPhysicsContact) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContact] clone -- @param self -- @return EventListenerPhysicsContact#EventListenerPhysicsContact ret (return value: cc.EventListenerPhysicsContact) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContact] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua index 88e8610634..02b608e263 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua @@ -5,20 +5,23 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithBodies] hitTest -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape shapeA +-- @param #cc.PhysicsShape shapeB -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithBodies] create -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody bodyA +-- @param #cc.PhysicsBody bodyB -- @return EventListenerPhysicsContactWithBodies#EventListenerPhysicsContactWithBodies ret (return value: cc.EventListenerPhysicsContactWithBodies) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithBodies] clone -- @param self -- @return EventListenerPhysicsContactWithBodies#EventListenerPhysicsContactWithBodies ret (return value: cc.EventListenerPhysicsContactWithBodies) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua index 73c3f799f2..0222b32314 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua @@ -5,19 +5,22 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithGroup] hitTest -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape shapeA +-- @param #cc.PhysicsShape shapeB -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithGroup] create -- @param self --- @param #int int +-- @param #int group -- @return EventListenerPhysicsContactWithGroup#EventListenerPhysicsContactWithGroup ret (return value: cc.EventListenerPhysicsContactWithGroup) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithGroup] clone -- @param self -- @return EventListenerPhysicsContactWithGroup#EventListenerPhysicsContactWithGroup ret (return value: cc.EventListenerPhysicsContactWithGroup) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua index 902a390148..96f49e33c7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua @@ -5,20 +5,23 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithShapes] hitTest -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape shapeA +-- @param #cc.PhysicsShape shapeB -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithShapes] create -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape shapeA +-- @param #cc.PhysicsShape shapeB -- @return EventListenerPhysicsContactWithShapes#EventListenerPhysicsContactWithShapes ret (return value: cc.EventListenerPhysicsContactWithShapes) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithShapes] clone -- @param self -- @return EventListenerPhysicsContactWithShapes#EventListenerPhysicsContactWithShapes ret (return value: cc.EventListenerPhysicsContactWithShapes) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua index fd7e487488..3c6425d423 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- / Overrides -- @function [parent=#EventListenerTouchAllAtOnce] clone -- @param self -- @return EventListenerTouchAllAtOnce#EventListenerTouchAllAtOnce ret (return value: cc.EventListenerTouchAllAtOnce) -------------------------------- +-- -- @function [parent=#EventListenerTouchAllAtOnce] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua index 1da5fcb02e..adfc237d07 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerTouchOneByOne] isSwallowTouches -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#EventListenerTouchOneByOne] setSwallowTouches -- @param self --- @param #bool bool +-- @param #bool needSwallow -------------------------------- +-- / Overrides -- @function [parent=#EventListenerTouchOneByOne] clone -- @param self -- @return EventListenerTouchOneByOne#EventListenerTouchOneByOne ret (return value: cc.EventListenerTouchOneByOne) -------------------------------- +-- -- @function [parent=#EventListenerTouchOneByOne] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventMouse.lua b/cocos/scripting/lua-bindings/auto/api/EventMouse.lua index 4d991e49e3..4021c695a2 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventMouse.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventMouse.lua @@ -5,85 +5,101 @@ -- @parent_module cc -------------------------------- +-- returns the previous touch location in screen coordinates -- @function [parent=#EventMouse] getPreviousLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the current touch location in OpenGL coordinates -- @function [parent=#EventMouse] getLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#EventMouse] getMouseButton -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- returns the previous touch location in OpenGL coordinates -- @function [parent=#EventMouse] getPreviousLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the delta of 2 current touches locations in screen coordinates -- @function [parent=#EventMouse] getDelta -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Set mouse scroll data -- @function [parent=#EventMouse] setScrollData -- @param self --- @param #float float --- @param #float float +-- @param #float scrollX +-- @param #float scrollY -------------------------------- +-- returns the start touch location in screen coordinates -- @function [parent=#EventMouse] getStartLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the start touch location in OpenGL coordinates -- @function [parent=#EventMouse] getStartLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#EventMouse] setMouseButton -- @param self --- @param #int int +-- @param #int button -------------------------------- +-- returns the current touch location in screen coordinates -- @function [parent=#EventMouse] getLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#EventMouse] getScrollY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EventMouse] getScrollX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EventMouse] getCursorX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EventMouse] getCursorY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EventMouse] setCursorPosition -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y -------------------------------- +-- -- @function [parent=#EventMouse] EventMouse -- @param self --- @param #int mouseeventtype +-- @param #int mouseEventCode return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventTouch.lua b/cocos/scripting/lua-bindings/auto/api/EventTouch.lua index d32256fd93..16567c6908 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventTouch.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventTouch.lua @@ -5,16 +5,19 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventTouch] getEventCode -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#EventTouch] setEventCode -- @param self --- @param #int eventcode +-- @param #int eventCode -------------------------------- +-- -- @function [parent=#EventTouch] EventTouch -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/FadeIn.lua b/cocos/scripting/lua-bindings/auto/api/FadeIn.lua index f9875e7109..9b21453127 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeIn.lua @@ -5,27 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#FadeIn] setReverseAction -- @param self --- @param #cc.FadeTo fadeto +-- @param #cc.FadeTo ac -------------------------------- +-- creates the action -- @function [parent=#FadeIn] create -- @param self --- @param #float float +-- @param #float d -- @return FadeIn#FadeIn ret (return value: cc.FadeIn) -------------------------------- +-- -- @function [parent=#FadeIn] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#FadeIn] clone -- @param self -- @return FadeIn#FadeIn ret (return value: cc.FadeIn) -------------------------------- +-- -- @function [parent=#FadeIn] reverse -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOut.lua b/cocos/scripting/lua-bindings/auto/api/FadeOut.lua index e49935eb6e..8d4ec375af 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOut.lua @@ -5,27 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#FadeOut] setReverseAction -- @param self --- @param #cc.FadeTo fadeto +-- @param #cc.FadeTo ac -------------------------------- +-- creates the action -- @function [parent=#FadeOut] create -- @param self --- @param #float float +-- @param #float d -- @return FadeOut#FadeOut ret (return value: cc.FadeOut) -------------------------------- +-- -- @function [parent=#FadeOut] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#FadeOut] clone -- @param self -- @return FadeOut#FadeOut ret (return value: cc.FadeOut) -------------------------------- +-- -- @function [parent=#FadeOut] reverse -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua index 6936709eaf..52afec3aa4 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates the action with the grid size and the duration -- @function [parent=#FadeOutBLTiles] create -- @param self --- @param #float float --- @param #size_table size +-- @param #float duration +-- @param #size_table gridSize -- @return FadeOutBLTiles#FadeOutBLTiles ret (return value: cc.FadeOutBLTiles) -------------------------------- +-- -- @function [parent=#FadeOutBLTiles] clone -- @param self -- @return FadeOutBLTiles#FadeOutBLTiles ret (return value: cc.FadeOutBLTiles) -------------------------------- +-- -- @function [parent=#FadeOutBLTiles] testFunc -- @param self --- @param #size_table size --- @param #float float +-- @param #size_table pos +-- @param #float time -- @return float#float ret (return value: float) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua index 0fdf8f3c1b..111e762731 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates the action with the grid size and the duration -- @function [parent=#FadeOutDownTiles] create -- @param self --- @param #float float --- @param #size_table size +-- @param #float duration +-- @param #size_table gridSize -- @return FadeOutDownTiles#FadeOutDownTiles ret (return value: cc.FadeOutDownTiles) -------------------------------- +-- -- @function [parent=#FadeOutDownTiles] clone -- @param self -- @return FadeOutDownTiles#FadeOutDownTiles ret (return value: cc.FadeOutDownTiles) -------------------------------- +-- -- @function [parent=#FadeOutDownTiles] testFunc -- @param self --- @param #size_table size --- @param #float float +-- @param #size_table pos +-- @param #float time -- @return float#float ret (return value: float) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua index 127a804281..6315647ab9 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua @@ -5,43 +5,50 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] turnOnTile -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] turnOffTile -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] transformTile -- @param self --- @param #vec2_table vec2 --- @param #float float +-- @param #vec2_table pos +-- @param #float distance -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] testFunc -- @param self --- @param #size_table size --- @param #float float +-- @param #size_table pos +-- @param #float time -- @return float#float ret (return value: float) -------------------------------- +-- creates the action with the grid size and the duration -- @function [parent=#FadeOutTRTiles] create -- @param self --- @param #float float --- @param #size_table size +-- @param #float duration +-- @param #size_table gridSize -- @return FadeOutTRTiles#FadeOutTRTiles ret (return value: cc.FadeOutTRTiles) -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] clone -- @param self -- @return FadeOutTRTiles#FadeOutTRTiles ret (return value: cc.FadeOutTRTiles) -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua index 22a5bae741..9d871f5f51 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua @@ -5,28 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#FadeOutUpTiles] transformTile -- @param self --- @param #vec2_table vec2 --- @param #float float +-- @param #vec2_table pos +-- @param #float distance -------------------------------- +-- creates the action with the grid size and the duration -- @function [parent=#FadeOutUpTiles] create -- @param self --- @param #float float --- @param #size_table size +-- @param #float duration +-- @param #size_table gridSize -- @return FadeOutUpTiles#FadeOutUpTiles ret (return value: cc.FadeOutUpTiles) -------------------------------- +-- -- @function [parent=#FadeOutUpTiles] clone -- @param self -- @return FadeOutUpTiles#FadeOutUpTiles ret (return value: cc.FadeOutUpTiles) -------------------------------- +-- -- @function [parent=#FadeOutUpTiles] testFunc -- @param self --- @param #size_table size --- @param #float float +-- @param #size_table pos +-- @param #float time -- @return float#float ret (return value: float) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeTo.lua b/cocos/scripting/lua-bindings/auto/api/FadeTo.lua index 854e4047ba..81cf2e8fec 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeTo.lua @@ -5,30 +5,35 @@ -- @parent_module cc -------------------------------- +-- creates an action with duration and opacity -- @function [parent=#FadeTo] create -- @param self --- @param #float float --- @param #unsigned char char +-- @param #float duration +-- @param #unsigned char opacity -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) -------------------------------- +-- -- @function [parent=#FadeTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#FadeTo] clone -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) -------------------------------- +-- -- @function [parent=#FadeTo] reverse -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) -------------------------------- +-- -- @function [parent=#FadeTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FileUtils.lua b/cocos/scripting/lua-bindings/auto/api/FileUtils.lua index 465eafc67b..8f3aa1f787 100644 --- a/cocos/scripting/lua-bindings/auto/api/FileUtils.lua +++ b/cocos/scripting/lua-bindings/auto/api/FileUtils.lua @@ -4,166 +4,320 @@ -- @parent_module cc -------------------------------- +-- Returns the fullpath for a given filename.
+-- First it will try to get a new filename from the "filenameLookup" dictionary.
+-- If a new filename can't be found on the dictionary, it will use the original filename.
+-- Then it will try to obtain the full path of the filename using the FileUtils search rules: resolutions, and search paths.
+-- The file search is based on the array element order of search paths and resolution directories.
+-- For instance:
+-- We set two elements("/mnt/sdcard/", "internal_dir/") to search paths vector by setSearchPaths,
+-- and set three elements("resources-ipadhd/", "resources-ipad/", "resources-iphonehd")
+-- to resolutions vector by setSearchResolutionsOrder. The "internal_dir" is relative to "Resources/".
+-- If we have a file named 'sprite.png', the mapping in fileLookup dictionary contains `key: sprite.png -> value: sprite.pvr.gz`.
+-- Firstly, it will replace 'sprite.png' with 'sprite.pvr.gz', then searching the file sprite.pvr.gz as follows:
+-- /mnt/sdcard/resources-ipadhd/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/resources-ipad/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/resources-iphonehd/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/sprite.pvr.gz (if not found, search next)
+-- internal_dir/resources-ipadhd/sprite.pvr.gz (if not found, search next)
+-- internal_dir/resources-ipad/sprite.pvr.gz (if not found, search next)
+-- internal_dir/resources-iphonehd/sprite.pvr.gz (if not found, search next)
+-- internal_dir/sprite.pvr.gz (if not found, return "sprite.png")
+-- If the filename contains relative path like "gamescene/uilayer/sprite.png",
+-- and the mapping in fileLookup dictionary contains `key: gamescene/uilayer/sprite.png -> value: gamescene/uilayer/sprite.pvr.gz`.
+-- The file search order will be:
+-- /mnt/sdcard/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/gamescene/uilayer/sprite.pvr.gz (if not found, search next)
+-- internal_dir/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next)
+-- internal_dir/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next)
+-- internal_dir/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next)
+-- internal_dir/gamescene/uilayer/sprite.pvr.gz (if not found, return "gamescene/uilayer/sprite.png")
+-- If the new file can't be found on the file system, it will return the parameter filename directly.
+-- This method was added to simplify multiplatform support. Whether you are using cocos2d-js or any cross-compilation toolchain like StellaSDK or Apportable,
+-- you might need to load different resources for a given file in the different platforms.
+-- since v2.1 -- @function [parent=#FileUtils] fullPathForFilename -- @param self --- @param #string str +-- @param #string filename -- @return string#string ret (return value: string) -------------------------------- +-- Gets string from a file. -- @function [parent=#FileUtils] getStringFromFile -- @param self --- @param #string str +-- @param #string filename -- @return string#string ret (return value: string) -------------------------------- +-- Sets the filenameLookup dictionary.
+-- param pFilenameLookupDict The dictionary for replacing filename.
+-- since v2.1 -- @function [parent=#FileUtils] setFilenameLookupDictionary -- @param self --- @param #map_table map +-- @param #map_table filenameLookupDict -------------------------------- +-- Remove a file
+-- param filepath The full path of the file, it must be an absolute path.
+-- return true if the file have been removed successfully, otherwise it will return false. -- @function [parent=#FileUtils] removeFile -- @param self --- @param #string str +-- @param #string filepath -- @return bool#bool ret (return value: bool) -------------------------------- +-- Checks whether the path is an absolute path.
+-- note On Android, if the parameter passed in is relative to "assets/", this method will treat it as an absolute path.
+-- Also on Blackberry, path starts with "app/native/Resources/" is treated as an absolute path.
+-- param strPath The path that needs to be checked.
+-- return true if it's an absolute path, otherwise it will return false. -- @function [parent=#FileUtils] isAbsolutePath -- @param self --- @param #string str +-- @param #string path -- @return bool#bool ret (return value: bool) -------------------------------- +-- Rename a file under the given directory
+-- param path The parent directory path of the file, it must be an absolute path.
+-- param oldname The current name of the file.
+-- param name The new name of the file.
+-- return true if the file have been renamed successfully, otherwise it will return false. -- @function [parent=#FileUtils] renameFile -- @param self --- @param #string str --- @param #string str --- @param #string str +-- @param #string path +-- @param #string oldname +-- @param #string name -- @return bool#bool ret (return value: bool) -------------------------------- +-- Loads the filenameLookup dictionary from the contents of a filename.
+-- note The plist file name should follow the format below:
+-- code
+--
+--
+--
+--
+-- filenames
+--
+-- sounds/click.wav
+-- sounds/click.caf
+-- sounds/endgame.wav
+-- sounds/endgame.caf
+-- sounds/gem-0.wav
+-- sounds/gem-0.caf
+--

+-- metadata
+--
+-- version
+-- 1
+--

+--

+--

+-- endcode
+-- param filename The plist file name.
+-- since v2.1
+-- js loadFilenameLookup
+-- lua loadFilenameLookup -- @function [parent=#FileUtils] loadFilenameLookupDictionaryFromFile -- @param self --- @param #string str +-- @param #string filename -------------------------------- +-- -- @function [parent=#FileUtils] isPopupNotify -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Converts the contents of a file to a ValueVector.
+-- note This method is used internally. -- @function [parent=#FileUtils] getValueVectorFromFile -- @param self --- @param #string str +-- @param #string filename -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Gets the array of search paths.
+-- return The array of search paths.
+-- see fullPathForFilename(const char*).
+-- lua NA -- @function [parent=#FileUtils] getSearchPaths -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Write a ValueMap to a plist file.
+-- note This method is used internally. -- @function [parent=#FileUtils] writeToFile -- @param self --- @param #map_table map --- @param #string str +-- @param #map_table dict +-- @param #string fullPath -- @return bool#bool ret (return value: bool) -------------------------------- +-- Converts the contents of a file to a ValueMap.
+-- note This method is used internally. -- @function [parent=#FileUtils] getValueMapFromFile -- @param self --- @param #string str +-- @param #string filename -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- Converts the contents of a file to a ValueMap.
+-- note This method is used internally. -- @function [parent=#FileUtils] getValueMapFromData -- @param self --- @param #char char --- @param #int int +-- @param #char filedata +-- @param #int filesize -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- Remove a directory
+-- param dirPath The full path of the directory, it must be an absolute path.
+-- return true if the directory have been removed successfully, otherwise it will return false. -- @function [parent=#FileUtils] removeDirectory -- @param self --- @param #string str +-- @param #string dirPath -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the array of search paths.
+-- You can use this array to modify the search path of the resources.
+-- If you want to use "themes" or search resources in the "cache", you can do it easily by adding new entries in this array.
+-- note This method could access relative path and absolute path.
+-- If the relative path was passed to the vector, FileUtils will add the default resource directory before the relative path.
+-- For instance:
+-- On Android, the default resource root path is "assets/".
+-- If "/mnt/sdcard/" and "resources-large" were set to the search paths vector,
+-- "resources-large" will be converted to "assets/resources-large" since it was a relative path.
+-- param searchPaths The array contains search paths.
+-- see fullPathForFilename(const char*)
+-- since v2.1
+-- In js:var setSearchPaths(var jsval);
+-- lua NA -- @function [parent=#FileUtils] setSearchPaths -- @param self --- @param #array_table array +-- @param #array_table searchPaths -------------------------------- +-- Retrieve the file size
+-- note If a relative path was passed in, it will be inserted a default root path at the beginning.
+-- param filepath The path of the file, it could be a relative or absolute path.
+-- return The file size. -- @function [parent=#FileUtils] getFileSize -- @param self --- @param #string str +-- @param #string filepath -- @return long#long ret (return value: long) -------------------------------- +-- Sets the array that contains the search order of the resources.
+-- param searchResolutionsOrder The source array that contains the search order of the resources.
+-- see getSearchResolutionsOrder(void), fullPathForFilename(const char*).
+-- since v2.1
+-- In js:var setSearchResolutionsOrder(var jsval)
+-- lua NA -- @function [parent=#FileUtils] setSearchResolutionsOrder -- @param self --- @param #array_table array +-- @param #array_table searchResolutionsOrder -------------------------------- +-- Append search order of the resources.
+-- see setSearchResolutionsOrder(), fullPathForFilename().
+-- since v2.1 -- @function [parent=#FileUtils] addSearchResolutionsOrder -- @param self --- @param #string str --- @param #bool bool +-- @param #string order +-- @param #bool front -------------------------------- +-- Add search path.
+-- since v2.1 -- @function [parent=#FileUtils] addSearchPath -- @param self --- @param #string str --- @param #bool bool +-- @param #string path +-- @param #bool front -------------------------------- +-- Checks whether a file exists.
+-- note If a relative path was passed in, it will be inserted a default root path at the beginning.
+-- param strFilePath The path of the file, it could be a relative or absolute path.
+-- return true if the file exists, otherwise it will return false. -- @function [parent=#FileUtils] isFileExist -- @param self --- @param #string str +-- @param #string filename -- @return bool#bool ret (return value: bool) -------------------------------- +-- Purges the file searching cache.
+-- note It should be invoked after the resources were updated.
+-- For instance, in the CocosPlayer sample, every time you run application from CocosBuilder,
+-- All the resources will be downloaded to the writable folder, before new js app launchs,
+-- this method should be invoked to clean the file search cache. -- @function [parent=#FileUtils] purgeCachedEntries -- @param self -------------------------------- +-- Gets full path from a file name and the path of the reletive file.
+-- param filename The file name.
+-- param pszRelativeFile The path of the relative file.
+-- return The full path.
+-- e.g. filename: hello.png, pszRelativeFile: /User/path1/path2/hello.plist
+-- Return: /User/path1/path2/hello.pvr (If there a a key(hello.png)-value(hello.pvr) in FilenameLookup dictionary. ) -- @function [parent=#FileUtils] fullPathFromRelativeFile -- @param self --- @param #string str --- @param #string str +-- @param #string filename +-- @param #string relativeFile -- @return string#string ret (return value: string) -------------------------------- +-- Sets/Gets whether to pop-up a message box when failed to load an image. -- @function [parent=#FileUtils] setPopupNotify -- @param self --- @param #bool bool +-- @param #bool notify -------------------------------- +-- Checks whether the path is a directory
+-- param dirPath The path of the directory, it could be a relative or an absolute path.
+-- return true if the directory exists, otherwise it will return false. -- @function [parent=#FileUtils] isDirectoryExist -- @param self --- @param #string str +-- @param #string dirPath -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the array that contains the search order of the resources.
+-- see setSearchResolutionsOrder(const std::vector&), fullPathForFilename(const char*).
+-- since v2.1
+-- lua NA -- @function [parent=#FileUtils] getSearchResolutionsOrder -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Creates a directory
+-- param dirPath The path of the directory, it must be an absolute path.
+-- return true if the directory have been created successfully, otherwise it will return false. -- @function [parent=#FileUtils] createDirectory -- @param self --- @param #string str +-- @param #string dirPath -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the writable path.
+-- return The path that can be write/read a file in -- @function [parent=#FileUtils] getWritablePath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Destroys the instance of FileUtils. -- @function [parent=#FileUtils] destroyInstance -- @param self -------------------------------- +-- Gets the instance of FileUtils. -- @function [parent=#FileUtils] getInstance -- @param self -- @return FileUtils#FileUtils ret (return value: cc.FileUtils) diff --git a/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua b/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua index a89deabc3f..c14f9aba2e 100644 --- a/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- set duration in seconds of the action -- @function [parent=#FiniteTimeAction] setDuration -- @param self --- @param #float float +-- @param #float duration -------------------------------- +-- get duration in seconds of the action -- @function [parent=#FiniteTimeAction] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#FiniteTimeAction] clone -- @param self -- @return FiniteTimeAction#FiniteTimeAction ret (return value: cc.FiniteTimeAction) -------------------------------- +-- -- @function [parent=#FiniteTimeAction] reverse -- @param self -- @return FiniteTimeAction#FiniteTimeAction ret (return value: cc.FiniteTimeAction) diff --git a/cocos/scripting/lua-bindings/auto/api/FlipX.lua b/cocos/scripting/lua-bindings/auto/api/FlipX.lua index ab9ca2096d..530a3978cb 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipX.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipX.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- create the action -- @function [parent=#FlipX] create -- @param self --- @param #bool bool +-- @param #bool x -- @return FlipX#FlipX ret (return value: cc.FlipX) -------------------------------- +-- -- @function [parent=#FlipX] clone -- @param self -- @return FlipX#FlipX ret (return value: cc.FlipX) -------------------------------- +-- -- @function [parent=#FlipX] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#FlipX] reverse -- @param self -- @return FlipX#FlipX ret (return value: cc.FlipX) diff --git a/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua b/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua index 4823e905f5..b948ef4880 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua @@ -5,19 +5,22 @@ -- @parent_module cc -------------------------------- +-- creates the action with duration -- @function [parent=#FlipX3D] create -- @param self --- @param #float float +-- @param #float duration -- @return FlipX3D#FlipX3D ret (return value: cc.FlipX3D) -------------------------------- +-- -- @function [parent=#FlipX3D] clone -- @param self -- @return FlipX3D#FlipX3D ret (return value: cc.FlipX3D) -------------------------------- +-- -- @function [parent=#FlipX3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FlipY.lua b/cocos/scripting/lua-bindings/auto/api/FlipY.lua index bb8be4aa66..f0d76b4a1e 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipY.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipY.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- create the action -- @function [parent=#FlipY] create -- @param self --- @param #bool bool +-- @param #bool y -- @return FlipY#FlipY ret (return value: cc.FlipY) -------------------------------- +-- -- @function [parent=#FlipY] clone -- @param self -- @return FlipY#FlipY ret (return value: cc.FlipY) -------------------------------- +-- -- @function [parent=#FlipY] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#FlipY] reverse -- @param self -- @return FlipY#FlipY ret (return value: cc.FlipY) diff --git a/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua b/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua index dda47890cb..47b8104226 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua @@ -5,19 +5,22 @@ -- @parent_module cc -------------------------------- +-- creates the action with duration -- @function [parent=#FlipY3D] create -- @param self --- @param #float float +-- @param #float duration -- @return FlipY3D#FlipY3D ret (return value: cc.FlipY3D) -------------------------------- +-- -- @function [parent=#FlipY3D] clone -- @param self -- @return FlipY3D#FlipY3D ret (return value: cc.FlipY3D) -------------------------------- +-- -- @function [parent=#FlipY3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Follow.lua b/cocos/scripting/lua-bindings/auto/api/Follow.lua index ebc67f26dc..c4cc29986b 100644 --- a/cocos/scripting/lua-bindings/auto/api/Follow.lua +++ b/cocos/scripting/lua-bindings/auto/api/Follow.lua @@ -5,42 +5,53 @@ -- @parent_module cc -------------------------------- +-- alter behavior - turn on/off boundary -- @function [parent=#Follow] setBoudarySet -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- -- @function [parent=#Follow] isBoundarySet -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Creates the action with a set boundary or with no boundary.
+-- param followedNode The node to be followed.
+-- param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work
+-- with no boundary. -- @function [parent=#Follow] create -- @param self --- @param #cc.Node node +-- @param #cc.Node followedNode -- @param #rect_table rect -- @return Follow#Follow ret (return value: cc.Follow) -------------------------------- +-- -- @function [parent=#Follow] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Follow] clone -- @param self -- @return Follow#Follow ret (return value: cc.Follow) -------------------------------- +-- -- @function [parent=#Follow] stop -- @param self -------------------------------- +-- -- @function [parent=#Follow] reverse -- @param self -- @return Follow#Follow ret (return value: cc.Follow) -------------------------------- +-- -- @function [parent=#Follow] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/Frame.lua b/cocos/scripting/lua-bindings/auto/api/Frame.lua index e339312138..a2f7cb095d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Frame.lua +++ b/cocos/scripting/lua-bindings/auto/api/Frame.lua @@ -5,51 +5,61 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#Frame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#Frame] setNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#Frame] setTimeline -- @param self -- @param #ccs.Timeline timeline -------------------------------- +-- -- @function [parent=#Frame] getFrameIndex -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#Frame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#Frame] isTween -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Frame] setFrameIndex -- @param self --- @param #unsigned int int +-- @param #unsigned int frameIndex -------------------------------- +-- -- @function [parent=#Frame] setTween -- @param self --- @param #bool bool +-- @param #bool tween -------------------------------- +-- -- @function [parent=#Frame] getTimeline -- @param self -- @return Timeline#Timeline ret (return value: ccs.Timeline) -------------------------------- +-- -- @function [parent=#Frame] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) diff --git a/cocos/scripting/lua-bindings/auto/api/FrameData.lua b/cocos/scripting/lua-bindings/auto/api/FrameData.lua index 038aa1923b..3bc8f4334f 100644 --- a/cocos/scripting/lua-bindings/auto/api/FrameData.lua +++ b/cocos/scripting/lua-bindings/auto/api/FrameData.lua @@ -5,16 +5,19 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#FrameData] copy -- @param self --- @param #ccs.BaseData basedata +-- @param #ccs.BaseData baseData -------------------------------- +-- -- @function [parent=#FrameData] create -- @param self -- @return FrameData#FrameData ret (return value: ccs.FrameData) -------------------------------- +-- js ctor -- @function [parent=#FrameData] FrameData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgram.lua b/cocos/scripting/lua-bindings/auto/api/GLProgram.lua index 21a267ccf7..125f68811d 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgram.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgram.lua @@ -5,29 +5,34 @@ -- @parent_module cc -------------------------------- +-- returns the fragmentShader error log -- @function [parent=#GLProgram] getFragmentShaderLog -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#GLProgram] initWithByteArrays -- @param self --- @param #char char --- @param #char char +-- @param #char vShaderByteArray +-- @param #char fShaderByteArray -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#GLProgram] initWithFilenames -- @param self --- @param #string str --- @param #string str +-- @param #string vShaderFilename +-- @param #string fShaderFilename -- @return bool#bool ret (return value: bool) -------------------------------- +-- it will call glUseProgram() -- @function [parent=#GLProgram] use -- @param self -------------------------------- +-- returns the vertexShader error log -- @function [parent=#GLProgram] getVertexShaderLog -- @param self -- @return string#string ret (return value: string) @@ -37,54 +42,74 @@ -- @overload self -- @function [parent=#GLProgram] setUniformsForBuiltins -- @param self --- @param #mat4_table mat4 +-- @param #mat4_table modelView -------------------------------- +-- It will create 4 uniforms:
+-- - kUniformPMatrix
+-- - kUniformMVMatrix
+-- - kUniformMVPMatrix
+-- - GLProgram::UNIFORM_SAMPLER
+-- And it will bind "GLProgram::UNIFORM_SAMPLER" to 0 -- @function [parent=#GLProgram] updateUniforms -- @param self -------------------------------- +-- calls glUniform1i only if the values are different than the previous call for this same shader program.
+-- js setUniformLocationI32
+-- lua setUniformLocationI32 -- @function [parent=#GLProgram] setUniformLocationWith1i -- @param self --- @param #int int --- @param #int int +-- @param #int location +-- @param #int i1 -------------------------------- +-- -- @function [parent=#GLProgram] reset -- @param self -------------------------------- +-- It will add a new attribute to the shader by calling glBindAttribLocation -- @function [parent=#GLProgram] bindAttribLocation -- @param self --- @param #string str --- @param #unsigned int int +-- @param #string attributeName +-- @param #unsigned int index -------------------------------- +-- calls glGetAttribLocation -- @function [parent=#GLProgram] getAttribLocation -- @param self --- @param #string str +-- @param #string attributeName -- @return int#int ret (return value: int) -------------------------------- +-- links the glProgram -- @function [parent=#GLProgram] link -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Initializes the GLProgram with a vertex and fragment with bytes array
+-- js initWithString
+-- lua initWithString -- @function [parent=#GLProgram] createWithByteArrays -- @param self --- @param #char char --- @param #char char +-- @param #char vShaderByteArray +-- @param #char fShaderByteArray -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- Initializes the GLProgram with a vertex and fragment with contents of filenames
+-- js init
+-- lua init -- @function [parent=#GLProgram] createWithFilenames -- @param self --- @param #string str --- @param #string str +-- @param #string vShaderFilename +-- @param #string fShaderFilename -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- -- @function [parent=#GLProgram] GLProgram -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua b/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua index a7ddd24ba7..405063fd94 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua @@ -5,35 +5,42 @@ -- @parent_module cc -------------------------------- +-- adds a GLProgram to the cache for a given name -- @function [parent=#GLProgramCache] addGLProgram -- @param self --- @param #cc.GLProgram glprogram --- @param #string str +-- @param #cc.GLProgram program +-- @param #string key -------------------------------- +-- returns a GL program for a given key -- @function [parent=#GLProgramCache] getGLProgram -- @param self --- @param #string str +-- @param #string key -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- reload the default shaders -- @function [parent=#GLProgramCache] reloadDefaultGLPrograms -- @param self -------------------------------- +-- loads the default shaders -- @function [parent=#GLProgramCache] loadDefaultGLPrograms -- @param self -------------------------------- +-- purges the cache. It releases the retained instance. -- @function [parent=#GLProgramCache] destroyInstance -- @param self -------------------------------- +-- returns the shared instance -- @function [parent=#GLProgramCache] getInstance -- @param self -- @return GLProgramCache#GLProgramCache ret (return value: cc.GLProgramCache) -------------------------------- +-- js ctor -- @function [parent=#GLProgramCache] GLProgramCache -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua b/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua index 45e1e90168..0cd5f93193 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua @@ -11,32 +11,37 @@ -- @overload self, int, unsigned int -- @function [parent=#GLProgramState] setUniformTexture -- @param self --- @param #int int --- @param #unsigned int int +-- @param #int uniformLocation +-- @param #unsigned int textureId -------------------------------- -- @overload self, int, mat4_table -- @overload self, string, mat4_table -- @function [parent=#GLProgramState] setUniformMat4 -- @param self --- @param #string str --- @param #mat4_table mat4 +-- @param #string uniformName +-- @param #mat4_table value -------------------------------- +-- -- @function [parent=#GLProgramState] applyUniforms -- @param self -------------------------------- +-- -- @function [parent=#GLProgramState] applyGLProgram -- @param self --- @param #mat4_table mat4 +-- @param #mat4_table modelView -------------------------------- +-- -- @function [parent=#GLProgramState] getUniformCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- apply vertex attributes
+-- param applyAttribFlags Call GL::enableVertexAttribs(_vertexAttribsFlags) or not -- @function [parent=#GLProgramState] applyAttributes -- @param self @@ -45,26 +50,27 @@ -- @overload self, string, float -- @function [parent=#GLProgramState] setUniformFloat -- @param self --- @param #string str --- @param #float float +-- @param #string uniformName +-- @param #float value -------------------------------- -- @overload self, int, vec3_table -- @overload self, string, vec3_table -- @function [parent=#GLProgramState] setUniformVec3 -- @param self --- @param #string str --- @param #vec3_table vec3 +-- @param #string uniformName +-- @param #vec3_table value -------------------------------- -- @overload self, int, int -- @overload self, string, int -- @function [parent=#GLProgramState] setUniformInt -- @param self --- @param #string str --- @param #int int +-- @param #string uniformName +-- @param #int value -------------------------------- +-- -- @function [parent=#GLProgramState] getVertexAttribCount -- @param self -- @return long#long ret (return value: long) @@ -74,10 +80,11 @@ -- @overload self, string, vec4_table -- @function [parent=#GLProgramState] setUniformVec4 -- @param self --- @param #string str --- @param #vec4_table vec4 +-- @param #string uniformName +-- @param #vec4_table value -------------------------------- +-- -- @function [parent=#GLProgramState] setGLProgram -- @param self -- @param #cc.GLProgram glprogram @@ -87,37 +94,43 @@ -- @overload self, string, vec2_table -- @function [parent=#GLProgramState] setUniformVec2 -- @param self --- @param #string str --- @param #vec2_table vec2 +-- @param #string uniformName +-- @param #vec2_table value -------------------------------- +-- -- @function [parent=#GLProgramState] getVertexAttribsFlags -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#GLProgramState] apply -- @param self --- @param #mat4_table mat4 +-- @param #mat4_table modelView -------------------------------- +-- -- @function [parent=#GLProgramState] getGLProgram -- @param self -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- returns a new instance of GLProgramState for a given GLProgram -- @function [parent=#GLProgramState] create -- @param self -- @param #cc.GLProgram glprogram -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- +-- gets-or-creates an instance of GLProgramState for a given GLProgramName -- @function [parent=#GLProgramState] getOrCreateWithGLProgramName -- @param self --- @param #string str +-- @param #string glProgramName -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- +-- gets-or-creates an instance of GLProgramState for a given GLProgram -- @function [parent=#GLProgramState] getOrCreateWithGLProgram -- @param self -- @param #cc.GLProgram glprogram diff --git a/cocos/scripting/lua-bindings/auto/api/GLView.lua b/cocos/scripting/lua-bindings/auto/api/GLView.lua index fd42bfe851..85456927f0 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLView.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLView.lua @@ -5,163 +5,203 @@ -- @parent_module cc -------------------------------- +-- Set the frame size of EGL view. -- @function [parent=#GLView] setFrameSize -- @param self --- @param #float float --- @param #float float +-- @param #float width +-- @param #float height -------------------------------- +-- Get the opengl view port rectangle. -- @function [parent=#GLView] getViewPortRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- only works on ios platform -- @function [parent=#GLView] setContentScaleFactor -- @param self --- @param #float float +-- @param #float scaleFactor -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#GLView] getContentScaleFactor -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Open or close IME keyboard , subclass must implement this method. -- @function [parent=#GLView] setIMEKeyboardState -- @param self --- @param #bool bool +-- @param #bool open -------------------------------- +-- Set Scissor rectangle with points. -- @function [parent=#GLView] setScissorInPoints -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y +-- @param #float w +-- @param #float h -------------------------------- +-- -- @function [parent=#GLView] getViewName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Get whether opengl render system is ready, subclass must implement this method. -- @function [parent=#GLView] isOpenGLReady -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Force destroying EGL view, subclass must implement this method. -- @function [parent=#GLView] end -- @param self -------------------------------- +-- Get scale factor of the vertical direction. -- @function [parent=#GLView] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Get scale factor of the horizontal direction. -- @function [parent=#GLView] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Get the visible origin point of opengl viewport. -- @function [parent=#GLView] getVisibleOrigin -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Get the frame size of EGL view.
+-- In general, it returns the screen size since the EGL view is a fullscreen view. -- @function [parent=#GLView] getFrameSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Set and get zoom factor for frame. This two methods are for
+-- debugging big resolution (e.g.new ipad) app on desktop. -- @function [parent=#GLView] setFrameZoomFactor -- @param self --- @param #float float +-- @param #float zoomFactor -------------------------------- +-- -- @function [parent=#GLView] getFrameZoomFactor -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Get design resolution size.
+-- Default resolution size is the same as 'getFrameSize'. -- @function [parent=#GLView] getDesignResolutionSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#GLView] windowShouldClose -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Exchanges the front and back buffers, subclass must implement this method. -- @function [parent=#GLView] swapBuffers -- @param self -------------------------------- +-- Set the design resolution size.
+-- param width Design resolution width.
+-- param height Design resolution height.
+-- param resolutionPolicy The resolution policy desired, you may choose:
+-- [1] EXACT_FIT Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched.
+-- [2] NO_BORDER Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut.
+-- [3] SHOW_ALL Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown. -- @function [parent=#GLView] setDesignResolutionSize -- @param self --- @param #float float --- @param #float float --- @param #int resolutionpolicy +-- @param #float width +-- @param #float height +-- @param #int resolutionPolicy -------------------------------- +-- returns the current Resolution policy -- @function [parent=#GLView] getResolutionPolicy -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- returns whether or not the view is in Retina Display mode -- @function [parent=#GLView] isRetinaDisplay -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Set opengl view port rectangle with points. -- @function [parent=#GLView] setViewPortInPoints -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y +-- @param #float w +-- @param #float h -------------------------------- +-- Get the current scissor rectangle -- @function [parent=#GLView] getScissorRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Get retina factor -- @function [parent=#GLView] getRetinaFactor -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#GLView] setViewName -- @param self --- @param #string str +-- @param #string viewname -------------------------------- +-- Get the visible rectangle of opengl viewport. -- @function [parent=#GLView] getVisibleRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Get the visible area size of opengl viewport. -- @function [parent=#GLView] getVisibleSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Get whether GL_SCISSOR_TEST is enable -- @function [parent=#GLView] isScissorEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#GLView] pollEvents -- @param self -------------------------------- +-- -- @function [parent=#GLView] setGLContextAttrs -- @param self --- @param #GLContextAttrs glcontextattrs +-- @param #GLContextAttrs glContextAttrs -------------------------------- +-- -- @function [parent=#GLView] getGLContextAttrs -- @param self -- @return GLContextAttrs#GLContextAttrs ret (return value: GLContextAttrs) diff --git a/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua b/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua index 37b80b7f7e..433292ff64 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua @@ -5,31 +5,36 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#GLViewImpl] createWithRect -- @param self --- @param #string str +-- @param #string viewName -- @param #rect_table rect --- @param #float float +-- @param #float frameZoomFactor -- @return GLViewImpl#GLViewImpl ret (return value: cc.GLViewImpl) -------------------------------- +-- -- @function [parent=#GLViewImpl] create -- @param self --- @param #string str +-- @param #string viewname -- @return GLViewImpl#GLViewImpl ret (return value: cc.GLViewImpl) -------------------------------- +-- -- @function [parent=#GLViewImpl] createWithFullScreen -- @param self --- @param #string str +-- @param #string viewName -- @return GLViewImpl#GLViewImpl ret (return value: cc.GLViewImpl) -------------------------------- +-- -- @function [parent=#GLViewImpl] setIMEKeyboardState -- @param self --- @param #bool bool +-- @param #bool bOpen -------------------------------- +-- -- @function [parent=#GLViewImpl] isOpenGLReady -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/GUIReader.lua b/cocos/scripting/lua-bindings/auto/api/GUIReader.lua index b32f8d0270..cd73bb0fce 100644 --- a/cocos/scripting/lua-bindings/auto/api/GUIReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/GUIReader.lua @@ -5,38 +5,45 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#GUIReader] setFilePath -- @param self --- @param #string str +-- @param #string strFilePath -------------------------------- +-- -- @function [parent=#GUIReader] widgetFromJsonFile -- @param self --- @param #char char +-- @param #char fileName -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- -- @function [parent=#GUIReader] getFilePath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#GUIReader] widgetFromBinaryFile -- @param self --- @param #char char +-- @param #char fileName -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- -- @function [parent=#GUIReader] getVersionInteger -- @param self --- @param #char char +-- @param #char str -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#GUIReader] destroyInstance -- @param self -------------------------------- +-- -- @function [parent=#GUIReader] getInstance -- @param self -- @return GUIReader#GUIReader ret (return value: ccs.GUIReader) diff --git a/cocos/scripting/lua-bindings/auto/api/Grid3D.lua b/cocos/scripting/lua-bindings/auto/api/Grid3D.lua index 8adbad9174..b20675bf6f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Grid3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Grid3D.lua @@ -9,24 +9,28 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#Grid3D] create -- @param self --- @param #size_table size --- @param #cc.Texture2D texture2d --- @param #bool bool +-- @param #size_table gridSize +-- @param #cc.Texture2D texture +-- @param #bool flipped -- @return Grid3D#Grid3D ret (retunr value: cc.Grid3D) -------------------------------- +-- -- @function [parent=#Grid3D] calculateVertexPoints -- @param self -------------------------------- +-- -- @function [parent=#Grid3D] blit -- @param self -------------------------------- +-- -- @function [parent=#Grid3D] reuse -- @param self -------------------------------- +-- js ctor -- @function [parent=#Grid3D] Grid3D -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua b/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua index 5863941c70..d4dec67c66 100644 --- a/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- returns the grid -- @function [parent=#Grid3DAction] getGrid -- @param self -- @return GridBase#GridBase ret (return value: cc.GridBase) -------------------------------- +-- -- @function [parent=#Grid3DAction] clone -- @param self -- @return Grid3DAction#Grid3DAction ret (return value: cc.Grid3DAction) diff --git a/cocos/scripting/lua-bindings/auto/api/GridAction.lua b/cocos/scripting/lua-bindings/auto/api/GridAction.lua index 4f6abb4c43..b9d8e572bc 100644 --- a/cocos/scripting/lua-bindings/auto/api/GridAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/GridAction.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- returns the grid -- @function [parent=#GridAction] getGrid -- @param self -- @return GridBase#GridBase ret (return value: cc.GridBase) -------------------------------- +-- -- @function [parent=#GridAction] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#GridAction] clone -- @param self -- @return GridAction#GridAction ret (return value: cc.GridAction) -------------------------------- +-- -- @function [parent=#GridAction] reverse -- @param self -- @return GridAction#GridAction ret (return value: cc.GridAction) diff --git a/cocos/scripting/lua-bindings/auto/api/GridBase.lua b/cocos/scripting/lua-bindings/auto/api/GridBase.lua index e42656495f..bfea6b3f12 100644 --- a/cocos/scripting/lua-bindings/auto/api/GridBase.lua +++ b/cocos/scripting/lua-bindings/auto/api/GridBase.lua @@ -5,62 +5,75 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#GridBase] setGridSize -- @param self --- @param #size_table size +-- @param #size_table gridSize -------------------------------- +-- -- @function [parent=#GridBase] calculateVertexPoints -- @param self -------------------------------- +-- -- @function [parent=#GridBase] afterDraw -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#GridBase] beforeDraw -- @param self -------------------------------- +-- is texture flipped -- @function [parent=#GridBase] isTextureFlipped -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- size of the grid -- @function [parent=#GridBase] getGridSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- pixels between the grids -- @function [parent=#GridBase] getStep -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#GridBase] set2DProjection -- @param self -------------------------------- +-- -- @function [parent=#GridBase] setStep -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table step -------------------------------- +-- -- @function [parent=#GridBase] setTextureFlipped -- @param self --- @param #bool bool +-- @param #bool flipped -------------------------------- +-- -- @function [parent=#GridBase] blit -- @param self -------------------------------- +-- -- @function [parent=#GridBase] setActive -- @param self --- @param #bool bool +-- @param #bool active -------------------------------- +-- number of times that the grid will be reused -- @function [parent=#GridBase] getReuseGrid -- @param self -- @return int#int ret (return value: int) @@ -70,22 +83,25 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#GridBase] initWithSize -- @param self --- @param #size_table size --- @param #cc.Texture2D texture2d --- @param #bool bool +-- @param #size_table gridSize +-- @param #cc.Texture2D texture +-- @param #bool flipped -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#GridBase] setReuseGrid -- @param self --- @param #int int +-- @param #int reuseGrid -------------------------------- +-- whether or not the grid is active -- @function [parent=#GridBase] isActive -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#GridBase] reuse -- @param self @@ -94,9 +110,9 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#GridBase] create -- @param self --- @param #size_table size --- @param #cc.Texture2D texture2d --- @param #bool bool +-- @param #size_table gridSize +-- @param #cc.Texture2D texture +-- @param #bool flipped -- @return GridBase#GridBase ret (retunr value: cc.GridBase) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/HBox.lua b/cocos/scripting/lua-bindings/auto/api/HBox.lua index 54ce53f9e3..cec73b279a 100644 --- a/cocos/scripting/lua-bindings/auto/api/HBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/HBox.lua @@ -13,6 +13,7 @@ -- @return HBox#HBox ret (retunr value: ccui.HBox) -------------------------------- +-- Default constructor -- @function [parent=#HBox] HBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Helper.lua b/cocos/scripting/lua-bindings/auto/api/Helper.lua index f7d6579957..539ae88abb 100644 --- a/cocos/scripting/lua-bindings/auto/api/Helper.lua +++ b/cocos/scripting/lua-bindings/auto/api/Helper.lua @@ -4,32 +4,46 @@ -- @parent_module ccui -------------------------------- +-- brief Get a UTF8 substring from a std::string with a given start position and length
+-- Sample: std::string str = "中国中国中国”; substr = getSubStringOfUTF8String(str,0,2) will = "中国"
+-- param start The start position of the substring.
+-- param length The length of the substring in UTF8 count
+-- return a UTF8 substring -- @function [parent=#Helper] getSubStringOfUTF8String -- @param self -- @param #string str --- @param #unsigned long long --- @param #unsigned long long +-- @param #unsigned long start +-- @param #unsigned long length -- @return string#string ret (return value: string) -------------------------------- +-- Finds a widget whose tag equals to param tag from root widget.
+-- param root widget which will be seeked.
+-- tag tag value.
+-- return finded result. -- @function [parent=#Helper] seekWidgetByTag -- @param self --- @param #ccui.Widget widget --- @param #int int +-- @param #ccui.Widget root +-- @param #int tag -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- -- @function [parent=#Helper] seekActionWidgetByActionTag -- @param self --- @param #ccui.Widget widget --- @param #int int +-- @param #ccui.Widget root +-- @param #int tag -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- Finds a widget whose name equals to param name from root widget.
+-- param root widget which will be seeked.
+-- name name value.
+-- return finded result. -- @function [parent=#Helper] seekWidgetByName -- @param self --- @param #ccui.Widget widget --- @param #string str +-- @param #ccui.Widget root +-- @param #string name -- @return Widget#Widget ret (return value: ccui.Widget) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Hide.lua b/cocos/scripting/lua-bindings/auto/api/Hide.lua index b40dbd8ea7..4aa81b057e 100644 --- a/cocos/scripting/lua-bindings/auto/api/Hide.lua +++ b/cocos/scripting/lua-bindings/auto/api/Hide.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- Allocates and initializes the action -- @function [parent=#Hide] create -- @param self -- @return Hide#Hide ret (return value: cc.Hide) -------------------------------- +-- -- @function [parent=#Hide] clone -- @param self -- @return Hide#Hide ret (return value: cc.Hide) -------------------------------- +-- -- @function [parent=#Hide] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#Hide] reverse -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) diff --git a/cocos/scripting/lua-bindings/auto/api/Image.lua b/cocos/scripting/lua-bindings/auto/api/Image.lua index 4ce6cd8d50..bc93b29571 100644 --- a/cocos/scripting/lua-bindings/auto/api/Image.lua +++ b/cocos/scripting/lua-bindings/auto/api/Image.lua @@ -5,69 +5,89 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Image] hasPremultipliedAlpha -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief Save Image data to the specified file, with specified format.
+-- param filePath the file's absolute path, including file suffix.
+-- param isToRGB whether the image is saved as RGB format. -- @function [parent=#Image] saveToFile -- @param self --- @param #string str --- @param #bool bool +-- @param #string filename +-- @param #bool isToRGB -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Image] hasAlpha -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Image] isCompressed -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Image] getHeight -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- brief Load the image from the specified path.
+-- param path the absolute file path.
+-- return true if loaded correctly. -- @function [parent=#Image] initWithImageFile -- @param self --- @param #string str +-- @param #string path -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Image] getWidth -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Image] getBitPerPixel -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Image] getFileType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Image] getNumberOfMipmaps -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Image] getRenderFormat -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- treats (or not) PVR files as if they have alpha premultiplied.
+-- Since it is impossible to know at runtime if the PVR images have the alpha channel premultiplied, it is
+-- possible load them as if they have (or not) the alpha channel premultiplied.
+-- By default it is disabled. -- @function [parent=#Image] setPVRImagesHavePremultipliedAlpha -- @param self --- @param #bool bool +-- @param #bool haveAlphaPremultiplied -------------------------------- +-- js ctor -- @function [parent=#Image] Image -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ImageView.lua b/cocos/scripting/lua-bindings/auto/api/ImageView.lua index 395449e067..6bfec98e56 100644 --- a/cocos/scripting/lua-bindings/auto/api/ImageView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ImageView.lua @@ -5,32 +5,43 @@ -- @parent_module ccui -------------------------------- +-- Load texture for imageview.
+-- param fileName file name of texture.
+-- param texType @see TextureResType -- @function [parent=#ImageView] loadTexture -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string fileName +-- @param #int texType -------------------------------- +-- Sets if imageview is using scale9 renderer.
+-- param able true that using scale9 renderer, false otherwise. -- @function [parent=#ImageView] setScale9Enabled -- @param self --- @param #bool bool +-- @param #bool able -------------------------------- +-- Updates the texture rect of the ImageView in points.
+-- It will call setTextureRect:rotated:untrimmedSize with rotated = NO, and utrimmedSize = rect.size. -- @function [parent=#ImageView] setTextureRect -- @param self -- @param #rect_table rect -------------------------------- +-- Sets capinsets for imageview, if imageview is using scale9 renderer.
+-- param capInsets capinsets for imageview -- @function [parent=#ImageView] setCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- -- @function [parent=#ImageView] getCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#ImageView] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) @@ -40,36 +51,42 @@ -- @overload self -- @function [parent=#ImageView] create -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string imageFileName +-- @param #int texType -- @return ImageView#ImageView ret (retunr value: ccui.ImageView) -------------------------------- +-- -- @function [parent=#ImageView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#ImageView] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#ImageView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ImageView] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#ImageView] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- Default constructor -- @function [parent=#ImageView] ImageView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua b/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua index 5de5259f53..1ca735b5ef 100644 --- a/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua @@ -5,36 +5,43 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#InnerActionFrame] getInnerActionType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#InnerActionFrame] setStartFrameIndex -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- -- @function [parent=#InnerActionFrame] setInnerActionType -- @param self --- @param #int inneractiontype +-- @param #int type -------------------------------- +-- -- @function [parent=#InnerActionFrame] getStartFrameIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#InnerActionFrame] create -- @param self -- @return InnerActionFrame#InnerActionFrame ret (return value: ccs.InnerActionFrame) -------------------------------- +-- -- @function [parent=#InnerActionFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#InnerActionFrame] InnerActionFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/JumpBy.lua b/cocos/scripting/lua-bindings/auto/api/JumpBy.lua index d507b67485..14eb4a8885 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpBy.lua @@ -5,32 +5,37 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#JumpBy] create -- @param self --- @param #float float --- @param #vec2_table vec2 --- @param #float float --- @param #int int +-- @param #float duration +-- @param #vec2_table position +-- @param #float height +-- @param #int jumps -- @return JumpBy#JumpBy ret (return value: cc.JumpBy) -------------------------------- +-- -- @function [parent=#JumpBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#JumpBy] clone -- @param self -- @return JumpBy#JumpBy ret (return value: cc.JumpBy) -------------------------------- +-- -- @function [parent=#JumpBy] reverse -- @param self -- @return JumpBy#JumpBy ret (return value: cc.JumpBy) -------------------------------- +-- -- @function [parent=#JumpBy] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua index 53c834be5b..dd54c6becf 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- amplitude rate -- @function [parent=#JumpTiles3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#JumpTiles3D] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- -- @function [parent=#JumpTiles3D] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- amplitude of the sin -- @function [parent=#JumpTiles3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- creates the action with the number of jumps, the sin amplitude, the grid size and the duration -- @function [parent=#JumpTiles3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int numberOfJumps +-- @param #float amplitude -- @return JumpTiles3D#JumpTiles3D ret (return value: cc.JumpTiles3D) -------------------------------- +-- -- @function [parent=#JumpTiles3D] clone -- @param self -- @return JumpTiles3D#JumpTiles3D ret (return value: cc.JumpTiles3D) -------------------------------- +-- -- @function [parent=#JumpTiles3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/JumpTo.lua b/cocos/scripting/lua-bindings/auto/api/JumpTo.lua index d2e4081e8d..daeb353815 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpTo.lua @@ -5,25 +5,29 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#JumpTo] create -- @param self --- @param #float float --- @param #vec2_table vec2 --- @param #float float --- @param #int int +-- @param #float duration +-- @param #vec2_table position +-- @param #float height +-- @param #int jumps -- @return JumpTo#JumpTo ret (return value: cc.JumpTo) -------------------------------- +-- -- @function [parent=#JumpTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#JumpTo] clone -- @param self -- @return JumpTo#JumpTo ret (return value: cc.JumpTo) -------------------------------- +-- -- @function [parent=#JumpTo] reverse -- @param self -- @return JumpTo#JumpTo ret (return value: cc.JumpTo) diff --git a/cocos/scripting/lua-bindings/auto/api/Label.lua b/cocos/scripting/lua-bindings/auto/api/Label.lua index 52319e86ec..ccd1e9e660 100644 --- a/cocos/scripting/lua-bindings/auto/api/Label.lua +++ b/cocos/scripting/lua-bindings/auto/api/Label.lua @@ -5,123 +5,157 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Label] isClipMarginEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Enable shadow for the label
+-- todo support blur for shadow effect -- @function [parent=#Label] enableShadow -- @param self -------------------------------- +-- Sets the untransformed size of the label in a more efficient way. -- @function [parent=#Label] setDimensions -- @param self --- @param #unsigned int int --- @param #unsigned int int +-- @param #unsigned int width +-- @param #unsigned int height -------------------------------- +-- -- @function [parent=#Label] getString -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Label] getHeight -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- disable shadow/outline/glow rendering -- @function [parent=#Label] disableEffect -- @param self -------------------------------- +-- set TTF configuration for Label -- @function [parent=#Label] setTTFConfig -- @param self --- @param #cc._ttfConfig _ttfconfig +-- @param #cc._ttfConfig ttfConfig -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the text color of this label
+-- Only support for TTF and system font
+-- warning Different from the color of Node. -- @function [parent=#Label] getTextColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- +-- Sets the untransformed size of the label.
+-- The label's width be used for text align if the set value not equal zero.
+-- The label's max line width will be equal to the same value. -- @function [parent=#Label] setWidth -- @param self --- @param #unsigned int int +-- @param #unsigned int width -------------------------------- +-- -- @function [parent=#Label] getMaxLineWidth -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#Label] getHorizontalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- clip upper and lower margin for reduce height of label. -- @function [parent=#Label] setClipMarginEnabled -- @param self --- @param #bool bool +-- @param #bool clipEnabled -------------------------------- +-- changes the string to render
+-- warning It is as expensive as changing the string if you haven't set up TTF/BMFont/CharMap for the label. -- @function [parent=#Label] setString -- @param self --- @param #string str +-- @param #string text -------------------------------- +-- -- @function [parent=#Label] setSystemFontName -- @param self --- @param #string str +-- @param #string systemFont -------------------------------- +-- -- @function [parent=#Label] setBMFontFilePath -- @param self --- @param #string str --- @param #vec2_table vec2 +-- @param #string bmfontFilePath +-- @param #vec2_table imageOffset -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Label] getFontAtlas -- @param self -- @return FontAtlas#FontAtlas ret (return value: cc.FontAtlas) -------------------------------- +-- Sets the line height of the label
+-- warning Not support system font
+-- since v3.2.0 -- @function [parent=#Label] setLineHeight -- @param self --- @param #float float +-- @param #float height -------------------------------- +-- -- @function [parent=#Label] setSystemFontSize -- @param self --- @param #float float +-- @param #float fontSize -------------------------------- +-- update content immediately. -- @function [parent=#Label] updateContent -- @param self -------------------------------- +-- -- @function [parent=#Label] getStringLength -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Label] setLineBreakWithoutSpace -- @param self --- @param #bool bool +-- @param #bool breakWithoutSpace -------------------------------- +-- -- @function [parent=#Label] getStringNumLines -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- only support for TTF -- @function [parent=#Label] enableOutline -- @param self --- @param #color4b_table color4b --- @param #int int +-- @param #color4b_table outlineColor +-- @param #int outlineSize -------------------------------- +-- Returns the additional kerning of this label
+-- warning Not support system font
+-- since v3.2.0 -- @function [parent=#Label] getAdditionalKerning -- @param self -- @return float#float ret (return value: float) @@ -132,117 +166,145 @@ -- @overload self, string -- @function [parent=#Label] setCharMap -- @param self --- @param #string str --- @param #int int --- @param #int int --- @param #int int +-- @param #string charMapFile +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #int startCharMap -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Label] getDimensions -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Sets the max line width of the label.
+-- The label's max line width be used for force line breaks if the set value not equal zero.
+-- The label's width and max line width has not always to be equal. -- @function [parent=#Label] setMaxLineWidth -- @param self --- @param #unsigned int int +-- @param #unsigned int maxLineWidth -------------------------------- +-- -- @function [parent=#Label] getSystemFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Label] setVerticalAlignment -- @param self --- @param #int textvalignment +-- @param #int vAlignment -------------------------------- +-- Returns the line height of this label
+-- warning Not support system font -- @function [parent=#Label] getLineHeight -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Label] getTTFConfig -- @param self -- @return _ttfConfig#_ttfConfig ret (return value: cc._ttfConfig) -------------------------------- +-- -- @function [parent=#Label] getVerticalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Sets the text color of the label
+-- Only support for TTF and system font
+-- warning Different from the color of Node. -- @function [parent=#Label] setTextColor -- @param self --- @param #color4b_table color4b +-- @param #color4b_table color -------------------------------- +-- Sets the untransformed size of the label.
+-- The label's height be used for text align if the set value not equal zero.
+-- The text will display of incomplete when the size of label not enough to support display all text. -- @function [parent=#Label] setHeight -- @param self --- @param #unsigned int int +-- @param #unsigned int height -------------------------------- +-- -- @function [parent=#Label] getWidth -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- only support for TTF -- @function [parent=#Label] enableGlow -- @param self --- @param #color4b_table color4b +-- @param #color4b_table glowColor -------------------------------- +-- -- @function [parent=#Label] getLetter -- @param self --- @param #int int +-- @param #int lettetIndex -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- Sets the additional kerning of the label
+-- warning Not support system font
+-- since v3.2.0 -- @function [parent=#Label] setAdditionalKerning -- @param self --- @param #float float +-- @param #float space -------------------------------- +-- -- @function [parent=#Label] getSystemFontSize -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Label] getTextAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Label] getBMFontFilePath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Label] setHorizontalAlignment -- @param self --- @param #int texthalignment +-- @param #int hAlignment -------------------------------- -- @overload self, int, int -- @overload self, int -- @function [parent=#Label] setAlignment -- @param self --- @param #int texthalignment --- @param #int textvalignment +-- @param #int hAlignment +-- @param #int vAlignment -------------------------------- +-- -- @function [parent=#Label] createWithBMFont -- @param self --- @param #string str --- @param #string str --- @param #int texthalignment --- @param #int int --- @param #vec2_table vec2 +-- @param #string bmfontFilePath +-- @param #string text +-- @param #int alignment +-- @param #int maxLineWidth +-- @param #vec2_table imageOffset -- @return Label#Label ret (return value: cc.Label) -------------------------------- +-- -- @function [parent=#Label] create -- @param self -- @return Label#Label ret (return value: cc.Label) @@ -253,111 +315,130 @@ -- @overload self, string -- @function [parent=#Label] createWithCharMap -- @param self --- @param #string str --- @param #int int --- @param #int int --- @param #int int +-- @param #string charMapFile +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #int startCharMap -- @return Label#Label ret (retunr value: cc.Label) -------------------------------- +-- Creates a label with an initial string,font[font name or font file],font size, dimension in points, horizontal alignment and vertical alignment.
+-- warning It will generate texture by the platform-dependent code -- @function [parent=#Label] createWithSystemFont -- @param self --- @param #string str --- @param #string str --- @param #float float --- @param #size_table size --- @param #int texthalignment --- @param #int textvalignment +-- @param #string text +-- @param #string font +-- @param #float fontSize +-- @param #size_table dimensions +-- @param #int hAlignment +-- @param #int vAlignment -- @return Label#Label ret (return value: cc.Label) -------------------------------- +-- -- @function [parent=#Label] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#Label] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#Label] setScaleY -- @param self --- @param #float float +-- @param #float scaleY -------------------------------- +-- -- @function [parent=#Label] setScaleX -- @param self --- @param #float float +-- @param #float scaleX -------------------------------- +-- -- @function [parent=#Label] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Label] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Label] setBlendFunc -- @param self --- @param #cc.BlendFunc blendfunc +-- @param #cc.BlendFunc blendFunc -------------------------------- +-- -- @function [parent=#Label] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#Label] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Label] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Label] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool isOpacityModifyRGB -------------------------------- +-- -- @function [parent=#Label] setScale -- @param self --- @param #float float +-- @param #float scale -------------------------------- +-- -- @function [parent=#Label] sortAllChildren -- @param self -------------------------------- +-- -- @function [parent=#Label] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- -- @function [parent=#Label] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Label] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Label] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor return nil diff --git a/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua b/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua index 50753ea4c0..53d042dc5f 100644 --- a/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua +++ b/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#LabelAtlas] setString -- @param self --- @param #string str +-- @param #string label -------------------------------- -- @overload self, string, string @@ -15,18 +16,20 @@ -- @overload self, string, cc.Texture2D, int, int, int -- @function [parent=#LabelAtlas] initWithString -- @param self --- @param #string str --- @param #cc.Texture2D texture2d --- @param #int int --- @param #int int --- @param #int int +-- @param #string string +-- @param #cc.Texture2D texture +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #int startCharMap -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#LabelAtlas] updateAtlasValues -- @param self -------------------------------- +-- -- @function [parent=#LabelAtlas] getString -- @param self -- @return string#string ret (return value: string) @@ -37,14 +40,15 @@ -- @overload self, string, string -- @function [parent=#LabelAtlas] create -- @param self --- @param #string str --- @param #string str --- @param #int int --- @param #int int --- @param #int int +-- @param #string string +-- @param #string charMapFile +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #int startCharMap -- @return LabelAtlas#LabelAtlas ret (retunr value: cc.LabelAtlas) -------------------------------- +-- -- @function [parent=#LabelAtlas] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/Layer.lua b/cocos/scripting/lua-bindings/auto/api/Layer.lua index 8918c08dbe..cca3874464 100644 --- a/cocos/scripting/lua-bindings/auto/api/Layer.lua +++ b/cocos/scripting/lua-bindings/auto/api/Layer.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- creates a fullscreen black layer -- @function [parent=#Layer] create -- @param self -- @return Layer#Layer ret (return value: cc.Layer) -------------------------------- +-- -- @function [parent=#Layer] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/LayerColor.lua b/cocos/scripting/lua-bindings/auto/api/LayerColor.lua index 6a190c9eb1..c4cdc21e89 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerColor.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerColor.lua @@ -5,20 +5,24 @@ -- @parent_module cc -------------------------------- +-- change width and height in Points
+-- since v0.8 -- @function [parent=#LayerColor] changeWidthAndHeight -- @param self --- @param #float float --- @param #float float +-- @param #float w +-- @param #float h -------------------------------- +-- change height in Points -- @function [parent=#LayerColor] changeHeight -- @param self --- @param #float float +-- @param #float h -------------------------------- +-- change width in Points -- @function [parent=#LayerColor] changeWidth -- @param self --- @param #float float +-- @param #float w -------------------------------- -- @overload self, color4b_table, float, float @@ -26,26 +30,29 @@ -- @overload self, color4b_table -- @function [parent=#LayerColor] create -- @param self --- @param #color4b_table color4b --- @param #float float --- @param #float float +-- @param #color4b_table color +-- @param #float width +-- @param #float height -- @return LayerColor#LayerColor ret (retunr value: cc.LayerColor) -------------------------------- +-- -- @function [parent=#LayerColor] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#LayerColor] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#LayerColor] setContentSize -- @param self --- @param #size_table size +-- @param #size_table var return nil diff --git a/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua b/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua index 8f18269408..fda8a00876 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua @@ -5,64 +5,78 @@ -- @parent_module cc -------------------------------- +-- Returns the start color of the gradient -- @function [parent=#LayerGradient] getStartColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#LayerGradient] isCompressedInterpolation -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the start opacity of the gradient -- @function [parent=#LayerGradient] getStartOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- Sets the directional vector that will be used for the gradient.
+-- The default value is vertical direction (0,-1). -- @function [parent=#LayerGradient] setVector -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table alongVector -------------------------------- +-- Returns the start opacity of the gradient -- @function [parent=#LayerGradient] setStartOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char startOpacity -------------------------------- +-- Whether or not the interpolation will be compressed in order to display all the colors of the gradient both in canonical and non canonical vectors
+-- Default: true -- @function [parent=#LayerGradient] setCompressedInterpolation -- @param self --- @param #bool bool +-- @param #bool compressedInterpolation -------------------------------- +-- Returns the end opacity of the gradient -- @function [parent=#LayerGradient] setEndOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char endOpacity -------------------------------- +-- Returns the directional vector used for the gradient -- @function [parent=#LayerGradient] getVector -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Sets the end color of the gradient -- @function [parent=#LayerGradient] setEndColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table endColor -------------------------------- +-- Returns the end color of the gradient -- @function [parent=#LayerGradient] getEndColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Returns the end opacity of the gradient -- @function [parent=#LayerGradient] getEndOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- Sets the start color of the gradient -- @function [parent=#LayerGradient] setStartColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table startColor -------------------------------- -- @overload self, color4b_table, color4b_table @@ -70,12 +84,13 @@ -- @overload self, color4b_table, color4b_table, vec2_table -- @function [parent=#LayerGradient] create -- @param self --- @param #color4b_table color4b --- @param #color4b_table color4b --- @param #vec2_table vec2 +-- @param #color4b_table start +-- @param #color4b_table end +-- @param #vec2_table v -- @return LayerGradient#LayerGradient ret (retunr value: cc.LayerGradient) -------------------------------- +-- -- @function [parent=#LayerGradient] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua b/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua index 3f577da04d..b413d3dd25 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua @@ -5,21 +5,27 @@ -- @parent_module cc -------------------------------- +-- release the current layer and switches to another layer indexed by n.
+-- The current (old) layer will be removed from it's parent with 'cleanup=true'. -- @function [parent=#LayerMultiplex] switchToAndReleaseMe -- @param self --- @param #int int +-- @param #int n -------------------------------- +-- -- @function [parent=#LayerMultiplex] addLayer -- @param self -- @param #cc.Layer layer -------------------------------- +-- switches to a certain layer indexed by n.
+-- The current (old) layer will be removed from it's parent with 'cleanup=true'. -- @function [parent=#LayerMultiplex] switchTo -- @param self --- @param #int int +-- @param #int n -------------------------------- +-- -- @function [parent=#LayerMultiplex] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/Layout.lua b/cocos/scripting/lua-bindings/auto/api/Layout.lua index fc0c574ce7..4612380c7a 100644 --- a/cocos/scripting/lua-bindings/auto/api/Layout.lua +++ b/cocos/scripting/lua-bindings/auto/api/Layout.lua @@ -5,177 +5,223 @@ -- @parent_module ccui -------------------------------- +-- Sets background color vector for layout, if color type is BackGroundColorType::GRADIENT
+-- param vector -- @function [parent=#Layout] setBackGroundColorVector -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table vector -------------------------------- +-- -- @function [parent=#Layout] setClippingType -- @param self --- @param #int clippingtype +-- @param #int type -------------------------------- +-- Sets Color Type for layout.
+-- param type @see LayoutBackGroundColorType. -- @function [parent=#Layout] setBackGroundColorType -- @param self --- @param #int backgroundcolortype +-- @param #int type -------------------------------- +-- If a layout is loop focused which means that the focus movement will be inside the layout
+-- param loop pass true to let the focus movement loop inside the layout -- @function [parent=#Layout] setLoopFocus -- @param self --- @param #bool bool +-- @param #bool loop -------------------------------- +-- -- @function [parent=#Layout] setBackGroundImageColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- -- @function [parent=#Layout] getBackGroundColorVector -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Layout] getClippingType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- return If focus loop is enabled, then it will return true, otherwise it returns false. The default value is false. -- @function [parent=#Layout] isLoopFocus -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Remove the background image of layout. -- @function [parent=#Layout] removeBackGroundImage -- @param self -------------------------------- +-- -- @function [parent=#Layout] getBackGroundColorOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- Gets if layout is clipping enabled.
+-- return if layout is clipping enabled. -- @function [parent=#Layout] isClippingEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Layout] setBackGroundImageOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity -------------------------------- +-- Sets a background image for layout
+-- param fileName image file path.
+-- param texType @see TextureResType. TextureResType::LOCAL means local file, TextureResType::PLIST means sprite frame. -- @function [parent=#Layout] setBackGroundImage -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string fileName +-- @param #int texType -------------------------------- -- @overload self, color3b_table, color3b_table -- @overload self, color3b_table -- @function [parent=#Layout] setBackGroundColor -- @param self --- @param #color3b_table color3b --- @param #color3b_table color3b +-- @param #color3b_table startColor +-- @param #color3b_table endColor -------------------------------- +-- request to refresh widget layout -- @function [parent=#Layout] requestDoLayout -- @param self -------------------------------- +-- -- @function [parent=#Layout] getBackGroundImageCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Layout] getBackGroundColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Changes if layout can clip it's content and child.
+-- If you really need this, please enable it. But it would reduce the rendering efficiency.
+-- param clipping enabled. -- @function [parent=#Layout] setClippingEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#Layout] getBackGroundImageColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#Layout] isBackGroundImageScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Layout] getBackGroundColorType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Layout] getBackGroundEndColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Sets background opacity layout.
+-- param opacity -- @function [parent=#Layout] setBackGroundColorOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity -------------------------------- +-- -- @function [parent=#Layout] getBackGroundImageOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- return To query whether the layout will pass the focus to its children or not. The default value is true -- @function [parent=#Layout] isPassFocusToChild -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets a background image capinsets for layout, if the background image is a scale9 render.
+-- param capinsets of background image. -- @function [parent=#Layout] setBackGroundImageCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Gets background image texture size.
+-- return background image texture size. -- @function [parent=#Layout] getBackGroundImageTextureSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- force refresh widget layout -- @function [parent=#Layout] forceDoLayout -- @param self -------------------------------- +-- -- @function [parent=#Layout] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- param pass To specify whether the layout pass its focus to its child -- @function [parent=#Layout] setPassFocusToChild -- @param self --- @param #bool bool +-- @param #bool pass -------------------------------- +-- -- @function [parent=#Layout] getBackGroundStartColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Sets background iamge use scale9 renderer.
+-- param enabled true that use scale9 renderer, false otherwise. -- @function [parent=#Layout] setBackGroundImageScale9Enabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#Layout] setLayoutType -- @param self -- @param #int type -------------------------------- +-- Allocates and initializes a layout. -- @function [parent=#Layout] create -- @param self -- @return Layout#Layout ret (return value: ccui.Layout) -------------------------------- +-- -- @function [parent=#Layout] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) @@ -187,38 +233,52 @@ -- @overload self, cc.Node, int, string -- @function [parent=#Layout] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #string str +-- @param #cc.Node child +-- @param #int zOrder +-- @param #string name -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#Layout] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
+-- param cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
+-- js removeAllChildren
+-- lua removeAllChildren -- @function [parent=#Layout] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- Removes all children from the container with a cleanup.
+-- see `removeAllChildrenWithCleanup(bool)` -- @function [parent=#Layout] removeAllChildren -- @param self -------------------------------- +-- When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
+-- If the widget is not in a layout, it will return itself
+-- param dir the direction to look for the next focused widget in a layout
+-- param current the current focused widget
+-- return the next focused widget in a layout -- @function [parent=#Layout] findNextFocusedWidget -- @param self --- @param #int focusdirection --- @param #ccui.Widget widget +-- @param #int direction +-- @param #ccui.Widget current -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- -- @function [parent=#Layout] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- Default constructor -- @function [parent=#Layout] Layout -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua b/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua index 590f5ea26d..93f935f428 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua @@ -5,31 +5,40 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#LayoutParameter] clone -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- Gets LayoutParameterType of LayoutParameter.
+-- see LayoutParameterType
+-- return LayoutParameterType -- @function [parent=#LayoutParameter] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#LayoutParameter] createCloneInstance -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- -- @function [parent=#LayoutParameter] copyProperties -- @param self --- @param #ccui.LayoutParameter layoutparameter +-- @param #ccui.LayoutParameter model -------------------------------- +-- Allocates and initializes.
+-- return A initialized LayoutParameter which is marked as "autorelease". -- @function [parent=#LayoutParameter] create -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- Default constructor -- @function [parent=#LayoutParameter] LayoutParameter -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Lens3D.lua b/cocos/scripting/lua-bindings/auto/api/Lens3D.lua index 2bfdba6006..780fef9f24 100644 --- a/cocos/scripting/lua-bindings/auto/api/Lens3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Lens3D.lua @@ -5,47 +5,55 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Lens3D] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- Set whether lens is concave -- @function [parent=#Lens3D] setConcave -- @param self --- @param #bool bool +-- @param #bool concave -------------------------------- +-- Set lens center position -- @function [parent=#Lens3D] setLensEffect -- @param self --- @param #float float +-- @param #float lensEffect -------------------------------- +-- -- @function [parent=#Lens3D] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Get lens center position -- @function [parent=#Lens3D] getLensEffect -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- creates the action with center position, radius, a grid size and duration -- @function [parent=#Lens3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #vec2_table vec2 --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #vec2_table position +-- @param #float radius -- @return Lens3D#Lens3D ret (return value: cc.Lens3D) -------------------------------- +-- -- @function [parent=#Lens3D] clone -- @param self -- @return Lens3D#Lens3D ret (return value: cc.Lens3D) -------------------------------- +-- -- @function [parent=#Lens3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua b/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua index 81db029efb..0b73c6dce6 100644 --- a/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua +++ b/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua @@ -5,31 +5,42 @@ -- @parent_module ccui -------------------------------- +-- Sets LinearGravity parameter for LayoutParameter.
+-- see LinearGravity
+-- param LinearGravity -- @function [parent=#LinearLayoutParameter] setGravity -- @param self --- @param #int lineargravity +-- @param #int gravity -------------------------------- +-- Gets LinearGravity parameter for LayoutParameter.
+-- see LinearGravity
+-- return LinearGravity -- @function [parent=#LinearLayoutParameter] getGravity -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Allocates and initializes.
+-- return A initialized LayoutParameter which is marked as "autorelease". -- @function [parent=#LinearLayoutParameter] create -- @param self -- @return LinearLayoutParameter#LinearLayoutParameter ret (return value: ccui.LinearLayoutParameter) -------------------------------- +-- -- @function [parent=#LinearLayoutParameter] createCloneInstance -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- -- @function [parent=#LinearLayoutParameter] copyProperties -- @param self --- @param #ccui.LayoutParameter layoutparameter +-- @param #ccui.LayoutParameter model -------------------------------- +-- Default constructor -- @function [parent=#LinearLayoutParameter] LinearLayoutParameter -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Liquid.lua b/cocos/scripting/lua-bindings/auto/api/Liquid.lua index 1d70bc7690..d572cb528b 100644 --- a/cocos/scripting/lua-bindings/auto/api/Liquid.lua +++ b/cocos/scripting/lua-bindings/auto/api/Liquid.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Liquid] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Liquid] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- -- @function [parent=#Liquid] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- -- @function [parent=#Liquid] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- creates the action with amplitude, a grid and duration -- @function [parent=#Liquid] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int waves +-- @param #float amplitude -- @return Liquid#Liquid ret (return value: cc.Liquid) -------------------------------- +-- -- @function [parent=#Liquid] clone -- @param self -- @return Liquid#Liquid ret (return value: cc.Liquid) -------------------------------- +-- -- @function [parent=#Liquid] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ListView.lua b/cocos/scripting/lua-bindings/auto/api/ListView.lua index eb0b32815d..550f7ede5d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ListView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ListView.lua @@ -5,103 +5,133 @@ -- @parent_module ccui -------------------------------- +-- Returns the index of item.
+-- param item the item which need to be checked.
+-- return the index of item. -- @function [parent=#ListView] getIndex -- @param self --- @param #ccui.Widget widget +-- @param #ccui.Widget item -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#ListView] removeAllItems -- @param self -------------------------------- +-- Changes the gravity of listview.
+-- see ListViewGravity -- @function [parent=#ListView] setGravity -- @param self -- @param #int gravity -------------------------------- +-- Push back custom item into listview. -- @function [parent=#ListView] pushBackCustomItem -- @param self --- @param #ccui.Widget widget +-- @param #ccui.Widget item -------------------------------- +-- Returns the item container. -- @function [parent=#ListView] getItems -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Removes a item whose index is same as the parameter.
+-- param index of item. -- @function [parent=#ListView] removeItem -- @param self --- @param #long long +-- @param #long index -------------------------------- +-- -- @function [parent=#ListView] getCurSelectedIndex -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Insert a default item(create by a cloned model) into listview. -- @function [parent=#ListView] insertDefaultItem -- @param self --- @param #long long +-- @param #long index -------------------------------- +-- -- @function [parent=#ListView] requestRefreshView -- @param self -------------------------------- +-- Changes the margin between each item.
+-- param margin -- @function [parent=#ListView] setItemsMargin -- @param self --- @param #float float +-- @param #float margin -------------------------------- +-- -- @function [parent=#ListView] refreshView -- @param self -------------------------------- +-- Removes the last item of listview. -- @function [parent=#ListView] removeLastItem -- @param self -------------------------------- +-- -- @function [parent=#ListView] getItemsMargin -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ListView] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- Returns a item whose index is same as the parameter.
+-- param index of item.
+-- return the item widget. -- @function [parent=#ListView] getItem -- @param self --- @param #long long +-- @param #long index -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- Sets a item model for listview
+-- A model will be cloned for adding default item.
+-- param model item model for listview -- @function [parent=#ListView] setItemModel -- @param self --- @param #ccui.Widget widget +-- @param #ccui.Widget model -------------------------------- +-- -- @function [parent=#ListView] doLayout -- @param self -------------------------------- +-- Push back a default item(create by a cloned model) into listview. -- @function [parent=#ListView] pushBackDefaultItem -- @param self -------------------------------- +-- Insert custom item into listview. -- @function [parent=#ListView] insertCustomItem -- @param self --- @param #ccui.Widget widget --- @param #long long +-- @param #ccui.Widget item +-- @param #long index -------------------------------- +-- Allocates and initializes. -- @function [parent=#ListView] create -- @param self -- @return ListView#ListView ret (return value: ccui.ListView) -------------------------------- +-- -- @function [parent=#ListView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) @@ -113,36 +143,44 @@ -- @overload self, cc.Node, int, string -- @function [parent=#ListView] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #string str +-- @param #cc.Node child +-- @param #int zOrder +-- @param #string name -------------------------------- +-- Changes scroll direction of scrollview.
+-- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
+-- param dir, set the list view's scroll direction -- @function [parent=#ListView] setDirection -- @param self --- @param #int direction +-- @param #int dir -------------------------------- +-- -- @function [parent=#ListView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ListView] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#ListView] removeAllChildren -- @param self -------------------------------- +-- -- @function [parent=#ListView] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleaup -------------------------------- +-- Default constructor -- @function [parent=#ListView] ListView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua b/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua index 132912332c..bb0fa5deff 100644 --- a/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua +++ b/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua @@ -5,47 +5,66 @@ -- @parent_module ccui -------------------------------- +-- Changes the progress direction of loadingbar.
+-- param percent percent value from 1 to 100. -- @function [parent=#LoadingBar] setPercent -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- Load texture for loadingbar.
+-- param texture file name of texture.
+-- param texType @see TextureResType -- @function [parent=#LoadingBar] loadTexture -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string texture +-- @param #int texType -------------------------------- +-- Changes the progress direction of loadingbar.
+-- see Direction LEFT means progress left to right, RIGHT otherwise.
+-- param direction Direction -- @function [parent=#LoadingBar] setDirection -- @param self -- @param #int direction -------------------------------- +-- Sets if loadingbar is using scale9 renderer.
+-- param enabled true that using scale9 renderer, false otherwise. -- @function [parent=#LoadingBar] setScale9Enabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Sets capinsets for loadingbar, if loadingbar is using scale9 renderer.
+-- param capInsets capinsets for loadingbar -- @function [parent=#LoadingBar] setCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Gets the progress direction of loadingbar.
+-- see Direction LEFT means progress left to right, RIGHT otherwise.
+-- return Direction -- @function [parent=#LoadingBar] getDirection -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#LoadingBar] getCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#LoadingBar] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the progress direction of loadingbar.
+-- return percent value from 1 to 100. -- @function [parent=#LoadingBar] getPercent -- @param self -- @return float#float ret (return value: float) @@ -55,36 +74,42 @@ -- @overload self -- @function [parent=#LoadingBar] create -- @param self --- @param #string str --- @param #float float +-- @param #string textureName +-- @param #float percentage -- @return LoadingBar#LoadingBar ret (retunr value: ccui.LoadingBar) -------------------------------- +-- -- @function [parent=#LoadingBar] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#LoadingBar] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#LoadingBar] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#LoadingBar] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#LoadingBar] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- Default constructor -- @function [parent=#LoadingBar] LoadingBar -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Menu.lua b/cocos/scripting/lua-bindings/auto/api/Menu.lua index 3a228e3443..9c5f8e0bc4 100644 --- a/cocos/scripting/lua-bindings/auto/api/Menu.lua +++ b/cocos/scripting/lua-bindings/auto/api/Menu.lua @@ -5,30 +5,38 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Menu] setEnabled -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- align items vertically -- @function [parent=#Menu] alignItemsVertically -- @param self -------------------------------- +-- -- @function [parent=#Menu] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- align items horizontally with padding
+-- since v0.7.2 -- @function [parent=#Menu] alignItemsHorizontallyWithPadding -- @param self --- @param #float float +-- @param #float padding -------------------------------- +-- align items vertically with padding
+-- since v0.7.2 -- @function [parent=#Menu] alignItemsVerticallyWithPadding -- @param self --- @param #float float +-- @param #float padding -------------------------------- +-- align items horizontally -- @function [parent=#Menu] alignItemsHorizontally -- @param self @@ -39,29 +47,33 @@ -- @overload self, cc.Node, int, string -- @function [parent=#Menu] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #string str +-- @param #cc.Node child +-- @param #int zOrder +-- @param #string name -------------------------------- +-- -- @function [parent=#Menu] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Menu] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Menu] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool bValue -------------------------------- +-- -- @function [parent=#Menu] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItem.lua b/cocos/scripting/lua-bindings/auto/api/MenuItem.lua index 12a0238e4c..b525b9112c 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItem.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItem.lua @@ -5,38 +5,46 @@ -- @parent_module cc -------------------------------- +-- enables or disables the item -- @function [parent=#MenuItem] setEnabled -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- Activate the item -- @function [parent=#MenuItem] activate -- @param self -------------------------------- +-- returns whether or not the item is enabled -- @function [parent=#MenuItem] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- The item was selected (not activated), similar to "mouse-over" -- @function [parent=#MenuItem] selected -- @param self -------------------------------- +-- returns whether or not the item is selected -- @function [parent=#MenuItem] isSelected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- The item was unselected -- @function [parent=#MenuItem] unselected -- @param self -------------------------------- +-- Returns the outside box -- @function [parent=#MenuItem] rect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#MenuItem] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua index 7f0c2f5767..fd9baf15a8 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua @@ -5,43 +5,59 @@ -- @parent_module cc -------------------------------- +-- get font size
+-- js getFontSize -- @function [parent=#MenuItemFont] getFontSizeObj -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- returns the name of the Font
+-- js getFontNameObj -- @function [parent=#MenuItemFont] getFontNameObj -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- set font size
+-- c++ can not overload static and non-static member functions with the same parameter types
+-- so change the name to setFontSizeObj
+-- js setFontSize -- @function [parent=#MenuItemFont] setFontSizeObj -- @param self --- @param #int int +-- @param #int size -------------------------------- +-- set the font name
+-- c++ can not overload static and non-static member functions with the same parameter types
+-- so change the name to setFontNameObj
+-- js setFontName -- @function [parent=#MenuItemFont] setFontNameObj -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- set the default font name -- @function [parent=#MenuItemFont] setFontName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- get default font size -- @function [parent=#MenuItemFont] getFontSize -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- get the default font name -- @function [parent=#MenuItemFont] getFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- set default font size -- @function [parent=#MenuItemFont] setFontSize -- @param self --- @param #int int +-- @param #int size return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua index 81b37760cd..bdad1c852f 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua @@ -5,18 +5,21 @@ -- @parent_module cc -------------------------------- +-- sets the sprite frame for the disabled image -- @function [parent=#MenuItemImage] setDisabledSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame frame -------------------------------- +-- sets the sprite frame for the selected image -- @function [parent=#MenuItemImage] setSelectedSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame frame -------------------------------- +-- sets the sprite frame for the normal image -- @function [parent=#MenuItemImage] setNormalSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame frame return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua index 177d9f914b..9048226099 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua @@ -5,44 +5,53 @@ -- @parent_module cc -------------------------------- +-- Gets the color that will be used to disable the item -- @function [parent=#MenuItemLabel] getDisabledColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- sets a new string to the inner label -- @function [parent=#MenuItemLabel] setString -- @param self --- @param #string str +-- @param #string label -------------------------------- +-- Sets the label that is rendered. -- @function [parent=#MenuItemLabel] setLabel -- @param self -- @param #cc.Node node -------------------------------- +-- Sets the color that will be used to disable the item -- @function [parent=#MenuItemLabel] setDisabledColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- Gets the label that is rendered. -- @function [parent=#MenuItemLabel] getLabel -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#MenuItemLabel] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#MenuItemLabel] activate -- @param self -------------------------------- +-- -- @function [parent=#MenuItemLabel] unselected -- @param self -------------------------------- +-- -- @function [parent=#MenuItemLabel] selected -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua index 881f690df1..5af7c2fd8e 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua @@ -5,45 +5,54 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#MenuItemSprite] setEnabled -- @param self --- @param #bool bool +-- @param #bool bEnabled -------------------------------- +-- since v0.99.5 -- @function [parent=#MenuItemSprite] selected -- @param self -------------------------------- +-- Sets the image used when the item is not selected -- @function [parent=#MenuItemSprite] setNormalImage -- @param self --- @param #cc.Node node +-- @param #cc.Node image -------------------------------- +-- Sets the image used when the item is disabled -- @function [parent=#MenuItemSprite] setDisabledImage -- @param self --- @param #cc.Node node +-- @param #cc.Node image -------------------------------- +-- Sets the image used when the item is selected -- @function [parent=#MenuItemSprite] setSelectedImage -- @param self --- @param #cc.Node node +-- @param #cc.Node image -------------------------------- +-- Gets the image used when the item is disabled -- @function [parent=#MenuItemSprite] getDisabledImage -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Gets the image used when the item is selected -- @function [parent=#MenuItemSprite] getSelectedImage -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Gets the image used when the item is not selected -- @function [parent=#MenuItemSprite] getNormalImage -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#MenuItemSprite] unselected -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua index 7442feb1b5..a2e32d4499 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua @@ -5,44 +5,53 @@ -- @parent_module cc -------------------------------- +-- Sets the array that contains the subitems. -- @function [parent=#MenuItemToggle] setSubItems -- @param self --- @param #array_table array +-- @param #array_table items -------------------------------- +-- Gets the index of the selected item -- @function [parent=#MenuItemToggle] getSelectedIndex -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- add more menu item -- @function [parent=#MenuItemToggle] addSubItem -- @param self --- @param #cc.MenuItem menuitem +-- @param #cc.MenuItem item -------------------------------- +-- return the selected item -- @function [parent=#MenuItemToggle] getSelectedItem -- @param self -- @return MenuItem#MenuItem ret (return value: cc.MenuItem) -------------------------------- +-- Sets the index of the selected item -- @function [parent=#MenuItemToggle] setSelectedIndex -- @param self --- @param #unsigned int int +-- @param #unsigned int index -------------------------------- +-- -- @function [parent=#MenuItemToggle] setEnabled -- @param self --- @param #bool bool +-- @param #bool var -------------------------------- +-- -- @function [parent=#MenuItemToggle] activate -- @param self -------------------------------- +-- -- @function [parent=#MenuItemToggle] unselected -- @param self -------------------------------- +-- -- @function [parent=#MenuItemToggle] selected -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Mesh.lua b/cocos/scripting/lua-bindings/auto/api/Mesh.lua index b9b817d4f2..2b58a7a1dc 100644 --- a/cocos/scripting/lua-bindings/auto/api/Mesh.lua +++ b/cocos/scripting/lua-bindings/auto/api/Mesh.lua @@ -5,6 +5,7 @@ -- @parent_module cc -------------------------------- +-- get mesh vertex attribute count -- @function [parent=#Mesh] getMeshVertexAttribCount -- @param self -- @return long#long ret (return value: long) @@ -14,93 +15,110 @@ -- @overload self, string -- @function [parent=#Mesh] setTexture -- @param self --- @param #string str +-- @param #string texPath -------------------------------- +-- mesh index data getter -- @function [parent=#Mesh] getMeshIndexData -- @param self -- @return MeshIndexData#MeshIndexData ret (return value: cc.MeshIndexData) -------------------------------- +-- -- @function [parent=#Mesh] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- skin getter -- @function [parent=#Mesh] getSkin -- @param self -- @return MeshSkin#MeshSkin ret (return value: cc.MeshSkin) -------------------------------- +-- name getter -- @function [parent=#Mesh] getName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Mesh] setBlendFunc -- @param self --- @param #cc.BlendFunc blendfunc +-- @param #cc.BlendFunc blendFunc -------------------------------- +-- get index format -- @function [parent=#Mesh] getIndexFormat -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- get per vertex size in bytes -- @function [parent=#Mesh] getVertexSizeInBytes -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Mesh] getBlendFunc -- @param self -- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) -------------------------------- +-- get GLProgramState -- @function [parent=#Mesh] getGLProgramState -- @param self -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- +-- get index count -- @function [parent=#Mesh] getIndexCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- get vertex buffer -- @function [parent=#Mesh] getVertexBuffer -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- get MeshVertexAttribute by index -- @function [parent=#Mesh] getMeshVertexAttribute -- @param self --- @param #int int +-- @param #int idx -- @return MeshVertexAttrib#MeshVertexAttrib ret (return value: cc.MeshVertexAttrib) -------------------------------- +-- -- @function [parent=#Mesh] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- get index buffer -- @function [parent=#Mesh] getIndexBuffer -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- has vertex attribute? -- @function [parent=#Mesh] hasVertexAttrib -- @param self --- @param #int int +-- @param #int attrib -- @return bool#bool ret (return value: bool) -------------------------------- +-- get primitive type -- @function [parent=#Mesh] getPrimitiveType -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- visible getter and setter -- @function [parent=#Mesh] setVisible -- @param self --- @param #bool bool +-- @param #bool visible return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua b/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua index 47f6c9dbeb..63d586f109 100644 --- a/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua +++ b/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua @@ -5,92 +5,108 @@ -- @parent_module cc -------------------------------- +-- Remove all living segments of the ribbon -- @function [parent=#MotionStreak] reset -- @param self -------------------------------- +-- -- @function [parent=#MotionStreak] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- -- @function [parent=#MotionStreak] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- color used for the tint -- @function [parent=#MotionStreak] tintWithColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table colors -------------------------------- +-- -- @function [parent=#MotionStreak] setStartingPositionInitialized -- @param self --- @param #bool bool +-- @param #bool bStartingPositionInitialized -------------------------------- +-- -- @function [parent=#MotionStreak] isStartingPositionInitialized -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- When fast mode is enabled, new points are added faster but with lower precision -- @function [parent=#MotionStreak] isFastMode -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#MotionStreak] setFastMode -- @param self --- @param #bool bool +-- @param #bool bFastMode -------------------------------- -- @overload self, float, float, float, color3b_table, cc.Texture2D -- @overload self, float, float, float, color3b_table, string -- @function [parent=#MotionStreak] create -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #color3b_table color3b --- @param #string str +-- @param #float fade +-- @param #float minSeg +-- @param #float stroke +-- @param #color3b_table color +-- @param #string path -- @return MotionStreak#MotionStreak ret (retunr value: cc.MotionStreak) -------------------------------- +-- -- @function [parent=#MotionStreak] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#MotionStreak] setPositionY -- @param self --- @param #float float +-- @param #float y -------------------------------- +-- -- @function [parent=#MotionStreak] setPositionX -- @param self --- @param #float float +-- @param #float x -------------------------------- +-- -- @function [parent=#MotionStreak] getPositionY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#MotionStreak] getPositionX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#MotionStreak] setOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity -------------------------------- +-- -- @function [parent=#MotionStreak] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- -- @function [parent=#MotionStreak] getOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) @@ -100,15 +116,15 @@ -- @overload self, vec2_table -- @function [parent=#MotionStreak] setPosition -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y -------------------------------- -- @overload self, float, float -- @overload self -- @function [parent=#MotionStreak] getPosition -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MoveBy.lua b/cocos/scripting/lua-bindings/auto/api/MoveBy.lua index c478aff92a..ee6d677fce 100644 --- a/cocos/scripting/lua-bindings/auto/api/MoveBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/MoveBy.lua @@ -5,30 +5,35 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#MoveBy] create -- @param self --- @param #float float --- @param #vec2_table vec2 +-- @param #float duration +-- @param #vec2_table deltaPosition -- @return MoveBy#MoveBy ret (return value: cc.MoveBy) -------------------------------- +-- -- @function [parent=#MoveBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#MoveBy] clone -- @param self -- @return MoveBy#MoveBy ret (return value: cc.MoveBy) -------------------------------- +-- -- @function [parent=#MoveBy] reverse -- @param self -- @return MoveBy#MoveBy ret (return value: cc.MoveBy) -------------------------------- +-- -- @function [parent=#MoveBy] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MoveTo.lua b/cocos/scripting/lua-bindings/auto/api/MoveTo.lua index 432c2baff3..0212565eda 100644 --- a/cocos/scripting/lua-bindings/auto/api/MoveTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/MoveTo.lua @@ -5,18 +5,21 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#MoveTo] create -- @param self --- @param #float float --- @param #vec2_table vec2 +-- @param #float duration +-- @param #vec2_table position -- @return MoveTo#MoveTo ret (return value: cc.MoveTo) -------------------------------- +-- -- @function [parent=#MoveTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#MoveTo] clone -- @param self -- @return MoveTo#MoveTo ret (return value: cc.MoveTo) diff --git a/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua b/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua index 89f032a8ad..c6c456be00 100644 --- a/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua +++ b/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua @@ -5,27 +5,32 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#MovementBoneData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#MovementBoneData] getFrameData -- @param self --- @param #int int +-- @param #int index -- @return FrameData#FrameData ret (return value: ccs.FrameData) -------------------------------- +-- -- @function [parent=#MovementBoneData] addFrameData -- @param self --- @param #ccs.FrameData framedata +-- @param #ccs.FrameData frameData -------------------------------- +-- -- @function [parent=#MovementBoneData] create -- @param self -- @return MovementBoneData#MovementBoneData ret (return value: ccs.MovementBoneData) -------------------------------- +-- js ctor -- @function [parent=#MovementBoneData] MovementBoneData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/MovementData.lua b/cocos/scripting/lua-bindings/auto/api/MovementData.lua index 0e79adf323..3bc6b1b16a 100644 --- a/cocos/scripting/lua-bindings/auto/api/MovementData.lua +++ b/cocos/scripting/lua-bindings/auto/api/MovementData.lua @@ -5,22 +5,26 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#MovementData] getMovementBoneData -- @param self --- @param #string str +-- @param #string boneName -- @return MovementBoneData#MovementBoneData ret (return value: ccs.MovementBoneData) -------------------------------- +-- -- @function [parent=#MovementData] addMovementBoneData -- @param self --- @param #ccs.MovementBoneData movementbonedata +-- @param #ccs.MovementBoneData movBoneData -------------------------------- +-- -- @function [parent=#MovementData] create -- @param self -- @return MovementData#MovementData ret (return value: ccs.MovementData) -------------------------------- +-- js ctor -- @function [parent=#MovementData] MovementData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index e97163ead5..3fc9d7d51d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -11,42 +11,57 @@ -- @overload self, cc.Node, int, string -- @function [parent=#Node] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #string str +-- @param #cc.Node child +-- @param #int localZOrder +-- @param #string name -------------------------------- -- @overload self, cc.Component -- @overload self, string -- @function [parent=#Node] removeComponent -- @param self --- @param #string str +-- @param #string name -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- set the PhysicsBody that let the sprite effect with physics
+-- note This method will set anchor point to Vec2::ANCHOR_MIDDLE if body not null, and you cann't change anchor point if node has a physics body. -- @function [parent=#Node] setPhysicsBody -- @param self --- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody body -------------------------------- +-- Gets the description string. It makes debugging easier.
+-- return A string
+-- js NA
+-- lua NA -- @function [parent=#Node] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
+-- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
+-- while the second one uses the real skew function.
+-- 0 is the default rotation angle.
+-- Positive values rotate node clockwise, and negative values for anti-clockwise.
+-- param rotationY The Y rotation in degrees.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setRotationSkewY -- @param self --- @param #float float +-- @param #float rotationY -------------------------------- +-- -- @function [parent=#Node] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- -- @function [parent=#Node] setCascadeOpacityEnabled -- @param self --- @param #bool bool +-- @param #bool cascadeOpacityEnabled -------------------------------- -- @overload self @@ -56,159 +71,237 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- -- @function [parent=#Node] setOnExitCallback -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- Pauses all scheduled selectors, actions and event listeners..
+-- This method is called internally by onExit -- @function [parent=#Node] pause -- @param self -------------------------------- +-- Converts a local Vec2 to world space coordinates.The result is in Points.
+-- treating the returned/received node point as anchor relative. -- @function [parent=#Node] convertToWorldSpaceAR -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table nodePoint -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Gets whether the anchor point will be (0,0) when you position this node.
+-- see `ignoreAnchorPointForPosition(bool)`
+-- return true if the anchor point will be (0,0) when you position this node. -- @function [parent=#Node] isIgnoreAnchorPointForPosition -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets a child from the container with its name
+-- param name An identifier to find the child node.
+-- return a Node object whose name equals to the input parameter
+-- since v3.2 -- @function [parent=#Node] getChildByName -- @param self --- @param #string str +-- @param #string name -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#Node] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- get & set camera mask, the node is visible by the camera whose camera flag & node's camera mask is true -- @function [parent=#Node] getCameraMask -- @param self -- @return unsigned short#unsigned short ret (return value: unsigned short) -------------------------------- +-- Sets the rotation (angle) of the node in degrees.
+-- 0 is the default rotation angle.
+-- Positive values rotate node clockwise, and negative values for anti-clockwise.
+-- param rotation The rotation of the node in degrees. -- @function [parent=#Node] setRotation -- @param self --- @param #float float +-- @param #float rotation -------------------------------- +-- Changes the scale factor on Z axis of this node
+-- The Default value is 1.0 if you haven't changed it before.
+-- param scaleY The scale factor on Y axis.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setScaleZ -- @param self --- @param #float float +-- @param #float scaleZ -------------------------------- +-- Sets the scale (y) of the node.
+-- It is a scaling factor that multiplies the height of the node and its children.
+-- param scaleY The scale factor on Y axis.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setScaleY -- @param self --- @param #float float +-- @param #float scaleY -------------------------------- +-- Sets the scale (x) of the node.
+-- It is a scaling factor that multiplies the width of the node and its children.
+-- param scaleX The scale factor on X axis.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setScaleX -- @param self --- @param #float float +-- @param #float scaleX -------------------------------- +-- Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
+-- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
+-- while the second one uses the real skew function.
+-- 0 is the default rotation angle.
+-- Positive values rotate node clockwise, and negative values for anti-clockwise.
+-- param rotationX The X rotation in degrees which performs a horizontal rotational skew.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setRotationSkewX -- @param self --- @param #float float +-- @param #float rotationX -------------------------------- +-- -- @function [parent=#Node] setonEnterTransitionDidFinishCallback -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- removes all components -- @function [parent=#Node] removeAllComponents -- @param self -------------------------------- +-- -- @function [parent=#Node] _setLocalZOrder -- @param self --- @param #int int +-- @param #int z -------------------------------- +-- -- @function [parent=#Node] setCameraMask -- @param self --- @param #unsigned short short --- @param #bool bool +-- @param #unsigned short mask +-- @param #bool applyChildren -------------------------------- +-- Returns a tag that is used to identify the node easily.
+-- return An integer that identifies the node.
+-- Please use `getTag()` instead. -- @function [parent=#Node] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- / @{/ @name GLProgram
+-- Return the GLProgram (shader) currently used for this node
+-- return The GLProgram (shader) currently used for this node -- @function [parent=#Node] getGLProgram -- @param self -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- Returns the world affine transform matrix. The matrix is in Pixels. -- @function [parent=#Node] getNodeToWorldTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- returns the position (X,Y,Z) in its parent's coordinate system -- @function [parent=#Node] getPosition3D -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- +-- Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
+-- param child The child node which will be removed.
+-- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#Node] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- Converts a Vec2 to world space coordinates. The result is in Points. -- @function [parent=#Node] convertToWorldSpace -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table nodePoint -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Returns the Scene that contains the Node.
+-- It returns `nullptr` if the node doesn't belong to any Scene.
+-- This function recursively calls parent->getScene() until parent is a Scene object. The results are not cached. It is that the user caches the results in case this functions is being used inside a loop. -- @function [parent=#Node] getScene -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- -- @function [parent=#Node] getEventDispatcher -- @param self -- @return EventDispatcher#EventDispatcher ret (return value: cc.EventDispatcher) -------------------------------- +-- Changes the X skew angle of the node in degrees.
+-- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
+-- while the second one uses the real skew function.
+-- This angle describes the shear distortion in the X direction.
+-- Thus, it is the angle between the Y coordinate and the left edge of the shape
+-- The default skewX angle is 0. Positive values distort the node in a CW direction.
+-- param skewX The X skew angle of the node in degrees.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setSkewX -- @param self --- @param #float float +-- @param #float skewX -------------------------------- +-- -- @function [parent=#Node] setGLProgramState -- @param self --- @param #cc.GLProgramState glprogramstate +-- @param #cc.GLProgramState glProgramState -------------------------------- +-- -- @function [parent=#Node] setOnEnterCallback -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- -- @function [parent=#Node] getOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- Sets the position (x,y) using values between 0 and 1.
+-- The positions in pixels is calculated like the following:
+-- code pseudo code
+-- void setNormalizedPosition(Vec2 pos) {
+-- Size s = getParent()->getContentSize();
+-- _position = pos * s;
+-- }
+-- endcode -- @function [parent=#Node] setNormalizedPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- -- @function [parent=#Node] setonExitTransitionDidStartCallback -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- convenience methods which take a Touch instead of Vec2 -- @function [parent=#Node] convertTouchToNodeSpace -- @param self -- @param #cc.Touch touch @@ -219,55 +312,70 @@ -- @overload self -- @function [parent=#Node] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#Node] getNodeToParentAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- +-- -- @function [parent=#Node] isCascadeOpacityEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the parent node
+-- param parent A pointer to the parent node -- @function [parent=#Node] setParent -- @param self --- @param #cc.Node node +-- @param #cc.Node parent -------------------------------- +-- Returns a string that is used to identify the node.
+-- return A string that identifies the node.
+-- since v3.2 -- @function [parent=#Node] getName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- returns the rotation (X,Y,Z) in degrees. -- @function [parent=#Node] getRotation3D -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- +-- Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
+-- The matrix is in Pixels. -- @function [parent=#Node] getNodeToParentTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- converts a Touch (world coordinates) into a local coordinate. This method is AR (Anchor Relative). -- @function [parent=#Node] convertTouchToNodeSpaceAR -- @param self -- @param #cc.Touch touch -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Converts a Vec2 to node (local) space coordinates. The result is in Points. -- @function [parent=#Node] convertToNodeSpace -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table worldPoint -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Resumes all scheduled selectors, actions and event listeners.
+-- This method is called internally by onEnter -- @function [parent=#Node] resume -- @param self -------------------------------- +-- get the PhysicsBody the sprite have -- @function [parent=#Node] getPhysicsBody -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) @@ -277,108 +385,178 @@ -- @overload self, vec2_table -- @function [parent=#Node] setPosition -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y -------------------------------- +-- Removes an action from the running action list by its tag.
+-- param tag A tag that indicates the action to be removed. -- @function [parent=#Node] stopActionByTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- Reorders a child according to a new z value.
+-- param child An already added child node. It MUST be already added.
+-- param localZOrder Z order for drawing priority. Please refer to setLocalZOrder(int) -- @function [parent=#Node] reorderChild -- @param self --- @param #cc.Node node --- @param #int int +-- @param #cc.Node child +-- @param #int localZOrder -------------------------------- +-- Sets whether the anchor point will be (0,0) when you position this node.
+-- This is an internal method, only used by Layer and Scene. Don't call it outside framework.
+-- The default value is false, while in Layer and Scene are true
+-- param ignore true if anchor point will be (0,0) when you position this node
+-- todo This method should be renamed as setIgnoreAnchorPointForPosition(bool) or something with "set" -- @function [parent=#Node] ignoreAnchorPointForPosition -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- Changes the Y skew angle of the node in degrees.
+-- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
+-- while the second one uses the real skew function.
+-- This angle describes the shear distortion in the Y direction.
+-- Thus, it is the angle between the X coordinate and the bottom edge of the shape
+-- The default skewY angle is 0. Positive values distort the node in a CCW direction.
+-- param skewY The Y skew angle of the node in degrees.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setSkewY -- @param self --- @param #float float +-- @param #float skewY -------------------------------- +-- Sets the 'z' coordinate in the position. It is the OpenGL Z vertex value.
+-- The OpenGL depth buffer and depth testing are disabled by default. You need to turn them on
+-- in order to use this property correctly.
+-- `setPositionZ()` also sets the `setGlobalZValue()` with the positionZ as value.
+-- see `setGlobalZValue()`
+-- param vertexZ OpenGL Z vertex of this node. -- @function [parent=#Node] setPositionZ -- @param self --- @param #float float +-- @param #float positionZ -------------------------------- +-- Sets the rotation (X,Y,Z) in degrees.
+-- Useful for 3d rotations
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setRotation3D -- @param self --- @param #vec3_table vec3 +-- @param #vec3_table rotation -------------------------------- +-- Gets/Sets x or y coordinate individually for position.
+-- These methods are used in Lua and Javascript Bindings -- @function [parent=#Node] setPositionX -- @param self --- @param #float float +-- @param #float x -------------------------------- +-- Sets the Transformation matrix manually. -- @function [parent=#Node] setNodeToParentTransform -- @param self --- @param #mat4_table mat4 +-- @param #mat4_table transform -------------------------------- +-- Returns the anchor point in percent.
+-- see `setAnchorPoint(const Vec2&)`
+-- return The anchor point of node. -- @function [parent=#Node] getAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
+-- Composable actions are counted as 1 action. Example:
+-- If you are running 1 Sequence of 7 actions, it will return 1.
+-- If you are running 7 Sequences of 2 actions, it will return 7.
+-- todo Rename to getNumberOfRunningActions()
+-- return The number of actions that are running plus the ones that are schedule to run -- @function [parent=#Node] getNumberOfRunningActions -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Calls children's updateTransform() method recursively.
+-- This method is moved from Sprite, so it's no longer specific to Sprite.
+-- As the result, you apply SpriteBatchNode's optimization on your customed Node.
+-- e.g., `batchNode->addChild(myCustomNode)`, while you can only addChild(sprite) before. -- @function [parent=#Node] updateTransform -- @param self -------------------------------- +-- Sets the shader program for this node
+-- Since v2.0, each rendering node must set its shader program.
+-- It should be set in initialize phase.
+-- code
+-- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));
+-- endcode
+-- param shaderProgram The shader program -- @function [parent=#Node] setGLProgram -- @param self -- @param #cc.GLProgram glprogram -------------------------------- +-- Determines if the node is visible
+-- see `setVisible(bool)`
+-- return true if the node is visible, false if the node is hidden. -- @function [parent=#Node] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the amount of children
+-- return The amount of children. -- @function [parent=#Node] getChildrenCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Converts a Vec2 to node (local) space coordinates. The result is in Points.
+-- treating the returned/received node point as anchor relative. -- @function [parent=#Node] convertToNodeSpaceAR -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table worldPoint -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- adds a component -- @function [parent=#Node] addComponent -- @param self -- @param #cc.Component component -- @return bool#bool ret (return value: bool) -------------------------------- +-- Executes an action, and returns the action that is executed.
+-- This node becomes the action's target. Refer to Action::getTarget()
+-- warning Actions don't retain their target.
+-- return An Action pointer -- @function [parent=#Node] runAction -- @param self -- @param #cc.Action action -- @return Action#Action ret (return value: cc.Action) -------------------------------- +-- -- @function [parent=#Node] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the rotation of the node in degrees.
+-- see `setRotation(float)`
+-- return The rotation of the node in degrees. -- @function [parent=#Node] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Returns the anchorPoint in absolute pixels.
+-- warning You can only read it. If you wish to modify it, use anchorPoint instead.
+-- see `getAnchorPoint()`
+-- return The anchor point in absolute pixels. -- @function [parent=#Node] getAnchorPointInPoints -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) @@ -389,68 +567,93 @@ -- @function [parent=#Node] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
+-- param name A string that identifies a child node
+-- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#Node] removeChildByName -- @param self --- @param #string str --- @param #bool bool +-- @param #string name +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#Node] getGLProgramState -- @param self -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- +-- Sets a Scheduler object that is used to schedule all "updates" and timers.
+-- warning If you set a new Scheduler, then previously created timers/update are going to be removed.
+-- param scheduler A Shdeduler object that is used to schedule all "update" and timers. -- @function [parent=#Node] setScheduler -- @param self -- @param #cc.Scheduler scheduler -------------------------------- +-- Stops and removes all actions from the running action list . -- @function [parent=#Node] stopAllActions -- @param self -------------------------------- +-- Returns the X skew angle of the node in degrees.
+-- see `setSkewX(float)`
+-- return The X skew angle of the node in degrees. -- @function [parent=#Node] getSkewX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Returns the Y skew angle of the node in degrees.
+-- see `setSkewY(float)`
+-- return The Y skew angle of the node in degrees. -- @function [parent=#Node] getSkewY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Node] getDisplayedColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Gets an action from the running action list by its tag.
+-- see `setTag(int)`, `getTag()`.
+-- return The action object with the given tag. -- @function [parent=#Node] getActionByTag -- @param self --- @param #int int +-- @param #int tag -- @return Action#Action ret (return value: cc.Action) -------------------------------- +-- Changes the name that is used to identify the node easily.
+-- param name A string that identifies the node.
+-- since v3.2 -- @function [parent=#Node] setName -- @param self --- @param #string str +-- @param #string name -------------------------------- -- @overload self, cc.AffineTransform -- @overload self, mat4_table -- @function [parent=#Node] setAdditionalTransform -- @param self --- @param #mat4_table mat4 +-- @param #mat4_table additionalTransform -------------------------------- +-- -- @function [parent=#Node] getDisplayedOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- Gets the local Z order of this node.
+-- see `setLocalZOrder(int)`
+-- return The local (relative to its siblings) Z order. -- @function [parent=#Node] getLocalZOrder -- @param self -- @return int#int ret (return value: int) @@ -463,26 +666,37 @@ -- @return Scheduler#Scheduler ret (retunr value: cc.Scheduler) -------------------------------- +-- -- @function [parent=#Node] getParentToNodeAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- +-- Returns the arrival order, indicates which children is added previously.
+-- see `setOrderOfArrival(unsigned int)`
+-- return The arrival order. -- @function [parent=#Node] getOrderOfArrival -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Sets the ActionManager object that is used by all actions.
+-- warning If you set a new ActionManager, then previously created actions will be removed.
+-- param actionManager A ActionManager object that is used by all actions. -- @function [parent=#Node] setActionManager -- @param self --- @param #cc.ActionManager actionmanager +-- @param #cc.ActionManager actionManager -------------------------------- +-- -- @function [parent=#Node] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- Returns whether or not the node is "running".
+-- If the node is running it will accept event callbacks like onEnter(), onExit(), update()
+-- return Whether or not the node is running. -- @function [parent=#Node] isRunning -- @param self -- @return bool#bool ret (return value: bool) @@ -495,146 +709,218 @@ -- @return Node#Node ret (retunr value: cc.Node) -------------------------------- +-- Gets position Z coordinate of this node.
+-- see setPositionZ(float)
+-- return the position Z coordinate of this node. -- @function [parent=#Node] getPositionZ -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Node] getPositionY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Node] getPositionX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
+-- param tag An interger number that identifies a child node
+-- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise.
+-- Please use `removeChildByName` instead. -- @function [parent=#Node] removeChildByTag -- @param self --- @param #int int --- @param #bool bool +-- @param #int tag +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#Node] setPositionY -- @param self --- @param #float float +-- @param #float y -------------------------------- +-- -- @function [parent=#Node] getNodeToWorldAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- +-- -- @function [parent=#Node] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor -------------------------------- +-- Sets whether the node is visible
+-- The default value is true, a node is default to visible
+-- param visible true if the node is visible, false if the node is hidden. -- @function [parent=#Node] setVisible -- @param self --- @param #bool bool +-- @param #bool visible -------------------------------- +-- Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
+-- The matrix is in Pixels. -- @function [parent=#Node] getParentToNodeTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- Defines the oder in which the nodes are renderer.
+-- Nodes that have a Global Z Order lower, are renderer first.
+-- In case two or more nodes have the same Global Z Order, the oder is not guaranteed.
+-- The only exception if the Nodes have a Global Z Order == 0. In that case, the Scene Graph order is used.
+-- By default, all nodes have a Global Z Order = 0. That means that by default, the Scene Graph order is used to render the nodes.
+-- Global Z Order is useful when you need to render nodes in an order different than the Scene Graph order.
+-- Limitations: Global Z Order can't be used used by Nodes that have SpriteBatchNode as one of their acenstors.
+-- And if ClippingNode is one of the ancestors, then "global Z order" will be relative to the ClippingNode.
+-- see `setLocalZOrder()`
+-- see `setVertexZ()`
+-- since v3.0 -- @function [parent=#Node] setGlobalZOrder -- @param self --- @param #float float +-- @param #float globalZOrder -------------------------------- -- @overload self, float, float -- @overload self, float -- @function [parent=#Node] setScale -- @param self --- @param #float float --- @param #float float +-- @param #float scaleX +-- @param #float scaleY -------------------------------- +-- Gets a child from the container with its tag
+-- param tag An identifier to find the child node.
+-- return a Node object whose tag equals to the input parameter
+-- Please use `getChildByName()` instead -- @function [parent=#Node] getChildByTag -- @param self --- @param #int int +-- @param #int tag -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Sets the arrival order when this node has a same ZOrder with other children.
+-- A node which called addChild subsequently will take a larger arrival order,
+-- If two children have the same Z order, the child with larger arrival order will be drawn later.
+-- warning This method is used internally for localZOrder sorting, don't change this manually
+-- param orderOfArrival The arrival order. -- @function [parent=#Node] setOrderOfArrival -- @param self --- @param #int int +-- @param #int orderOfArrival -------------------------------- +-- Returns the scale factor on Z axis of this node
+-- see `setScaleZ(float)`
+-- return The scale factor on Z axis. -- @function [parent=#Node] getScaleZ -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Returns the scale factor on Y axis of this node
+-- see `setScaleY(float)`
+-- return The scale factor on Y axis. -- @function [parent=#Node] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Returns the scale factor on X axis of this node
+-- see setScaleX(float)
+-- return The scale factor on X axis. -- @function [parent=#Node] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- LocalZOrder is the 'key' used to sort the node relative to its siblings.
+-- The Node's parent will sort all its children based ont the LocalZOrder value.
+-- If two nodes have the same LocalZOrder, then the node that was added first to the children's array will be in front of the other node in the array.
+-- Also, the Scene Graph is traversed using the "In-Order" tree traversal algorithm ( http:en.wikipedia.org/wiki/Tree_traversal#In-order )
+-- And Nodes that have LocalZOder values < 0 are the "left" subtree
+-- While Nodes with LocalZOder >=0 are the "right" subtree.
+-- see `setGlobalZOrder`
+-- see `setVertexZ` -- @function [parent=#Node] setLocalZOrder -- @param self --- @param #int int +-- @param #int localZOrder -------------------------------- +-- -- @function [parent=#Node] getWorldToNodeAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- +-- -- @function [parent=#Node] setCascadeColorEnabled -- @param self --- @param #bool bool +-- @param #bool cascadeColorEnabled -------------------------------- +-- -- @function [parent=#Node] setOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity -------------------------------- +-- Stops all running actions and schedulers -- @function [parent=#Node] cleanup -- @param self -------------------------------- +-- / @{/ @name component functions
+-- gets a component by its name -- @function [parent=#Node] getComponent -- @param self --- @param #string str +-- @param #string name -- @return Component#Component ret (return value: cc.Component) -------------------------------- +-- Returns the untransformed size of the node.
+-- see `setContentSize(const Size&)`
+-- return The untransformed size of the node. -- @function [parent=#Node] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Removes all actions from the running action list by its tag.
+-- param tag A tag that indicates the action to be removed. -- @function [parent=#Node] stopAllActionsByTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- -- @function [parent=#Node] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Returns an AABB (axis-aligned bounding-box) in its parent's coordinate system.
+-- return An AABB (axis-aligned bounding-box) in its parent's coordinate system -- @function [parent=#Node] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Node] setEventDispatcher -- @param self --- @param #cc.EventDispatcher eventdispatcher +-- @param #cc.EventDispatcher dispatcher -------------------------------- +-- Returns the Node's Global Z Order.
+-- see `setGlobalZOrder(int)`
+-- return The node's global Z order -- @function [parent=#Node] getGlobalZOrder -- @param self -- @return float#float ret (return value: float) @@ -645,71 +931,101 @@ -- @function [parent=#Node] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- Returns a user assigned Object
+-- Similar to UserData, but instead of holding a void* it holds an object.
+-- The UserObject will be retained once in this method,
+-- and the previous UserObject (if existed) will be released.
+-- The UserObject will be released in Node's destructor.
+-- param userObject A user assigned Object -- @function [parent=#Node] setUserObject -- @param self --- @param #cc.Ref ref +-- @param #cc.Ref userObject -------------------------------- -- @overload self, bool -- @overload self -- @function [parent=#Node] removeFromParentAndCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- Sets the position (X, Y, and Z) in its parent's coordinate system -- @function [parent=#Node] setPosition3D -- @param self --- @param #vec3_table vec3 +-- @param #vec3_table position -------------------------------- +-- -- @function [parent=#Node] update -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- Sorts the children array once before drawing, instead of every time when a child is added or reordered.
+-- This appraoch can improves the performance massively.
+-- note Don't call this manually unless a child added needs to be removed in the same frame -- @function [parent=#Node] sortAllChildren -- @param self -------------------------------- +-- Returns the inverse world affine transform matrix. The matrix is in Pixels. -- @function [parent=#Node] getWorldToNodeTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- Gets the scale factor of the node, when X and Y have the same scale factor.
+-- warning Assert when `_scaleX != _scaleY`
+-- see setScale(float)
+-- return The scale factor of the node. -- @function [parent=#Node] getScale -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- returns the normalized position -- @function [parent=#Node] getNormalizedPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew.
+-- see `setRotationSkewX(float)`
+-- return The X rotation in degrees. -- @function [parent=#Node] getRotationSkewX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
+-- see `setRotationSkewY(float)`
+-- return The Y rotation in degrees. -- @function [parent=#Node] getRotationSkewY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Changes the tag that is used to identify the node easily.
+-- Please refer to getTag for the sample code.
+-- param tag A integer that identifies the node.
+-- Please use `setName()` instead. -- @function [parent=#Node] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- -- @function [parent=#Node] isCascadeColorEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Stops and removes an action from the running action list.
+-- param action The action object to be removed. -- @function [parent=#Node] stopAction -- @param self -- @param #cc.Action action @@ -722,6 +1038,8 @@ -- @return ActionManager#ActionManager ret (retunr value: cc.ActionManager) -------------------------------- +-- Allocates and initializes a node.
+-- return A initialized node which is marked as "autorelease". -- @function [parent=#Node] create -- @param self -- @return Node#Node ret (return value: cc.Node) diff --git a/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua b/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua index 2d99049a3c..7ccb4f01c2 100644 --- a/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua +++ b/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#NodeGrid] setTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- -- @overload self @@ -17,20 +18,24 @@ -- @return GridBase#GridBase ret (retunr value: cc.GridBase) -------------------------------- +-- Changes a grid object that is used when applying effects
+-- param grid A Grid object that is used when applying effects -- @function [parent=#NodeGrid] setGrid -- @param self --- @param #cc.GridBase gridbase +-- @param #cc.GridBase grid -------------------------------- +-- -- @function [parent=#NodeGrid] create -- @param self -- @return NodeGrid#NodeGrid ret (return value: cc.NodeGrid) -------------------------------- +-- -- @function [parent=#NodeGrid] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/NodeReader.lua b/cocos/scripting/lua-bindings/auto/api/NodeReader.lua index 51e345250a..989c2ae99b 100644 --- a/cocos/scripting/lua-bindings/auto/api/NodeReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/NodeReader.lua @@ -4,56 +4,67 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#NodeReader] setJsonPath -- @param self --- @param #string str +-- @param #string jsonPath -------------------------------- +-- -- @function [parent=#NodeReader] createNode -- @param self --- @param #string str +-- @param #string filename -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#NodeReader] loadNodeWithFile -- @param self --- @param #string str +-- @param #string fileName -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#NodeReader] purge -- @param self -------------------------------- +-- -- @function [parent=#NodeReader] init -- @param self -------------------------------- +-- -- @function [parent=#NodeReader] loadNodeWithContent -- @param self --- @param #string str +-- @param #string content -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#NodeReader] isRecordJsonPath -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#NodeReader] getJsonPath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#NodeReader] setRecordJsonPath -- @param self --- @param #bool bool +-- @param #bool record -------------------------------- +-- -- @function [parent=#NodeReader] destroyInstance -- @param self -------------------------------- +-- -- @function [parent=#NodeReader] NodeReader -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua b/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua index c4130a75c8..9919cf681e 100644 --- a/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua +++ b/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua @@ -5,30 +5,34 @@ -- @parent_module cc -------------------------------- +-- creates a OrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX -- @function [parent=#OrbitCamera] create -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float t +-- @param #float radius +-- @param #float deltaRadius +-- @param #float angleZ +-- @param #float deltaAngleZ +-- @param #float angleX +-- @param #float deltaAngleX -- @return OrbitCamera#OrbitCamera ret (return value: cc.OrbitCamera) -------------------------------- +-- -- @function [parent=#OrbitCamera] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#OrbitCamera] clone -- @param self -- @return OrbitCamera#OrbitCamera ret (return value: cc.OrbitCamera) -------------------------------- +-- -- @function [parent=#OrbitCamera] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua b/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua index aa9eff0b3d..2d17a6451a 100644 --- a/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua @@ -5,20 +5,23 @@ -- @parent_module cc -------------------------------- +-- create the action -- @function [parent=#PageTurn3D] create -- @param self --- @param #float float --- @param #size_table size +-- @param #float duration +-- @param #size_table gridSize -- @return PageTurn3D#PageTurn3D ret (return value: cc.PageTurn3D) -------------------------------- +-- -- @function [parent=#PageTurn3D] clone -- @param self -- @return PageTurn3D#PageTurn3D ret (return value: cc.PageTurn3D) -------------------------------- +-- -- @function [parent=#PageTurn3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PageView.lua b/cocos/scripting/lua-bindings/auto/api/PageView.lua index f68253b507..f32fed2e39 100644 --- a/cocos/scripting/lua-bindings/auto/api/PageView.lua +++ b/cocos/scripting/lua-bindings/auto/api/PageView.lua @@ -5,114 +5,150 @@ -- @parent_module ccui -------------------------------- +-- brief Return user defined scroll page threshold -- @function [parent=#PageView] getCustomScrollThreshold -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets current page index.
+-- return current page index. -- @function [parent=#PageView] getCurPageIndex -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Add a widget to a page of pageview.
+-- param widget widget to be added to pageview.
+-- param pageIdx index of page.
+-- param forceCreate if force create and there is no page exsit, pageview would create a default page for adding widget. -- @function [parent=#PageView] addWidgetToPage -- @param self -- @param #ccui.Widget widget --- @param #long long --- @param #bool bool +-- @param #long pageIdx +-- @param #bool forceCreate -------------------------------- +-- brief Query whether we are using user defined scroll page threshold or not -- @function [parent=#PageView] isUsingCustomScrollThreshold -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#PageView] getPage -- @param self --- @param #long long +-- @param #long index -- @return Layout#Layout ret (return value: ccui.Layout) -------------------------------- +-- Remove a page of pageview.
+-- param page page which will be removed. -- @function [parent=#PageView] removePage -- @param self --- @param #ccui.Layout layout +-- @param #ccui.Layout page -------------------------------- +-- -- @function [parent=#PageView] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- brief Set using user defined scroll page threshold or not
+-- If you set it to false, then the default scroll threshold is pageView.width / 2 -- @function [parent=#PageView] setUsingCustomScrollThreshold -- @param self --- @param #bool bool +-- @param #bool flag -------------------------------- +-- brief If you don't specify the value, the pageView will scroll when half pageview width reached -- @function [parent=#PageView] setCustomScrollThreshold -- @param self --- @param #float float +-- @param #float threshold -------------------------------- +-- Insert a page to pageview.
+-- param page page to be added to pageview. -- @function [parent=#PageView] insertPage -- @param self --- @param #ccui.Layout layout --- @param #int int +-- @param #ccui.Layout page +-- @param #int idx -------------------------------- +-- scroll pageview to index.
+-- param idx index of page. -- @function [parent=#PageView] scrollToPage -- @param self --- @param #long long +-- @param #long idx -------------------------------- +-- Remove a page at index of pageview.
+-- param index index of page. -- @function [parent=#PageView] removePageAtIndex -- @param self --- @param #long long +-- @param #long index -------------------------------- +-- -- @function [parent=#PageView] getPages -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#PageView] removeAllPages -- @param self -------------------------------- +-- Push back a page to pageview.
+-- param page page to be added to pageview. -- @function [parent=#PageView] addPage -- @param self --- @param #ccui.Layout layout +-- @param #ccui.Layout page -------------------------------- +-- Allocates and initializes. -- @function [parent=#PageView] create -- @param self -- @return PageView#PageView ret (return value: ccui.PageView) -------------------------------- +-- -- @function [parent=#PageView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- Gets LayoutType.
+-- see LayoutType
+-- return LayoutType -- @function [parent=#PageView] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#PageView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#PageView] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- Sets LayoutType.
+-- see LayoutType
+-- param type LayoutType -- @function [parent=#PageView] setLayoutType -- @param self -- @param #int type -------------------------------- +-- Default constructor -- @function [parent=#PageView] PageView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua b/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua index 3a55ee2e5a..08e5385b90 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua @@ -5,19 +5,22 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParallaxNode] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #cc.Node child +-- @param #int z +-- @param #vec2_table parallaxRatio +-- @param #vec2_table positionOffset -------------------------------- +-- -- @function [parent=#ParallaxNode] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#ParallaxNode] create -- @param self -- @return ParallaxNode#ParallaxNode ret (return value: cc.ParallaxNode) @@ -27,21 +30,23 @@ -- @overload self, cc.Node, int, int -- @function [parent=#ParallaxNode] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#ParallaxNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#ParallaxNode] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua b/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua index 1adde946b7..7207e4e41e 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua @@ -5,59 +5,69 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleBatchNode] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- disables a particle by inserting a 0'd quad into the texture atlas -- @function [parent=#ParticleBatchNode] disableParticle -- @param self --- @param #int int +-- @param #int particleIndex -------------------------------- +-- -- @function [parent=#ParticleBatchNode] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- Sets the texture atlas used for drawing the quads -- @function [parent=#ParticleBatchNode] setTextureAtlas -- @param self --- @param #cc.TextureAtlas textureatlas +-- @param #cc.TextureAtlas atlas -------------------------------- +-- -- @function [parent=#ParticleBatchNode] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool doCleanup -------------------------------- +-- Gets the texture atlas used for drawing the quads -- @function [parent=#ParticleBatchNode] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- +-- Inserts a child into the ParticleBatchNode -- @function [parent=#ParticleBatchNode] insertChild -- @param self --- @param #cc.ParticleSystem particlesystem --- @param #int int +-- @param #cc.ParticleSystem system +-- @param #int index -------------------------------- +-- -- @function [parent=#ParticleBatchNode] removeChildAtIndex -- @param self --- @param #int int --- @param #bool bool +-- @param #int index +-- @param #bool doCleanup -------------------------------- +-- initializes the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles -- @function [parent=#ParticleBatchNode] create -- @param self --- @param #string str --- @param #int int +-- @param #string fileImage +-- @param #int capacity -- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode) -------------------------------- +-- initializes the particle system with Texture2D, a capacity of particles, which particle system to use -- @function [parent=#ParticleBatchNode] createWithTexture -- @param self --- @param #cc.Texture2D texture2d --- @param #int int +-- @param #cc.Texture2D tex +-- @param #int capacity -- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode) -------------------------------- @@ -65,34 +75,38 @@ -- @overload self, cc.Node, int, int -- @function [parent=#ParticleBatchNode] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#ParticleBatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#ParticleBatchNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#ParticleBatchNode] reorderChild -- @param self --- @param #cc.Node node --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder -------------------------------- +-- -- @function [parent=#ParticleBatchNode] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua b/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua index d9f24aa9d7..7e2361d90e 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua @@ -5,11 +5,13 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ParticleDisplayData] create -- @param self -- @return ParticleDisplayData#ParticleDisplayData ret (return value: ccs.ParticleDisplayData) -------------------------------- +-- js ctor -- @function [parent=#ParticleDisplayData] ParticleDisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua b/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua index 693f1ebd46..5fded9bb0f 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleExplosion] create -- @param self -- @return ParticleExplosion#ParticleExplosion ret (return value: cc.ParticleExplosion) -------------------------------- +-- -- @function [parent=#ParticleExplosion] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleExplosion#ParticleExplosion ret (return value: cc.ParticleExplosion) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua b/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua index 1c9d89cda7..d26181214a 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleFire] create -- @param self -- @return ParticleFire#ParticleFire ret (return value: cc.ParticleFire) -------------------------------- +-- -- @function [parent=#ParticleFire] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleFire#ParticleFire ret (return value: cc.ParticleFire) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua b/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua index 3a6549d5ab..cf8cc88409 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleFireworks] create -- @param self -- @return ParticleFireworks#ParticleFireworks ret (return value: cc.ParticleFireworks) -------------------------------- +-- -- @function [parent=#ParticleFireworks] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleFireworks#ParticleFireworks ret (return value: cc.ParticleFireworks) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua b/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua index 55c7f9cd33..1d69ebf5ec 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleFlower] create -- @param self -- @return ParticleFlower#ParticleFlower ret (return value: cc.ParticleFlower) -------------------------------- +-- -- @function [parent=#ParticleFlower] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleFlower#ParticleFlower ret (return value: cc.ParticleFlower) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua b/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua index c99c2ead77..5ec68f2b85 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleGalaxy] create -- @param self -- @return ParticleGalaxy#ParticleGalaxy ret (return value: cc.ParticleGalaxy) -------------------------------- +-- -- @function [parent=#ParticleGalaxy] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleGalaxy#ParticleGalaxy ret (return value: cc.ParticleGalaxy) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua b/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua index 556a9f56ca..ed1c10d29f 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleMeteor] create -- @param self -- @return ParticleMeteor#ParticleMeteor ret (return value: cc.ParticleMeteor) -------------------------------- +-- -- @function [parent=#ParticleMeteor] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleMeteor#ParticleMeteor ret (return value: cc.ParticleMeteor) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua b/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua index 36921412b2..602a43e5fc 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleRain] create -- @param self -- @return ParticleRain#ParticleRain ret (return value: cc.ParticleRain) -------------------------------- +-- -- @function [parent=#ParticleRain] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleRain#ParticleRain ret (return value: cc.ParticleRain) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua index 61c5124bf6..8ba9f90ca0 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleSmoke] create -- @param self -- @return ParticleSmoke#ParticleSmoke ret (return value: cc.ParticleSmoke) -------------------------------- +-- -- @function [parent=#ParticleSmoke] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSmoke#ParticleSmoke ret (return value: cc.ParticleSmoke) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua index 9f72153785..4b872058bb 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleSnow] create -- @param self -- @return ParticleSnow#ParticleSnow ret (return value: cc.ParticleSnow) -------------------------------- +-- -- @function [parent=#ParticleSnow] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSnow#ParticleSnow ret (return value: cc.ParticleSnow) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua index 0179b56720..6f653e601d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleSpiral] create -- @param self -- @return ParticleSpiral#ParticleSpiral ret (return value: cc.ParticleSpiral) -------------------------------- +-- -- @function [parent=#ParticleSpiral] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSpiral#ParticleSpiral ret (return value: cc.ParticleSpiral) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua index 93f07dafde..d702a58839 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleSun] create -- @param self -- @return ParticleSun#ParticleSun ret (return value: cc.ParticleSun) -------------------------------- +-- -- @function [parent=#ParticleSun] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSun#ParticleSun ret (return value: cc.ParticleSun) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua index 3a36b92a5c..5151144bb3 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua @@ -5,506 +5,613 @@ -- @parent_module cc -------------------------------- +-- size variance in pixels of each particle -- @function [parent=#ParticleSystem] getStartSizeVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- whether or not the system is full -- @function [parent=#ParticleSystem] isFull -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] getBatchNode -- @param self -- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode) -------------------------------- +-- start color of each particle -- @function [parent=#ParticleSystem] getStartColor -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- +-- particles movement type: Free or Grouped
+-- since v0.8 -- @function [parent=#ParticleSystem] getPositionType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ParticleSystem] setPosVar -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#ParticleSystem] getEndSpin -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setRotatePerSecondVar -- @param self --- @param #float float +-- @param #float degrees -------------------------------- +-- -- @function [parent=#ParticleSystem] getStartSpinVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] getRadialAccelVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- end size variance in pixels of each particle -- @function [parent=#ParticleSystem] getEndSizeVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setRotation -- @param self --- @param #float float +-- @param #float newRotation -------------------------------- +-- -- @function [parent=#ParticleSystem] setTangentialAccel -- @param self --- @param #float float +-- @param #float t -------------------------------- +-- -- @function [parent=#ParticleSystem] setScaleY -- @param self --- @param #float float +-- @param #float newScaleY -------------------------------- +-- -- @function [parent=#ParticleSystem] setScaleX -- @param self --- @param #float float +-- @param #float newScaleX -------------------------------- +-- -- @function [parent=#ParticleSystem] getRadialAccel -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartRadius -- @param self --- @param #float float +-- @param #float startRadius -------------------------------- +-- -- @function [parent=#ParticleSystem] setRotatePerSecond -- @param self --- @param #float float +-- @param #float degrees -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndSize -- @param self --- @param #float float +-- @param #float endSize -------------------------------- +-- -- @function [parent=#ParticleSystem] getGravity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ParticleSystem] getTangentialAccel -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndRadius -- @param self --- @param #float float +-- @param #float endRadius -------------------------------- +-- -- @function [parent=#ParticleSystem] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- angle and angle variation of each particle -- @function [parent=#ParticleSystem] getAngle -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndColor -- @param self --- @param #color4f_table color4f +-- @param #color4f_table color -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartSpin -- @param self --- @param #float float +-- @param #float spin -------------------------------- +-- -- @function [parent=#ParticleSystem] setDuration -- @param self --- @param #float float +-- @param #float duration -------------------------------- +-- -- @function [parent=#ParticleSystem] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- Position variance of the emitter -- @function [parent=#ParticleSystem] getPosVar -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ParticleSystem] updateWithNoTime -- @param self -------------------------------- +-- -- @function [parent=#ParticleSystem] isBlendAdditive -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] getSpeedVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setPositionType -- @param self --- @param #int positiontype +-- @param #int type -------------------------------- +-- stop emitting particles. Running particles will continue to run until they die -- @function [parent=#ParticleSystem] stopSystem -- @param self -------------------------------- +-- sourcePosition of the emitter -- @function [parent=#ParticleSystem] getSourcePosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ParticleSystem] setLifeVar -- @param self --- @param #float float +-- @param #float lifeVar -------------------------------- +-- -- @function [parent=#ParticleSystem] setTotalParticles -- @param self --- @param #int int +-- @param #int totalParticles -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndColorVar -- @param self --- @param #color4f_table color4f +-- @param #color4f_table color -------------------------------- +-- -- @function [parent=#ParticleSystem] getAtlasIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- start size in pixels of each particle -- @function [parent=#ParticleSystem] getStartSize -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartSpinVar -- @param self --- @param #float float +-- @param #float pinVar -------------------------------- +-- Kill all living particles. -- @function [parent=#ParticleSystem] resetSystem -- @param self -------------------------------- +-- -- @function [parent=#ParticleSystem] setAtlasIndex -- @param self --- @param #int int +-- @param #int index -------------------------------- +-- -- @function [parent=#ParticleSystem] setTangentialAccelVar -- @param self --- @param #float float +-- @param #float t -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndRadiusVar -- @param self --- @param #float float +-- @param #float endRadiusVar -------------------------------- +-- -- @function [parent=#ParticleSystem] getEndRadius -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] isActive -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] setRadialAccelVar -- @param self --- @param #float float +-- @param #float t -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartSize -- @param self --- @param #float float +-- @param #float startSize -------------------------------- +-- -- @function [parent=#ParticleSystem] setSpeed -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- -- @function [parent=#ParticleSystem] getStartSpin -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] getRotatePerSecond -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setEmitterMode -- @param self -- @param #int mode -------------------------------- +-- How many seconds the emitter will run. -1 means 'forever' -- @function [parent=#ParticleSystem] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setSourcePosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#ParticleSystem] getEndSpinVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setBlendAdditive -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- -- @function [parent=#ParticleSystem] setLife -- @param self --- @param #float float +-- @param #float life -------------------------------- +-- -- @function [parent=#ParticleSystem] setAngleVar -- @param self --- @param #float float +-- @param #float angleVar -------------------------------- +-- -- @function [parent=#ParticleSystem] setRotationIsDir -- @param self --- @param #bool bool +-- @param #bool t -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndSizeVar -- @param self --- @param #float float +-- @param #float sizeVar -------------------------------- +-- -- @function [parent=#ParticleSystem] setAngle -- @param self --- @param #float float +-- @param #float angle -------------------------------- +-- -- @function [parent=#ParticleSystem] setBatchNode -- @param self --- @param #cc.ParticleBatchNode particlebatchnode +-- @param #cc.ParticleBatchNode batchNode -------------------------------- +-- -- @function [parent=#ParticleSystem] getTangentialAccelVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Switch between different kind of emitter modes:
+-- - kParticleModeGravity: uses gravity, speed, radial and tangential acceleration
+-- - kParticleModeRadius: uses radius movement + rotation -- @function [parent=#ParticleSystem] getEmitterMode -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndSpinVar -- @param self --- @param #float float +-- @param #float endSpinVar -------------------------------- +-- angle variance of each particle -- @function [parent=#ParticleSystem] getAngleVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartColor -- @param self --- @param #color4f_table color4f +-- @param #color4f_table color -------------------------------- +-- -- @function [parent=#ParticleSystem] getRotatePerSecondVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- end size in pixels of each particle -- @function [parent=#ParticleSystem] getEndSize -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- life, and life variation of each particle -- @function [parent=#ParticleSystem] getLife -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setSpeedVar -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- -- @function [parent=#ParticleSystem] setAutoRemoveOnFinish -- @param self --- @param #bool bool +-- @param #bool var -------------------------------- +-- -- @function [parent=#ParticleSystem] setGravity -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table g -------------------------------- +-- should be overridden by subclasses -- @function [parent=#ParticleSystem] postStep -- @param self -------------------------------- +-- -- @function [parent=#ParticleSystem] setEmissionRate -- @param self --- @param #float float +-- @param #float rate -------------------------------- +-- end color variance of each particle -- @function [parent=#ParticleSystem] getEndColorVar -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- +-- -- @function [parent=#ParticleSystem] getRotationIsDir -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] setScale -- @param self --- @param #float float +-- @param #float s -------------------------------- +-- emission rate of the particles -- @function [parent=#ParticleSystem] getEmissionRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- end color and end color variation of each particle -- @function [parent=#ParticleSystem] getEndColor -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- +-- life variance of each particle -- @function [parent=#ParticleSystem] getLifeVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartSizeVar -- @param self --- @param #float float +-- @param #float sizeVar -------------------------------- +-- does the alpha value modify color -- @function [parent=#ParticleSystem] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool opacityModifyRGB -------------------------------- +-- Add a particle to the emitter -- @function [parent=#ParticleSystem] addParticle -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] getStartRadius -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Quantity of particles that are being simulated at the moment -- @function [parent=#ParticleSystem] getParticleCount -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#ParticleSystem] getStartRadiusVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartColorVar -- @param self --- @param #color4f_table color4f +-- @param #color4f_table color -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndSpin -- @param self --- @param #float float +-- @param #float endSpin -------------------------------- +-- -- @function [parent=#ParticleSystem] setRadialAccel -- @param self --- @param #float float +-- @param #float t -------------------------------- +-- -- @function [parent=#ParticleSystem] isAutoRemoveOnFinish -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- maximum particles of the system -- @function [parent=#ParticleSystem] getTotalParticles -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartRadiusVar -- @param self --- @param #float float +-- @param #float startRadiusVar -------------------------------- +-- -- @function [parent=#ParticleSystem] getEndRadiusVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- start color variance of each particle -- @function [parent=#ParticleSystem] getStartColorVar -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- +-- creates an initializes a ParticleSystem from a plist file.
+-- This plist files can be created manually or with Particle Designer:
+-- http:particledesigner.71squared.com/
+-- since v2.0 -- @function [parent=#ParticleSystem] create -- @param self --- @param #string str +-- @param #string plistFile -- @return ParticleSystem#ParticleSystem ret (return value: cc.ParticleSystem) -------------------------------- +-- create a system with a fixed number of particles -- @function [parent=#ParticleSystem] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSystem#ParticleSystem ret (return value: cc.ParticleSystem) -------------------------------- +-- -- @function [parent=#ParticleSystem] update -- @param self --- @param #float float +-- @param #float dt return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua index 92e7402676..b4efdc78a4 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua @@ -5,20 +5,30 @@ -- @parent_module cc -------------------------------- +-- Sets a new SpriteFrame as particle.
+-- WARNING: this method is experimental. Use setTextureWithRect instead.
+-- since v0.99.4 -- @function [parent=#ParticleSystemQuad] setDisplayFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame spriteFrame -------------------------------- +-- Sets a new texture with a rect. The rect is in Points.
+-- since v0.99.4
+-- js NA
+-- lua NA -- @function [parent=#ParticleSystemQuad] setTextureWithRect -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -- @param #rect_table rect -------------------------------- +-- listen the event that renderer was recreated on Android/WP8
+-- js NA
+-- lua NA -- @function [parent=#ParticleSystemQuad] listenRendererRecreated -- @param self --- @param #cc.EventCustom eventcustom +-- @param #cc.EventCustom event -------------------------------- -- @overload self, string @@ -26,16 +36,18 @@ -- @overload self, map_table -- @function [parent=#ParticleSystemQuad] create -- @param self --- @param #map_table map +-- @param #map_table dictionary -- @return ParticleSystemQuad#ParticleSystemQuad ret (retunr value: cc.ParticleSystemQuad) -------------------------------- +-- creates a Particle Emitter with a number of particles -- @function [parent=#ParticleSystemQuad] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSystemQuad#ParticleSystemQuad ret (return value: cc.ParticleSystemQuad) -------------------------------- +-- -- @function [parent=#ParticleSystemQuad] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua index 6e90f80f52..62e4933a0b 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua @@ -5,45 +5,56 @@ -- @parent_module cc -------------------------------- +-- whether this physics body is affected by the physics world’s gravitational force. -- @function [parent=#PhysicsBody] isGravityEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- reset all the force applied to body. -- @function [parent=#PhysicsBody] resetForces -- @param self -------------------------------- +-- get the max of velocity -- @function [parent=#PhysicsBody] getVelocityLimit -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set the group of body
+-- Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index)
+-- it have high priority than bit masks -- @function [parent=#PhysicsBody] setGroup -- @param self --- @param #int int +-- @param #int group -------------------------------- +-- get the body mass. -- @function [parent=#PhysicsBody] getMass -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Return bitmask of first shape, if there is no shape in body, return default value.(0xFFFFFFFF) -- @function [parent=#PhysicsBody] getCollisionBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- set the body rotation offset -- @function [parent=#PhysicsBody] getRotationOffset -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get the body rotation. -- @function [parent=#PhysicsBody] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get the body moment of inertia. -- @function [parent=#PhysicsBody] getMoment -- @param self -- @return float#float ret (return value: float) @@ -53,166 +64,204 @@ -- @overload self, vec2_table -- @function [parent=#PhysicsBody] applyImpulse -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #vec2_table impulse +-- @param #vec2_table offset -------------------------------- +-- set body rotation offset, it's the rotation witch relative to node -- @function [parent=#PhysicsBody] setRotationOffset -- @param self --- @param #float float +-- @param #float rotation -------------------------------- -- @overload self, vec2_table, vec2_table -- @overload self, vec2_table -- @function [parent=#PhysicsBody] applyForce -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #vec2_table force +-- @param #vec2_table offset -------------------------------- +-- -- @function [parent=#PhysicsBody] addShape -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #bool bool +-- @param #cc.PhysicsShape shape +-- @param #bool addMassAndMoment -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- +-- Applies a torque force to body. -- @function [parent=#PhysicsBody] applyTorque -- @param self --- @param #float float +-- @param #float torque -------------------------------- +-- get the max of angular velocity -- @function [parent=#PhysicsBody] getAngularVelocityLimit -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set the max of angular velocity -- @function [parent=#PhysicsBody] setAngularVelocityLimit -- @param self --- @param #float float +-- @param #float limit -------------------------------- +-- get the velocity of a body -- @function [parent=#PhysicsBody] getVelocity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- get linear damping. -- @function [parent=#PhysicsBody] getLinearDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsBody] removeAllShapes -- @param self -------------------------------- +-- set angular damping.
+-- it is used to simulate fluid or air friction forces on the body.
+-- the value is 0.0f to 1.0f. -- @function [parent=#PhysicsBody] setAngularDamping -- @param self --- @param #float float +-- @param #float damping -------------------------------- +-- set the max of velocity -- @function [parent=#PhysicsBody] setVelocityLimit -- @param self --- @param #float float +-- @param #float limit -------------------------------- +-- set body to rest -- @function [parent=#PhysicsBody] setResting -- @param self --- @param #bool bool +-- @param #bool rest -------------------------------- +-- get body position offset. -- @function [parent=#PhysicsBody] getPositionOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- A mask that defines which categories this physics body belongs to.
+-- Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions.
+-- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsBody] setCategoryBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- get the world body added to. -- @function [parent=#PhysicsBody] getWorld -- @param self -- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld) -------------------------------- +-- get the angular velocity of a body -- @function [parent=#PhysicsBody] getAngularVelocity -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get the body position. -- @function [parent=#PhysicsBody] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- set the enable value.
+-- if the body it isn't enabled, it will not has simulation by world -- @function [parent=#PhysicsBody] setEnable -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- set the body is affected by the physics world's gravitational force or not. -- @function [parent=#PhysicsBody] setGravityEnable -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- Return group of first shape, if there is no shape in body, return default value.(0) -- @function [parent=#PhysicsBody] getGroup -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- brief set the body moment of inertia.
+-- note if you need add/subtract moment to body, don't use setMoment(getMoment() +/- moment), because the moment of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMoment() instead. -- @function [parent=#PhysicsBody] setMoment -- @param self --- @param #float float +-- @param #float moment -------------------------------- +-- get the body's tag -- @function [parent=#PhysicsBody] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- convert the local point to world -- @function [parent=#PhysicsBody] local2World -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Return bitmask of first shape, if there is no shape in body, return default value.(0xFFFFFFFF) -- @function [parent=#PhysicsBody] getCategoryBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- brief set dynamic to body.
+-- a dynamic body will effect with gravity. -- @function [parent=#PhysicsBody] setDynamic -- @param self --- @param #bool bool +-- @param #bool dynamic -------------------------------- +-- -- @function [parent=#PhysicsBody] getFirstShape -- @param self -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- +-- -- @function [parent=#PhysicsBody] getShapes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Return bitmask of first shape, if there is no shape in body, return default value.(0x00000000) -- @function [parent=#PhysicsBody] getContactTestBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- set the angular velocity of a body -- @function [parent=#PhysicsBody] setAngularVelocity -- @param self --- @param #float float +-- @param #float velocity -------------------------------- +-- convert the world point to local -- @function [parent=#PhysicsBody] world2Local -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- whether the body is enabled
+-- if the body it isn't enabled, it will not has simulation by world -- @function [parent=#PhysicsBody] isEnabled -- @param self -- @return bool#bool ret (return value: bool) @@ -222,121 +271,160 @@ -- @overload self, cc.PhysicsShape, bool -- @function [parent=#PhysicsBody] removeShape -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #bool bool +-- @param #cc.PhysicsShape shape +-- @param #bool reduceMassAndMoment -------------------------------- +-- brief set the body mass.
+-- note if you need add/subtract mass to body, don't use setMass(getMass() +/- mass), because the mass of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMass() instead. -- @function [parent=#PhysicsBody] setMass -- @param self --- @param #float float +-- @param #float mass -------------------------------- +-- brief add moment of inertia to body.
+-- if _moment(moment of the body) == PHYSICS_INFINITY, it remains.
+-- if moment == PHYSICS_INFINITY, _moment will be PHYSICS_INFINITY.
+-- if moment == -PHYSICS_INFINITY, _moment will not change.
+-- if moment + _moment <= 0, _moment will equal to MASS_DEFAULT(1.0)
+-- other wise, moment = moment + _moment; -- @function [parent=#PhysicsBody] addMoment -- @param self --- @param #float float +-- @param #float moment -------------------------------- +-- set the velocity of a body -- @function [parent=#PhysicsBody] setVelocity -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table velocity -------------------------------- +-- set linear damping.
+-- it is used to simulate fluid or air friction forces on the body.
+-- the value is 0.0f to 1.0f. -- @function [parent=#PhysicsBody] setLinearDamping -- @param self --- @param #float float +-- @param #float damping -------------------------------- +-- A mask that defines which categories of physics bodies can collide with this physics body.
+-- When two physics bodies contact each other, a collision may occur. This body’s collision mask is compared to the other body’s category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body’s velocity.
+-- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsBody] setCollisionBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- set body position offset, it's the position witch relative to node -- @function [parent=#PhysicsBody] setPositionOffset -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- set the body is allow rotation or not -- @function [parent=#PhysicsBody] setRotationEnable -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- whether the body can rotation -- @function [parent=#PhysicsBody] isRotationEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- get angular damping. -- @function [parent=#PhysicsBody] getAngularDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get the angular velocity of a body at a local point -- @function [parent=#PhysicsBody] getVelocityAtLocalPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- whether the body is at rest -- @function [parent=#PhysicsBody] isResting -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief add mass to body.
+-- if _mass(mass of the body) == PHYSICS_INFINITY, it remains.
+-- if mass == PHYSICS_INFINITY, _mass will be PHYSICS_INFINITY.
+-- if mass == -PHYSICS_INFINITY, _mass will not change.
+-- if mass + _mass <= 0, _mass will equal to MASS_DEFAULT(1.0)
+-- other wise, mass = mass + _mass; -- @function [parent=#PhysicsBody] addMass -- @param self --- @param #float float +-- @param #float mass -------------------------------- +-- -- @function [parent=#PhysicsBody] getShape -- @param self --- @param #int int +-- @param #int tag -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- +-- set the body's tag -- @function [parent=#PhysicsBody] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- get the angular velocity of a body at a world point -- @function [parent=#PhysicsBody] getVelocityAtWorldPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- A mask that defines which categories of bodies cause intersection notifications with this physics body.
+-- When two bodies share the same space, each body’s category mask is tested against the other body’s contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
+-- The default value is 0x00000000 (all bits cleared). -- @function [parent=#PhysicsBody] setContactTestBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- remove the body from the world it added to -- @function [parent=#PhysicsBody] removeFromWorld -- @param self -------------------------------- +-- brief test the body is dynamic or not.
+-- a dynamic body will effect with gravity. -- @function [parent=#PhysicsBody] isDynamic -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- get the sprite the body set to. -- @function [parent=#PhysicsBody] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Create a body contains a box shape. -- @function [parent=#PhysicsBody] createBox -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial physicsmaterial --- @param #vec2_table vec2 +-- @param #cc.PhysicsMaterial material +-- @param #vec2_table offset -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- +-- Create a body contains a EdgeSegment shape. -- @function [parent=#PhysicsBody] createEdgeSegment -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #cc.PhysicsMaterial physicsmaterial --- @param #float float +-- @param #vec2_table a +-- @param #vec2_table b +-- @param #cc.PhysicsMaterial material +-- @param #float border -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- @@ -345,25 +433,27 @@ -- @overload self, float, float -- @function [parent=#PhysicsBody] create -- @param self --- @param #float float --- @param #float float +-- @param #float mass +-- @param #float moment -- @return PhysicsBody#PhysicsBody ret (retunr value: cc.PhysicsBody) -------------------------------- +-- Create a body contains a EdgeBox shape. -- @function [parent=#PhysicsBody] createEdgeBox -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial physicsmaterial --- @param #float float --- @param #vec2_table vec2 +-- @param #cc.PhysicsMaterial material +-- @param #float border +-- @param #vec2_table offset -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- +-- Create a body contains a circle shape. -- @function [parent=#PhysicsBody] createCircle -- @param self --- @param #float float --- @param #cc.PhysicsMaterial physicsmaterial --- @param #vec2_table vec2 +-- @param #float radius +-- @param #cc.PhysicsMaterial material +-- @param #vec2_table offset -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua index 30d6f985d3..c7fce04e0a 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua @@ -5,26 +5,31 @@ -- @parent_module cc -------------------------------- +-- get contact data -- @function [parent=#PhysicsContact] getContactData -- @param self -- @return PhysicsContactData#PhysicsContactData ret (return value: cc.PhysicsContactData) -------------------------------- +-- get the event code -- @function [parent=#PhysicsContact] getEventCode -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- get previous contact data -- @function [parent=#PhysicsContact] getPreContactData -- @param self -- @return PhysicsContactData#PhysicsContactData ret (return value: cc.PhysicsContactData) -------------------------------- +-- get contact shape A. -- @function [parent=#PhysicsContact] getShapeA -- @param self -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- +-- get contact shape B. -- @function [parent=#PhysicsContact] getShapeB -- @param self -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua index 30efdef896..15b4e7932a 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua @@ -4,16 +4,19 @@ -- @parent_module cc -------------------------------- +-- get friction between two bodies -- @function [parent=#PhysicsContactPostSolve] getFriction -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get surface velocity between two bodies -- @function [parent=#PhysicsContactPostSolve] getSurfaceVelocity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- get restitution between two bodies -- @function [parent=#PhysicsContactPostSolve] getRestitution -- @param self -- @return float#float ret (return value: float) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua index fdf2df8e50..911ca67ece 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua @@ -4,37 +4,44 @@ -- @parent_module cc -------------------------------- +-- get friction between two bodies -- @function [parent=#PhysicsContactPreSolve] getFriction -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get restitution between two bodies -- @function [parent=#PhysicsContactPreSolve] getRestitution -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set the friction -- @function [parent=#PhysicsContactPreSolve] setFriction -- @param self --- @param #float float +-- @param #float friction -------------------------------- +-- ignore the rest of the contact presolve and postsolve callbacks -- @function [parent=#PhysicsContactPreSolve] ignore -- @param self -------------------------------- +-- get surface velocity between two bodies -- @function [parent=#PhysicsContactPreSolve] getSurfaceVelocity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- set the surface velocity -- @function [parent=#PhysicsContactPreSolve] setSurfaceVelocity -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table velocity -------------------------------- +-- set the restitution -- @function [parent=#PhysicsContactPreSolve] setRestitution -- @param self --- @param #float float +-- @param #float restitution return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua index 93cffc0a79..bd755d2459 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua @@ -4,67 +4,80 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJoint] getBodyA -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- +-- -- @function [parent=#PhysicsJoint] getBodyB -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- +-- Get the max force setting -- @function [parent=#PhysicsJoint] getMaxForce -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Set the max force between two bodies -- @function [parent=#PhysicsJoint] setMaxForce -- @param self --- @param #float float +-- @param #float force -------------------------------- +-- -- @function [parent=#PhysicsJoint] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Enable/Disable the joint -- @function [parent=#PhysicsJoint] setEnable -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- Enable/disable the collision between two bodies -- @function [parent=#PhysicsJoint] setCollisionEnable -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#PhysicsJoint] getWorld -- @param self -- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld) -------------------------------- +-- -- @function [parent=#PhysicsJoint] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- Remove the joint from the world -- @function [parent=#PhysicsJoint] removeFormWorld -- @param self -------------------------------- +-- -- @function [parent=#PhysicsJoint] isCollisionEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#PhysicsJoint] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Distory the joint -- @function [parent=#PhysicsJoint] destroy -- @param self --- @param #cc.PhysicsJoint physicsjoint +-- @param #cc.PhysicsJoint joint return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua index 854ab0a0da..2bfabc2470 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointDistance] setDistance -- @param self --- @param #float float +-- @param #float distance -------------------------------- +-- -- @function [parent=#PhysicsJointDistance] getDistance -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointDistance] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table anchr1 +-- @param #vec2_table anchr2 -- @return PhysicsJointDistance#PhysicsJointDistance ret (return value: cc.PhysicsJointDistance) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua index b3daf9fcb2..a4f86b1dc5 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua @@ -5,11 +5,12 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointFixed] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table anchr -- @return PhysicsJointFixed#PhysicsJointFixed ret (return value: cc.PhysicsJointFixed) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua index 08c0c858cf..80c94bce3b 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua @@ -5,32 +5,37 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointGear] setRatio -- @param self --- @param #float float +-- @param #float ratchet -------------------------------- +-- -- @function [parent=#PhysicsJointGear] getPhase -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointGear] setPhase -- @param self --- @param #float float +-- @param #float phase -------------------------------- +-- -- @function [parent=#PhysicsJointGear] getRatio -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointGear] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #float phase +-- @param #float ratio -- @return PhysicsJointGear#PhysicsJointGear ret (return value: cc.PhysicsJointGear) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua index 9f71e7cfc6..1e0c0f8b9e 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua @@ -5,43 +5,50 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] setAnchr2 -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchr2 -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] setGrooveA -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table grooveA -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] setGrooveB -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table grooveB -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] getGrooveA -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] getGrooveB -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] getAnchr2 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table grooveA +-- @param #vec2_table grooveB +-- @param #vec2_table anchr2 -- @return PhysicsJointGroove#PhysicsJointGroove ret (return value: cc.PhysicsJointGroove) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua index 796d4143c2..6b4a92acd8 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua @@ -5,56 +5,64 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] setAnchr2 -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchr2 -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] setAnchr1 -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchr1 -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] setMax -- @param self --- @param #float float +-- @param #float max -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] getAnchr2 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] getAnchr1 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] getMin -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] getMax -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] setMin -- @param self --- @param #float float +-- @param #float min -------------------------------- -- @overload self, cc.PhysicsBody, cc.PhysicsBody, vec2_table, vec2_table, float, float -- @overload self, cc.PhysicsBody, cc.PhysicsBody, vec2_table, vec2_table -- @function [parent=#PhysicsJointLimit] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table anchr1 +-- @param #vec2_table anchr2 +-- @param #float min +-- @param #float max -- @return PhysicsJointLimit#PhysicsJointLimit ret (retunr value: cc.PhysicsJointLimit) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua index 733df66a22..27f44d36aa 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua @@ -5,21 +5,24 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointMotor] setRate -- @param self --- @param #float float +-- @param #float rate -------------------------------- +-- -- @function [parent=#PhysicsJointMotor] getRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointMotor] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #float rate -- @return PhysicsJointMotor#PhysicsJointMotor ret (return value: cc.PhysicsJointMotor) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua index 0934a2f851..c45189c216 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua @@ -5,11 +5,12 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointPin] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table anchr -- @return PhysicsJointPin#PhysicsJointPin ret (return value: cc.PhysicsJointPin) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua index 7002033ba4..f61f444ffd 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] getAngle -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] setAngle -- @param self --- @param #float float +-- @param #float angle -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] setPhase -- @param self --- @param #float float +-- @param #float phase -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] getPhase -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] setRatchet -- @param self --- @param #float float +-- @param #float ratchet -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] getRatchet -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #float phase +-- @param #float ratchet -- @return PhysicsJointRatchet#PhysicsJointRatchet ret (return value: cc.PhysicsJointRatchet) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua index db5d66222e..8feaf87785 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointRotaryLimit] getMax -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRotaryLimit] setMin -- @param self --- @param #float float +-- @param #float min -------------------------------- +-- -- @function [parent=#PhysicsJointRotaryLimit] setMax -- @param self --- @param #float float +-- @param #float max -------------------------------- +-- -- @function [parent=#PhysicsJointRotaryLimit] getMin -- @param self -- @return float#float ret (return value: float) @@ -29,10 +33,10 @@ -- @overload self, cc.PhysicsBody, cc.PhysicsBody, float, float -- @function [parent=#PhysicsJointRotaryLimit] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #float min +-- @param #float max -- @return PhysicsJointRotaryLimit#PhysicsJointRotaryLimit ret (retunr value: cc.PhysicsJointRotaryLimit) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua index 56e2bc4242..e8df535554 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] getDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] setRestAngle -- @param self --- @param #float float +-- @param #float restAngle -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] getStiffness -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] setStiffness -- @param self --- @param #float float +-- @param #float stiffness -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] setDamping -- @param self --- @param #float float +-- @param #float damping -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] getRestAngle -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #float stiffness +-- @param #float damping -- @return PhysicsJointRotarySpring#PhysicsJointRotarySpring ret (return value: cc.PhysicsJointRotarySpring) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua index b3c3b916b6..0b177ac1f4 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua @@ -5,64 +5,75 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] setAnchr2 -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchr2 -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] setAnchr1 -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchr1 -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] getDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] setStiffness -- @param self --- @param #float float +-- @param #float stiffness -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] getRestLength -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] getAnchr2 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] getAnchr1 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] getStiffness -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] setRestLength -- @param self --- @param #float float +-- @param #float restLength -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] setDamping -- @param self --- @param #float float +-- @param #float damping -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table anchr1 +-- @param #vec2_table anchr2 +-- @param #float stiffness +-- @param #float damping -- @return PhysicsJointSpring#PhysicsJointSpring ret (return value: cc.PhysicsJointSpring) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua index 56d5538836..f3ee8f5126 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua @@ -5,147 +5,184 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShape] getFriction -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set the group of body
+-- Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index)
+-- it have high priority than bit masks -- @function [parent=#PhysicsShape] setGroup -- @param self --- @param #int int +-- @param #int group -------------------------------- +-- -- @function [parent=#PhysicsShape] setDensity -- @param self --- @param #float float +-- @param #float density -------------------------------- +-- get mass -- @function [parent=#PhysicsShape] getMass -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShape] getMaterial -- @param self -- @return PhysicsMaterial#PhysicsMaterial ret (return value: cc.PhysicsMaterial) -------------------------------- +-- -- @function [parent=#PhysicsShape] getCollisionBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- return the area of this shape -- @function [parent=#PhysicsShape] getArea -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- A mask that defines which categories this physics body belongs to.
+-- Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions.
+-- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsShape] setCategoryBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- -- @function [parent=#PhysicsShape] getGroup -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Set moment, it will change the body's moment this shape attaches -- @function [parent=#PhysicsShape] setMoment -- @param self --- @param #float float +-- @param #float moment -------------------------------- +-- Test point is in shape or not -- @function [parent=#PhysicsShape] containsPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#PhysicsShape] getCategoryBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Return the type of this shape -- @function [parent=#PhysicsShape] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#PhysicsShape] getContactTestBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Get center of this shape -- @function [parent=#PhysicsShape] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShape] getDensity -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Set mass, it will change the body's mass this shape attaches -- @function [parent=#PhysicsShape] setMass -- @param self --- @param #float float +-- @param #float mass -------------------------------- +-- -- @function [parent=#PhysicsShape] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Calculate the default moment value -- @function [parent=#PhysicsShape] calculateDefaultMoment -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- A mask that defines which categories of physics bodies can collide with this physics body.
+-- When two physics bodies contact each other, a collision may occur. This body’s collision mask is compared to the other body’s category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body’s velocity.
+-- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsShape] setCollisionBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- get moment -- @function [parent=#PhysicsShape] getMoment -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Get offset -- @function [parent=#PhysicsShape] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShape] getRestitution -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShape] setFriction -- @param self --- @param #float float +-- @param #float friction -------------------------------- +-- -- @function [parent=#PhysicsShape] setMaterial -- @param self --- @param #cc.PhysicsMaterial physicsmaterial +-- @param #cc.PhysicsMaterial material -------------------------------- +-- -- @function [parent=#PhysicsShape] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- A mask that defines which categories of bodies cause intersection notifications with this physics body.
+-- When two bodies share the same space, each body’s category mask is tested against the other body’s contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
+-- The default value is 0x00000000 (all bits cleared). -- @function [parent=#PhysicsShape] setContactTestBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- -- @function [parent=#PhysicsShape] setRestitution -- @param self --- @param #float float +-- @param #float restitution -------------------------------- +-- Get the body that this shape attaches -- @function [parent=#PhysicsShape] getBody -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua index 338ac5add2..a2a6c2a5ac 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua @@ -5,19 +5,22 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeBox] getSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#PhysicsShapeBox] create -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial physicsmaterial --- @param #vec2_table vec2 +-- @param #cc.PhysicsMaterial material +-- @param #vec2_table offset -- @return PhysicsShapeBox#PhysicsShapeBox ret (return value: cc.PhysicsShapeBox) -------------------------------- +-- -- @function [parent=#PhysicsShapeBox] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua index 2fb52b6df9..324465d163 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua @@ -5,38 +5,44 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] getRadius -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] create -- @param self --- @param #float float --- @param #cc.PhysicsMaterial physicsmaterial --- @param #vec2_table vec2 +-- @param #float radius +-- @param #cc.PhysicsMaterial material +-- @param #vec2_table offset -- @return PhysicsShapeCircle#PhysicsShapeCircle ret (return value: cc.PhysicsShapeCircle) -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] calculateArea -- @param self --- @param #float float +-- @param #float radius -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] calculateMoment -- @param self --- @param #float float --- @param #float float --- @param #vec2_table vec2 +-- @param #float mass +-- @param #float radius +-- @param #vec2_table offset -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] calculateDefaultMoment -- @param self -- @return float#float ret (return value: float) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua index 6e879ad541..14fe760243 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua @@ -5,15 +5,17 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeBox] create -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial physicsmaterial --- @param #float float --- @param #vec2_table vec2 +-- @param #cc.PhysicsMaterial material +-- @param #float border +-- @param #vec2_table offset -- @return PhysicsShapeEdgeBox#PhysicsShapeEdgeBox ret (return value: cc.PhysicsShapeEdgeBox) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeBox] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua index d4dc91703e..40b42cf74a 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeChain] getPointsCount -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeChain] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua index d2bbb2d42e..de1165c4ae 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgePolygon] getPointsCount -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgePolygon] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua index c4588a7bf8..852c62a8af 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua @@ -5,25 +5,29 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeSegment] getPointB -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeSegment] getPointA -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeSegment] create -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #cc.PhysicsMaterial physicsmaterial --- @param #float float +-- @param #vec2_table a +-- @param #vec2_table b +-- @param #cc.PhysicsMaterial material +-- @param #float border -- @return PhysicsShapeEdgeSegment#PhysicsShapeEdgeSegment ret (return value: cc.PhysicsShapeEdgeSegment) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeSegment] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua index c924c1a867..81c6bf76c1 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapePolygon] getPointsCount -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#PhysicsShapePolygon] getPoint -- @param self --- @param #int int +-- @param #int i -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShapePolygon] calculateDefaultMoment -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShapePolygon] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua index 6c16ea6dc4..7a15ac9d59 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua @@ -4,35 +4,44 @@ -- @parent_module cc -------------------------------- +-- set the gravity value -- @function [parent=#PhysicsWorld] setGravity -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table gravity -------------------------------- +-- Get all the bodys that in the physics world. -- @function [parent=#PhysicsWorld] getAllBodies -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- get the bebug draw mask -- @function [parent=#PhysicsWorld] getDebugDrawMask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- To control the step of physics, if you want control it by yourself( fixed-timestep for example ), you can set this to false and call step by yourself.
+-- Defaut value is true.
+-- Note: if you set auto step to false, setSpeed and setUpdateRate won't work, you need to control the time step by yourself. -- @function [parent=#PhysicsWorld] setAutoStep -- @param self --- @param #bool bool +-- @param #bool autoStep -------------------------------- +-- Adds a joint to the physics world. -- @function [parent=#PhysicsWorld] addJoint -- @param self --- @param #cc.PhysicsJoint physicsjoint +-- @param #cc.PhysicsJoint joint -------------------------------- +-- Remove all joints from physics world. -- @function [parent=#PhysicsWorld] removeAllJoints -- @param self -------------------------------- +-- Get the auto step -- @function [parent=#PhysicsWorld] isAutoStep -- @param self -- @return bool#bool ret (return value: bool) @@ -42,69 +51,86 @@ -- @overload self, cc.PhysicsBody -- @function [parent=#PhysicsWorld] removeBody -- @param self --- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody body -------------------------------- +-- Remove a joint from physics world. -- @function [parent=#PhysicsWorld] removeJoint -- @param self --- @param #cc.PhysicsJoint physicsjoint --- @param #bool bool +-- @param #cc.PhysicsJoint joint +-- @param #bool destroy -------------------------------- +-- Get phsyics shapes that contains the point. -- @function [parent=#PhysicsWorld] getShapes -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- The step for physics world, The times passing for simulate the physics.
+-- Note: you need to setAutoStep(false) first before it can work. -- @function [parent=#PhysicsWorld] step -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- set the debug draw mask -- @function [parent=#PhysicsWorld] setDebugDrawMask -- @param self --- @param #int int +-- @param #int mask -------------------------------- +-- get the gravity value -- @function [parent=#PhysicsWorld] getGravity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- set the update rate of physics world, update rate is the value of EngineUpdateTimes/PhysicsWorldUpdateTimes.
+-- set it higher can improve performance, set it lower can improve accuracy of physics world simulation.
+-- default value is 1.0
+-- Note: if you setAutoStep(false), this won't work. -- @function [parent=#PhysicsWorld] setUpdateRate -- @param self --- @param #int int +-- @param #int rate -------------------------------- +-- get the speed of physics world -- @function [parent=#PhysicsWorld] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get the update rate -- @function [parent=#PhysicsWorld] getUpdateRate -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Remove all bodies from physics world. -- @function [parent=#PhysicsWorld] removeAllBodies -- @param self -------------------------------- +-- Set the speed of physics world, speed is the rate at which the simulation executes. default value is 1.0
+-- Note: if you setAutoStep(false), this won't work. -- @function [parent=#PhysicsWorld] setSpeed -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- return physics shape that contains the point. -- @function [parent=#PhysicsWorld] getShape -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- +-- Get body by tag -- @function [parent=#PhysicsWorld] getBody -- @param self --- @param #int int +-- @param #int tag -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Place.lua b/cocos/scripting/lua-bindings/auto/api/Place.lua index 11fb95222a..8592661d0f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Place.lua +++ b/cocos/scripting/lua-bindings/auto/api/Place.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates a Place action with a position -- @function [parent=#Place] create -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -- @return Place#Place ret (return value: cc.Place) -------------------------------- +-- -- @function [parent=#Place] clone -- @param self -- @return Place#Place ret (return value: cc.Place) -------------------------------- +-- -- @function [parent=#Place] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#Place] reverse -- @param self -- @return Place#Place ret (return value: cc.Place) diff --git a/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua b/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua index 1fa6573504..8f31161282 100644 --- a/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua @@ -5,51 +5,61 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#PositionFrame] getX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PositionFrame] getY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PositionFrame] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- -- @function [parent=#PositionFrame] setX -- @param self --- @param #float float +-- @param #float x -------------------------------- +-- -- @function [parent=#PositionFrame] setY -- @param self --- @param #float float +-- @param #float y -------------------------------- +-- -- @function [parent=#PositionFrame] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PositionFrame] create -- @param self -- @return PositionFrame#PositionFrame ret (return value: ccs.PositionFrame) -------------------------------- +-- -- @function [parent=#PositionFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#PositionFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#PositionFrame] PositionFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua b/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua index 2b24b53b37..426f309feb 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua @@ -5,31 +5,36 @@ -- @parent_module cc -------------------------------- +-- Creates and initializes the action with a duration, a "from" percentage and a "to" percentage -- @function [parent=#ProgressFromTo] create -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float fromPercentage +-- @param #float toPercentage -- @return ProgressFromTo#ProgressFromTo ret (return value: cc.ProgressFromTo) -------------------------------- +-- -- @function [parent=#ProgressFromTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ProgressFromTo] clone -- @param self -- @return ProgressFromTo#ProgressFromTo ret (return value: cc.ProgressFromTo) -------------------------------- +-- -- @function [parent=#ProgressFromTo] reverse -- @param self -- @return ProgressFromTo#ProgressFromTo ret (return value: cc.ProgressFromTo) -------------------------------- +-- -- @function [parent=#ProgressFromTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua b/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua index d19cf74354..7182839fc3 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua @@ -5,41 +5,59 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ProgressTimer] isReverseDirection -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- This allows the bar type to move the component at a specific rate
+-- Set the component to 0 to make sure it stays at 100%.
+-- For example you want a left to right bar but not have the height stay 100%
+-- Set the rate to be Vec2(0,1); and set the midpoint to = Vec2(0,.5f); -- @function [parent=#ProgressTimer] setBarChangeRate -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table barChangeRate -------------------------------- +-- Percentages are from 0 to 100 -- @function [parent=#ProgressTimer] getPercentage -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ProgressTimer] setSprite -- @param self -- @param #cc.Sprite sprite -------------------------------- +-- Change the percentage to change progress. -- @function [parent=#ProgressTimer] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- The image to show the progress percentage, retain -- @function [parent=#ProgressTimer] getSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- Midpoint is used to modify the progress start position.
+-- If you're using radials type then the midpoint changes the center point
+-- If you're using bar type the the midpoint changes the bar growth
+-- it expands from the center but clamps to the sprites edge so:
+-- you want a left to right then set the midpoint all the way to Vec2(0,y)
+-- you want a right to left then set the midpoint all the way to Vec2(1,y)
+-- you want a bottom to top then set the midpoint all the way to Vec2(x,0)
+-- you want a top to bottom then set the midpoint all the way to Vec2(x,1) -- @function [parent=#ProgressTimer] setMidpoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -------------------------------- +-- Returns the BarChangeRate -- @function [parent=#ProgressTimer] getBarChangeRate -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) @@ -49,57 +67,67 @@ -- @overload self, bool -- @function [parent=#ProgressTimer] setReverseDirection -- @param self --- @param #bool bool +-- @param #bool reverse -------------------------------- +-- Returns the Midpoint -- @function [parent=#ProgressTimer] getMidpoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ProgressTimer] setPercentage -- @param self --- @param #float float +-- @param #float percentage -------------------------------- +-- -- @function [parent=#ProgressTimer] setType -- @param self -- @param #int type -------------------------------- +-- Creates a progress timer with the sprite as the shape the timer goes through -- @function [parent=#ProgressTimer] create -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite sp -- @return ProgressTimer#ProgressTimer ret (return value: cc.ProgressTimer) -------------------------------- +-- -- @function [parent=#ProgressTimer] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchorPoint -------------------------------- +-- -- @function [parent=#ProgressTimer] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#ProgressTimer] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- -- @function [parent=#ProgressTimer] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#ProgressTimer] setOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity -------------------------------- +-- -- @function [parent=#ProgressTimer] getOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua b/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua index 1eed2eefe4..1cf3d03f21 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua @@ -5,30 +5,35 @@ -- @parent_module cc -------------------------------- +-- Creates and initializes with a duration and a percent -- @function [parent=#ProgressTo] create -- @param self --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float percent -- @return ProgressTo#ProgressTo ret (return value: cc.ProgressTo) -------------------------------- +-- -- @function [parent=#ProgressTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ProgressTo] clone -- @param self -- @return ProgressTo#ProgressTo ret (return value: cc.ProgressTo) -------------------------------- +-- -- @function [parent=#ProgressTo] reverse -- @param self -- @return ProgressTo#ProgressTo ret (return value: cc.ProgressTo) -------------------------------- +-- -- @function [parent=#ProgressTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua b/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua index 64c2d01165..c49c9574ad 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua @@ -10,78 +10,106 @@ -- @overload self, cc.Node, int, int -- @function [parent=#ProtectedNode] addProtectedChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int localZOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#ProtectedNode] disableCascadeColor -- @param self -------------------------------- +-- Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
+-- param tag An interger number that identifies a child node
+-- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#ProtectedNode] removeProtectedChildByTag -- @param self --- @param #int int --- @param #bool bool +-- @param #int tag +-- @param #bool cleanup -------------------------------- +-- Reorders a child according to a new z value.
+-- param child An already added child node. It MUST be already added.
+-- param localZOrder Z order for drawing priority. Please refer to setLocalZOrder(int) -- @function [parent=#ProtectedNode] reorderProtectedChild -- @param self --- @param #cc.Node node --- @param #int int +-- @param #cc.Node child +-- @param #int localZOrder -------------------------------- +-- Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
+-- param cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
+-- js removeAllChildren
+-- lua removeAllChildren -- @function [parent=#ProtectedNode] removeAllProtectedChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#ProtectedNode] disableCascadeOpacity -- @param self -------------------------------- +-- Sorts the children array once before drawing, instead of every time when a child is added or reordered.
+-- This appraoch can improves the performance massively.
+-- note Don't call this manually unless a child added needs to be removed in the same frame -- @function [parent=#ProtectedNode] sortAllProtectedChildren -- @param self -------------------------------- +-- Gets a child from the container with its tag
+-- param tag An identifier to find the child node.
+-- return a Node object whose tag equals to the input parameter -- @function [parent=#ProtectedNode] getProtectedChildByTag -- @param self --- @param #int int +-- @param #int tag -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
+-- param child The child node which will be removed.
+-- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#ProtectedNode] removeProtectedChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- Removes all children from the container with a cleanup.
+-- see `removeAllChildrenWithCleanup(bool)` -- @function [parent=#ProtectedNode] removeAllProtectedChildren -- @param self -------------------------------- +-- -- @function [parent=#ProtectedNode] create -- @param self -- @return ProtectedNode#ProtectedNode ret (return value: cc.ProtectedNode) -------------------------------- +-- / @} end of Children and Parent -- @function [parent=#ProtectedNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#ProtectedNode] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- -- @function [parent=#ProtectedNode] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor -------------------------------- +-- -- @function [parent=#ProtectedNode] cleanup -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Ref.lua b/cocos/scripting/lua-bindings/auto/api/Ref.lua index 23aa688f85..8ab85e5d9f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Ref.lua +++ b/cocos/scripting/lua-bindings/auto/api/Ref.lua @@ -4,14 +4,27 @@ -- @parent_module cc -------------------------------- +-- Releases the ownership immediately.
+-- This decrements the Ref's reference count.
+-- If the reference count reaches 0 after the descrement, this Ref is
+-- destructed.
+-- see retain, autorelease
+-- js NA -- @function [parent=#Ref] release -- @param self -------------------------------- +-- Retains the ownership.
+-- This increases the Ref's reference count.
+-- see release, autorelease
+-- js NA -- @function [parent=#Ref] retain -- @param self -------------------------------- +-- Returns the Ref's current reference count.
+-- returns The Ref's reference count.
+-- js NA -- @function [parent=#Ref] getReferenceCount -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) diff --git a/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua b/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua index a12a3b8f4a..b919424813 100644 --- a/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua @@ -13,6 +13,7 @@ -- @return RelativeBox#RelativeBox ret (retunr value: ccui.RelativeBox) -------------------------------- +-- Default constructor -- @function [parent=#RelativeBox] RelativeBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua b/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua index ec81d4f44e..d40ea5f727 100644 --- a/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua +++ b/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua @@ -5,51 +5,70 @@ -- @parent_module ccui -------------------------------- +-- Sets RelativeAlign parameter for LayoutParameter.
+-- see RelativeAlign
+-- param RelativeAlign -- @function [parent=#RelativeLayoutParameter] setAlign -- @param self --- @param #int relativealign +-- @param #int align -------------------------------- +-- Sets a key for LayoutParameter. Witch widget named this is relative to.
+-- param name -- @function [parent=#RelativeLayoutParameter] setRelativeToWidgetName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- Gets a name in Relative Layout of LayoutParameter.
+-- return name -- @function [parent=#RelativeLayoutParameter] getRelativeName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Gets the key of LayoutParameter. Witch widget named this is relative to.
+-- return name -- @function [parent=#RelativeLayoutParameter] getRelativeToWidgetName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Sets a name in Relative Layout for LayoutParameter.
+-- param name -- @function [parent=#RelativeLayoutParameter] setRelativeName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- Gets RelativeAlign parameter for LayoutParameter.
+-- see RelativeAlign
+-- return RelativeAlign -- @function [parent=#RelativeLayoutParameter] getAlign -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Allocates and initializes.
+-- return A initialized LayoutParameter which is marked as "autorelease". -- @function [parent=#RelativeLayoutParameter] create -- @param self -- @return RelativeLayoutParameter#RelativeLayoutParameter ret (return value: ccui.RelativeLayoutParameter) -------------------------------- +-- -- @function [parent=#RelativeLayoutParameter] createCloneInstance -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- -- @function [parent=#RelativeLayoutParameter] copyProperties -- @param self --- @param #ccui.LayoutParameter layoutparameter +-- @param #ccui.LayoutParameter model -------------------------------- +-- Default constructor -- @function [parent=#RelativeLayoutParameter] RelativeLayoutParameter -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua b/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua index 27ef10c677..c477540f27 100644 --- a/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua +++ b/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- create the action -- @function [parent=#RemoveSelf] create -- @param self -- @return RemoveSelf#RemoveSelf ret (return value: cc.RemoveSelf) -------------------------------- +-- -- @function [parent=#RemoveSelf] clone -- @param self -- @return RemoveSelf#RemoveSelf ret (return value: cc.RemoveSelf) -------------------------------- +-- -- @function [parent=#RemoveSelf] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#RemoveSelf] reverse -- @param self -- @return RemoveSelf#RemoveSelf ret (return value: cc.RemoveSelf) diff --git a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua index 661a25c17e..d7f705032c 100644 --- a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua +++ b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua @@ -5,62 +5,75 @@ -- @parent_module cc -------------------------------- +-- Used for grab part of screen to a texture.rtBegin: the position of renderTexture on the fullRectfullRect: the total size of screenfullViewport: the total viewportSize -- @function [parent=#RenderTexture] setVirtualViewport -- @param self --- @param #vec2_table vec2 --- @param #rect_table rect --- @param #rect_table rect +-- @param #vec2_table rtBegin +-- @param #rect_table fullRect +-- @param #rect_table fullViewport -------------------------------- +-- clears the texture with a specified stencil value -- @function [parent=#RenderTexture] clearStencil -- @param self --- @param #int int +-- @param #int stencilValue -------------------------------- +-- Value for clearDepth. Valid only when "autoDraw" is true. -- @function [parent=#RenderTexture] getClearDepth -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Value for clear Stencil. Valid only when "autoDraw" is true -- @function [parent=#RenderTexture] getClearStencil -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- ends grabbing -- @function [parent=#RenderTexture] end -- @param self -------------------------------- +-- -- @function [parent=#RenderTexture] setClearStencil -- @param self --- @param #int int +-- @param #int clearStencil -------------------------------- +-- Sets the Sprite being used. -- @function [parent=#RenderTexture] setSprite -- @param self -- @param #cc.Sprite sprite -------------------------------- +-- Gets the Sprite being used. -- @function [parent=#RenderTexture] getSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons.
+-- Will be enabled in the future. -- @function [parent=#RenderTexture] isAutoDraw -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RenderTexture] setKeepMatrix -- @param self --- @param #bool bool +-- @param #bool keepMatrix -------------------------------- +-- -- @function [parent=#RenderTexture] setClearFlags -- @param self --- @param #unsigned int int +-- @param #unsigned int clearFlags -------------------------------- +-- starts grabbing -- @function [parent=#RenderTexture] begin -- @param self @@ -69,23 +82,26 @@ -- @overload self, string, bool, function -- @function [parent=#RenderTexture] saveToFile -- @param self --- @param #string str +-- @param #string filename -- @param #int format --- @param #bool bool --- @param #function func +-- @param #bool isRGBA +-- @param #function callback -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#RenderTexture] setAutoDraw -- @param self --- @param #bool bool +-- @param #bool isAutoDraw -------------------------------- +-- -- @function [parent=#RenderTexture] setClearColor -- @param self --- @param #color4f_table color4f +-- @param #color4f_table clearColor -------------------------------- +-- end is key word of lua, use other name to export to lua. -- @function [parent=#RenderTexture] endToLua -- @param self @@ -95,55 +111,61 @@ -- @overload self, float, float, float, float, float, int -- @function [parent=#RenderTexture] beginWithClear -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float --- @param #float float --- @param #int int +-- @param #float r +-- @param #float g +-- @param #float b +-- @param #float a +-- @param #float depthValue +-- @param #int stencilValue -------------------------------- +-- clears the texture with a specified depth value -- @function [parent=#RenderTexture] clearDepth -- @param self --- @param #float float +-- @param #float depthValue -------------------------------- +-- Clear color value. Valid only when "autoDraw" is true. -- @function [parent=#RenderTexture] getClearColor -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- +-- clears the texture with a color -- @function [parent=#RenderTexture] clear -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float r +-- @param #float g +-- @param #float b +-- @param #float a -------------------------------- +-- Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw" is true. -- @function [parent=#RenderTexture] getClearFlags -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#RenderTexture] newImage -- @param self -- @return Image#Image ret (return value: cc.Image) -------------------------------- +-- -- @function [parent=#RenderTexture] setClearDepth -- @param self --- @param #float float +-- @param #float clearDepth -------------------------------- -- @overload self, int, int, int, unsigned int -- @overload self, int, int, int -- @function [parent=#RenderTexture] initWithWidthAndHeight -- @param self --- @param #int int --- @param #int int --- @param #int pixelformat --- @param #unsigned int int +-- @param #int w +-- @param #int h +-- @param #int format +-- @param #unsigned int depthStencilFormat -- @return bool#bool ret (retunr value: bool) -------------------------------- @@ -152,27 +174,30 @@ -- @overload self, int, int -- @function [parent=#RenderTexture] create -- @param self --- @param #int int --- @param #int int --- @param #int pixelformat --- @param #unsigned int int +-- @param #int w +-- @param #int h +-- @param #int format +-- @param #unsigned int depthStencilFormat -- @return RenderTexture#RenderTexture ret (retunr value: cc.RenderTexture) -------------------------------- +-- -- @function [parent=#RenderTexture] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#RenderTexture] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#RenderTexture] RenderTexture -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Repeat.lua b/cocos/scripting/lua-bindings/auto/api/Repeat.lua index 0fceefb74c..6416570584 100644 --- a/cocos/scripting/lua-bindings/auto/api/Repeat.lua +++ b/cocos/scripting/lua-bindings/auto/api/Repeat.lua @@ -5,47 +5,56 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Repeat] setInnerAction -- @param self --- @param #cc.FiniteTimeAction finitetimeaction +-- @param #cc.FiniteTimeAction action -------------------------------- +-- -- @function [parent=#Repeat] getInnerAction -- @param self -- @return FiniteTimeAction#FiniteTimeAction ret (return value: cc.FiniteTimeAction) -------------------------------- +-- creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30) -- @function [parent=#Repeat] create -- @param self --- @param #cc.FiniteTimeAction finitetimeaction --- @param #unsigned int int +-- @param #cc.FiniteTimeAction action +-- @param #unsigned int times -- @return Repeat#Repeat ret (return value: cc.Repeat) -------------------------------- +-- -- @function [parent=#Repeat] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Repeat] reverse -- @param self -- @return Repeat#Repeat ret (return value: cc.Repeat) -------------------------------- +-- -- @function [parent=#Repeat] clone -- @param self -- @return Repeat#Repeat ret (return value: cc.Repeat) -------------------------------- +-- -- @function [parent=#Repeat] stop -- @param self -------------------------------- +-- -- @function [parent=#Repeat] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Repeat] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua b/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua index d846b49287..bd2f1b1b8f 100644 --- a/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua +++ b/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua @@ -5,44 +5,52 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#RepeatForever] setInnerAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -------------------------------- +-- -- @function [parent=#RepeatForever] getInnerAction -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- creates the action -- @function [parent=#RepeatForever] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return RepeatForever#RepeatForever ret (return value: cc.RepeatForever) -------------------------------- +-- -- @function [parent=#RepeatForever] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#RepeatForever] clone -- @param self -- @return RepeatForever#RepeatForever ret (return value: cc.RepeatForever) -------------------------------- +-- -- @function [parent=#RepeatForever] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RepeatForever] reverse -- @param self -- @return RepeatForever#RepeatForever ret (return value: cc.RepeatForever) -------------------------------- +-- -- @function [parent=#RepeatForever] step -- @param self --- @param #float float +-- @param #float dt return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua b/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua index d36121c163..d5d09ff12e 100644 --- a/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua +++ b/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates an action with the number of times that the current grid will be reused -- @function [parent=#ReuseGrid] create -- @param self --- @param #int int +-- @param #int times -- @return ReuseGrid#ReuseGrid ret (return value: cc.ReuseGrid) -------------------------------- +-- -- @function [parent=#ReuseGrid] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ReuseGrid] clone -- @param self -- @return ReuseGrid#ReuseGrid ret (return value: cc.ReuseGrid) -------------------------------- +-- -- @function [parent=#ReuseGrid] reverse -- @param self -- @return ReuseGrid#ReuseGrid ret (return value: cc.ReuseGrid) diff --git a/cocos/scripting/lua-bindings/auto/api/RichElement.lua b/cocos/scripting/lua-bindings/auto/api/RichElement.lua index 6043d0bf08..dcb76df400 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElement.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElement.lua @@ -5,14 +5,16 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#RichElement] init -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RichElement] RichElement -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua b/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua index df0910149b..12663cbf56 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua @@ -5,24 +5,27 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#RichElementCustomNode] init -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #cc.Node node +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #cc.Node customNode -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RichElementCustomNode] create -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #cc.Node node +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #cc.Node customNode -- @return RichElementCustomNode#RichElementCustomNode ret (return value: ccui.RichElementCustomNode) -------------------------------- +-- -- @function [parent=#RichElementCustomNode] RichElementCustomNode -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua b/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua index c94db3c5cc..bbccb743f8 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua @@ -5,24 +5,27 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#RichElementImage] init -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #string str +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #string filePath -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RichElementImage] create -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #string str +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #string filePath -- @return RichElementImage#RichElementImage ret (return value: ccui.RichElementImage) -------------------------------- +-- -- @function [parent=#RichElementImage] RichElementImage -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementText.lua b/cocos/scripting/lua-bindings/auto/api/RichElementText.lua index e92a8c5916..35ceb7e869 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementText.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementText.lua @@ -5,28 +5,31 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#RichElementText] init -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #string str --- @param #string str --- @param #float float +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #string text +-- @param #string fontName +-- @param #float fontSize -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RichElementText] create -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #string str --- @param #string str --- @param #float float +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #string text +-- @param #string fontName +-- @param #float fontSize -- @return RichElementText#RichElementText ret (return value: ccui.RichElementText) -------------------------------- +-- -- @function [parent=#RichElementText] RichElementText -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichText.lua b/cocos/scripting/lua-bindings/auto/api/RichText.lua index c332a6f8e7..ff84a62b20 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichText.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichText.lua @@ -5,32 +5,38 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#RichText] insertElement -- @param self --- @param #ccui.RichElement richelement --- @param #int int +-- @param #ccui.RichElement element +-- @param #int index -------------------------------- +-- -- @function [parent=#RichText] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pt -------------------------------- +-- -- @function [parent=#RichText] pushBackElement -- @param self --- @param #ccui.RichElement richelement +-- @param #ccui.RichElement element -------------------------------- +-- -- @function [parent=#RichText] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- -- @function [parent=#RichText] setVerticalSpace -- @param self --- @param #float float +-- @param #float space -------------------------------- +-- -- @function [parent=#RichText] formatText -- @param self @@ -39,24 +45,28 @@ -- @overload self, int -- @function [parent=#RichText] removeElement -- @param self --- @param #int int +-- @param #int index -------------------------------- +-- -- @function [parent=#RichText] create -- @param self -- @return RichText#RichText ret (return value: ccui.RichText) -------------------------------- +-- -- @function [parent=#RichText] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#RichText] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#RichText] RichText -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua b/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua index 22ecc16a89..d335042d84 100644 --- a/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua @@ -5,54 +5,63 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Ripple3D] setAmplitudeRate -- @param self --- @param #float float +-- @param #float fAmplitudeRate -------------------------------- +-- -- @function [parent=#Ripple3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Ripple3D] setAmplitude -- @param self --- @param #float float +-- @param #float fAmplitude -------------------------------- +-- -- @function [parent=#Ripple3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set center position -- @function [parent=#Ripple3D] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- get center position -- @function [parent=#Ripple3D] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- creates the action with radius, number of waves, amplitude, a grid size and duration -- @function [parent=#Ripple3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #vec2_table vec2 --- @param #float float --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #vec2_table position +-- @param #float radius +-- @param #unsigned int waves +-- @param #float amplitude -- @return Ripple3D#Ripple3D ret (return value: cc.Ripple3D) -------------------------------- +-- -- @function [parent=#Ripple3D] clone -- @param self -- @return Ripple3D#Ripple3D ret (return value: cc.Ripple3D) -------------------------------- +-- -- @function [parent=#Ripple3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/RotateBy.lua b/cocos/scripting/lua-bindings/auto/api/RotateBy.lua index 8d1d33c55e..05a24a7f5a 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotateBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotateBy.lua @@ -10,29 +10,33 @@ -- @overload self, float, vec3_table -- @function [parent=#RotateBy] create -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float deltaAngleZ_X +-- @param #float deltaAngleZ_Y -- @return RotateBy#RotateBy ret (retunr value: cc.RotateBy) -------------------------------- +-- -- @function [parent=#RotateBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#RotateBy] clone -- @param self -- @return RotateBy#RotateBy ret (return value: cc.RotateBy) -------------------------------- +-- -- @function [parent=#RotateBy] reverse -- @param self -- @return RotateBy#RotateBy ret (return value: cc.RotateBy) -------------------------------- +-- -- @function [parent=#RotateBy] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/RotateTo.lua b/cocos/scripting/lua-bindings/auto/api/RotateTo.lua index 1631a28fbd..9a03166d87 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotateTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotateTo.lua @@ -10,29 +10,33 @@ -- @overload self, float, vec3_table -- @function [parent=#RotateTo] create -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float dstAngleX +-- @param #float dstAngleY -- @return RotateTo#RotateTo ret (retunr value: cc.RotateTo) -------------------------------- +-- -- @function [parent=#RotateTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#RotateTo] clone -- @param self -- @return RotateTo#RotateTo ret (return value: cc.RotateTo) -------------------------------- +-- -- @function [parent=#RotateTo] reverse -- @param self -- @return RotateTo#RotateTo ret (return value: cc.RotateTo) -------------------------------- +-- -- @function [parent=#RotateTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua b/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua index 0d0e14cd48..6be076892d 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua @@ -5,31 +5,37 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#RotationFrame] setRotation -- @param self --- @param #float float +-- @param #float rotation -------------------------------- +-- -- @function [parent=#RotationFrame] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#RotationFrame] create -- @param self -- @return RotationFrame#RotationFrame ret (return value: ccs.RotationFrame) -------------------------------- +-- -- @function [parent=#RotationFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#RotationFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#RotationFrame] RotationFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua b/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua index 7fb9190a5b..340f6f167e 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua @@ -5,21 +5,25 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#RotationSkewFrame] create -- @param self -- @return RotationSkewFrame#RotationSkewFrame ret (return value: ccs.RotationSkewFrame) -------------------------------- +-- -- @function [parent=#RotationSkewFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#RotationSkewFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#RotationSkewFrame] RotationSkewFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua index 3e353cf61d..6264f3826f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua @@ -5,65 +5,82 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#Scale9Sprite] disableCascadeColor -- @param self -------------------------------- +-- -- @function [parent=#Scale9Sprite] updateWithSprite -- @param self -- @param #cc.Sprite sprite -- @param #rect_table rect --- @param #bool bool --- @param #rect_table rect +-- @param #bool rotated +-- @param #rect_table capInsets -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the flag which indicates whether the widget is flipped horizontally or not.
+-- It only flips the texture of the widget, and not the texture of the widget's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- widget->setScaleX(sprite->getScaleX() * -1);
+-- return true if the widget is flipped horizaontally, false otherwise. -- @function [parent=#Scale9Sprite] isFlippedX -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets whether the widget should be flipped vertically or not.
+-- param bFlippedY true if the widget should be flipped vertically, flase otherwise. -- @function [parent=#Scale9Sprite] setFlippedY -- @param self --- @param #bool bool +-- @param #bool flippedY -------------------------------- +-- Sets whether the widget should be flipped horizontally or not.
+-- param bFlippedX true if the widget should be flipped horizaontally, false otherwise. -- @function [parent=#Scale9Sprite] setFlippedX -- @param self --- @param #bool bool +-- @param #bool flippedX -------------------------------- +-- -- @function [parent=#Scale9Sprite] setScale9Enabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#Scale9Sprite] disableCascadeOpacity -- @param self -------------------------------- +-- -- @function [parent=#Scale9Sprite] setInsetBottom -- @param self --- @param #float float +-- @param #float bottomInset -------------------------------- -- @overload self, string -- @overload self, string, rect_table -- @function [parent=#Scale9Sprite] initWithSpriteFrameName -- @param self --- @param #string str --- @param #rect_table rect +-- @param #string spriteFrameName +-- @param #rect_table capInsets -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setInsetTop -- @param self --- @param #float float +-- @param #float topInset -------------------------------- -- @overload self, cc.Sprite, rect_table, bool, rect_table @@ -73,47 +90,59 @@ -- @param self -- @param #cc.Sprite sprite -- @param #rect_table rect --- @param #bool bool --- @param #rect_table rect +-- @param #bool rotated +-- @param #rect_table capInsets -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setPreferredSize -- @param self -- @param #size_table size -------------------------------- +-- -- @function [parent=#Scale9Sprite] getInsetRight -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame spriteFrame -------------------------------- +-- -- @function [parent=#Scale9Sprite] getInsetBottom -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Creates and returns a new sprite object with the specified cap insets.
+-- You use this method to add cap insets to a sprite or to change the existing
+-- cap insets of a sprite. In both cases, you get back a new image and the
+-- original sprite remains untouched.
+-- param capInsets The values to use for the cap insets. -- @function [parent=#Scale9Sprite] resizableSpriteWithCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -- @return Scale9Sprite#Scale9Sprite ret (return value: ccui.Scale9Sprite) -------------------------------- +-- -- @function [parent=#Scale9Sprite] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getOriginalSize -- @param self -- @return size_table#size_table ret (return value: size_table) @@ -125,54 +154,66 @@ -- @overload self, string -- @function [parent=#Scale9Sprite] initWithFile -- @param self --- @param #string str --- @param #rect_table rect +-- @param #string file -- @param #rect_table rect +-- @param #rect_table capInsets -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getInsetTop -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setInsetLeft -- @param self --- @param #float float +-- @param #float leftInset -------------------------------- -- @overload self, cc.SpriteFrame -- @overload self, cc.SpriteFrame, rect_table -- @function [parent=#Scale9Sprite] initWithSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe --- @param #rect_table rect +-- @param #cc.SpriteFrame spriteFrame +-- @param #rect_table capInsets -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getPreferredSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setCapInsets -- @param self -- @param #rect_table rect -------------------------------- +-- Return the flag which indicates whether the widget is flipped vertically or not.
+-- It only flips the texture of the widget, and not the texture of the widget's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- widget->setScaleY(widget->getScaleY() * -1);
+-- return true if the widget is flipped vertically, flase otherwise. -- @function [parent=#Scale9Sprite] isFlippedY -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getInsetLeft -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setInsetRight -- @param self --- @param #float float +-- @param #float rightInset -------------------------------- -- @overload self, string, rect_table, rect_table @@ -182,9 +223,9 @@ -- @overload self, string -- @function [parent=#Scale9Sprite] create -- @param self --- @param #string str --- @param #rect_table rect +-- @param #string file -- @param #rect_table rect +-- @param #rect_table capInsets -- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite) -------------------------------- @@ -192,8 +233,8 @@ -- @overload self, string -- @function [parent=#Scale9Sprite] createWithSpriteFrameName -- @param self --- @param #string str --- @param #rect_table rect +-- @param #string spriteFrameName +-- @param #rect_table capInsets -- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite) -------------------------------- @@ -201,35 +242,41 @@ -- @overload self, cc.SpriteFrame -- @function [parent=#Scale9Sprite] createWithSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe --- @param #rect_table rect +-- @param #cc.SpriteFrame spriteFrame +-- @param #rect_table capInsets -- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchorPoint -------------------------------- +-- -- @function [parent=#Scale9Sprite] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- -- @function [parent=#Scale9Sprite] cleanup -- @param self -------------------------------- +-- -- @function [parent=#Scale9Sprite] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor -------------------------------- +-- -- @function [parent=#Scale9Sprite] setContentSize -- @param self -- @param #size_table size -------------------------------- +-- js ctor -- @function [parent=#Scale9Sprite] Scale9Sprite -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua b/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua index 3d2e657b72..f7e93e6bfb 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua @@ -10,23 +10,26 @@ -- @overload self, float, float, float, float -- @function [parent=#ScaleBy] create -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float sx +-- @param #float sy +-- @param #float sz -- @return ScaleBy#ScaleBy ret (retunr value: cc.ScaleBy) -------------------------------- +-- -- @function [parent=#ScaleBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ScaleBy] clone -- @param self -- @return ScaleBy#ScaleBy ret (return value: cc.ScaleBy) -------------------------------- +-- -- @function [parent=#ScaleBy] reverse -- @param self -- @return ScaleBy#ScaleBy ret (return value: cc.ScaleBy) diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua b/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua index d8fa8f909b..e7bca6756f 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua @@ -5,46 +5,55 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ScaleFrame] setScaleY -- @param self --- @param #float float +-- @param #float scaleY -------------------------------- +-- -- @function [parent=#ScaleFrame] setScaleX -- @param self --- @param #float float +-- @param #float scaleX -------------------------------- +-- -- @function [parent=#ScaleFrame] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ScaleFrame] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ScaleFrame] setScale -- @param self --- @param #float float +-- @param #float scale -------------------------------- +-- -- @function [parent=#ScaleFrame] create -- @param self -- @return ScaleFrame#ScaleFrame ret (return value: ccs.ScaleFrame) -------------------------------- +-- -- @function [parent=#ScaleFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#ScaleFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#ScaleFrame] ScaleFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua b/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua index 3869dffc97..7709deadf1 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua @@ -10,30 +10,34 @@ -- @overload self, float, float, float, float -- @function [parent=#ScaleTo] create -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float sx +-- @param #float sy +-- @param #float sz -- @return ScaleTo#ScaleTo ret (retunr value: cc.ScaleTo) -------------------------------- +-- -- @function [parent=#ScaleTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ScaleTo] clone -- @param self -- @return ScaleTo#ScaleTo ret (return value: cc.ScaleTo) -------------------------------- +-- -- @function [parent=#ScaleTo] reverse -- @param self -- @return ScaleTo#ScaleTo ret (return value: cc.ScaleTo) -------------------------------- +-- -- @function [parent=#ScaleTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Scene.lua b/cocos/scripting/lua-bindings/auto/api/Scene.lua index ba1bec9356..671e74d783 100644 --- a/cocos/scripting/lua-bindings/auto/api/Scene.lua +++ b/cocos/scripting/lua-bindings/auto/api/Scene.lua @@ -5,48 +5,55 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Scene] getPhysicsWorld -- @param self -- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld) -------------------------------- +-- creates a new Scene object with a predefined Size -- @function [parent=#Scene] createWithSize -- @param self -- @param #size_table size -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- creates a new Scene object -- @function [parent=#Scene] create -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- -- @function [parent=#Scene] createWithPhysics -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- -- @function [parent=#Scene] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Scene] getScene -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- -- @function [parent=#Scene] update -- @param self --- @param #float float +-- @param #float delta -------------------------------- -- @overload self, cc.Node, int, string -- @overload self, cc.Node, int, int -- @function [parent=#Scene] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SceneReader.lua b/cocos/scripting/lua-bindings/auto/api/SceneReader.lua index 7ea99e4d21..eb30a5ff16 100644 --- a/cocos/scripting/lua-bindings/auto/api/SceneReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/SceneReader.lua @@ -4,38 +4,46 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#SceneReader] setTarget -- @param self --- @param #function func +-- @param #function selector -------------------------------- +-- -- @function [parent=#SceneReader] createNodeWithSceneFile -- @param self --- @param #string str --- @param #int attachcomponenttype +-- @param #string fileName +-- @param #int attachComponent -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#SceneReader] getAttachComponentType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#SceneReader] getNodeByTag -- @param self --- @param #int int +-- @param #int nTag -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- js purge
+-- lua destroySceneReader -- @function [parent=#SceneReader] destroyInstance -- @param self -------------------------------- +-- -- @function [parent=#SceneReader] sceneReaderVersion -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#SceneReader] getInstance -- @param self -- @return SceneReader#SceneReader ret (return value: ccs.SceneReader) diff --git a/cocos/scripting/lua-bindings/auto/api/Scheduler.lua b/cocos/scripting/lua-bindings/auto/api/Scheduler.lua index 7a3870c4d6..b1b7d560f3 100644 --- a/cocos/scripting/lua-bindings/auto/api/Scheduler.lua +++ b/cocos/scripting/lua-bindings/auto/api/Scheduler.lua @@ -5,16 +5,24 @@ -- @parent_module cc -------------------------------- +-- Modifies the time of all scheduled callbacks.
+-- You can use this property to create a 'slow motion' or 'fast forward' effect.
+-- Default is 1.0. To create a 'slow motion' effect, use values below 1.0.
+-- To create a 'fast forward' effect, use values higher than 1.0.
+-- since v0.8
+-- warning It will affect EVERY scheduled selector / action. -- @function [parent=#Scheduler] setTimeScale -- @param self --- @param #float float +-- @param #float timeScale -------------------------------- +-- -- @function [parent=#Scheduler] getTimeScale -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- js ctor -- @function [parent=#Scheduler] Scheduler -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ScrollView.lua b/cocos/scripting/lua-bindings/auto/api/ScrollView.lua index f1a9bab896..1cd19f24c4 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScrollView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScrollView.lua @@ -5,177 +5,221 @@ -- @parent_module ccui -------------------------------- +-- Scroll inner container to top boundary of scrollview. -- @function [parent=#ScrollView] scrollToTop -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Scroll inner container to horizontal percent position of scrollview. -- @function [parent=#ScrollView] scrollToPercentHorizontal -- @param self --- @param #float float --- @param #float float --- @param #bool bool +-- @param #float percent +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- -- @function [parent=#ScrollView] isInertiaScrollEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Scroll inner container to both direction percent position of scrollview. -- @function [parent=#ScrollView] scrollToPercentBothDirection -- @param self --- @param #vec2_table vec2 --- @param #float float --- @param #bool bool +-- @param #vec2_table percent +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Gets scroll direction of scrollview.
+-- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
+-- return Direction -- @function [parent=#ScrollView] getDirection -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Scroll inner container to bottom and left boundary of scrollview. -- @function [parent=#ScrollView] scrollToBottomLeft -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Gets inner container of scrollview.
+-- Inner container is the container of scrollview's children.
+-- return inner container. -- @function [parent=#ScrollView] getInnerContainer -- @param self -- @return Layout#Layout ret (return value: ccui.Layout) -------------------------------- +-- Move inner container to bottom boundary of scrollview. -- @function [parent=#ScrollView] jumpToBottom -- @param self -------------------------------- +-- Changes scroll direction of scrollview.
+-- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
+-- param dir -- @function [parent=#ScrollView] setDirection -- @param self --- @param #int direction +-- @param #int dir -------------------------------- +-- Scroll inner container to top and left boundary of scrollview. -- @function [parent=#ScrollView] scrollToTopLeft -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Move inner container to top and right boundary of scrollview. -- @function [parent=#ScrollView] jumpToTopRight -- @param self -------------------------------- +-- Move inner container to bottom and left boundary of scrollview. -- @function [parent=#ScrollView] jumpToBottomLeft -- @param self -------------------------------- +-- Changes inner container size of scrollview.
+-- Inner container size must be larger than or equal scrollview's size.
+-- param inner container size. -- @function [parent=#ScrollView] setInnerContainerSize -- @param self -- @param #size_table size -------------------------------- +-- Gets inner container size of scrollview.
+-- Inner container size must be larger than or equal scrollview's size.
+-- return inner container size. -- @function [parent=#ScrollView] getInnerContainerSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#ScrollView] isBounceEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Move inner container to vertical percent position of scrollview. -- @function [parent=#ScrollView] jumpToPercentVertical -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#ScrollView] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- -- @function [parent=#ScrollView] setInertiaScrollEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Move inner container to top and left boundary of scrollview. -- @function [parent=#ScrollView] jumpToTopLeft -- @param self -------------------------------- +-- Move inner container to horizontal percent position of scrollview. -- @function [parent=#ScrollView] jumpToPercentHorizontal -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- Move inner container to bottom and right boundary of scrollview. -- @function [parent=#ScrollView] jumpToBottomRight -- @param self -------------------------------- +-- -- @function [parent=#ScrollView] setBounceEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Move inner container to top boundary of scrollview. -- @function [parent=#ScrollView] jumpToTop -- @param self -------------------------------- +-- Scroll inner container to left boundary of scrollview. -- @function [parent=#ScrollView] scrollToLeft -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Move inner container to both direction percent position of scrollview. -- @function [parent=#ScrollView] jumpToPercentBothDirection -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table percent -------------------------------- +-- Scroll inner container to vertical percent position of scrollview. -- @function [parent=#ScrollView] scrollToPercentVertical -- @param self --- @param #float float --- @param #float float --- @param #bool bool +-- @param #float percent +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Scroll inner container to bottom boundary of scrollview. -- @function [parent=#ScrollView] scrollToBottom -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Scroll inner container to bottom and right boundary of scrollview. -- @function [parent=#ScrollView] scrollToBottomRight -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Move inner container to left boundary of scrollview. -- @function [parent=#ScrollView] jumpToLeft -- @param self -------------------------------- +-- Scroll inner container to right boundary of scrollview. -- @function [parent=#ScrollView] scrollToRight -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Move inner container to right boundary of scrollview. -- @function [parent=#ScrollView] jumpToRight -- @param self -------------------------------- +-- Scroll inner container to top and right boundary of scrollview. -- @function [parent=#ScrollView] scrollToTopRight -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Allocates and initializes. -- @function [parent=#ScrollView] create -- @param self -- @return ScrollView#ScrollView ret (return value: ccui.ScrollView) -------------------------------- +-- -- @function [parent=#ScrollView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) @@ -187,52 +231,66 @@ -- @overload self, cc.Node, int, string -- @function [parent=#ScrollView] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #string str +-- @param #cc.Node child +-- @param #int zOrder +-- @param #string name -------------------------------- +-- -- @function [parent=#ScrollView] getChildByName -- @param self --- @param #string str +-- @param #string name -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#ScrollView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ScrollView] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- Gets LayoutType.
+-- see LayoutType
+-- return LayoutType -- @function [parent=#ScrollView] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ScrollView] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#ScrollView] removeAllChildren -- @param self -------------------------------- +-- When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
+-- If the widget is not in a layout, it will return itself
+-- param dir the direction to look for the next focused widget in a layout
+-- param current the current focused widget
+-- return the next focused widget in a layout -- @function [parent=#ScrollView] findNextFocusedWidget -- @param self --- @param #int focusdirection --- @param #ccui.Widget widget +-- @param #int direction +-- @param #ccui.Widget current -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- -- @function [parent=#ScrollView] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleaup -------------------------------- -- @overload self @@ -242,22 +300,28 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- -- @function [parent=#ScrollView] getChildByTag -- @param self --- @param #int int +-- @param #int tag -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#ScrollView] getChildrenCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Sets LayoutType.
+-- see LayoutType
+-- param LayoutType -- @function [parent=#ScrollView] setLayoutType -- @param self -- @param #int type -------------------------------- +-- Default constructor -- @function [parent=#ScrollView] ScrollView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Sequence.lua b/cocos/scripting/lua-bindings/auto/api/Sequence.lua index feda1c3c1f..965c25b93d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sequence.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sequence.lua @@ -5,27 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Sequence] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Sequence] clone -- @param self -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- +-- -- @function [parent=#Sequence] stop -- @param self -------------------------------- +-- -- @function [parent=#Sequence] reverse -- @param self -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- +-- -- @function [parent=#Sequence] update -- @param self --- @param #float float +-- @param #float t return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua b/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua index 2458883412..f16b0bca3f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates the action with a range, shake Z vertices, a grid and duration -- @function [parent=#Shaky3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #int int --- @param #bool bool +-- @param #float duration +-- @param #size_table gridSize +-- @param #int range +-- @param #bool shakeZ -- @return Shaky3D#Shaky3D ret (return value: cc.Shaky3D) -------------------------------- +-- -- @function [parent=#Shaky3D] clone -- @param self -- @return Shaky3D#Shaky3D ret (return value: cc.Shaky3D) -------------------------------- +-- -- @function [parent=#Shaky3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua index dbf2de70f6..f8f94b06e4 100644 --- a/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates the action with a range, whether or not to shake Z vertices, a grid size, and duration -- @function [parent=#ShakyTiles3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #int int --- @param #bool bool +-- @param #float duration +-- @param #size_table gridSize +-- @param #int range +-- @param #bool shakeZ -- @return ShakyTiles3D#ShakyTiles3D ret (return value: cc.ShakyTiles3D) -------------------------------- +-- -- @function [parent=#ShakyTiles3D] clone -- @param self -- @return ShakyTiles3D#ShakyTiles3D ret (return value: cc.ShakyTiles3D) -------------------------------- +-- -- @function [parent=#ShakyTiles3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua index 6e59cf6e15..68a37cd638 100644 --- a/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates the action with a range, whether of not to shatter Z vertices, a grid size and duration -- @function [parent=#ShatteredTiles3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #int int --- @param #bool bool +-- @param #float duration +-- @param #size_table gridSize +-- @param #int range +-- @param #bool shatterZ -- @return ShatteredTiles3D#ShatteredTiles3D ret (return value: cc.ShatteredTiles3D) -------------------------------- +-- -- @function [parent=#ShatteredTiles3D] clone -- @param self -- @return ShatteredTiles3D#ShatteredTiles3D ret (return value: cc.ShatteredTiles3D) -------------------------------- +-- -- @function [parent=#ShatteredTiles3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Show.lua b/cocos/scripting/lua-bindings/auto/api/Show.lua index a09d54705a..7b53551bf0 100644 --- a/cocos/scripting/lua-bindings/auto/api/Show.lua +++ b/cocos/scripting/lua-bindings/auto/api/Show.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- Allocates and initializes the action -- @function [parent=#Show] create -- @param self -- @return Show#Show ret (return value: cc.Show) -------------------------------- +-- -- @function [parent=#Show] clone -- @param self -- @return Show#Show ret (return value: cc.Show) -------------------------------- +-- -- @function [parent=#Show] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#Show] reverse -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) diff --git a/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua b/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua index 231f1e070b..c8e89ce80c 100644 --- a/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua @@ -5,32 +5,37 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ShuffleTiles] getDelta -- @param self --- @param #size_table size +-- @param #size_table pos -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- creates the action with a random seed, the grid size and the duration -- @function [parent=#ShuffleTiles] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int seed -- @return ShuffleTiles#ShuffleTiles ret (return value: cc.ShuffleTiles) -------------------------------- +-- -- @function [parent=#ShuffleTiles] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ShuffleTiles] clone -- @param self -- @return ShuffleTiles#ShuffleTiles ret (return value: cc.ShuffleTiles) -------------------------------- +-- -- @function [parent=#ShuffleTiles] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua b/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua index c56c9104b3..2cb9410358 100644 --- a/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua +++ b/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua @@ -4,114 +4,181 @@ -- @parent_module cc -------------------------------- +-- brief Preload background music
+-- param pszFilePath The path of the background music file.
+-- js preloadMusic
+-- lua preloadMusic -- @function [parent=#SimpleAudioEngine] preloadBackgroundMusic -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- brief Stop playing background music
+-- param bReleaseData If release the background music data or not.As default value is false
+-- js stopMusic
+-- lua stopMusic -- @function [parent=#SimpleAudioEngine] stopBackgroundMusic -- @param self -------------------------------- +-- brief Stop all playing sound effects -- @function [parent=#SimpleAudioEngine] stopAllEffects -- @param self -------------------------------- +-- brief The volume of the background music within the range of 0.0 as the minimum and 1.0 as the maximum.
+-- js getMusicVolume
+-- lua getMusicVolume -- @function [parent=#SimpleAudioEngine] getBackgroundMusicVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- brief Resume playing background music
+-- js resumeMusic
+-- lua resumeMusic -- @function [parent=#SimpleAudioEngine] resumeBackgroundMusic -- @param self -------------------------------- +-- brief Set the volume of background music
+-- param volume must be within the range of 0.0 as the minimum and 1.0 as the maximum.
+-- js setMusicVolume
+-- lua setMusicVolume -- @function [parent=#SimpleAudioEngine] setBackgroundMusicVolume -- @param self --- @param #float float +-- @param #float volume -------------------------------- +-- brief preload a compressed audio file
+-- details the compressed audio will be decoded to wave, then written into an internal buffer in SimpleAudioEngine
+-- param pszFilePath The path of the effect file -- @function [parent=#SimpleAudioEngine] preloadEffect -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- brief Indicates whether the background music is playing
+-- return true if the background music is playing, otherwise false
+-- js isMusicPlaying
+-- lua isMusicPlaying -- @function [parent=#SimpleAudioEngine] isBackgroundMusicPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief The volume of the effects within the range of 0.0 as the minimum and 1.0 as the maximum. -- @function [parent=#SimpleAudioEngine] getEffectsVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- brief Indicates whether any background music can be played or not.
+-- return true if background music can be played, otherwise false.
+-- js willPlayMusic
+-- lua willPlayMusic -- @function [parent=#SimpleAudioEngine] willPlayBackgroundMusic -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief Pause playing sound effect
+-- param nSoundId The return value of function playEffect -- @function [parent=#SimpleAudioEngine] pauseEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- brief Play sound effect with a file path, pitch, pan and gain
+-- param pszFilePath The path of the effect file.
+-- param bLoop Determines whether to loop the effect playing or not. The default value is false.
+-- param pitch Frequency, normal value is 1.0. Will also change effect play time.
+-- param pan Stereo effect, in the range of [-1..1] where -1 enables only left channel.
+-- param gain Volume, in the range of [0..1]. The normal value is 1.
+-- return the OpenAL source id
+-- note Full support is under development, now there are limitations:
+-- - no pitch effect on Samsung Galaxy S2 with OpenSL backend enabled;
+-- - no pitch/pan/gain on emscrippten, win32, marmalade. -- @function [parent=#SimpleAudioEngine] playEffect -- @param self --- @param #char char --- @param #bool bool --- @param #float float --- @param #float float --- @param #float float +-- @param #char pszFilePath +-- @param #bool bLoop +-- @param #float pitch +-- @param #float pan +-- @param #float gain -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- brief Rewind playing background music
+-- js rewindMusic
+-- lua rewindMusic -- @function [parent=#SimpleAudioEngine] rewindBackgroundMusic -- @param self -------------------------------- +-- brief Play background music
+-- param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo
+-- param bLoop Whether the background music loop or not
+-- js playMusic
+-- lua playMusic -- @function [parent=#SimpleAudioEngine] playBackgroundMusic -- @param self --- @param #char char --- @param #bool bool +-- @param #char pszFilePath +-- @param #bool bLoop -------------------------------- +-- brief Resume all playing sound effect -- @function [parent=#SimpleAudioEngine] resumeAllEffects -- @param self -------------------------------- +-- brief Set the volume of sound effects
+-- param volume must be within the range of 0.0 as the minimum and 1.0 as the maximum. -- @function [parent=#SimpleAudioEngine] setEffectsVolume -- @param self --- @param #float float +-- @param #float volume -------------------------------- +-- brief Stop playing sound effect
+-- param nSoundId The return value of function playEffect -- @function [parent=#SimpleAudioEngine] stopEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- brief Pause playing background music
+-- js pauseMusic
+-- lua pauseMusic -- @function [parent=#SimpleAudioEngine] pauseBackgroundMusic -- @param self -------------------------------- +-- brief Pause all playing sound effect -- @function [parent=#SimpleAudioEngine] pauseAllEffects -- @param self -------------------------------- +-- brief unload the preloaded effect from internal buffer
+-- param pszFilePath The path of the effect file -- @function [parent=#SimpleAudioEngine] unloadEffect -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- brief Resume playing sound effect
+-- param nSoundId The return value of function playEffect -- @function [parent=#SimpleAudioEngine] resumeEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- brief Release the shared Engine object
+-- warning It must be called before the application exit, or a memory leak will be casued. -- @function [parent=#SimpleAudioEngine] end -- @param self -------------------------------- +-- brief Get the shared Engine object,it will new one when first time be called -- @function [parent=#SimpleAudioEngine] getInstance -- @param self -- @return SimpleAudioEngine#SimpleAudioEngine ret (return value: cc.SimpleAudioEngine) diff --git a/cocos/scripting/lua-bindings/auto/api/Skeleton.lua b/cocos/scripting/lua-bindings/auto/api/Skeleton.lua index 893bef22d1..51d4c7a9e6 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skeleton.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skeleton.lua @@ -5,49 +5,59 @@ -- @parent_module sp -------------------------------- +-- -- @function [parent=#Skeleton] setToSetupPose -- @param self -------------------------------- +-- -- @function [parent=#Skeleton] setBlendFunc -- @param self --- @param #cc.BlendFunc blendfunc +-- @param #cc.BlendFunc func -------------------------------- +-- -- @function [parent=#Skeleton] onDraw -- @param self --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#Skeleton] setSlotsToSetupPose -- @param self -------------------------------- +-- -- @function [parent=#Skeleton] getBlendFunc -- @param self -- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) -------------------------------- +-- -- @function [parent=#Skeleton] setSkin -- @param self --- @param #char char +-- @param #char skinName -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Skeleton] setBonesToSetupPose -- @param self -------------------------------- +-- -- @function [parent=#Skeleton] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Skeleton] onEnter -- @param self -------------------------------- +-- -- @function [parent=#Skeleton] onExit -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua b/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua index 3f5fb38b02..b4271af29d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua @@ -5,39 +5,46 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Skeleton3D] getBoneByName -- @param self --- @param #string str +-- @param #string id -- @return Bone3D#Bone3D ret (return value: cc.Bone3D) -------------------------------- +-- -- @function [parent=#Skeleton3D] getRootBone -- @param self --- @param #int int +-- @param #int index -- @return Bone3D#Bone3D ret (return value: cc.Bone3D) -------------------------------- +-- refresh bone world matrix -- @function [parent=#Skeleton3D] updateBoneMatrix -- @param self -------------------------------- +-- get bone -- @function [parent=#Skeleton3D] getBoneByIndex -- @param self --- @param #unsigned int int +-- @param #unsigned int index -- @return Bone3D#Bone3D ret (return value: cc.Bone3D) -------------------------------- +-- get & set root bone -- @function [parent=#Skeleton3D] getRootCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- get bone index -- @function [parent=#Skeleton3D] getBoneIndex -- @param self --- @param #cc.Bone3D bone3d +-- @param #cc.Bone3D bone -- @return int#int ret (return value: int) -------------------------------- +-- get total bone count -- @function [parent=#Skeleton3D] getBoneCount -- @param self -- @return long#long ret (return value: long) diff --git a/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua b/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua index a3cd0aad24..c57eb13010 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua @@ -5,17 +5,20 @@ -- @parent_module sp -------------------------------- +-- -- @function [parent=#SkeletonAnimation] setMix -- @param self --- @param #char char --- @param #char char --- @param #float float +-- @param #char fromAnimation +-- @param #char toAnimation +-- @param #float duration -------------------------------- +-- -- @function [parent=#SkeletonAnimation] clearTracks -- @param self -------------------------------- +-- -- @function [parent=#SkeletonAnimation] clearTrack -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/SkewBy.lua b/cocos/scripting/lua-bindings/auto/api/SkewBy.lua index 4aeb6a83ac..637696e2cc 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkewBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkewBy.lua @@ -5,24 +5,28 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#SkewBy] create -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float t +-- @param #float deltaSkewX +-- @param #float deltaSkewY -- @return SkewBy#SkewBy ret (return value: cc.SkewBy) -------------------------------- +-- -- @function [parent=#SkewBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#SkewBy] clone -- @param self -- @return SkewBy#SkewBy ret (return value: cc.SkewBy) -------------------------------- +-- -- @function [parent=#SkewBy] reverse -- @param self -- @return SkewBy#SkewBy ret (return value: cc.SkewBy) diff --git a/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua b/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua index 3616dd1b88..53b967470e 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua @@ -5,41 +5,49 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#SkewFrame] getSkewY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#SkewFrame] setSkewX -- @param self --- @param #float float +-- @param #float skewx -------------------------------- +-- -- @function [parent=#SkewFrame] setSkewY -- @param self --- @param #float float +-- @param #float skewy -------------------------------- +-- -- @function [parent=#SkewFrame] getSkewX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#SkewFrame] create -- @param self -- @return SkewFrame#SkewFrame ret (return value: ccs.SkewFrame) -------------------------------- +-- -- @function [parent=#SkewFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#SkewFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#SkewFrame] SkewFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/SkewTo.lua b/cocos/scripting/lua-bindings/auto/api/SkewTo.lua index 65979d1638..be1840199a 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkewTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkewTo.lua @@ -5,31 +5,36 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#SkewTo] create -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float t +-- @param #float sx +-- @param #float sy -- @return SkewTo#SkewTo ret (return value: cc.SkewTo) -------------------------------- +-- -- @function [parent=#SkewTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#SkewTo] clone -- @param self -- @return SkewTo#SkewTo ret (return value: cc.SkewTo) -------------------------------- +-- -- @function [parent=#SkewTo] reverse -- @param self -- @return SkewTo#SkewTo ret (return value: cc.SkewTo) -------------------------------- +-- -- @function [parent=#SkewTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Skin.lua b/cocos/scripting/lua-bindings/auto/api/Skin.lua index 10b1e77183..c0f870f33f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skin.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skin.lua @@ -5,37 +5,44 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#Skin] getBone -- @param self -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- +-- -- @function [parent=#Skin] getNodeToWorldTransformAR -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- -- @function [parent=#Skin] initWithFile -- @param self --- @param #string str +-- @param #string filename -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Skin] getDisplayName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Skin] updateArmatureTransform -- @param self -------------------------------- +-- -- @function [parent=#Skin] initWithSpriteFrameName -- @param self --- @param #string str +-- @param #string spriteFrameName -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Skin] setBone -- @param self -- @param #ccs.Bone bone @@ -45,32 +52,37 @@ -- @overload self -- @function [parent=#Skin] create -- @param self --- @param #string str +-- @param #string pszFileName -- @return Skin#Skin ret (retunr value: ccs.Skin) -------------------------------- +-- -- @function [parent=#Skin] createWithSpriteFrameName -- @param self --- @param #string str +-- @param #string pszSpriteFrameName -- @return Skin#Skin ret (return value: ccs.Skin) -------------------------------- +-- -- @function [parent=#Skin] updateTransform -- @param self -------------------------------- +-- -- @function [parent=#Skin] getNodeToWorldTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- -- @function [parent=#Skin] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- js ctor -- @function [parent=#Skin] Skin -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Slider.lua b/cocos/scripting/lua-bindings/auto/api/Slider.lua index ade0016d08..69dc0e637e 100644 --- a/cocos/scripting/lua-bindings/auto/api/Slider.lua +++ b/cocos/scripting/lua-bindings/auto/api/Slider.lua @@ -5,130 +5,174 @@ -- @parent_module ccui -------------------------------- +-- Changes the progress direction of slider.
+-- param percent percent value from 1 to 100. -- @function [parent=#Slider] setPercent -- @param self --- @param #int int +-- @param #int percent -------------------------------- +-- Load dark state texture for slider ball.
+-- param disabled dark state texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTextureDisabled -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string disabled +-- @param #int texType -------------------------------- +-- Load normal state texture for slider ball.
+-- param normal normal state texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTextureNormal -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string normal +-- @param #int texType -------------------------------- +-- Load texture for slider bar.
+-- param fileName file name of texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadBarTexture -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string fileName +-- @param #int texType -------------------------------- +-- Load dark state texture for slider progress bar.
+-- param fileName file path of texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadProgressBarTexture -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string fileName +-- @param #int texType -------------------------------- +-- Load textures for slider ball.
+-- param slider ball normal normal state texture.
+-- param slider ball selected selected state texture.
+-- param slider ball disabled dark state texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTextures -- @param self --- @param #string str --- @param #string str --- @param #string str --- @param #int texturerestype +-- @param #string normal +-- @param #string pressed +-- @param #string disabled +-- @param #int texType -------------------------------- +-- Sets capinsets for slider, if slider is using scale9 renderer.
+-- param capInsets capinsets for slider -- @function [parent=#Slider] setCapInsetProgressBarRebderer -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Sets capinsets for slider, if slider is using scale9 renderer.
+-- param capInsets capinsets for slider -- @function [parent=#Slider] setCapInsetsBarRenderer -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- -- @function [parent=#Slider] getCapInsetsProgressBarRebderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Sets if slider is using scale9 renderer.
+-- param true that using scale9 renderer, false otherwise. -- @function [parent=#Slider] setScale9Enabled -- @param self --- @param #bool bool +-- @param #bool able -------------------------------- +-- Sets capinsets for slider, if slider is using scale9 renderer.
+-- param capInsets capinsets for slider -- @function [parent=#Slider] setCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- -- @function [parent=#Slider] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- Load selected state texture for slider ball.
+-- param selected selected state texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTexturePressed -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string pressed +-- @param #int texType -------------------------------- +-- -- @function [parent=#Slider] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Slider] getCapInsetsBarRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Gets the progress direction of slider.
+-- return percent percent value from 1 to 100. -- @function [parent=#Slider] getPercent -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Allocates and initializes. -- @function [parent=#Slider] create -- @param self -- @return Slider#Slider ret (return value: ccui.Slider) -------------------------------- +-- -- @function [parent=#Slider] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#Slider] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#Slider] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#Slider] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Slider] hitTest -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pt -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Slider] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Default constructor -- @function [parent=#Slider] Slider -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Spawn.lua b/cocos/scripting/lua-bindings/auto/api/Spawn.lua index 8188b52d7c..1bdc516a1d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Spawn.lua +++ b/cocos/scripting/lua-bindings/auto/api/Spawn.lua @@ -5,27 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Spawn] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Spawn] clone -- @param self -- @return Spawn#Spawn ret (return value: cc.Spawn) -------------------------------- +-- -- @function [parent=#Spawn] stop -- @param self -------------------------------- +-- -- @function [parent=#Spawn] reverse -- @param self -- @return Spawn#Spawn ret (return value: cc.Spawn) -------------------------------- +-- -- @function [parent=#Spawn] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Speed.lua b/cocos/scripting/lua-bindings/auto/api/Speed.lua index f45b157ffa..20fdf2985b 100644 --- a/cocos/scripting/lua-bindings/auto/api/Speed.lua +++ b/cocos/scripting/lua-bindings/auto/api/Speed.lua @@ -5,57 +5,68 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Speed] setInnerAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -------------------------------- +-- alter the speed of the inner function in runtime -- @function [parent=#Speed] setSpeed -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- -- @function [parent=#Speed] getInnerAction -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#Speed] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- create the action -- @function [parent=#Speed] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float speed -- @return Speed#Speed ret (return value: cc.Speed) -------------------------------- +-- -- @function [parent=#Speed] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Speed] reverse -- @param self -- @return Speed#Speed ret (return value: cc.Speed) -------------------------------- +-- -- @function [parent=#Speed] clone -- @param self -- @return Speed#Speed ret (return value: cc.Speed) -------------------------------- +-- -- @function [parent=#Speed] stop -- @param self -------------------------------- +-- -- @function [parent=#Speed] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Speed] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/SplitCols.lua b/cocos/scripting/lua-bindings/auto/api/SplitCols.lua index 96730e20c7..852bd2a2fc 100644 --- a/cocos/scripting/lua-bindings/auto/api/SplitCols.lua +++ b/cocos/scripting/lua-bindings/auto/api/SplitCols.lua @@ -5,25 +5,29 @@ -- @parent_module cc -------------------------------- +-- creates the action with the number of columns to split and the duration -- @function [parent=#SplitCols] create -- @param self --- @param #float float --- @param #unsigned int int +-- @param #float duration +-- @param #unsigned int cols -- @return SplitCols#SplitCols ret (return value: cc.SplitCols) -------------------------------- +-- -- @function [parent=#SplitCols] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#SplitCols] clone -- @param self -- @return SplitCols#SplitCols ret (return value: cc.SplitCols) -------------------------------- +-- -- @function [parent=#SplitCols] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SplitRows.lua b/cocos/scripting/lua-bindings/auto/api/SplitRows.lua index 1e362c2676..2dc41380a3 100644 --- a/cocos/scripting/lua-bindings/auto/api/SplitRows.lua +++ b/cocos/scripting/lua-bindings/auto/api/SplitRows.lua @@ -5,25 +5,29 @@ -- @parent_module cc -------------------------------- +-- creates the action with the number of rows to split and the duration -- @function [parent=#SplitRows] create -- @param self --- @param #float float --- @param #unsigned int int +-- @param #float duration +-- @param #unsigned int rows -- @return SplitRows#SplitRows ret (return value: cc.SplitRows) -------------------------------- +-- -- @function [parent=#SplitRows] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#SplitRows] clone -- @param self -- @return SplitRows#SplitRows ret (return value: cc.SplitRows) -------------------------------- +-- -- @function [parent=#SplitRows] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Sprite.lua index 7be402618d..1450fafc8d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite.lua @@ -9,46 +9,57 @@ -- @overload self, string -- @function [parent=#Sprite] setSpriteFrame -- @param self --- @param #string str +-- @param #string spriteFrameName -------------------------------- -- @overload self, cc.Texture2D -- @overload self, string -- @function [parent=#Sprite] setTexture -- @param self --- @param #string str +-- @param #string filename -------------------------------- +-- returns the Texture2D object used by the sprite -- @function [parent=#Sprite] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- Sets whether the sprite should be flipped vertically or not.
+-- param flippedY true if the sprite should be flipped vertically, false otherwise. -- @function [parent=#Sprite] setFlippedY -- @param self --- @param #bool bool +-- @param #bool flippedY -------------------------------- +-- Sets whether the sprite should be flipped horizontally or not.
+-- param flippedX true if the sprite should be flipped horizontally, false otherwise. -- @function [parent=#Sprite] setFlippedX -- @param self --- @param #bool bool +-- @param #bool flippedX -------------------------------- +-- Returns the batch node object if this sprite is rendered by SpriteBatchNode
+-- return The SpriteBatchNode object if this sprite is rendered by SpriteBatchNode,
+-- nullptr if the sprite isn't used batch node. -- @function [parent=#Sprite] getBatchNode -- @param self -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- +-- Gets the offset position of the sprite. Calculated automatically by editors like Zwoptex. -- @function [parent=#Sprite] getOffsetPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Sprite] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- Updates the quad according the rotation, position, scale values. -- @function [parent=#Sprite] updateTransform -- @param self @@ -58,82 +69,121 @@ -- @function [parent=#Sprite] setTextureRect -- @param self -- @param #rect_table rect --- @param #bool bool --- @param #size_table size +-- @param #bool rotated +-- @param #size_table untrimmedSize -------------------------------- +-- Returns whether or not a SpriteFrame is being displayed -- @function [parent=#Sprite] isFrameDisplayed -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame pFrame -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the index used on the TextureAtlas. -- @function [parent=#Sprite] getAtlasIndex -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Sets the batch node to sprite
+-- warning This method is not recommended for game developers. Sample code for using batch node
+-- code
+-- SpriteBatchNode *batch = SpriteBatchNode::create("Images/grossini_dance_atlas.png", 15);
+-- Sprite *sprite = Sprite::createWithTexture(batch->getTexture(), Rect(0, 0, 57, 57));
+-- batch->addChild(sprite);
+-- layer->addChild(batch);
+-- endcode -- @function [parent=#Sprite] setBatchNode -- @param self --- @param #cc.SpriteBatchNode spritebatchnode +-- @param #cc.SpriteBatchNode spriteBatchNode -------------------------------- +-- / @{/ @name Animation methods
+-- Changes the display frame with animation name and index.
+-- The animation name will be get from the AnimationCache -- @function [parent=#Sprite] setDisplayFrameWithAnimationName -- @param self --- @param #string str --- @param #long long +-- @param #string animationName +-- @param #long frameIndex -------------------------------- +-- Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode -- @function [parent=#Sprite] setTextureAtlas -- @param self --- @param #cc.TextureAtlas textureatlas +-- @param #cc.TextureAtlas pobTextureAtlas -------------------------------- +-- Returns the current displayed frame. -- @function [parent=#Sprite] getSpriteFrame -- @param self -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- +-- Whether or not the Sprite needs to be updated in the Atlas.
+-- return true if the sprite needs to be updated in the Atlas, false otherwise. -- @function [parent=#Sprite] isDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the index used on the TextureAtlas.
+-- warning Don't modify this value unless you know what you are doing -- @function [parent=#Sprite] setAtlasIndex -- @param self --- @param #long long +-- @param #long atlasIndex -------------------------------- +-- Makes the Sprite to be updated in the Atlas. -- @function [parent=#Sprite] setDirty -- @param self --- @param #bool bool +-- @param #bool dirty -------------------------------- +-- Returns whether or not the texture rectangle is rotated. -- @function [parent=#Sprite] isTextureRectRotated -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the rect of the Sprite in points -- @function [parent=#Sprite] getTextureRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode -- @function [parent=#Sprite] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- +-- Returns the flag which indicates whether the sprite is flipped horizontally or not.
+-- It only flips the texture of the sprite, and not the texture of the sprite's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- sprite->setScaleX(sprite->getScaleX() * -1);
+-- return true if the sprite is flipped horizontally, false otherwise. -- @function [parent=#Sprite] isFlippedX -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Return the flag which indicates whether the sprite is flipped vertically or not.
+-- It only flips the texture of the sprite, and not the texture of the sprite's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- sprite->setScaleY(sprite->getScaleY() * -1);
+-- return true if the sprite is flipped vertically, false otherwise. -- @function [parent=#Sprite] isFlippedY -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the vertex rect.
+-- It will be called internally by setTextureRect.
+-- Useful if you want to create 2x images from SD images in Retina Display.
+-- Do not call it manually. Use setTextureRect instead. -- @function [parent=#Sprite] setVertexRect -- @param self -- @param #rect_table rect @@ -144,7 +194,7 @@ -- @overload self, string, rect_table -- @function [parent=#Sprite] create -- @param self --- @param #string str +-- @param #string filename -- @param #rect_table rect -- @return Sprite#Sprite ret (retunr value: cc.Sprite) @@ -153,131 +203,157 @@ -- @overload self, cc.Texture2D -- @function [parent=#Sprite] createWithTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -- @param #rect_table rect --- @param #bool bool +-- @param #bool rotated -- @return Sprite#Sprite ret (retunr value: cc.Sprite) -------------------------------- +-- Creates a sprite with an sprite frame name.
+-- A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param.
+-- If the SpriteFrame doesn't exist it will raise an exception.
+-- param spriteFrameName A null terminated string which indicates the sprite frame name.
+-- return An autoreleased sprite object -- @function [parent=#Sprite] createWithSpriteFrameName -- @param self --- @param #string str +-- @param #string spriteFrameName -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- Creates a sprite with an sprite frame.
+-- param spriteFrame A sprite frame which involves a texture and a rect
+-- return An autoreleased sprite object -- @function [parent=#Sprite] createWithSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame spriteFrame -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#Sprite] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- -- @overload self, cc.Node, int, string -- @overload self, cc.Node, int, int -- @function [parent=#Sprite] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#Sprite] setScaleY -- @param self --- @param #float float +-- @param #float scaleY -------------------------------- +-- / @{/ @name Functions inherited from Node -- @function [parent=#Sprite] setScaleX -- @param self --- @param #float float +-- @param #float scaleX -------------------------------- +-- -- @function [parent=#Sprite] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Sprite] setPositionZ -- @param self --- @param #float float +-- @param #float positionZ -------------------------------- +-- -- @function [parent=#Sprite] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchor -------------------------------- +-- -- @function [parent=#Sprite] setRotationSkewX -- @param self --- @param #float float +-- @param #float rotationX -------------------------------- +-- / @} -- @function [parent=#Sprite] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Sprite] setRotationSkewY -- @param self --- @param #float float +-- @param #float rotationY -------------------------------- -- @overload self, float -- @overload self, float, float -- @function [parent=#Sprite] setScale -- @param self --- @param #float float --- @param #float float +-- @param #float scaleX +-- @param #float scaleY -------------------------------- +-- -- @function [parent=#Sprite] reorderChild -- @param self --- @param #cc.Node node --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder -------------------------------- +-- -- @function [parent=#Sprite] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#Sprite] sortAllChildren -- @param self -------------------------------- +-- -- @function [parent=#Sprite] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool modify -------------------------------- +-- -- @function [parent=#Sprite] setRotation -- @param self --- @param #float float +-- @param #float rotation -------------------------------- +-- -- @function [parent=#Sprite] setSkewY -- @param self --- @param #float float +-- @param #float sy -------------------------------- +-- -- @function [parent=#Sprite] setVisible -- @param self --- @param #bool bool +-- @param #bool bVisible -------------------------------- +-- -- @function [parent=#Sprite] setSkewX -- @param self --- @param #float float +-- @param #float sx -------------------------------- +-- -- @function [parent=#Sprite] ignoreAnchorPointForPosition -- @param self --- @param #bool bool +-- @param #bool value return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua index 281ad2ac27..002556c277 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua @@ -5,67 +5,78 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Sprite3D] setCullFaceEnabled -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- -- @overload self, cc.Texture2D -- @overload self, string -- @function [parent=#Sprite3D] setTexture -- @param self --- @param #string str +-- @param #string texFile -------------------------------- +-- remove all attach nodes -- @function [parent=#Sprite3D] removeAllAttachNode -- @param self -------------------------------- +-- -- @function [parent=#Sprite3D] setBlendFunc -- @param self --- @param #cc.BlendFunc blendfunc +-- @param #cc.BlendFunc blendFunc -------------------------------- +-- get mesh -- @function [parent=#Sprite3D] getMesh -- @param self -- @return Mesh#Mesh ret (return value: cc.Mesh) -------------------------------- +-- -- @function [parent=#Sprite3D] getBlendFunc -- @param self -- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) -------------------------------- +-- -- @function [parent=#Sprite3D] setCullFace -- @param self --- @param #unsigned int int +-- @param #unsigned int cullFace -------------------------------- +-- remove attach node -- @function [parent=#Sprite3D] removeAttachNode -- @param self --- @param #string str +-- @param #string boneName -------------------------------- +-- get SubMeshState by index -- @function [parent=#Sprite3D] getMeshByIndex -- @param self --- @param #int int +-- @param #int index -- @return Mesh#Mesh ret (return value: cc.Mesh) -------------------------------- +-- get SubMeshState by Name -- @function [parent=#Sprite3D] getMeshByName -- @param self --- @param #string str +-- @param #string name -- @return Mesh#Mesh ret (return value: cc.Mesh) -------------------------------- +-- -- @function [parent=#Sprite3D] getSkeleton -- @param self -- @return Skeleton3D#Skeleton3D ret (return value: cc.Skeleton3D) -------------------------------- +-- get AttachNode by bone name, return nullptr if not exist -- @function [parent=#Sprite3D] getAttachNode -- @param self --- @param #string str +-- @param #string boneName -- @return AttachNode#AttachNode ret (return value: cc.AttachNode) -------------------------------- @@ -73,21 +84,25 @@ -- @overload self, string -- @function [parent=#Sprite3D] create -- @param self --- @param #string str --- @param #string str +-- @param #string modelPath +-- @param #string texturePath -- @return Sprite3D#Sprite3D ret (retunr value: cc.Sprite3D) -------------------------------- +-- Returns 2d bounding-box
+-- Note: the bouding-box is just get from the AABB which as Z=0, so that is not very accurate. -- @function [parent=#Sprite3D] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- set GLProgramState, you should bind attributes by yourself -- @function [parent=#Sprite3D] setGLProgramState -- @param self --- @param #cc.GLProgramState glprogramstate +-- @param #cc.GLProgramState glProgramState -------------------------------- +-- just rember bind attributes -- @function [parent=#Sprite3D] setGLProgram -- @param self -- @param #cc.GLProgram glprogram diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua b/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua index 66321568dd..51e356b39d 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua @@ -5,107 +5,131 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#SpriteBatchNode] appendChild -- @param self -- @param #cc.Sprite sprite -------------------------------- +-- -- @function [parent=#SpriteBatchNode] addSpriteWithoutQuad -- @param self --- @param #cc.Sprite sprite --- @param #int int --- @param #int int +-- @param #cc.Sprite child +-- @param #int z +-- @param #int aTag -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- +-- -- @function [parent=#SpriteBatchNode] reorderBatch -- @param self --- @param #bool bool +-- @param #bool reorder -------------------------------- +-- -- @function [parent=#SpriteBatchNode] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#SpriteBatchNode] lowestAtlasIndexInChild -- @param self -- @param #cc.Sprite sprite -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#SpriteBatchNode] atlasIndexForChild -- @param self -- @param #cc.Sprite sprite --- @param #int int +-- @param #int z -- @return long#long ret (return value: long) -------------------------------- +-- sets the TextureAtlas object -- @function [parent=#SpriteBatchNode] setTextureAtlas -- @param self --- @param #cc.TextureAtlas textureatlas +-- @param #cc.TextureAtlas textureAtlas -------------------------------- +-- -- @function [parent=#SpriteBatchNode] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- -- @function [parent=#SpriteBatchNode] increaseAtlasCapacity -- @param self -------------------------------- +-- returns the TextureAtlas object -- @function [parent=#SpriteBatchNode] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- +-- Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.
+-- This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.
+-- For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont) -- @function [parent=#SpriteBatchNode] insertQuadFromSprite -- @param self -- @param #cc.Sprite sprite --- @param #long long +-- @param #long index -------------------------------- +-- -- @function [parent=#SpriteBatchNode] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- -- @function [parent=#SpriteBatchNode] rebuildIndexInOrder -- @param self --- @param #cc.Sprite sprite --- @param #long long +-- @param #cc.Sprite parent +-- @param #long index -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#SpriteBatchNode] highestAtlasIndexInChild -- @param self -- @param #cc.Sprite sprite -- @return long#long ret (return value: long) -------------------------------- +-- removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter.
+-- warning Removing a child from a SpriteBatchNode is very slow -- @function [parent=#SpriteBatchNode] removeChildAtIndex -- @param self --- @param #long long --- @param #bool bool +-- @param #long index +-- @param #bool doCleanup -------------------------------- +-- -- @function [parent=#SpriteBatchNode] removeSpriteFromAtlas -- @param self -- @param #cc.Sprite sprite -------------------------------- +-- creates a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.
+-- The capacity will be increased in 33% in runtime if it run out of space.
+-- The file will be loaded using the TextureMgr. -- @function [parent=#SpriteBatchNode] create -- @param self --- @param #string str --- @param #long long +-- @param #string fileImage +-- @param #long capacity -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- +-- creates a SpriteBatchNode with a texture2d and capacity of children.
+-- The capacity will be increased in 33% in runtime if it run out of space. -- @function [parent=#SpriteBatchNode] createWithTexture -- @param self --- @param #cc.Texture2D texture2d --- @param #long long +-- @param #cc.Texture2D tex +-- @param #long capacity -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- @@ -113,43 +137,49 @@ -- @overload self, cc.Node, int, int -- @function [parent=#SpriteBatchNode] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#SpriteBatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#SpriteBatchNode] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#SpriteBatchNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#SpriteBatchNode] sortAllChildren -- @param self -------------------------------- +-- -- @function [parent=#SpriteBatchNode] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#SpriteBatchNode] reorderChild -- @param self --- @param #cc.Node node --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua b/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua index 1f7cc32b52..4b0c6c07bc 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua @@ -5,16 +5,19 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#SpriteDisplayData] copy -- @param self --- @param #ccs.DisplayData displaydata +-- @param #ccs.DisplayData displayData -------------------------------- +-- -- @function [parent=#SpriteDisplayData] create -- @param self -- @return SpriteDisplayData#SpriteDisplayData ret (return value: ccs.SpriteDisplayData) -------------------------------- +-- js ctor -- @function [parent=#SpriteDisplayData] SpriteDisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua b/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua index cca90af1d0..b71c6eeaad 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua @@ -5,86 +5,103 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#SpriteFrame] clone -- @param self -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- +-- -- @function [parent=#SpriteFrame] setRotated -- @param self --- @param #bool bool +-- @param #bool rotated -------------------------------- +-- set texture of the frame, the texture is retained -- @function [parent=#SpriteFrame] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D pobTexture -------------------------------- +-- -- @function [parent=#SpriteFrame] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#SpriteFrame] setRectInPixels -- @param self --- @param #rect_table rect +-- @param #rect_table rectInPixels -------------------------------- +-- get texture of the frame -- @function [parent=#SpriteFrame] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- get rect of the frame -- @function [parent=#SpriteFrame] getRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- set offset of the frame -- @function [parent=#SpriteFrame] setOffsetInPixels -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table offsetInPixels -------------------------------- +-- -- @function [parent=#SpriteFrame] getRectInPixels -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- set original size of the trimmed image -- @function [parent=#SpriteFrame] setOriginalSize -- @param self --- @param #size_table size +-- @param #size_table sizeInPixels -------------------------------- +-- get original size of the trimmed image -- @function [parent=#SpriteFrame] getOriginalSizeInPixels -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- set original size of the trimmed image -- @function [parent=#SpriteFrame] setOriginalSizeInPixels -- @param self --- @param #size_table size +-- @param #size_table sizeInPixels -------------------------------- +-- -- @function [parent=#SpriteFrame] setOffset -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table offsets -------------------------------- +-- -- @function [parent=#SpriteFrame] isRotated -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- set rect of the frame -- @function [parent=#SpriteFrame] setRect -- @param self -- @param #rect_table rect -------------------------------- +-- get offset of the frame -- @function [parent=#SpriteFrame] getOffsetInPixels -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- get original size of the trimmed image -- @function [parent=#SpriteFrame] getOriginalSize -- @param self -- @return size_table#size_table ret (return value: size_table) @@ -94,11 +111,11 @@ -- @overload self, string, rect_table -- @function [parent=#SpriteFrame] create -- @param self --- @param #string str +-- @param #string filename -- @param #rect_table rect --- @param #bool bool --- @param #vec2_table vec2 --- @param #size_table size +-- @param #bool rotated +-- @param #vec2_table offset +-- @param #size_table originalSize -- @return SpriteFrame#SpriteFrame ret (retunr value: cc.SpriteFrame) -------------------------------- @@ -106,11 +123,11 @@ -- @overload self, cc.Texture2D, rect_table -- @function [parent=#SpriteFrame] createWithTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D pobTexture -- @param #rect_table rect --- @param #bool bool --- @param #vec2_table vec2 --- @param #size_table size +-- @param #bool rotated +-- @param #vec2_table offset +-- @param #size_table originalSize -- @return SpriteFrame#SpriteFrame ret (retunr value: cc.SpriteFrame) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua b/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua index 33e686b786..8b6ceba0a9 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua @@ -5,10 +5,13 @@ -- @parent_module cc -------------------------------- +-- Adds multiple Sprite Frames from a plist file content. The texture will be associated with the created sprite frames.
+-- js addSpriteFrames
+-- lua addSpriteFrames -- @function [parent=#SpriteFrameCache] addSpriteFramesWithFileContent -- @param self --- @param #string str --- @param #cc.Texture2D texture2d +-- @param #string plist_content +-- @param #cc.Texture2D texture -------------------------------- -- @overload self, string, string @@ -16,59 +19,88 @@ -- @overload self, string, cc.Texture2D -- @function [parent=#SpriteFrameCache] addSpriteFramesWithFile -- @param self --- @param #string str --- @param #cc.Texture2D texture2d +-- @param #string plist +-- @param #cc.Texture2D texture -------------------------------- +-- Adds an sprite frame with a given name.
+-- If the name already exists, then the contents of the old name will be replaced with the new one. -- @function [parent=#SpriteFrameCache] addSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe --- @param #string str +-- @param #cc.SpriteFrame frame +-- @param #string frameName -------------------------------- +-- Removes unused sprite frames.
+-- Sprite Frames that have a retain count of 1 will be deleted.
+-- It is convenient to call this method after when starting a new Scene. -- @function [parent=#SpriteFrameCache] removeUnusedSpriteFrames -- @param self -------------------------------- +-- Returns an Sprite Frame that was previously added.
+-- If the name is not found it will return nil.
+-- You should retain the returned copy if you are going to use it.
+-- js getSpriteFrame
+-- lua getSpriteFrame -- @function [parent=#SpriteFrameCache] getSpriteFrameByName -- @param self --- @param #string str +-- @param #string name -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- +-- Removes multiple Sprite Frames from a plist file.
+-- Sprite Frames stored in this file will be removed.
+-- It is convenient to call this method when a specific texture needs to be removed.
+-- since v0.99.5 -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromFile -- @param self --- @param #string str +-- @param #string plist -------------------------------- +-- -- @function [parent=#SpriteFrameCache] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Purges the dictionary of loaded sprite frames.
+-- Call this method if you receive the "Memory Warning".
+-- In the short term: it will free some resources preventing your app from being killed.
+-- In the medium term: it will allocate more resources.
+-- In the long term: it will be the same. -- @function [parent=#SpriteFrameCache] removeSpriteFrames -- @param self -------------------------------- +-- Removes all Sprite Frames associated with the specified textures.
+-- It is convenient to call this method when a specific texture needs to be removed.
+-- since v0.995. -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- Removes multiple Sprite Frames from a plist file content.
+-- Sprite Frames stored in this file will be removed.
+-- It is convenient to call this method when a specific texture needs to be removed. -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromFileContent -- @param self --- @param #string str +-- @param #string plist_content -------------------------------- +-- Deletes an sprite frame from the sprite frame cache. -- @function [parent=#SpriteFrameCache] removeSpriteFrameByName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- Destroys the cache. It releases all the Sprite Frames and the retained instance. -- @function [parent=#SpriteFrameCache] destroyInstance -- @param self -------------------------------- +-- Returns the shared instance of the Sprite Frame cache -- @function [parent=#SpriteFrameCache] getInstance -- @param self -- @return SpriteFrameCache#SpriteFrameCache ret (return value: cc.SpriteFrameCache) diff --git a/cocos/scripting/lua-bindings/auto/api/StopGrid.lua b/cocos/scripting/lua-bindings/auto/api/StopGrid.lua index 7dd7245795..7859d30d7f 100644 --- a/cocos/scripting/lua-bindings/auto/api/StopGrid.lua +++ b/cocos/scripting/lua-bindings/auto/api/StopGrid.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- Allocates and initializes the action -- @function [parent=#StopGrid] create -- @param self -- @return StopGrid#StopGrid ret (return value: cc.StopGrid) -------------------------------- +-- -- @function [parent=#StopGrid] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#StopGrid] clone -- @param self -- @return StopGrid#StopGrid ret (return value: cc.StopGrid) -------------------------------- +-- -- @function [parent=#StopGrid] reverse -- @param self -- @return StopGrid#StopGrid ret (return value: cc.StopGrid) diff --git a/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua b/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua index 315b1a4f20..92d5b7e46b 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua @@ -5,45 +5,53 @@ -- @parent_module ccexp -------------------------------- +-- returns the position in points of a given tile coordinate -- @function [parent=#TMXLayer] getPositionAt -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table tileCoordinate -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#TMXLayer] setLayerOrientation -- @param self --- @param #int int +-- @param #int orientation -------------------------------- +-- size of the layer in tiles -- @function [parent=#TMXLayer] getLayerSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#TMXLayer] setMapTileSize -- @param self -- @param #size_table size -------------------------------- +-- Layer orientation, which is the same as the map orientation -- @function [parent=#TMXLayer] getLayerOrientation -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TMXLayer] setProperties -- @param self --- @param #map_table map +-- @param #map_table properties -------------------------------- +-- -- @function [parent=#TMXLayer] setLayerName -- @param self --- @param #string str +-- @param #string layerName -------------------------------- +-- removes a tile at given tile coordinate -- @function [parent=#TMXLayer] removeTileAt -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table tileCoordinate -------------------------------- -- @overload self @@ -53,89 +61,107 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- +-- Creates the tiles -- @function [parent=#TMXLayer] setupTiles -- @param self -------------------------------- +-- -- @function [parent=#TMXLayer] setupTileSprite -- @param self -- @param #cc.Sprite sprite --- @param #vec2_table vec2 --- @param #int int +-- @param #vec2_table pos +-- @param #int gid -------------------------------- -- @overload self, int, vec2_table, int -- @overload self, int, vec2_table -- @function [parent=#TMXLayer] setTileGID -- @param self --- @param #int int --- @param #vec2_table vec2 --- @param #int tmxtileflags_ +-- @param #int gid +-- @param #vec2_table tileCoordinate +-- @param #int flags -------------------------------- +-- size of the map's tile (could be different from the tile's size) -- @function [parent=#TMXLayer] getMapTileSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- return the value for the specific property name -- @function [parent=#TMXLayer] getProperty -- @param self --- @param #string str +-- @param #string propertyName -- @return Value#Value ret (return value: cc.Value) -------------------------------- +-- -- @function [parent=#TMXLayer] setLayerSize -- @param self -- @param #size_table size -------------------------------- +-- -- @function [parent=#TMXLayer] getLayerName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TMXLayer] setTileSet -- @param self --- @param #cc.TMXTilesetInfo tmxtilesetinfo +-- @param #cc.TMXTilesetInfo info -------------------------------- +-- Tileset information for the layer -- @function [parent=#TMXLayer] getTileSet -- @param self -- @return TMXTilesetInfo#TMXTilesetInfo ret (return value: cc.TMXTilesetInfo) -------------------------------- +-- returns the tile (Sprite) at a given a tile coordinate.
+-- The returned Sprite will be already added to the TMXLayer. Don't add it again.
+-- The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.
+-- You can remove either by calling:
+-- - layer->removeChild(sprite, cleanup); -- @function [parent=#TMXLayer] getTileAt -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table tileCoordinate -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- creates a FastTMXLayer with an tileset info, a layer info and a map info -- @function [parent=#TMXLayer] create -- @param self --- @param #cc.TMXTilesetInfo tmxtilesetinfo --- @param #cc.TMXLayerInfo tmxlayerinfo --- @param #cc.TMXMapInfo map +-- @param #cc.TMXTilesetInfo tilesetInfo +-- @param #cc.TMXLayerInfo layerInfo +-- @param #cc.TMXMapInfo mapInfo -- @return experimental::TMXLayer#experimental::TMXLayer ret (return value: cc.experimental::TMXLayer) -------------------------------- +-- -- @function [parent=#TMXLayer] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#TMXLayer] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#TMXLayer] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- js ctor -- @function [parent=#TMXLayer] TMXLayer -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua b/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua index fad88388e2..acb406eb7a 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua @@ -5,16 +5,19 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TMXLayerInfo] setProperties -- @param self --- @param #map_table map +-- @param #map_table properties -------------------------------- +-- -- @function [parent=#TMXLayerInfo] getProperties -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- js ctor -- @function [parent=#TMXLayerInfo] TMXLayerInfo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua b/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua index ef098ce6f2..3a77a877b5 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua @@ -4,56 +4,66 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TMXMapInfo] setObjectGroups -- @param self --- @param #array_table array +-- @param #array_table groups -------------------------------- +-- -- @function [parent=#TMXMapInfo] setTileSize -- @param self --- @param #size_table size +-- @param #size_table tileSize -------------------------------- +-- initializes a TMX format with a tmx file -- @function [parent=#TMXMapInfo] initWithTMXFile -- @param self --- @param #string str +-- @param #string tmxFile -- @return bool#bool ret (return value: bool) -------------------------------- +-- / map orientation -- @function [parent=#TMXMapInfo] getOrientation -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- / is storing characters? -- @function [parent=#TMXMapInfo] isStoringCharacters -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setLayers -- @param self --- @param #array_table array +-- @param #array_table layers -------------------------------- +-- initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file -- @function [parent=#TMXMapInfo] parseXMLFile -- @param self --- @param #string str +-- @param #string xmlFilename -- @return bool#bool ret (return value: bool) -------------------------------- +-- / parent element -- @function [parent=#TMXMapInfo] getParentElement -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setTMXFileName -- @param self --- @param #string str +-- @param #string fileName -------------------------------- +-- -- @function [parent=#TMXMapInfo] parseXMLString -- @param self --- @param #string str +-- @param #string xmlString -- @return bool#bool ret (return value: bool) -------------------------------- @@ -71,38 +81,45 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- / parent GID -- @function [parent=#TMXMapInfo] getParentGID -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setParentElement -- @param self --- @param #int int +-- @param #int element -------------------------------- +-- initializes a TMX format with an XML string and a TMX resource path -- @function [parent=#TMXMapInfo] initWithXML -- @param self --- @param #string str --- @param #string str +-- @param #string tmxString +-- @param #string resourcePath -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setParentGID -- @param self --- @param #int int +-- @param #int gid -------------------------------- +-- / layer attribs -- @function [parent=#TMXMapInfo] getLayerAttribs -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- / tiles width & height -- @function [parent=#TMXMapInfo] getTileSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#TMXMapInfo] getTileProperties -- @param self -- @return map_table#map_table ret (return value: map_table) @@ -115,49 +132,58 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- -- @function [parent=#TMXMapInfo] getTMXFileName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setCurrentString -- @param self --- @param #string str +-- @param #string currentString -------------------------------- +-- -- @function [parent=#TMXMapInfo] setProperties -- @param self --- @param #map_table map +-- @param #map_table properties -------------------------------- +-- -- @function [parent=#TMXMapInfo] setOrientation -- @param self --- @param #int int +-- @param #int orientation -------------------------------- +-- -- @function [parent=#TMXMapInfo] setTileProperties -- @param self --- @param #map_table map +-- @param #map_table tileProperties -------------------------------- +-- -- @function [parent=#TMXMapInfo] setMapSize -- @param self --- @param #size_table size +-- @param #size_table mapSize -------------------------------- +-- -- @function [parent=#TMXMapInfo] setStoringCharacters -- @param self --- @param #bool bool +-- @param #bool storingCharacters -------------------------------- +-- / map width & height -- @function [parent=#TMXMapInfo] getMapSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setTilesets -- @param self --- @param #array_table array +-- @param #array_table tilesets -------------------------------- -- @overload self @@ -167,29 +193,34 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- +-- -- @function [parent=#TMXMapInfo] getCurrentString -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setLayerAttribs -- @param self --- @param #int int +-- @param #int layerAttribs -------------------------------- +-- creates a TMX Format with a tmx file -- @function [parent=#TMXMapInfo] create -- @param self --- @param #string str +-- @param #string tmxFile -- @return TMXMapInfo#TMXMapInfo ret (return value: cc.TMXMapInfo) -------------------------------- +-- creates a TMX Format with an XML string and a TMX resource path -- @function [parent=#TMXMapInfo] createWithXML -- @param self --- @param #string str --- @param #string str +-- @param #string tmxString +-- @param #string resourcePath -- @return TMXMapInfo#TMXMapInfo ret (return value: cc.TMXMapInfo) -------------------------------- +-- js ctor -- @function [parent=#TMXMapInfo] TMXMapInfo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua b/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua index 2a2330d036..3d6c1ebed2 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua @@ -5,25 +5,30 @@ -- @parent_module cc -------------------------------- +-- Sets the offset position of child objects -- @function [parent=#TMXObjectGroup] setPositionOffset -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table offset -------------------------------- +-- return the value for the specific property name -- @function [parent=#TMXObjectGroup] getProperty -- @param self --- @param #string str +-- @param #string propertyName -- @return Value#Value ret (return value: cc.Value) -------------------------------- +-- Gets the offset position of child objects -- @function [parent=#TMXObjectGroup] getPositionOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- return the dictionary for the specific object name.
+-- It will return the 1st object found on the array for the given name. -- @function [parent=#TMXObjectGroup] getObject -- @param self --- @param #string str +-- @param #string objectName -- @return map_table#map_table ret (return value: map_table) -------------------------------- @@ -34,9 +39,10 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- -- @function [parent=#TMXObjectGroup] setGroupName -- @param self --- @param #string str +-- @param #string groupName -------------------------------- -- @overload self @@ -46,21 +52,25 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- +-- -- @function [parent=#TMXObjectGroup] getGroupName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Sets the list of properties -- @function [parent=#TMXObjectGroup] setProperties -- @param self --- @param #map_table map +-- @param #map_table properties -------------------------------- +-- Sets the array of the objects -- @function [parent=#TMXObjectGroup] setObjects -- @param self --- @param #array_table array +-- @param #array_table objects -------------------------------- +-- js ctor -- @function [parent=#TMXObjectGroup] TMXObjectGroup -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua b/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua index 86175d51f4..1e36be8fd4 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua @@ -5,25 +5,29 @@ -- @parent_module ccexp -------------------------------- +-- -- @function [parent=#TMXTiledMap] setObjectGroups -- @param self --- @param #array_table array +-- @param #array_table groups -------------------------------- +-- return the value for the specific property name -- @function [parent=#TMXTiledMap] getProperty -- @param self --- @param #string str +-- @param #string propertyName -- @return Value#Value ret (return value: cc.Value) -------------------------------- +-- -- @function [parent=#TMXTiledMap] setMapSize -- @param self --- @param #size_table size +-- @param #size_table mapSize -------------------------------- +-- return the TMXObjectGroup for the specific group -- @function [parent=#TMXTiledMap] getObjectGroup -- @param self --- @param #string str +-- @param #string groupName -- @return TMXObjectGroup#TMXObjectGroup ret (return value: cc.TMXObjectGroup) -------------------------------- @@ -34,66 +38,78 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- the tiles's size property measured in pixels -- @function [parent=#TMXTiledMap] getTileSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- the map's size property measured in tiles -- @function [parent=#TMXTiledMap] getMapSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- properties -- @function [parent=#TMXTiledMap] getProperties -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- return properties dictionary for tile GID -- @function [parent=#TMXTiledMap] getPropertiesForGID -- @param self --- @param #int int +-- @param #int GID -- @return Value#Value ret (return value: cc.Value) -------------------------------- +-- -- @function [parent=#TMXTiledMap] setTileSize -- @param self --- @param #size_table size +-- @param #size_table tileSize -------------------------------- +-- -- @function [parent=#TMXTiledMap] setProperties -- @param self --- @param #map_table map +-- @param #map_table properties -------------------------------- +-- return the FastTMXLayer for the specific layer -- @function [parent=#TMXTiledMap] getLayer -- @param self --- @param #string str +-- @param #string layerName -- @return experimental::TMXLayer#experimental::TMXLayer ret (return value: cc.experimental::TMXLayer) -------------------------------- +-- map orientation -- @function [parent=#TMXTiledMap] getMapOrientation -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TMXTiledMap] setMapOrientation -- @param self --- @param #int int +-- @param #int mapOrientation -------------------------------- +-- creates a TMX Tiled Map with a TMX file. -- @function [parent=#TMXTiledMap] create -- @param self --- @param #string str +-- @param #string tmxFile -- @return experimental::TMXTiledMap#experimental::TMXTiledMap ret (return value: cc.experimental::TMXTiledMap) -------------------------------- +-- initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources -- @function [parent=#TMXTiledMap] createWithXML -- @param self --- @param #string str --- @param #string str +-- @param #string tmxString +-- @param #string resourcePath -- @return experimental::TMXTiledMap#experimental::TMXTiledMap ret (return value: cc.experimental::TMXTiledMap) -------------------------------- +-- -- @function [parent=#TMXTiledMap] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua b/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua index 3d07264e37..b782adde5f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua @@ -5,12 +5,14 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TMXTilesetInfo] getRectForGID -- @param self --- @param #unsigned int int +-- @param #unsigned int gid -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- js ctor -- @function [parent=#TMXTilesetInfo] TMXTilesetInfo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TableView.lua b/cocos/scripting/lua-bindings/auto/api/TableView.lua index 2efa32f127..21e38bd249 100644 --- a/cocos/scripting/lua-bindings/auto/api/TableView.lua +++ b/cocos/scripting/lua-bindings/auto/api/TableView.lua @@ -5,92 +5,115 @@ -- @parent_module cc -------------------------------- +-- Updates the content of the cell at a given index.
+-- param idx index to find a cell -- @function [parent=#TableView] updateCellAtIndex -- @param self --- @param #long long +-- @param #long idx -------------------------------- +-- determines how cell is ordered and filled in the view. -- @function [parent=#TableView] setVerticalFillOrder -- @param self --- @param #int verticalfillorder +-- @param #int order -------------------------------- +-- -- @function [parent=#TableView] scrollViewDidZoom -- @param self --- @param #cc.ScrollView scrollview +-- @param #cc.ScrollView view -------------------------------- +-- -- @function [parent=#TableView] _updateContentSize -- @param self -------------------------------- +-- -- @function [parent=#TableView] getVerticalFillOrder -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Removes a cell at a given index
+-- param idx index to find a cell -- @function [parent=#TableView] removeCellAtIndex -- @param self --- @param #long long +-- @param #long idx -------------------------------- +-- -- @function [parent=#TableView] initWithViewSize -- @param self -- @param #size_table size --- @param #cc.Node node +-- @param #cc.Node container -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TableView] scrollViewDidScroll -- @param self --- @param #cc.ScrollView scrollview +-- @param #cc.ScrollView view -------------------------------- +-- reloads data from data source. the view will be refreshed. -- @function [parent=#TableView] reloadData -- @param self -------------------------------- +-- Inserts a new cell at a given index
+-- param idx location to insert -- @function [parent=#TableView] insertCellAtIndex -- @param self --- @param #long long +-- @param #long idx -------------------------------- +-- Returns an existing cell at a given index. Returns nil if a cell is nonexistent at the moment of query.
+-- param idx index
+-- return a cell at a given index -- @function [parent=#TableView] cellAtIndex -- @param self --- @param #long long +-- @param #long idx -- @return TableViewCell#TableViewCell ret (return value: cc.TableViewCell) -------------------------------- +-- Dequeues a free cell if available. nil if not.
+-- return free cell -- @function [parent=#TableView] dequeueCell -- @param self -- @return TableViewCell#TableViewCell ret (return value: cc.TableViewCell) -------------------------------- +-- -- @function [parent=#TableView] onTouchMoved -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#TableView] onTouchEnded -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#TableView] onTouchCancelled -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#TableView] onTouchBegan -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#TableView] TableView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua b/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua index dc649d0806..8b243b0548 100644 --- a/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua +++ b/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua @@ -5,25 +5,30 @@ -- @parent_module cc -------------------------------- +-- Cleans up any resources linked to this cell and resets idx property. -- @function [parent=#TableViewCell] reset -- @param self -------------------------------- +-- The index used internally by SWTableView and its subclasses -- @function [parent=#TableViewCell] getIdx -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#TableViewCell] setIdx -- @param self --- @param #long long +-- @param #long uIdx -------------------------------- +-- -- @function [parent=#TableViewCell] create -- @param self -- @return TableViewCell#TableViewCell ret (return value: cc.TableViewCell) -------------------------------- +-- -- @function [parent=#TableViewCell] TableViewCell -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua b/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua index 82d934aab5..432a7b9a50 100644 --- a/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua @@ -12,39 +12,46 @@ -- @return Node#Node ret (retunr value: cc.Node) -------------------------------- +-- Sets the target that the action will be forced to run with -- @function [parent=#TargetedAction] setForcedTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node forcedTarget -------------------------------- +-- Create an action with the specified action and forced target -- @function [parent=#TargetedAction] create -- @param self --- @param #cc.Node node --- @param #cc.FiniteTimeAction finitetimeaction +-- @param #cc.Node target +-- @param #cc.FiniteTimeAction action -- @return TargetedAction#TargetedAction ret (return value: cc.TargetedAction) -------------------------------- +-- -- @function [parent=#TargetedAction] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#TargetedAction] clone -- @param self -- @return TargetedAction#TargetedAction ret (return value: cc.TargetedAction) -------------------------------- +-- -- @function [parent=#TargetedAction] stop -- @param self -------------------------------- +-- -- @function [parent=#TargetedAction] reverse -- @param self -- @return TargetedAction#TargetedAction ret (return value: cc.TargetedAction) -------------------------------- +-- -- @function [parent=#TargetedAction] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Text.lua b/cocos/scripting/lua-bindings/auto/api/Text.lua index b6b97605b6..7b1945dc30 100644 --- a/cocos/scripting/lua-bindings/auto/api/Text.lua +++ b/cocos/scripting/lua-bindings/auto/api/Text.lua @@ -5,145 +5,186 @@ -- @parent_module ccui -------------------------------- +-- Enable shadow for the label
+-- todo support blur for shadow effect -- @function [parent=#Text] enableShadow -- @param self -------------------------------- +-- -- @function [parent=#Text] getFontSize -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Text] getString -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- disable shadow/outline/glow rendering -- @function [parent=#Text] disableEffect -- @param self -------------------------------- +-- -- @function [parent=#Text] getTextColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- +-- -- @function [parent=#Text] setTextVerticalAlignment -- @param self --- @param #int textvalignment +-- @param #int alignment -------------------------------- +-- Sets the font name of label.
+-- If you are trying to use a system font, you could just pass a font name
+-- If you are trying to use a TTF, you should pass a file path to the TTF file
+-- Usage: Text *text = Text::create("Hello", "Arial", 20);create a system font UIText
+-- text->setFontName("Marfelt"); it will change the font to system font no matter the previous font type is TTF or system font
+-- text->setFontName("xxxx/xxx.ttf");it will change the font to TTF font no matter the previous font type is TTF or system font
+-- param name font name. -- @function [parent=#Text] setFontName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- Sets the touch scale enabled of label.
+-- param enabled touch scale enabled of label. -- @function [parent=#Text] setTouchScaleChangeEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#Text] setString -- @param self --- @param #string str +-- @param #string text -------------------------------- +-- Gets the touch scale enabled of label.
+-- return touch scale enabled of label. -- @function [parent=#Text] isTouchScaleChangeEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Text] getFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Text] setTextAreaSize -- @param self -- @param #size_table size -------------------------------- +-- Gets the string length of the label.
+-- Note: This length will be larger than the raw string length,
+-- if you want to get the raw string length, you should call this->getString().size() instead
+-- return string length. -- @function [parent=#Text] getStringLength -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Enable outline for the label
+-- It only works on IOS and Android when you use System fonts -- @function [parent=#Text] enableOutline -- @param self --- @param #color4b_table color4b --- @param #int int +-- @param #color4b_table outlineColor +-- @param #int outlineSize -------------------------------- +-- -- @function [parent=#Text] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Text] getTextHorizontalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Sets the font size of label.
+-- param size font size. -- @function [parent=#Text] setFontSize -- @param self --- @param #int int +-- @param #int size -------------------------------- +-- -- @function [parent=#Text] setTextColor -- @param self --- @param #color4b_table color4b +-- @param #color4b_table color -------------------------------- +-- only support for TTF -- @function [parent=#Text] enableGlow -- @param self --- @param #color4b_table color4b +-- @param #color4b_table glowColor -------------------------------- +-- -- @function [parent=#Text] getTextVerticalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Text] getTextAreaSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Text] setTextHorizontalAlignment -- @param self --- @param #int texthalignment +-- @param #int alignment -------------------------------- -- @overload self, string, string, int -- @overload self -- @function [parent=#Text] create -- @param self --- @param #string str --- @param #string str --- @param #int int +-- @param #string textContent +-- @param #string fontName +-- @param #int fontSize -- @return Text#Text ret (retunr value: ccui.Text) -------------------------------- +-- -- @function [parent=#Text] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#Text] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#Text] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Text] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Default constructor -- @function [parent=#Text] Text -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua b/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua index 2ee69b8e6e..7a23761192 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua @@ -5,30 +5,38 @@ -- @parent_module ccui -------------------------------- +-- Gets the string length of the label.
+-- Note: This length will be larger than the raw string length,
+-- if you want to get the raw string length, you should call this->getString().size() instead
+-- return string length. -- @function [parent=#TextAtlas] getStringLength -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#TextAtlas] getString -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextAtlas] setString -- @param self --- @param #string str +-- @param #string value -------------------------------- +-- initializes the LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas -- @function [parent=#TextAtlas] setProperty -- @param self --- @param #string str --- @param #string str --- @param #int int --- @param #int int --- @param #string str +-- @param #string stringValue +-- @param #string charMapFile +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #string startCharMap -------------------------------- +-- -- @function [parent=#TextAtlas] adaptRenderers -- @param self @@ -37,34 +45,39 @@ -- @overload self -- @function [parent=#TextAtlas] create -- @param self --- @param #string str --- @param #string str --- @param #int int --- @param #int int --- @param #string str +-- @param #string stringValue +-- @param #string charMapFile +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #string startCharMap -- @return TextAtlas#TextAtlas ret (retunr value: ccui.TextAtlas) -------------------------------- +-- -- @function [parent=#TextAtlas] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#TextAtlas] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#TextAtlas] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextAtlas] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Default constructor -- @function [parent=#TextAtlas] TextAtlas -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua b/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua index 424c43eda3..7903e704e1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua @@ -5,21 +5,28 @@ -- @parent_module ccui -------------------------------- +-- init a bitmap font atlas with an initial string and the FNT file -- @function [parent=#TextBMFont] setFntFile -- @param self --- @param #string str +-- @param #string fileName -------------------------------- +-- Gets the string length of the label.
+-- Note: This length will be larger than the raw string length,
+-- if you want to get the raw string length, you should call this->getString().size() instead
+-- return string length. -- @function [parent=#TextBMFont] getStringLength -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#TextBMFont] setString -- @param self --- @param #string str +-- @param #string value -------------------------------- +-- -- @function [parent=#TextBMFont] getString -- @param self -- @return string#string ret (return value: string) @@ -29,31 +36,36 @@ -- @overload self -- @function [parent=#TextBMFont] create -- @param self --- @param #string str --- @param #string str +-- @param #string text +-- @param #string filename -- @return TextBMFont#TextBMFont ret (retunr value: ccui.TextBMFont) -------------------------------- +-- -- @function [parent=#TextBMFont] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#TextBMFont] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#TextBMFont] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextBMFont] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Default constructor -- @function [parent=#TextBMFont] TextBMFont -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextField.lua b/cocos/scripting/lua-bindings/auto/api/TextField.lua index c4e22b25bc..eb5014b7c7 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextField.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextField.lua @@ -5,192 +5,229 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#TextField] setAttachWithIME -- @param self --- @param #bool bool +-- @param #bool attach -------------------------------- +-- -- @function [parent=#TextField] getFontSize -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TextField] getStringValue -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextField] setPasswordStyleText -- @param self --- @param #char char +-- @param #char styleText -------------------------------- +-- -- @function [parent=#TextField] getDeleteBackward -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] getPlaceHolder -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextField] getAttachWithIME -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setFontName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#TextField] getInsertText -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setInsertText -- @param self --- @param #bool bool +-- @param #bool insertText -------------------------------- +-- -- @function [parent=#TextField] getDetachWithIME -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setTextVerticalAlignment -- @param self --- @param #int textvalignment +-- @param #int alignment -------------------------------- +-- -- @function [parent=#TextField] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- -- @function [parent=#TextField] didNotSelectSelf -- @param self -------------------------------- +-- -- @function [parent=#TextField] getFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextField] setTextAreaSize -- @param self -- @param #size_table size -------------------------------- +-- -- @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 --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#TextField] getPlaceHolderColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- +-- -- @function [parent=#TextField] getPasswordStyleText -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#TextField] setMaxLengthEnabled -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#TextField] isPasswordEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setDeleteBackward -- @param self --- @param #bool bool +-- @param #bool deleteBackward -------------------------------- +-- -- @function [parent=#TextField] setFontSize -- @param self --- @param #int int +-- @param #int size -------------------------------- +-- -- @function [parent=#TextField] setPlaceHolder -- @param self --- @param #string str +-- @param #string value -------------------------------- -- @overload self, color4b_table -- @overload self, color3b_table -- @function [parent=#TextField] setPlaceHolderColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- -- @function [parent=#TextField] setTextHorizontalAlignment -- @param self --- @param #int texthalignment +-- @param #int alignment -------------------------------- +-- -- @function [parent=#TextField] setTextColor -- @param self --- @param #color4b_table color4b +-- @param #color4b_table textColor -------------------------------- +-- -- @function [parent=#TextField] getMaxLength -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TextField] isMaxLengthEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setDetachWithIME -- @param self --- @param #bool bool +-- @param #bool detach -------------------------------- +-- -- @function [parent=#TextField] setText -- @param self --- @param #string str +-- @param #string text -------------------------------- +-- -- @function [parent=#TextField] setTouchAreaEnabled -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#TextField] hitTest -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pt -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setMaxLength -- @param self --- @param #int int +-- @param #int length -------------------------------- +-- -- @function [parent=#TextField] setTouchSize -- @param self -- @param #size_table size -------------------------------- +-- -- @function [parent=#TextField] getTouchSize -- @param self -- @return size_table#size_table ret (return value: size_table) @@ -200,37 +237,43 @@ -- @overload self -- @function [parent=#TextField] create -- @param self --- @param #string str --- @param #string str --- @param #int int +-- @param #string placeholder +-- @param #string fontName +-- @param #int fontSize -- @return TextField#TextField ret (retunr value: ccui.TextField) -------------------------------- +-- -- @function [parent=#TextField] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#TextField] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#TextField] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextField] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#TextField] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#TextField] TextField -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua index c7c1456291..77a95a5282 100644 --- a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua @@ -5,11 +5,14 @@ -- @parent_module cc -------------------------------- +-- Gets max T -- @function [parent=#Texture2D] getMaxT -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- returns the pixel format.
+-- since v2.0 -- @function [parent=#Texture2D] getStringForFormat -- @param self -- @return char#char ret (return value: char) @@ -20,24 +23,30 @@ -- @function [parent=#Texture2D] initWithImage -- @param self -- @param #cc.Image image --- @param #int pixelformat +-- @param #int format -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- Gets max S -- @function [parent=#Texture2D] getMaxS -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- release only the gl texture.
+-- js NA
+-- lua NA -- @function [parent=#Texture2D] releaseGLTexture -- @param self -------------------------------- +-- -- @function [parent=#Texture2D] hasPremultipliedAlpha -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the height of the texture in pixels -- @function [parent=#Texture2D] getPixelsHigh -- @param self -- @return int#int ret (return value: int) @@ -47,10 +56,11 @@ -- @overload self -- @function [parent=#Texture2D] getBitsPerPixelForFormat -- @param self --- @param #int pixelformat +-- @param #int format -- @return unsigned int#unsigned int ret (retunr value: unsigned int) -------------------------------- +-- Gets the texture name -- @function [parent=#Texture2D] getName -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) @@ -60,97 +70,141 @@ -- @overload self, char, string, float, size_table, int, int -- @function [parent=#Texture2D] initWithString -- @param self --- @param #char char --- @param #string str --- @param #float float --- @param #size_table size --- @param #int texthalignment --- @param #int textvalignment +-- @param #char text +-- @param #string fontName +-- @param #float fontSize +-- @param #size_table dimensions +-- @param #int hAlignment +-- @param #int vAlignment -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- Sets max T -- @function [parent=#Texture2D] setMaxT -- @param self --- @param #float float +-- @param #float maxT -------------------------------- +-- draws a texture inside a rect -- @function [parent=#Texture2D] drawInRect -- @param self -- @param #rect_table rect -------------------------------- +-- -- @function [parent=#Texture2D] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- sets alias texture parameters:
+-- - GL_TEXTURE_MIN_FILTER = GL_NEAREST
+-- - GL_TEXTURE_MAG_FILTER = GL_NEAREST
+-- warning Calling this method could allocate additional texture memory.
+-- since v0.8 -- @function [parent=#Texture2D] setAliasTexParameters -- @param self -------------------------------- +-- sets antialias texture parameters:
+-- - GL_TEXTURE_MIN_FILTER = GL_LINEAR
+-- - GL_TEXTURE_MAG_FILTER = GL_LINEAR
+-- warning Calling this method could allocate additional texture memory.
+-- since v0.8 -- @function [parent=#Texture2D] setAntiAliasTexParameters -- @param self -------------------------------- +-- Generates mipmap images for the texture.
+-- It only works if the texture size is POT (power of 2).
+-- since v0.99.0 -- @function [parent=#Texture2D] generateMipmap -- @param self -------------------------------- +-- js NA
+-- lua NA -- @function [parent=#Texture2D] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Gets the pixel format of the texture -- @function [parent=#Texture2D] getPixelFormat -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Texture2D] setGLProgram -- @param self --- @param #cc.GLProgram glprogram +-- @param #cc.GLProgram program -------------------------------- +-- content size -- @function [parent=#Texture2D] getContentSizeInPixels -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Gets the width of the texture in pixels -- @function [parent=#Texture2D] getPixelsWide -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Drawing extensions to make it easy to draw basic quads using a Texture2D object.
+-- These functions require GL_TEXTURE_2D and both GL_VERTEX_ARRAY and GL_TEXTURE_COORD_ARRAY client states to be enabled.
+-- draws a texture at a given point -- @function [parent=#Texture2D] drawAtPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -------------------------------- +-- -- @function [parent=#Texture2D] getGLProgram -- @param self -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- -- @function [parent=#Texture2D] hasMipmaps -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets max S -- @function [parent=#Texture2D] setMaxS -- @param self --- @param #float float +-- @param #float maxS -------------------------------- +-- sets the default pixel format for UIImagescontains alpha channel.
+-- If the UIImage contains alpha channel, then the options are:
+-- - generate 32-bit textures: Texture2D::PixelFormat::RGBA8888 (default one)
+-- - generate 24-bit textures: Texture2D::PixelFormat::RGB888
+-- - generate 16-bit textures: Texture2D::PixelFormat::RGBA4444
+-- - generate 16-bit textures: Texture2D::PixelFormat::RGB5A1
+-- - generate 16-bit textures: Texture2D::PixelFormat::RGB565
+-- - generate 8-bit textures: Texture2D::PixelFormat::A8 (only use it if you use just 1 color)
+-- How does it work ?
+-- - If the image is an RGBA (with Alpha) then the default pixel format will be used (it can be a 8-bit, 16-bit or 32-bit texture)
+-- - If the image is an RGB (without Alpha) then: If the default pixel format is RGBA8888 then a RGBA8888 (32-bit) will be used. Otherwise a RGB565 (16-bit texture) will be used.
+-- This parameter is not valid for PVR / PVR.CCZ images.
+-- since v0.8 -- @function [parent=#Texture2D] setDefaultAlphaPixelFormat -- @param self --- @param #int pixelformat +-- @param #int format -------------------------------- +-- returns the alpha pixel format
+-- since v0.8 -- @function [parent=#Texture2D] getDefaultAlphaPixelFormat -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- js ctor -- @function [parent=#Texture2D] Texture2D -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextureCache.lua b/cocos/scripting/lua-bindings/auto/api/TextureCache.lua index fbcaadd1ac..bcbc70498f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextureCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextureCache.lua @@ -5,30 +5,48 @@ -- @parent_module cc -------------------------------- +-- Reload texture from the image file
+-- If the file image hasn't loaded before, load it.
+-- Otherwise the texture will be reloaded from the file image.
+-- The "filenName" parameter is the related/absolute path of the file image.
+-- Return true if the reloading is succeed, otherwise return false. -- @function [parent=#TextureCache] reloadTexture -- @param self --- @param #string str +-- @param #string fileName -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextureCache] unbindAllImageAsync -- @param self -------------------------------- +-- Deletes a texture from the cache given a its key name
+-- since v0.99.4 -- @function [parent=#TextureCache] removeTextureForKey -- @param self --- @param #string str +-- @param #string key -------------------------------- +-- Purges the dictionary of loaded textures.
+-- Call this method if you receive the "Memory Warning"
+-- In the short term: it will free some resources preventing your app from being killed
+-- In the medium term: it will allocate more resources
+-- In the long term: it will be the same -- @function [parent=#TextureCache] removeAllTextures -- @param self -------------------------------- +-- js NA
+-- lua NA -- @function [parent=#TextureCache] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Output to CCLOG the current contents of this TextureCache
+-- This will attempt to calculate the size of each texture, and the total texture memory in use
+-- since v1.0 -- @function [parent=#TextureCache] getCachedTextureInfo -- @param self -- @return string#string ret (return value: string) @@ -39,34 +57,44 @@ -- @function [parent=#TextureCache] addImage -- @param self -- @param #cc.Image image --- @param #string str +-- @param #string key -- @return Texture2D#Texture2D ret (retunr value: cc.Texture2D) -------------------------------- +-- -- @function [parent=#TextureCache] unbindImageAsync -- @param self --- @param #string str +-- @param #string filename -------------------------------- +-- Returns an already created texture. Returns nil if the texture doesn't exist.
+-- since v0.99.5 -- @function [parent=#TextureCache] getTextureForKey -- @param self --- @param #string str +-- @param #string key -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- Removes unused textures
+-- Textures that have a retain count of 1 will be deleted
+-- It is convenient to call this method after when starting a new Scene
+-- since v0.8 -- @function [parent=#TextureCache] removeUnusedTextures -- @param self -------------------------------- +-- Deletes a texture from the cache given a texture -- @function [parent=#TextureCache] removeTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- -- @function [parent=#TextureCache] waitForQuit -- @param self -------------------------------- +-- js ctor -- @function [parent=#TextureCache] TextureCache -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextureData.lua b/cocos/scripting/lua-bindings/auto/api/TextureData.lua index 5f1ea092e6..75e2950598 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextureData.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextureData.lua @@ -5,27 +5,32 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#TextureData] getContourData -- @param self --- @param #int int +-- @param #int index -- @return ContourData#ContourData ret (return value: ccs.ContourData) -------------------------------- +-- -- @function [parent=#TextureData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextureData] addContourData -- @param self --- @param #ccs.ContourData contourdata +-- @param #ccs.ContourData contourData -------------------------------- +-- -- @function [parent=#TextureData] create -- @param self -- @return TextureData#TextureData ret (return value: ccs.TextureData) -------------------------------- +-- js ctor -- @function [parent=#TextureData] TextureData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua b/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua index 32222d5bae..77b400ece7 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua @@ -5,31 +5,37 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#TextureFrame] getTextureName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextureFrame] setNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#TextureFrame] setTextureName -- @param self --- @param #string str +-- @param #string textureName -------------------------------- +-- -- @function [parent=#TextureFrame] create -- @param self -- @return TextureFrame#TextureFrame ret (return value: ccs.TextureFrame) -------------------------------- +-- -- @function [parent=#TextureFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#TextureFrame] TextureFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua b/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua index 4ea1ba0663..02831ff73f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua +++ b/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua @@ -5,40 +5,50 @@ -- @parent_module cc -------------------------------- +-- initializes a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points.
+-- The file will be loaded using the TextureMgr. -- @function [parent=#TileMapAtlas] initWithTileFile -- @param self --- @param #string str --- @param #string str --- @param #int int --- @param #int int +-- @param #string tile +-- @param #string mapFile +-- @param #int tileWidth +-- @param #int tileHeight -- @return bool#bool ret (return value: bool) -------------------------------- +-- dealloc the map from memory -- @function [parent=#TileMapAtlas] releaseMap -- @param self -------------------------------- +-- returns a tile from position x,y.
+-- For the moment only channel R is used -- @function [parent=#TileMapAtlas] getTileAt -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- sets a tile at position x,y.
+-- For the moment only channel R is used -- @function [parent=#TileMapAtlas] setTile -- @param self --- @param #color3b_table color3b --- @param #vec2_table vec2 +-- @param #color3b_table tile +-- @param #vec2_table position -------------------------------- +-- creates a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points.
+-- The tile file will be loaded using the TextureMgr. -- @function [parent=#TileMapAtlas] create -- @param self --- @param #string str --- @param #string str --- @param #int int --- @param #int int +-- @param #string tile +-- @param #string mapFile +-- @param #int tileWidth +-- @param #int tileHeight -- @return TileMapAtlas#TileMapAtlas ret (return value: cc.TileMapAtlas) -------------------------------- +-- js ctor -- @function [parent=#TileMapAtlas] TileMapAtlas -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua b/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua index 53ad06354a..2d459cac13 100644 --- a/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua @@ -9,24 +9,28 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#TiledGrid3D] create -- @param self --- @param #size_table size --- @param #cc.Texture2D texture2d --- @param #bool bool +-- @param #size_table gridSize +-- @param #cc.Texture2D texture +-- @param #bool flipped -- @return TiledGrid3D#TiledGrid3D ret (retunr value: cc.TiledGrid3D) -------------------------------- +-- -- @function [parent=#TiledGrid3D] calculateVertexPoints -- @param self -------------------------------- +-- -- @function [parent=#TiledGrid3D] blit -- @param self -------------------------------- +-- -- @function [parent=#TiledGrid3D] reuse -- @param self -------------------------------- +-- js ctor -- @function [parent=#TiledGrid3D] TiledGrid3D -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua b/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua index 638777d75d..41ef90697f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- returns the grid -- @function [parent=#TiledGrid3DAction] getGrid -- @param self -- @return GridBase#GridBase ret (return value: cc.GridBase) -------------------------------- +-- -- @function [parent=#TiledGrid3DAction] clone -- @param self -- @return TiledGrid3DAction#TiledGrid3DAction ret (return value: cc.TiledGrid3DAction) diff --git a/cocos/scripting/lua-bindings/auto/api/Timeline.lua b/cocos/scripting/lua-bindings/auto/api/Timeline.lua index e469f6528e..a22a39f028 100644 --- a/cocos/scripting/lua-bindings/auto/api/Timeline.lua +++ b/cocos/scripting/lua-bindings/auto/api/Timeline.lua @@ -5,77 +5,92 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#Timeline] clone -- @param self -- @return Timeline#Timeline ret (return value: ccs.Timeline) -------------------------------- +-- -- @function [parent=#Timeline] gotoFrame -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- -- @function [parent=#Timeline] setNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#Timeline] getActionTimeline -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- -- @function [parent=#Timeline] insertFrame -- @param self -- @param #ccs.Frame frame --- @param #int int +-- @param #int index -------------------------------- +-- -- @function [parent=#Timeline] setActionTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- -- @function [parent=#Timeline] addFrame -- @param self -- @param #ccs.Frame frame -------------------------------- +-- -- @function [parent=#Timeline] getFrames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#Timeline] getActionTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Timeline] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#Timeline] removeFrame -- @param self -- @param #ccs.Frame frame -------------------------------- +-- -- @function [parent=#Timeline] setActionTimeline -- @param self --- @param #ccs.ActionTimeline actiontimeline +-- @param #ccs.ActionTimeline action -------------------------------- +-- -- @function [parent=#Timeline] stepToFrame -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- -- @function [parent=#Timeline] create -- @param self -- @return Timeline#Timeline ret (return value: ccs.Timeline) -------------------------------- +-- -- @function [parent=#Timeline] Timeline -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Timer.lua b/cocos/scripting/lua-bindings/auto/api/Timer.lua index 2e44e70281..eed23459cd 100644 --- a/cocos/scripting/lua-bindings/auto/api/Timer.lua +++ b/cocos/scripting/lua-bindings/auto/api/Timer.lua @@ -5,32 +5,38 @@ -- @parent_module cc -------------------------------- +-- get interval in seconds -- @function [parent=#Timer] getInterval -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Timer] setupTimerWithInterval -- @param self --- @param #float float --- @param #unsigned int int --- @param #float float +-- @param #float seconds +-- @param #unsigned int repeat +-- @param #float delay -------------------------------- +-- set interval in seconds -- @function [parent=#Timer] setInterval -- @param self --- @param #float float +-- @param #float interval -------------------------------- +-- triggers the timer -- @function [parent=#Timer] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Timer] trigger -- @param self -------------------------------- +-- -- @function [parent=#Timer] cancel -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TintBy.lua b/cocos/scripting/lua-bindings/auto/api/TintBy.lua index 4eba544dc5..f86cbde3c1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TintBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/TintBy.lua @@ -5,32 +5,37 @@ -- @parent_module cc -------------------------------- +-- creates an action with duration and color -- @function [parent=#TintBy] create -- @param self --- @param #float float --- @param #short short --- @param #short short --- @param #short short +-- @param #float duration +-- @param #short deltaRed +-- @param #short deltaGreen +-- @param #short deltaBlue -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- +-- -- @function [parent=#TintBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#TintBy] clone -- @param self -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- +-- -- @function [parent=#TintBy] reverse -- @param self -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- +-- -- @function [parent=#TintBy] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TintTo.lua b/cocos/scripting/lua-bindings/auto/api/TintTo.lua index 25a5fe6a09..ec78c9aaa2 100644 --- a/cocos/scripting/lua-bindings/auto/api/TintTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TintTo.lua @@ -5,32 +5,37 @@ -- @parent_module cc -------------------------------- +-- creates an action with duration and color -- @function [parent=#TintTo] create -- @param self --- @param #float float --- @param #unsigned char char --- @param #unsigned char char --- @param #unsigned char char +-- @param #float duration +-- @param #unsigned char red +-- @param #unsigned char green +-- @param #unsigned char blue -- @return TintTo#TintTo ret (return value: cc.TintTo) -------------------------------- +-- -- @function [parent=#TintTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#TintTo] clone -- @param self -- @return TintTo#TintTo ret (return value: cc.TintTo) -------------------------------- +-- -- @function [parent=#TintTo] reverse -- @param self -- @return TintTo#TintTo ret (return value: cc.TintTo) -------------------------------- +-- -- @function [parent=#TintTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua b/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua index 21307c0a00..8898cdff27 100644 --- a/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua +++ b/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- Allocates and initializes the action -- @function [parent=#ToggleVisibility] create -- @param self -- @return ToggleVisibility#ToggleVisibility ret (return value: cc.ToggleVisibility) -------------------------------- +-- -- @function [parent=#ToggleVisibility] clone -- @param self -- @return ToggleVisibility#ToggleVisibility ret (return value: cc.ToggleVisibility) -------------------------------- +-- -- @function [parent=#ToggleVisibility] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#ToggleVisibility] reverse -- @param self -- @return ToggleVisibility#ToggleVisibility ret (return value: cc.ToggleVisibility) diff --git a/cocos/scripting/lua-bindings/auto/api/Touch.lua b/cocos/scripting/lua-bindings/auto/api/Touch.lua index d56df32267..0f2b51afcd 100644 --- a/cocos/scripting/lua-bindings/auto/api/Touch.lua +++ b/cocos/scripting/lua-bindings/auto/api/Touch.lua @@ -5,53 +5,64 @@ -- @parent_module cc -------------------------------- +-- returns the previous touch location in screen coordinates -- @function [parent=#Touch] getPreviousLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the current touch location in OpenGL coordinates -- @function [parent=#Touch] getLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the delta of 2 current touches locations in screen coordinates -- @function [parent=#Touch] getDelta -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the start touch location in screen coordinates -- @function [parent=#Touch] getStartLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the start touch location in OpenGL coordinates -- @function [parent=#Touch] getStartLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- js getId
+-- lua getId -- @function [parent=#Touch] getID -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Touch] setTouchInfo -- @param self --- @param #int int --- @param #float float --- @param #float float +-- @param #int id +-- @param #float x +-- @param #float y -------------------------------- +-- returns the current touch location in screen coordinates -- @function [parent=#Touch] getLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the previous touch location in OpenGL coordinates -- @function [parent=#Touch] getPreviousLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Touch] Touch -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua b/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua index e39e8adec7..5d03d65da6 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua @@ -5,17 +5,20 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionCrossFade] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionCrossFade#TransitionCrossFade ret (return value: cc.TransitionCrossFade) -------------------------------- +-- js NA
+-- lua NA -- @function [parent=#TransitionCrossFade] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua b/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua index 4afd77786d..2fe8fe717c 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua @@ -4,9 +4,11 @@ -- @parent_module cc -------------------------------- +-- returns the Ease action that will be performed on a linear action.
+-- since v0.8.2 -- @function [parent=#TransitionEaseScene] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua index 73bd19113b..7e98445787 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, color3b_table -- @function [parent=#TransitionFade] create -- @param self --- @param #float float +-- @param #float duration -- @param #cc.Scene scene --- @param #color3b_table color3b +-- @param #color3b_table color -- @return TransitionFade#TransitionFade ret (retunr value: cc.TransitionFade) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua index de2a9b5079..6412b19e34 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua @@ -5,13 +5,15 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionFadeBL] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionFadeBL#TransitionFadeBL ret (return value: cc.TransitionFadeBL) -------------------------------- +-- -- @function [parent=#TransitionFadeBL] actionWithSize -- @param self -- @param #size_table size diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua index dbcb62a2e9..435efe63a8 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua @@ -5,13 +5,15 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionFadeDown] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionFadeDown#TransitionFadeDown ret (return value: cc.TransitionFadeDown) -------------------------------- +-- -- @function [parent=#TransitionFadeDown] actionWithSize -- @param self -- @param #size_table size diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua index 3e7160fd6b..cb1e539ea4 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua @@ -5,29 +5,33 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionFadeTR] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionFadeTR] actionWithSize -- @param self -- @param #size_table size -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionFadeTR] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionFadeTR#TransitionFadeTR ret (return value: cc.TransitionFadeTR) -------------------------------- +-- -- @function [parent=#TransitionFadeTR] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua index 9e3bc4ac28..19c7b91167 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua @@ -5,13 +5,15 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionFadeUp] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionFadeUp#TransitionFadeUp ret (return value: cc.TransitionFadeUp) -------------------------------- +-- -- @function [parent=#TransitionFadeUp] actionWithSize -- @param self -- @param #size_table size diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua index e8be2f3f92..9765783694 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionFlipAngular] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionFlipAngular#TransitionFlipAngular ret (retunr value: cc.TransitionFlipAngular) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua index bd3d3d3660..b27aa235b0 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionFlipX] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionFlipX#TransitionFlipX ret (retunr value: cc.TransitionFlipX) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua index eebe6b56bc..5973c5b1f1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionFlipY] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionFlipY#TransitionFlipY ret (retunr value: cc.TransitionFlipY) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua b/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua index 915c89cfa0..3bb200c538 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionJumpZoom] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionJumpZoom#TransitionJumpZoom ret (return value: cc.TransitionJumpZoom) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua index 799212f087..7da02d0375 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionMoveInB] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionMoveInB#TransitionMoveInB ret (return value: cc.TransitionMoveInB) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua index dced884285..834ccdf1f2 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua @@ -5,20 +5,23 @@ -- @parent_module cc -------------------------------- +-- returns the action that will be performed -- @function [parent=#TransitionMoveInL] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionMoveInL] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionMoveInL] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionMoveInL#TransitionMoveInL ret (return value: cc.TransitionMoveInL) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua index 2b67b9a3e4..adc3bd97a4 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionMoveInR] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionMoveInR#TransitionMoveInR ret (return value: cc.TransitionMoveInR) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua index 40030fdda8..b71c1de3bb 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionMoveInT] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionMoveInT#TransitionMoveInT ret (return value: cc.TransitionMoveInT) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua b/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua index 1c655d6fab..65982e0145 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua @@ -5,32 +5,40 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionPageTurn] actionWithSize -- @param self --- @param #size_table size +-- @param #size_table vector -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- Creates a base transition with duration and incoming scene.
+-- If back is true then the effect is reversed to appear as if the incoming
+-- scene is being turned from left over the outgoing scene. -- @function [parent=#TransitionPageTurn] initWithDuration -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene --- @param #bool bool +-- @param #bool backwards -- @return bool#bool ret (return value: bool) -------------------------------- +-- Creates a base transition with duration and incoming scene.
+-- If back is true then the effect is reversed to appear as if the incoming
+-- scene is being turned from left over the outgoing scene. -- @function [parent=#TransitionPageTurn] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene --- @param #bool bool +-- @param #bool backwards -- @return TransitionPageTurn#TransitionPageTurn ret (return value: cc.TransitionPageTurn) -------------------------------- +-- -- @function [parent=#TransitionPageTurn] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua index d05379f82b..6b4ee9c9b3 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgress] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgress#TransitionProgress ret (return value: cc.TransitionProgress) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua index 917c7be032..2de10c764d 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressHorizontal] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressHorizontal#TransitionProgressHorizontal ret (return value: cc.TransitionProgressHorizontal) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua index d60be89302..24a1e3ee1c 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressInOut] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressInOut#TransitionProgressInOut ret (return value: cc.TransitionProgressInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua index c5f4e9fe18..5df3e5b9f1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressOutIn] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressOutIn#TransitionProgressOutIn ret (return value: cc.TransitionProgressOutIn) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua index cf95079265..9886d6ebfe 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressRadialCCW] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressRadialCCW#TransitionProgressRadialCCW ret (return value: cc.TransitionProgressRadialCCW) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua index 83c2370933..795e2047ab 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressRadialCW] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressRadialCW#TransitionProgressRadialCW ret (return value: cc.TransitionProgressRadialCW) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua index 7874cd3a6f..b2d75100bf 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressVertical] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressVertical#TransitionProgressVertical ret (return value: cc.TransitionProgressVertical) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua b/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua index b6d5f70e6f..388ff0b06f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionRotoZoom] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionRotoZoom#TransitionRotoZoom ret (return value: cc.TransitionRotoZoom) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua b/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua index 1a03e181d9..4b5f3be37a 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua @@ -5,28 +5,33 @@ -- @parent_module cc -------------------------------- +-- called after the transition finishes -- @function [parent=#TransitionScene] finish -- @param self -------------------------------- +-- used by some transitions to hide the outer scene -- @function [parent=#TransitionScene] hideOutShowIn -- @param self -------------------------------- +-- creates a base transition with duration and incoming scene -- @function [parent=#TransitionScene] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionScene#TransitionScene ret (return value: cc.TransitionScene) -------------------------------- +-- -- @function [parent=#TransitionScene] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#TransitionScene] cleanup -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua index 965126e682..d34be6be7e 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- creates a base transition with duration and incoming scene -- @function [parent=#TransitionSceneOriented] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @param #int orientation -- @return TransitionSceneOriented#TransitionSceneOriented ret (return value: cc.TransitionSceneOriented) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua b/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua index 28493ed5f2..2a9835a35e 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua @@ -5,15 +5,17 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionShrinkGrow] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionShrinkGrow] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionShrinkGrow#TransitionShrinkGrow ret (return value: cc.TransitionShrinkGrow) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua index 511ac8c25b..0cc097f834 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInB] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSlideInB] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSlideInB#TransitionSlideInB ret (return value: cc.TransitionSlideInB) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua index dce81f4ece..ab682254c8 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua @@ -5,20 +5,23 @@ -- @parent_module cc -------------------------------- +-- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInL] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSlideInL] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSlideInL] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSlideInL#TransitionSlideInL ret (return value: cc.TransitionSlideInL) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua index 10c78150b1..3de6ed9172 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInR] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSlideInR] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSlideInR#TransitionSlideInR ret (return value: cc.TransitionSlideInR) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua index 57dfa51ce4..c04116778f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInT] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSlideInT] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSlideInT#TransitionSlideInT ret (return value: cc.TransitionSlideInT) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua index a421599f70..6242195882 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua @@ -5,28 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionSplitCols] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSplitCols] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSplitCols] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSplitCols#TransitionSplitCols ret (return value: cc.TransitionSplitCols) -------------------------------- +-- -- @function [parent=#TransitionSplitCols] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua index fdcbaf1feb..0c9ccd61b1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua @@ -5,13 +5,15 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionSplitRows] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSplitRows#TransitionSplitRows ret (return value: cc.TransitionSplitRows) -------------------------------- +-- -- @function [parent=#TransitionSplitRows] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua b/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua index e9a4d6fc81..a3523d3c10 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua @@ -5,23 +5,26 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionTurnOffTiles] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionTurnOffTiles] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionTurnOffTiles#TransitionTurnOffTiles ret (return value: cc.TransitionTurnOffTiles) -------------------------------- +-- -- @function [parent=#TransitionTurnOffTiles] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua index 10360d5cf8..d726097c07 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionZoomFlipAngular] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionZoomFlipAngular#TransitionZoomFlipAngular ret (retunr value: cc.TransitionZoomFlipAngular) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua index fa6ed5fd29..0da39fdee8 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionZoomFlipX] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionZoomFlipX#TransitionZoomFlipX ret (retunr value: cc.TransitionZoomFlipX) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua index d137a545e9..397e989ffd 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionZoomFlipY] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionZoomFlipY#TransitionZoomFlipY ret (retunr value: cc.TransitionZoomFlipY) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua b/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua index c7ffd3d8f4..7798a1f952 100644 --- a/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua @@ -5,38 +5,43 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TurnOffTiles] turnOnTile -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#TurnOffTiles] turnOffTile -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- -- @overload self, float, size_table, unsigned int -- @overload self, float, size_table -- @function [parent=#TurnOffTiles] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int seed -- @return TurnOffTiles#TurnOffTiles ret (retunr value: cc.TurnOffTiles) -------------------------------- +-- -- @function [parent=#TurnOffTiles] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#TurnOffTiles] clone -- @param self -- @return TurnOffTiles#TurnOffTiles ret (return value: cc.TurnOffTiles) -------------------------------- +-- -- @function [parent=#TurnOffTiles] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Tween.lua b/cocos/scripting/lua-bindings/auto/api/Tween.lua index e4791051a9..923aef489d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Tween.lua +++ b/cocos/scripting/lua-bindings/auto/api/Tween.lua @@ -5,47 +5,70 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#Tween] getAnimation -- @param self -- @return ArmatureAnimation#ArmatureAnimation ret (return value: ccs.ArmatureAnimation) -------------------------------- +-- -- @function [parent=#Tween] gotoAndPause -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- Start the Process
+-- param movementBoneData the MovementBoneData include all FrameData
+-- param durationTo the number of frames changing to this animation needs.
+-- param durationTween the number of frames this animation actual last.
+-- param loop whether the animation is loop
+-- loop < 0 : use the value from MovementData get from Action Editor
+-- loop = 0 : this animation is not loop
+-- loop > 0 : this animation is loop
+-- param tweenEasing tween easing is used for calculate easing effect
+-- TWEEN_EASING_MAX : use the value from MovementData get from Action Editor
+-- -1 : fade out
+-- 0 : line
+-- 1 : fade in
+-- 2 : fade in and out -- @function [parent=#Tween] play -- @param self --- @param #ccs.MovementBoneData movementbonedata --- @param #int int --- @param #int int --- @param #int int --- @param #int int +-- @param #ccs.MovementBoneData movementBoneData +-- @param #int durationTo +-- @param #int durationTween +-- @param #int loop +-- @param #int tweenEasing -------------------------------- +-- -- @function [parent=#Tween] gotoAndPlay -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- Init with a Bone
+-- param bone the Bone Tween will bind to -- @function [parent=#Tween] init -- @param self -- @param #ccs.Bone bone -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Tween] setAnimation -- @param self --- @param #ccs.ArmatureAnimation armatureanimation +-- @param #ccs.ArmatureAnimation animation -------------------------------- +-- Create with a Bone
+-- param bone the Bone Tween will bind to -- @function [parent=#Tween] create -- @param self -- @param #ccs.Bone bone -- @return Tween#Tween ret (return value: ccs.Tween) -------------------------------- +-- -- @function [parent=#Tween] Tween -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Twirl.lua b/cocos/scripting/lua-bindings/auto/api/Twirl.lua index cfb9105cde..8b3574ae80 100644 --- a/cocos/scripting/lua-bindings/auto/api/Twirl.lua +++ b/cocos/scripting/lua-bindings/auto/api/Twirl.lua @@ -5,53 +5,62 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Twirl] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- -- @function [parent=#Twirl] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Twirl] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- -- @function [parent=#Twirl] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set twirl center -- @function [parent=#Twirl] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- get twirl center -- @function [parent=#Twirl] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- creates the action with center position, number of twirls, amplitude, a grid size and duration -- @function [parent=#Twirl] create -- @param self --- @param #float float --- @param #size_table size --- @param #vec2_table vec2 --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #vec2_table position +-- @param #unsigned int twirls +-- @param #float amplitude -- @return Twirl#Twirl ret (return value: cc.Twirl) -------------------------------- +-- -- @function [parent=#Twirl] clone -- @param self -- @return Twirl#Twirl ret (return value: cc.Twirl) -------------------------------- +-- -- @function [parent=#Twirl] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua index 173263c472..3b80444050 100644 --- a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua +++ b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua @@ -4,18 +4,20 @@ -- @parent_module cc -------------------------------- +-- brief Set integer value by key.
+-- js NA -- @function [parent=#UserDefault] setIntegerForKey -- @param self --- @param #char char --- @param #int int +-- @param #char pKey +-- @param #int value -------------------------------- -- @overload self, char, float -- @overload self, char -- @function [parent=#UserDefault] getFloatForKey -- @param self --- @param #char char --- @param #float float +-- @param #char pKey +-- @param #float defaultValue -- @return float#float ret (retunr value: float) -------------------------------- @@ -23,38 +25,46 @@ -- @overload self, char -- @function [parent=#UserDefault] getBoolForKey -- @param self --- @param #char char --- @param #bool bool +-- @param #char pKey +-- @param #bool defaultValue -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- brief Set double value by key.
+-- js NA -- @function [parent=#UserDefault] setDoubleForKey -- @param self --- @param #char char --- @param #double double +-- @param #char pKey +-- @param #double value -------------------------------- +-- brief Set float value by key.
+-- js NA -- @function [parent=#UserDefault] setFloatForKey -- @param self --- @param #char char --- @param #float float +-- @param #char pKey +-- @param #float value -------------------------------- -- @overload self, char, string -- @overload self, char -- @function [parent=#UserDefault] getStringForKey -- @param self --- @param #char char --- @param #string str +-- @param #char pKey +-- @param #string defaultValue -- @return string#string ret (retunr value: string) -------------------------------- +-- brief Set string value by key.
+-- js NA -- @function [parent=#UserDefault] setStringForKey -- @param self --- @param #char char --- @param #string str +-- @param #char pKey +-- @param #string value -------------------------------- +-- brief Save content to xml file
+-- js NA -- @function [parent=#UserDefault] flush -- @param self @@ -63,8 +73,8 @@ -- @overload self, char -- @function [parent=#UserDefault] getIntegerForKey -- @param self --- @param #char char --- @param #int int +-- @param #char pKey +-- @param #int defaultValue -- @return int#int ret (retunr value: int) -------------------------------- @@ -72,26 +82,31 @@ -- @overload self, char -- @function [parent=#UserDefault] getDoubleForKey -- @param self --- @param #char char --- @param #double double +-- @param #char pKey +-- @param #double defaultValue -- @return double#double ret (retunr value: double) -------------------------------- +-- brief Set bool value by key.
+-- js NA -- @function [parent=#UserDefault] setBoolForKey -- @param self --- @param #char char --- @param #bool bool +-- @param #char pKey +-- @param #bool value -------------------------------- +-- js NA -- @function [parent=#UserDefault] destroyInstance -- @param self -------------------------------- +-- js NA -- @function [parent=#UserDefault] getXMLFilePath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- js NA -- @function [parent=#UserDefault] isXMLFileExist -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/VBox.lua b/cocos/scripting/lua-bindings/auto/api/VBox.lua index 0955ae7c9e..4f94fe822e 100644 --- a/cocos/scripting/lua-bindings/auto/api/VBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/VBox.lua @@ -13,6 +13,7 @@ -- @return VBox#VBox ret (retunr value: ccui.VBox) -------------------------------- +-- Default constructor -- @function [parent=#VBox] VBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua b/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua index 36954f071d..4812de8cee 100644 --- a/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua +++ b/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua @@ -5,91 +5,109 @@ -- @parent_module ccexp -------------------------------- +-- -- @function [parent=#VideoPlayer] getFileName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#VideoPlayer] getURL -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#VideoPlayer] play -- @param self -------------------------------- +-- -- @function [parent=#VideoPlayer] pause -- @param self -------------------------------- +-- -- @function [parent=#VideoPlayer] setKeepAspectRatioEnabled -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#VideoPlayer] resume -- @param self -------------------------------- +-- -- @function [parent=#VideoPlayer] stop -- @param self -------------------------------- +-- -- @function [parent=#VideoPlayer] setFullScreenEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#VideoPlayer] setFileName -- @param self --- @param #string str +-- @param #string videoPath -------------------------------- +-- -- @function [parent=#VideoPlayer] setURL -- @param self --- @param #string str +-- @param #string _videoURL -------------------------------- +-- -- @function [parent=#VideoPlayer] isKeepAspectRatioEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#VideoPlayer] onPlayEvent -- @param self --- @param #int int +-- @param #int event -------------------------------- +-- -- @function [parent=#VideoPlayer] isFullScreenEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#VideoPlayer] isPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#VideoPlayer] seekTo -- @param self --- @param #float float +-- @param #float sec -------------------------------- +-- -- @function [parent=#VideoPlayer] create -- @param self -- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer ret (return value: cc.experimental::ui::VideoPlayer) -------------------------------- +-- -- @function [parent=#VideoPlayer] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#VideoPlayer] setVisible -- @param self --- @param #bool bool +-- @param #bool visible return nil diff --git a/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua b/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua index 2ca2917585..3d7b5e1115 100644 --- a/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua @@ -5,26 +5,31 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#VisibleFrame] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#VisibleFrame] setVisible -- @param self --- @param #bool bool +-- @param #bool visible -------------------------------- +-- -- @function [parent=#VisibleFrame] create -- @param self -- @return VisibleFrame#VisibleFrame ret (return value: ccs.VisibleFrame) -------------------------------- +-- -- @function [parent=#VisibleFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#VisibleFrame] VisibleFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Waves.lua b/cocos/scripting/lua-bindings/auto/api/Waves.lua index e8de3e0b5c..53569100b4 100644 --- a/cocos/scripting/lua-bindings/auto/api/Waves.lua +++ b/cocos/scripting/lua-bindings/auto/api/Waves.lua @@ -5,44 +5,51 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Waves] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Waves] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- -- @function [parent=#Waves] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- -- @function [parent=#Waves] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration -- @function [parent=#Waves] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int --- @param #float float --- @param #bool bool --- @param #bool bool +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int waves +-- @param #float amplitude +-- @param #bool horizontal +-- @param #bool vertical -- @return Waves#Waves ret (return value: cc.Waves) -------------------------------- +-- -- @function [parent=#Waves] clone -- @param self -- @return Waves#Waves ret (return value: cc.Waves) -------------------------------- +-- -- @function [parent=#Waves] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Waves3D.lua b/cocos/scripting/lua-bindings/auto/api/Waves3D.lua index 6eb07c8021..7ffc9ed324 100644 --- a/cocos/scripting/lua-bindings/auto/api/Waves3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Waves3D.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- returns the amplitude rate -- @function [parent=#Waves3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- sets the amplitude to the effect -- @function [parent=#Waves3D] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- sets the ampliture rate -- @function [parent=#Waves3D] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- returns the amplitude of the effect -- @function [parent=#Waves3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- creates an action with duration, grid size, waves and amplitude -- @function [parent=#Waves3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int waves +-- @param #float amplitude -- @return Waves3D#Waves3D ret (return value: cc.Waves3D) -------------------------------- +-- -- @function [parent=#Waves3D] clone -- @param self -- @return Waves3D#Waves3D ret (return value: cc.Waves3D) -------------------------------- +-- -- @function [parent=#Waves3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua index 35c8de579e..14e5255895 100644 --- a/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- waves amplitude rate -- @function [parent=#WavesTiles3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#WavesTiles3D] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- -- @function [parent=#WavesTiles3D] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- waves amplitude -- @function [parent=#WavesTiles3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- creates the action with a number of waves, the waves amplitude, the grid size and the duration -- @function [parent=#WavesTiles3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int waves +-- @param #float amplitude -- @return WavesTiles3D#WavesTiles3D ret (return value: cc.WavesTiles3D) -------------------------------- +-- -- @function [parent=#WavesTiles3D] clone -- @param self -- @return WavesTiles3D#WavesTiles3D ret (return value: cc.WavesTiles3D) -------------------------------- +-- -- @function [parent=#WavesTiles3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Widget.lua b/cocos/scripting/lua-bindings/auto/api/Widget.lua index b473cb3332..e840a16900 100644 --- a/cocos/scripting/lua-bindings/auto/api/Widget.lua +++ b/cocos/scripting/lua-bindings/auto/api/Widget.lua @@ -5,219 +5,304 @@ -- @parent_module ccui -------------------------------- +-- Changes the percent that is widget's percent size
+-- param percent that is widget's percent size -- @function [parent=#Widget] setSizePercent -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table percent -------------------------------- +-- -- @function [parent=#Widget] getCustomSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Widget] getLeftBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Sets whether the widget should be flipped horizontally or not.
+-- param bFlippedX true if the widget should be flipped horizaontally, false otherwise. -- @function [parent=#Widget] setFlippedX -- @param self --- @param #bool bool +-- @param #bool flippedX -------------------------------- +-- Gets the Virtual Renderer of widget.
+-- For example, a button's Virtual Renderer is it's texture renderer.
+-- return Node pointer. -- @function [parent=#Widget] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- brief Allow widget touch events to propagate to its parents. Set false will disable propagation -- @function [parent=#Widget] setPropagateTouchEvents -- @param self --- @param #bool bool +-- @param #bool isPropagate -------------------------------- +-- Returns size percent of widget
+-- return size percent -- @function [parent=#Widget] getSizePercent -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Set the percent(x,y) of the widget in OpenGL coordinates
+-- param percent The percent (x,y) of the widget in OpenGL coordinates -- @function [parent=#Widget] setPositionPercent -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table percent -------------------------------- +-- brief Specify widget to swallow touches or not -- @function [parent=#Widget] setSwallowTouches -- @param self --- @param #bool bool +-- @param #bool swallow -------------------------------- +-- -- @function [parent=#Widget] getLayoutSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Sets whether the widget is hilighted
+-- The default value is false, a widget is default to not hilighted
+-- param hilight true if the widget is hilighted, false if the widget is not hilighted. -- @function [parent=#Widget] setHighlighted -- @param self --- @param #bool bool +-- @param #bool hilight -------------------------------- +-- Changes the position type of the widget
+-- see PositionType
+-- param type the position type of widget -- @function [parent=#Widget] setPositionType -- @param self --- @param #int positiontype +-- @param #int type -------------------------------- +-- Query whether the widget ignores user deinfed content size or not
+-- return bool -- @function [parent=#Widget] isIgnoreContentAdaptWithSize -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Determines if the widget is highlighted
+-- return true if the widget is highlighted, false if the widget is not hignlighted . -- @function [parent=#Widget] isHighlighted -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets LayoutParameter of widget.
+-- see LayoutParameter
+-- param type Relative or Linear
+-- return LayoutParameter -- @function [parent=#Widget] getLayoutParameter -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- Checks a point if is in widget's space
+-- param point
+-- return true if the point is in widget's space, flase otherwise. -- @function [parent=#Widget] hitTest -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pt -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the position type of the widget
+-- see PositionType
+-- return type the position type of widget -- @function [parent=#Widget] getPositionType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Widget] getTopBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Note: when you set _ignoreSize to true, no matther you call setContentSize or not,
+-- the widget size is always equal to the return value of the member function getVirtualRendererSize.
+-- param ignore, set member variabl _ignoreSize to ignore -- @function [parent=#Widget] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
+-- If the widget is not in a layout, it will return itself
+-- param dir the direction to look for the next focused widget in a layout
+-- param current the current focused widget
+-- return the next focused widget in a layout -- @function [parent=#Widget] findNextFocusedWidget -- @param self --- @param #int focusdirection --- @param #ccui.Widget widget +-- @param #int direction +-- @param #ccui.Widget current -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- Determines if the widget is enabled
+-- return true if the widget is enabled, false if the widget is disabled. -- @function [parent=#Widget] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- return whether the widget is focused or not -- @function [parent=#Widget] isFocused -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] getTouchBeganPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Determines if the widget is touch enabled
+-- return true if the widget is touch enabled, false if the widget is touch disabled. -- @function [parent=#Widget] isTouchEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] getActionTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Gets world position of widget.
+-- return world position of widget. -- @function [parent=#Widget] getWorldPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- return true represent the widget could accept focus, false represent the widget couldn't accept focus -- @function [parent=#Widget] isFocusEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- param focus pass true to let the widget get focus or pass false to let the widget lose focus
+-- return void -- @function [parent=#Widget] setFocused -- @param self --- @param #bool bool +-- @param #bool focus -------------------------------- +-- -- @function [parent=#Widget] setActionTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- Sets whether the widget is touch enabled
+-- The default value is false, a widget is default to touch disabled
+-- param visible true if the widget is touch enabled, false if the widget is touch disabled. -- @function [parent=#Widget] setTouchEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Sets whether the widget should be flipped vertically or not.
+-- param bFlippedY true if the widget should be flipped vertically, flase otherwise. -- @function [parent=#Widget] setFlippedY -- @param self --- @param #bool bool +-- @param #bool flippedY -------------------------------- +-- Sets whether the widget is enabled
+-- true if the widget is enabled, widget may be touched , false if the widget is disabled, widget cannot be touched.
+-- The default value is true, a widget is default to enabled
+-- param enabled -- @function [parent=#Widget] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#Widget] getRightBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- To set the bright style of widget.
+-- see BrightStyle
+-- param style BrightStyle::NORMAL means the widget is in normal state, BrightStyle::HIGHLIGHT means the widget is in highlight state. -- @function [parent=#Widget] setBrightStyle -- @param self --- @param #int brightstyle +-- @param #int style -------------------------------- +-- Sets a LayoutParameter to widget.
+-- see LayoutParameter
+-- param LayoutParameter pointer
+-- param type Relative or Linear -- @function [parent=#Widget] setLayoutParameter -- @param self --- @param #ccui.LayoutParameter layoutparameter +-- @param #ccui.LayoutParameter parameter -------------------------------- +-- -- @function [parent=#Widget] clone -- @param self -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- param enable pass true/false to enable/disable the focus ability of a widget
+-- return void -- @function [parent=#Widget] setFocusEnabled -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#Widget] getBottomBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Determines if the widget is bright
+-- return true if the widget is bright, false if the widget is dark. -- @function [parent=#Widget] isBright -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] isPropagateTouchEvents -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] getCurrentFocusedWidget -- @param self -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- when a widget calls this method, it will get focus immediately. -- @function [parent=#Widget] requestFocus -- @param self @@ -226,95 +311,134 @@ -- @overload self -- @function [parent=#Widget] updateSizeAndPosition -- @param self --- @param #size_table size +-- @param #size_table parentSize -------------------------------- +-- -- @function [parent=#Widget] getTouchMovePosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Gets the size type of widget.
+-- see SizeType
+-- param type that is widget's size type -- @function [parent=#Widget] getSizeType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Widget] addTouchEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- -- @function [parent=#Widget] getTouchEndPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Gets the percent (x,y) of the widget in OpenGL coordinates
+-- see setPosition(const Vec2&)
+-- return The percent (x,y) of the widget in OpenGL coordinates -- @function [parent=#Widget] getPositionPercent -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Set a click event handler to the widget -- @function [parent=#Widget] addClickEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- Returns the flag which indicates whether the widget is flipped horizontally or not.
+-- It only flips the texture of the widget, and not the texture of the widget's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- widget->setScaleX(sprite->getScaleX() * -1);
+-- return true if the widget is flipped horizaontally, false otherwise. -- @function [parent=#Widget] isFlippedX -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Return the flag which indicates whether the widget is flipped vertically or not.
+-- It only flips the texture of the widget, and not the texture of the widget's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- widget->setScaleY(widget->getScaleY() * -1);
+-- return true if the widget is flipped vertically, flase otherwise. -- @function [parent=#Widget] isFlippedY -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] isClippingParentContainsPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pt -- @return bool#bool ret (return value: bool) -------------------------------- +-- Changes the size type of widget.
+-- see SizeType
+-- param type that is widget's size type -- @function [parent=#Widget] setSizeType -- @param self --- @param #int sizetype +-- @param #int type -------------------------------- +-- Sets whether the widget is bright
+-- The default value is true, a widget is default to bright
+-- param visible true if the widget is bright, false if the widget is dark. -- @function [parent=#Widget] setBright -- @param self --- @param #bool bool +-- @param #bool bright -------------------------------- +-- -- @function [parent=#Widget] isSwallowTouches -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] enableDpadNavigation -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- Allocates and initializes a widget. -- @function [parent=#Widget] create -- @param self -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#Widget] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Changes the position (x,y) of the widget in OpenGL coordinates
+-- Usually we use p(x,y) to compose Vec2 object.
+-- The original point (0,0) is at the left-bottom corner of screen.
+-- param position The position (x,y) of the widget in OpenGL coordinates -- @function [parent=#Widget] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#Widget] setContentSize -- @param self --- @param #size_table size +-- @param #size_table contentSize -------------------------------- +-- Default constructor -- @function [parent=#Widget] Widget -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua b/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua index aa0999498e..6a89744ead 100644 --- a/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua @@ -5,26 +5,31 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ZOrderFrame] getZOrder -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ZOrderFrame] setZOrder -- @param self --- @param #int int +-- @param #int zorder -------------------------------- +-- -- @function [parent=#ZOrderFrame] create -- @param self -- @return ZOrderFrame#ZOrderFrame ret (return value: ccs.ZOrderFrame) -------------------------------- +-- -- @function [parent=#ZOrderFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#ZOrderFrame] ZOrderFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 08c7fc576c..26d3bc8434 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -308,7 +308,8 @@ int lua_cocos2dx_3d_Mesh_setBlendFunc(lua_State* tolua_S) { cocos2d::BlendFunc arg0; - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc + ok = false; if(!ok) return 0; cobj->setBlendFunc(arg0); @@ -1070,7 +1071,8 @@ int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) { cocos2d::BlendFunc arg0; - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc + ok = false; if(!ok) return 0; cobj->setBlendFunc(arg0); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 88054b0c75..330a7cae1c 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -12255,7 +12255,8 @@ int lua_cocos2dx_GLView_setGLContextAttrs(lua_State* tolua_S) if (argc == 1) { GLContextAttrs arg0; - #pragma warning NO CONVERSION TO NATIVE FOR GLContextAttrs; + #pragma warning NO CONVERSION TO NATIVE FOR GLContextAttrs + ok = false; if(!ok) return 0; cocos2d::GLView::setGLContextAttrs(arg0); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp index e9a0cc19d0..8d94bee826 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp @@ -78,7 +78,8 @@ int lua_cocos2dx_spine_Skeleton_setBlendFunc(lua_State* tolua_S) { cocos2d::BlendFunc arg0; - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc + ok = false; if(!ok) return 0; cobj->setBlendFunc(arg0); From 444b29802876724df499c16a20bb19914ac70776 Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 29 Aug 2014 16:44:20 +0800 Subject: [PATCH 40/74] fix compiling error on windows --- cocos/2d/CCParticleSystem.cpp | 1 + cocos/2d/CCTMXXMLParser.cpp | 1 + cocos/base/CCDirector.cpp | 1 - cocos/base/CCDirector.h | 2 +- cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp | 1 - cocos/editor-support/cocosbuilder/CCBSequenceProperty.h | 3 +-- cocos/editor-support/cocostudio/CocoLoader.h | 1 + 7 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cocos/2d/CCParticleSystem.cpp b/cocos/2d/CCParticleSystem.cpp index b53a8e41db..35dcfd6338 100644 --- a/cocos/2d/CCParticleSystem.cpp +++ b/cocos/2d/CCParticleSystem.cpp @@ -53,6 +53,7 @@ THE SOFTWARE. #include "base/CCDirector.h" #include "renderer/CCTextureCache.h" #include "deprecated/CCString.h" +#include "platform/CCFileUtils.h" using namespace std; diff --git a/cocos/2d/CCTMXXMLParser.cpp b/cocos/2d/CCTMXXMLParser.cpp index be4eb662fb..8d15046181 100644 --- a/cocos/2d/CCTMXXMLParser.cpp +++ b/cocos/2d/CCTMXXMLParser.cpp @@ -33,6 +33,7 @@ THE SOFTWARE. #include "base/ZipUtils.h" #include "base/base64.h" #include "base/CCDirector.h" +#include "platform/CCFileUtils.h" using namespace std; diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index f14ddc988e..2209492e2a 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -32,7 +32,6 @@ THE SOFTWARE. #include #include "2d/CCDrawingPrimitives.h" -#include "2d/CCScene.h" #include "2d/CCSpriteFrameCache.h" #include "platform/CCFileUtils.h" diff --git a/cocos/base/CCDirector.h b/cocos/base/CCDirector.h index 6ef2950de1..a8e4c15254 100644 --- a/cocos/base/CCDirector.h +++ b/cocos/base/CCDirector.h @@ -32,6 +32,7 @@ THE SOFTWARE. #include "base/CCRef.h" #include "base/CCVector.h" +#include "2d/CCScene.h" #include "CCGL.h" #include #include "math/CCMath.h" @@ -46,7 +47,6 @@ NS_CC_BEGIN /* Forward declarations. */ class LabelAtlas; -class Scene; //class GLView; class DirectorDelegate; class Node; diff --git a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp b/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp index 59240fad5b..fa74e33881 100644 --- a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp +++ b/cocos/editor-support/cocosbuilder/CCBSequenceProperty.cpp @@ -1,5 +1,4 @@ #include "CCBSequenceProperty.h" -#include "CCBKeyframe.h" using namespace cocos2d; using namespace std; diff --git a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h b/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h index b460bc2dcf..b01c722bea 100644 --- a/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h +++ b/cocos/editor-support/cocosbuilder/CCBSequenceProperty.h @@ -3,11 +3,10 @@ #include "base/CCRef.h" #include "base/CCVector.h" +#include "CCBKeyframe.h" namespace cocosbuilder { -class CCBKeyframe; - class CC_DLL CCBSequenceProperty : public cocos2d::Ref { public: diff --git a/cocos/editor-support/cocostudio/CocoLoader.h b/cocos/editor-support/cocostudio/CocoLoader.h index 52b603a764..ddee90ea02 100644 --- a/cocos/editor-support/cocostudio/CocoLoader.h +++ b/cocos/editor-support/cocostudio/CocoLoader.h @@ -25,6 +25,7 @@ #ifndef _COCOLOADER_H #define _COCOLOADER_H +#include #include "json/document.h" #include "cocostudio/CocosStudioExport.h" From 05c767be3b121cc8602cf3cbe8e55cbb8f02f944 Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 29 Aug 2014 16:51:40 +0800 Subject: [PATCH 41/74] [ci skip] --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index ae0b7d74bc..78a3a19328 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,8 @@ cocos2d-x-3.3?? ?? [NEW] UI: added `WebView` on iOS and Android [FIX] Node: create unneeded temple `Vec2` object in `setPosition(int, int)`, `setPositionX()` and `setPositionY()` + [FIX] Node: skew effect is wrong + [FIX] TextureAtlas: may crash if only drawing part of it cocos2d-x-3.3alpha0 Aug.28 2014 [NEW] 3D: Added Camera, AABB, OBB and Ray From 25a7f21056c24a354a76601ff9b9791c61a5699c Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Fri, 29 Aug 2014 17:27:55 +0800 Subject: [PATCH 42/74] make debug writable path the same as release --- cocos/platform/win32/CCFileUtilsWin32.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/platform/win32/CCFileUtilsWin32.cpp b/cocos/platform/win32/CCFileUtilsWin32.cpp index a652850879..c43339c8a7 100644 --- a/cocos/platform/win32/CCFileUtilsWin32.cpp +++ b/cocos/platform/win32/CCFileUtilsWin32.cpp @@ -278,7 +278,7 @@ string FileUtilsWin32::getWritablePath() const ::GetModuleFileNameA(nullptr, full_path, CC_MAX_PATH + 1); // Debug app uses executable directory; Non-debug app uses local app data directory -#ifndef _DEBUG +//#ifndef _DEBUG // Get filename of executable only, e.g. MyGame.exe char *base_name = strrchr(full_path, '\\'); @@ -306,7 +306,7 @@ string FileUtilsWin32::getWritablePath() const } } } -#endif // not defined _DEBUG +//#endif // not defined _DEBUG // If fetching of local app data directory fails, use the executable one string ret((char*)full_path); From cdc41711f61c0118e4d1a0b828336c126be78d55 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Fri, 29 Aug 2014 10:38:25 +0000 Subject: [PATCH 43/74] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/Action.lua | 33 +- .../lua-bindings/auto/api/ActionCamera.lua | 21 +- .../lua-bindings/auto/api/ActionEase.lua | 10 +- .../lua-bindings/auto/api/ActionFadeFrame.lua | 12 +- .../lua-bindings/auto/api/ActionFrame.lua | 33 +- .../lua-bindings/auto/api/ActionInstant.lua | 9 +- .../lua-bindings/auto/api/ActionInterval.lua | 14 +- .../lua-bindings/auto/api/ActionManager.lua | 50 +- .../lua-bindings/auto/api/ActionManagerEx.lua | 21 +- .../lua-bindings/auto/api/ActionMoveFrame.lua | 12 +- .../lua-bindings/auto/api/ActionObject.lua | 47 +- .../auto/api/ActionRotationFrame.lua | 11 +- .../auto/api/ActionScaleFrame.lua | 18 +- .../lua-bindings/auto/api/ActionTimeline.lua | 51 +- .../auto/api/ActionTimelineCache.lua | 17 +- .../auto/api/ActionTimelineData.lua | 7 +- .../lua-bindings/auto/api/ActionTintFrame.lua | 12 +- .../lua-bindings/auto/api/ActionTween.lua | 17 +- .../auto/api/AnchorPointFrame.lua | 7 +- .../lua-bindings/auto/api/Animate.lua | 11 +- .../lua-bindings/auto/api/Animate3D.lua | 25 +- .../lua-bindings/auto/api/Animation.lua | 46 +- .../lua-bindings/auto/api/Animation3D.lua | 6 +- .../lua-bindings/auto/api/AnimationCache.lua | 30 +- .../lua-bindings/auto/api/AnimationData.lua | 9 +- .../lua-bindings/auto/api/AnimationFrame.lua | 20 +- .../lua-bindings/auto/api/Application.lua | 11 +- .../lua-bindings/auto/api/Armature.lua | 72 +- .../auto/api/ArmatureAnimation.lua | 71 +- .../lua-bindings/auto/api/ArmatureData.lua | 9 +- .../auto/api/ArmatureDataManager.lua | 77 +- .../auto/api/ArmatureDisplayData.lua | 2 - .../lua-bindings/auto/api/AssetsManager.lua | 34 +- .../lua-bindings/auto/api/AtlasNode.lua | 39 +- .../lua-bindings/auto/api/AttachNode.lua | 10 +- .../lua-bindings/auto/api/BaseData.lua | 6 +- .../lua-bindings/auto/api/BatchNode.lua | 18 +- .../lua-bindings/auto/api/BezierBy.lua | 8 +- .../lua-bindings/auto/api/BezierTo.lua | 5 +- .../scripting/lua-bindings/auto/api/Blink.lua | 14 +- .../scripting/lua-bindings/auto/api/Bone.lua | 85 +- .../lua-bindings/auto/api/BoneData.lua | 9 +- .../lua-bindings/auto/api/Button.lua | 99 +- .../auto/api/CCBAnimationManager.lua | 87 +- .../lua-bindings/auto/api/CCBReader.lua | 45 +- .../lua-bindings/auto/api/CallFunc.lua | 10 +- .../lua-bindings/auto/api/Camera.lua | 59 +- .../auto/api/CardinalSplineBy.lua | 9 +- .../auto/api/CardinalSplineTo.lua | 21 +- .../lua-bindings/auto/api/CatmullRomBy.lua | 7 +- .../lua-bindings/auto/api/CatmullRomTo.lua | 7 +- .../lua-bindings/auto/api/CheckBox.lua | 77 +- .../lua-bindings/auto/api/ClippingNode.lua | 26 +- .../lua-bindings/auto/api/ColorFrame.lua | 14 +- .../lua-bindings/auto/api/ComAttribute.lua | 49 +- .../lua-bindings/auto/api/ComAudio.lua | 63 +- .../lua-bindings/auto/api/ComController.lua | 11 +- .../lua-bindings/auto/api/ComRender.lua | 8 +- .../lua-bindings/auto/api/Component.lua | 17 +- .../lua-bindings/auto/api/Console.lua | 10 +- .../lua-bindings/auto/api/ContourData.lua | 6 +- .../lua-bindings/auto/api/Control.lua | 36 +- .../lua-bindings/auto/api/ControlButton.lua | 133 +- .../auto/api/ControlColourPicker.lua | 31 +- .../auto/api/ControlHuePicker.lua | 39 +- .../auto/api/ControlPotentiometer.lua | 83 +- .../api/ControlSaturationBrightnessPicker.lua | 21 +- .../lua-bindings/auto/api/ControlSlider.lua | 59 +- .../lua-bindings/auto/api/ControlStepper.lua | 72 +- .../lua-bindings/auto/api/ControlSwitch.lua | 55 +- .../lua-bindings/auto/api/Controller.lua | 26 +- .../lua-bindings/auto/api/DelayTime.lua | 8 +- .../lua-bindings/auto/api/Director.lua | 151 +- .../lua-bindings/auto/api/DisplayData.lua | 8 +- .../lua-bindings/auto/api/DisplayManager.lua | 48 +- .../lua-bindings/auto/api/DrawNode.lua | 61 +- .../lua-bindings/auto/api/EaseBackIn.lua | 8 +- .../lua-bindings/auto/api/EaseBackInOut.lua | 8 +- .../lua-bindings/auto/api/EaseBackOut.lua | 8 +- .../auto/api/EaseBezierAction.lua | 17 +- .../lua-bindings/auto/api/EaseBounce.lua | 2 - .../lua-bindings/auto/api/EaseBounceIn.lua | 8 +- .../lua-bindings/auto/api/EaseBounceInOut.lua | 8 +- .../lua-bindings/auto/api/EaseBounceOut.lua | 8 +- .../auto/api/EaseCircleActionIn.lua | 8 +- .../auto/api/EaseCircleActionInOut.lua | 8 +- .../auto/api/EaseCircleActionOut.lua | 8 +- .../auto/api/EaseCubicActionIn.lua | 8 +- .../auto/api/EaseCubicActionInOut.lua | 8 +- .../auto/api/EaseCubicActionOut.lua | 8 +- .../lua-bindings/auto/api/EaseElastic.lua | 6 +- .../lua-bindings/auto/api/EaseElasticIn.lua | 9 +- .../auto/api/EaseElasticInOut.lua | 9 +- .../lua-bindings/auto/api/EaseElasticOut.lua | 9 +- .../auto/api/EaseExponentialIn.lua | 8 +- .../auto/api/EaseExponentialInOut.lua | 8 +- .../auto/api/EaseExponentialOut.lua | 8 +- .../lua-bindings/auto/api/EaseIn.lua | 10 +- .../lua-bindings/auto/api/EaseInOut.lua | 10 +- .../lua-bindings/auto/api/EaseOut.lua | 10 +- .../auto/api/EaseQuadraticActionIn.lua | 8 +- .../auto/api/EaseQuadraticActionInOut.lua | 8 +- .../auto/api/EaseQuadraticActionOut.lua | 8 +- .../auto/api/EaseQuarticActionIn.lua | 8 +- .../auto/api/EaseQuarticActionInOut.lua | 8 +- .../auto/api/EaseQuarticActionOut.lua | 8 +- .../auto/api/EaseQuinticActionIn.lua | 8 +- .../auto/api/EaseQuinticActionInOut.lua | 8 +- .../auto/api/EaseQuinticActionOut.lua | 8 +- .../lua-bindings/auto/api/EaseRateAction.lua | 6 +- .../lua-bindings/auto/api/EaseSineIn.lua | 8 +- .../lua-bindings/auto/api/EaseSineInOut.lua | 8 +- .../lua-bindings/auto/api/EaseSineOut.lua | 8 +- .../lua-bindings/auto/api/EditBox.lua | 94 +- .../scripting/lua-bindings/auto/api/Event.lua | 7 - .../lua-bindings/auto/api/EventController.lua | 14 +- .../lua-bindings/auto/api/EventCustom.lua | 4 +- .../lua-bindings/auto/api/EventDispatcher.lua | 62 +- .../lua-bindings/auto/api/EventFocus.lua | 5 +- .../lua-bindings/auto/api/EventFrame.lua | 7 +- .../lua-bindings/auto/api/EventKeyboard.lua | 5 +- .../lua-bindings/auto/api/EventListener.lua | 10 +- .../auto/api/EventListenerAcceleration.lua | 2 - .../auto/api/EventListenerController.lua | 3 - .../auto/api/EventListenerCustom.lua | 2 - .../auto/api/EventListenerFocus.lua | 2 - .../auto/api/EventListenerKeyboard.lua | 2 - .../auto/api/EventListenerMouse.lua | 2 - .../auto/api/EventListenerPhysicsContact.lua | 3 - .../EventListenerPhysicsContactWithBodies.lua | 11 +- .../EventListenerPhysicsContactWithGroup.lua | 9 +- .../EventListenerPhysicsContactWithShapes.lua | 11 +- .../auto/api/EventListenerTouchAllAtOnce.lua | 2 - .../auto/api/EventListenerTouchOneByOne.lua | 6 +- .../lua-bindings/auto/api/EventMouse.lua | 28 +- .../lua-bindings/auto/api/EventTouch.lua | 5 +- .../lua-bindings/auto/api/FadeIn.lua | 11 +- .../lua-bindings/auto/api/FadeOut.lua | 11 +- .../lua-bindings/auto/api/FadeOutBLTiles.lua | 11 +- .../auto/api/FadeOutDownTiles.lua | 11 +- .../lua-bindings/auto/api/FadeOutTRTiles.lua | 25 +- .../lua-bindings/auto/api/FadeOutUpTiles.lua | 16 +- .../lua-bindings/auto/api/FadeTo.lua | 13 +- .../lua-bindings/auto/api/FileUtils.lua | 212 +- .../auto/api/FiniteTimeAction.lua | 6 +- .../scripting/lua-bindings/auto/api/FlipX.lua | 8 +- .../lua-bindings/auto/api/FlipX3D.lua | 7 +- .../scripting/lua-bindings/auto/api/FlipY.lua | 8 +- .../lua-bindings/auto/api/FlipY3D.lua | 7 +- .../lua-bindings/auto/api/Follow.lua | 17 +- .../scripting/lua-bindings/auto/api/Frame.lua | 16 +- .../lua-bindings/auto/api/FrameData.lua | 5 +- .../lua-bindings/auto/api/GLProgram.lua | 53 +- .../lua-bindings/auto/api/GLProgramCache.lua | 13 +- .../lua-bindings/auto/api/GLProgramState.lua | 47 +- .../lua-bindings/auto/api/GLView.lua | 76 +- .../lua-bindings/auto/api/GLViewImpl.lua | 15 +- .../lua-bindings/auto/api/GUIReader.lua | 15 +- .../lua-bindings/auto/api/Grid3D.lua | 10 +- .../lua-bindings/auto/api/Grid3DAction.lua | 2 - .../lua-bindings/auto/api/GridAction.lua | 6 +- .../lua-bindings/auto/api/GridBase.lua | 40 +- .../scripting/lua-bindings/auto/api/HBox.lua | 1 - .../lua-bindings/auto/api/Helper.lua | 30 +- .../scripting/lua-bindings/auto/api/Hide.lua | 6 +- .../scripting/lua-bindings/auto/api/Image.lua | 28 +- .../lua-bindings/auto/api/ImageView.lua | 31 +- .../auto/api/InnerActionFrame.lua | 11 +- .../lua-bindings/auto/api/JumpBy.lua | 17 +- .../lua-bindings/auto/api/JumpTiles3D.lua | 21 +- .../lua-bindings/auto/api/JumpTo.lua | 14 +- .../scripting/lua-bindings/auto/api/Label.lua | 195 +- .../lua-bindings/auto/api/LabelAtlas.lua | 26 +- .../scripting/lua-bindings/auto/api/Layer.lua | 2 - .../lua-bindings/auto/api/LayerColor.lua | 27 +- .../lua-bindings/auto/api/LayerGradient.lua | 33 +- .../lua-bindings/auto/api/LayerMultiplex.lua | 10 +- .../lua-bindings/auto/api/Layout.lua | 106 +- .../lua-bindings/auto/api/LayoutParameter.lua | 11 +- .../lua-bindings/auto/api/Lens3D.lua | 24 +- .../auto/api/LinearLayoutParameter.lua | 15 +- .../lua-bindings/auto/api/Liquid.lua | 21 +- .../lua-bindings/auto/api/ListView.lua | 72 +- .../lua-bindings/auto/api/LoadingBar.lua | 41 +- .../scripting/lua-bindings/auto/api/Menu.lua | 30 +- .../lua-bindings/auto/api/MenuItem.lua | 10 +- .../lua-bindings/auto/api/MenuItemFont.lua | 24 +- .../lua-bindings/auto/api/MenuItemImage.lua | 9 +- .../lua-bindings/auto/api/MenuItemLabel.lua | 15 +- .../lua-bindings/auto/api/MenuItemSprite.lua | 17 +- .../lua-bindings/auto/api/MenuItemToggle.lua | 17 +- .../scripting/lua-bindings/auto/api/Mesh.lua | 28 +- .../lua-bindings/auto/api/MotionStreak.lua | 50 +- .../lua-bindings/auto/api/MoveBy.lua | 13 +- .../lua-bindings/auto/api/MoveTo.lua | 9 +- .../auto/api/MovementBoneData.lua | 9 +- .../lua-bindings/auto/api/MovementData.lua | 8 +- .../scripting/lua-bindings/auto/api/Node.lua | 470 +- .../lua-bindings/auto/api/NodeGrid.lua | 13 +- .../lua-bindings/auto/api/NodeReader.lua | 21 +- .../lua-bindings/auto/api/OrbitCamera.lua | 22 +- .../lua-bindings/auto/api/PageTurn3D.lua | 9 +- .../lua-bindings/auto/api/PageView.lua | 62 +- .../lua-bindings/auto/api/ParallaxNode.lua | 29 +- .../auto/api/ParticleBatchNode.lua | 60 +- .../auto/api/ParticleDisplayData.lua | 2 - .../auto/api/ParticleExplosion.lua | 4 +- .../lua-bindings/auto/api/ParticleFire.lua | 4 +- .../auto/api/ParticleFireworks.lua | 4 +- .../lua-bindings/auto/api/ParticleFlower.lua | 4 +- .../lua-bindings/auto/api/ParticleGalaxy.lua | 4 +- .../lua-bindings/auto/api/ParticleMeteor.lua | 4 +- .../lua-bindings/auto/api/ParticleRain.lua | 4 +- .../lua-bindings/auto/api/ParticleSmoke.lua | 4 +- .../lua-bindings/auto/api/ParticleSnow.lua | 4 +- .../lua-bindings/auto/api/ParticleSpiral.lua | 4 +- .../lua-bindings/auto/api/ParticleSun.lua | 4 +- .../lua-bindings/auto/api/ParticleSystem.lua | 205 +- .../auto/api/ParticleSystemQuad.lua | 22 +- .../lua-bindings/auto/api/PhysicsBody.lua | 190 +- .../lua-bindings/auto/api/PhysicsContact.lua | 5 - .../auto/api/PhysicsContactPostSolve.lua | 3 - .../auto/api/PhysicsContactPreSolve.lua | 13 +- .../lua-bindings/auto/api/PhysicsJoint.lua | 23 +- .../auto/api/PhysicsJointDistance.lua | 13 +- .../auto/api/PhysicsJointFixed.lua | 7 +- .../auto/api/PhysicsJointGear.lua | 17 +- .../auto/api/PhysicsJointGroove.lua | 23 +- .../auto/api/PhysicsJointLimit.lua | 28 +- .../auto/api/PhysicsJointMotor.lua | 11 +- .../lua-bindings/auto/api/PhysicsJointPin.lua | 7 +- .../auto/api/PhysicsJointRatchet.lua | 21 +- .../auto/api/PhysicsJointRotaryLimit.lua | 16 +- .../auto/api/PhysicsJointRotarySpring.lua | 21 +- .../auto/api/PhysicsJointSpring.lua | 33 +- .../lua-bindings/auto/api/PhysicsShape.lua | 61 +- .../lua-bindings/auto/api/PhysicsShapeBox.lua | 7 +- .../auto/api/PhysicsShapeCircle.lua | 20 +- .../auto/api/PhysicsShapeEdgeBox.lua | 8 +- .../auto/api/PhysicsShapeEdgeChain.lua | 2 - .../auto/api/PhysicsShapeEdgePolygon.lua | 2 - .../auto/api/PhysicsShapeEdgeSegment.lua | 12 +- .../auto/api/PhysicsShapePolygon.lua | 6 +- .../lua-bindings/auto/api/PhysicsWorld.lua | 52 +- .../scripting/lua-bindings/auto/api/Place.lua | 8 +- .../lua-bindings/auto/api/PositionFrame.lua | 18 +- .../lua-bindings/auto/api/ProgressFromTo.lua | 15 +- .../lua-bindings/auto/api/ProgressTimer.lua | 48 +- .../lua-bindings/auto/api/ProgressTo.lua | 13 +- .../lua-bindings/auto/api/ProtectedNode.lua | 58 +- cocos/scripting/lua-bindings/auto/api/Ref.lua | 13 - .../lua-bindings/auto/api/RelativeBox.lua | 1 - .../auto/api/RelativeLayoutParameter.lua | 27 +- .../lua-bindings/auto/api/RemoveSelf.lua | 6 +- .../lua-bindings/auto/api/RenderTexture.lua | 97 +- .../lua-bindings/auto/api/Repeat.lua | 19 +- .../lua-bindings/auto/api/RepeatForever.lua | 16 +- .../lua-bindings/auto/api/ReuseGrid.lua | 8 +- .../lua-bindings/auto/api/RichElement.lua | 8 +- .../auto/api/RichElementCustomNode.lua | 19 +- .../auto/api/RichElementImage.lua | 19 +- .../lua-bindings/auto/api/RichElementText.lua | 27 +- .../lua-bindings/auto/api/RichText.lua | 24 +- .../lua-bindings/auto/api/Ripple3D.lua | 29 +- .../lua-bindings/auto/api/RotateBy.lua | 14 +- .../lua-bindings/auto/api/RotateTo.lua | 14 +- .../lua-bindings/auto/api/RotationFrame.lua | 10 +- .../auto/api/RotationSkewFrame.lua | 6 +- .../lua-bindings/auto/api/Scale9Sprite.lua | 103 +- .../lua-bindings/auto/api/ScaleBy.lua | 13 +- .../lua-bindings/auto/api/ScaleFrame.lua | 17 +- .../lua-bindings/auto/api/ScaleTo.lua | 16 +- .../scripting/lua-bindings/auto/api/Scene.lua | 15 +- .../lua-bindings/auto/api/SceneReader.lua | 16 +- .../lua-bindings/auto/api/Scheduler.lua | 10 +- .../lua-bindings/auto/api/ScrollView.lua | 150 +- .../lua-bindings/auto/api/Sequence.lua | 9 +- .../lua-bindings/auto/api/Shaky3D.lua | 13 +- .../lua-bindings/auto/api/ShakyTiles3D.lua | 13 +- .../auto/api/ShatteredTiles3D.lua | 13 +- .../scripting/lua-bindings/auto/api/Show.lua | 6 +- .../lua-bindings/auto/api/ShuffleTiles.lua | 17 +- .../auto/api/SimpleAudioEngine.lua | 97 +- .../lua-bindings/auto/api/Skeleton.lua | 18 +- .../lua-bindings/auto/api/Skeleton3D.lua | 15 +- .../auto/api/SkeletonAnimation.lua | 9 +- .../lua-bindings/auto/api/SkewBy.lua | 12 +- .../lua-bindings/auto/api/SkewFrame.lua | 14 +- .../lua-bindings/auto/api/SkewTo.lua | 15 +- .../scripting/lua-bindings/auto/api/Skin.lua | 24 +- .../lua-bindings/auto/api/Slider.lua | 88 +- .../scripting/lua-bindings/auto/api/Spawn.lua | 9 +- .../scripting/lua-bindings/auto/api/Speed.lua | 23 +- .../lua-bindings/auto/api/SplitCols.lua | 12 +- .../lua-bindings/auto/api/SplitRows.lua | 12 +- .../lua-bindings/auto/api/Sprite.lua | 160 +- .../lua-bindings/auto/api/Sprite3D.lua | 37 +- .../lua-bindings/auto/api/SpriteBatchNode.lua | 86 +- .../auto/api/SpriteDisplayData.lua | 5 +- .../lua-bindings/auto/api/SpriteFrame.lua | 47 +- .../auto/api/SpriteFrameCache.lua | 54 +- .../lua-bindings/auto/api/StopGrid.lua | 6 +- .../lua-bindings/auto/api/TMXLayer.lua | 66 +- .../lua-bindings/auto/api/TMXLayerInfo.lua | 5 +- .../lua-bindings/auto/api/TMXMapInfo.lua | 75 +- .../lua-bindings/auto/api/TMXObjectGroup.lua | 22 +- .../lua-bindings/auto/api/TMXTiledMap.lua | 40 +- .../lua-bindings/auto/api/TMXTilesetInfo.lua | 4 +- .../lua-bindings/auto/api/TableView.lua | 55 +- .../lua-bindings/auto/api/TableViewCell.lua | 7 +- .../lua-bindings/auto/api/TargetedAction.lua | 17 +- .../scripting/lua-bindings/auto/api/Text.lua | 67 +- .../lua-bindings/auto/api/TextAtlas.lua | 35 +- .../lua-bindings/auto/api/TextBMFont.lua | 20 +- .../lua-bindings/auto/api/TextField.lua | 89 +- .../lua-bindings/auto/api/Texture2D.lua | 80 +- .../lua-bindings/auto/api/TextureCache.lua | 40 +- .../lua-bindings/auto/api/TextureData.lua | 9 +- .../lua-bindings/auto/api/TextureFrame.lua | 8 +- .../lua-bindings/auto/api/TileMapAtlas.lua | 32 +- .../lua-bindings/auto/api/TiledGrid3D.lua | 10 +- .../auto/api/TiledGrid3DAction.lua | 2 - .../lua-bindings/auto/api/Timeline.lua | 25 +- .../scripting/lua-bindings/auto/api/Timer.lua | 16 +- .../lua-bindings/auto/api/TintBy.lua | 17 +- .../lua-bindings/auto/api/TintTo.lua | 17 +- .../auto/api/ToggleVisibility.lua | 6 +- .../scripting/lua-bindings/auto/api/Touch.lua | 17 +- .../auto/api/TransitionCrossFade.lua | 9 +- .../auto/api/TransitionEaseScene.lua | 4 +- .../lua-bindings/auto/api/TransitionFade.lua | 4 +- .../auto/api/TransitionFadeBL.lua | 4 +- .../auto/api/TransitionFadeDown.lua | 4 +- .../auto/api/TransitionFadeTR.lua | 12 +- .../auto/api/TransitionFadeUp.lua | 4 +- .../auto/api/TransitionFlipAngular.lua | 6 +- .../lua-bindings/auto/api/TransitionFlipX.lua | 6 +- .../lua-bindings/auto/api/TransitionFlipY.lua | 6 +- .../auto/api/TransitionJumpZoom.lua | 3 +- .../auto/api/TransitionMoveInB.lua | 3 +- .../auto/api/TransitionMoveInL.lua | 7 +- .../auto/api/TransitionMoveInR.lua | 3 +- .../auto/api/TransitionMoveInT.lua | 3 +- .../auto/api/TransitionPageTurn.lua | 22 +- .../auto/api/TransitionProgress.lua | 3 +- .../auto/api/TransitionProgressHorizontal.lua | 3 +- .../auto/api/TransitionProgressInOut.lua | 3 +- .../auto/api/TransitionProgressOutIn.lua | 3 +- .../auto/api/TransitionProgressRadialCCW.lua | 3 +- .../auto/api/TransitionProgressRadialCW.lua | 3 +- .../auto/api/TransitionProgressVertical.lua | 3 +- .../auto/api/TransitionRotoZoom.lua | 3 +- .../lua-bindings/auto/api/TransitionScene.lua | 11 +- .../auto/api/TransitionSceneOriented.lua | 3 +- .../auto/api/TransitionShrinkGrow.lua | 6 +- .../auto/api/TransitionSlideInB.lua | 4 +- .../auto/api/TransitionSlideInL.lua | 7 +- .../auto/api/TransitionSlideInR.lua | 4 +- .../auto/api/TransitionSlideInT.lua | 4 +- .../auto/api/TransitionSplitCols.lua | 12 +- .../auto/api/TransitionSplitRows.lua | 4 +- .../auto/api/TransitionTurnOffTiles.lua | 11 +- .../auto/api/TransitionZoomFlipAngular.lua | 6 +- .../auto/api/TransitionZoomFlipX.lua | 6 +- .../auto/api/TransitionZoomFlipY.lua | 6 +- .../lua-bindings/auto/api/TurnOffTiles.lua | 19 +- .../scripting/lua-bindings/auto/api/Tween.lua | 39 +- .../scripting/lua-bindings/auto/api/Twirl.lua | 27 +- .../lua-bindings/auto/api/UserDefault.lua | 55 +- .../scripting/lua-bindings/auto/api/VBox.lua | 1 - .../lua-bindings/auto/api/VideoPlayer.lua | 36 +- .../lua-bindings/auto/api/VisibleFrame.lua | 7 +- .../scripting/lua-bindings/auto/api/Waves.lua | 25 +- .../lua-bindings/auto/api/Waves3D.lua | 21 +- .../lua-bindings/auto/api/WavesTiles3D.lua | 21 +- .../lua-bindings/auto/api/Widget.lua | 180 +- .../lua-bindings/auto/api/ZOrderFrame.lua | 7 +- .../auto/api/lua_cocos2dx_3d_auto_api.lua | 8 +- .../auto/api/lua_cocos2dx_auto_api.lua | 42 +- .../auto/lua_cocos2dx_3d_auto.cpp | 1966 +++--- .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 5948 +++++++++-------- .../lua-bindings/auto/lua_cocos2dx_auto.hpp | 2 + .../auto/lua_cocos2dx_spine_auto.cpp | 3 +- 383 files changed, 6452 insertions(+), 10892 deletions(-) diff --git a/cocos/scripting/lua-bindings/auto/api/Action.lua b/cocos/scripting/lua-bindings/auto/api/Action.lua index 6d28c6c257..9502801e63 100644 --- a/cocos/scripting/lua-bindings/auto/api/Action.lua +++ b/cocos/scripting/lua-bindings/auto/api/Action.lua @@ -5,86 +5,65 @@ -- @parent_module cc -------------------------------- --- called before the action start. It will also set the target. -- @function [parent=#Action] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- Set the original target, since target can be nil.
--- Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method.
--- The target is 'assigned', it is not 'retained'.
--- since v0.8.2 -- @function [parent=#Action] setOriginalTarget -- @param self --- @param #cc.Node originalTarget +-- @param #cc.Node node -------------------------------- --- returns a clone of action -- @function [parent=#Action] clone -- @param self -- @return Action#Action ret (return value: cc.Action) -------------------------------- --- -- @function [parent=#Action] getOriginalTarget -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- called after the action has finished. It will set the 'target' to nil.
--- IMPORTANT: You should never call "[action stop]" manually. Instead, use: "target->stopAction(action);" -- @function [parent=#Action] stop -- @param self -------------------------------- --- called once per frame. time a value between 0 and 1
--- For example:
--- - 0 means that the action just started
--- - 0.5 means that the action is in the middle
--- - 1 means that the action is over -- @function [parent=#Action] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#Action] getTarget -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- called every frame with it's delta time. DON'T override unless you know what you are doing. -- @function [parent=#Action] step -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#Action] setTag -- @param self --- @param #int tag +-- @param #int int -------------------------------- --- -- @function [parent=#Action] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- --- The action will modify the target properties. -- @function [parent=#Action] setTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- return true if the action has finished -- @function [parent=#Action] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- returns a new action that performs the exactly the reverse action -- @function [parent=#Action] reverse -- @param self -- @return Action#Action ret (return value: cc.Action) diff --git a/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua b/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua index 673fbf6160..00beabfed2 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua @@ -9,60 +9,51 @@ -- @overload self, vec3_table -- @function [parent=#ActionCamera] setEye -- @param self --- @param #float x --- @param #float y --- @param #float z +-- @param #float float +-- @param #float float +-- @param #float float -------------------------------- --- -- @function [parent=#ActionCamera] getEye -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- --- -- @function [parent=#ActionCamera] setUp -- @param self --- @param #vec3_table up +-- @param #vec3_table vec3 -------------------------------- --- -- @function [parent=#ActionCamera] getCenter -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- --- -- @function [parent=#ActionCamera] setCenter -- @param self --- @param #vec3_table center +-- @param #vec3_table vec3 -------------------------------- --- -- @function [parent=#ActionCamera] getUp -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- --- -- @function [parent=#ActionCamera] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ActionCamera] clone -- @param self -- @return ActionCamera#ActionCamera ret (return value: cc.ActionCamera) -------------------------------- --- -- @function [parent=#ActionCamera] reverse -- @param self -- @return ActionCamera#ActionCamera ret (return value: cc.ActionCamera) -------------------------------- --- js ctor -- @function [parent=#ActionCamera] ActionCamera -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionEase.lua b/cocos/scripting/lua-bindings/auto/api/ActionEase.lua index 88463b5be3..b5b1ea0bd5 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionEase.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionEase.lua @@ -5,38 +5,32 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ActionEase] getInnerAction -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#ActionEase] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ActionEase] clone -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) -------------------------------- --- -- @function [parent=#ActionEase] stop -- @param self -------------------------------- --- -- @function [parent=#ActionEase] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) -------------------------------- --- -- @function [parent=#ActionEase] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua index 7727f649b5..f713688bf5 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua @@ -5,30 +5,22 @@ -- @parent_module ccs -------------------------------- --- Gets the fade action opacity.
--- return the fade action opacity. -- @function [parent=#ActionFadeFrame] getOpacity -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Gets the ActionInterval of ActionFrame.
--- parame duration the duration time of ActionFrame
--- return ActionInterval -- @function [parent=#ActionFadeFrame] getAction -- @param self --- @param #float duration +-- @param #float float -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- Changes the fade action opacity.
--- param opacity the fade action opacity -- @function [parent=#ActionFadeFrame] setOpacity -- @param self --- @param #int opacity +-- @param #int int -------------------------------- --- Default constructor -- @function [parent=#ActionFadeFrame] ActionFadeFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua index 0a2637cb6c..1be2073a67 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua @@ -9,75 +9,56 @@ -- @overload self, float -- @function [parent=#ActionFrame] getAction -- @param self --- @param #float duration --- @param #ccs.ActionFrame srcFrame +-- @param #float float +-- @param #ccs.ActionFrame actionframe -- @return ActionInterval#ActionInterval ret (retunr value: cc.ActionInterval) -------------------------------- --- Gets the type of action frame
--- return the type of action frame -- @function [parent=#ActionFrame] getFrameType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Changes the time of action frame
--- param fTime the time of action frame -- @function [parent=#ActionFrame] setFrameTime -- @param self --- @param #float fTime +-- @param #float float -------------------------------- --- Changes the easing type.
--- param easingType the easing type. -- @function [parent=#ActionFrame] setEasingType -- @param self --- @param #int easingType +-- @param #int int -------------------------------- --- Gets the time of action frame
--- return fTime the time of action frame -- @function [parent=#ActionFrame] getFrameTime -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Gets the index of action frame
--- return the index of action frame -- @function [parent=#ActionFrame] getFrameIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Changes the type of action frame
--- param frameType the type of action frame -- @function [parent=#ActionFrame] setFrameType -- @param self --- @param #int frameType +-- @param #int int -------------------------------- --- Changes the index of action frame
--- param index the index of action frame -- @function [parent=#ActionFrame] setFrameIndex -- @param self --- @param #int index +-- @param #int int -------------------------------- --- Set the ActionInterval easing parameter.
--- parame parameter the parameter for frame ease -- @function [parent=#ActionFrame] setEasingParameter -- @param self --- @param #array_table parameter +-- @param #array_table array -------------------------------- --- Gets the easing type.
--- return the easing type. -- @function [parent=#ActionFrame] getEasingType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Default constructor -- @function [parent=#ActionFrame] ActionFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua b/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua index 0a539e808d..0d0fb165a6 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua @@ -5,33 +5,28 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ActionInstant] step -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#ActionInstant] clone -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) -------------------------------- --- -- @function [parent=#ActionInstant] reverse -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) -------------------------------- --- -- @function [parent=#ActionInstant] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ActionInstant] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua b/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua index e0351a5712..a4cfe55038 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua @@ -5,49 +5,41 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ActionInterval] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ActionInterval] setAmplitudeRate -- @param self --- @param #float amp +-- @param #float float -------------------------------- --- how many seconds had elapsed since the actions started to run. -- @function [parent=#ActionInterval] getElapsed -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ActionInterval] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ActionInterval] step -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#ActionInterval] clone -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#ActionInterval] reverse -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#ActionInterval] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/ActionManager.lua b/cocos/scripting/lua-bindings/auto/api/ActionManager.lua index 9349a3e536..8597ac46f3 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionManager.lua @@ -5,99 +5,77 @@ -- @parent_module cc -------------------------------- --- Gets an action given its tag an a target
--- return the Action the with the given tag -- @function [parent=#ActionManager] getActionByTag -- @param self --- @param #int tag --- @param #cc.Node target +-- @param #int int +-- @param #cc.Node node -- @return Action#Action ret (return value: cc.Action) -------------------------------- --- Removes an action given its tag and the target -- @function [parent=#ActionManager] removeActionByTag -- @param self --- @param #int tag --- @param #cc.Node target +-- @param #int int +-- @param #cc.Node node -------------------------------- --- Removes all actions from all the targets. -- @function [parent=#ActionManager] removeAllActions -- @param self -------------------------------- --- Adds an action with a target.
--- If the target is already present, then the action will be added to the existing target.
--- If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target.
--- When the target is paused, the queued actions won't be 'ticked'. -- @function [parent=#ActionManager] addAction -- @param self -- @param #cc.Action action --- @param #cc.Node target --- @param #bool paused +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- Resumes the target. All queued actions will be resumed. -- @function [parent=#ActionManager] resumeTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ActionManager] update -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- Pauses the target: all running actions and newly added actions will be paused. -- @function [parent=#ActionManager] pauseTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- Returns the numbers of actions that are running in a certain target.
--- Composable actions are counted as 1 action. Example:
--- - If you are running 1 Sequence of 7 actions, it will return 1.
--- - If you are running 7 Sequences of 2 actions, it will return 7. -- @function [parent=#ActionManager] getNumberOfRunningActionsInTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -- @return long#long ret (return value: long) -------------------------------- --- Removes all actions from a certain target.
--- All the actions that belongs to the target will be removed. -- @function [parent=#ActionManager] removeAllActionsFromTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- Resume a set of targets (convenience function to reverse a pauseAllRunningActions call) -- @function [parent=#ActionManager] resumeTargets -- @param self --- @param #array_table targetsToResume +-- @param #array_table array -------------------------------- --- Removes an action given an action reference. -- @function [parent=#ActionManager] removeAction -- @param self -- @param #cc.Action action -------------------------------- --- Removes all actions given its tag and the target -- @function [parent=#ActionManager] removeAllActionsByTag -- @param self --- @param #int tag --- @param #cc.Node target +-- @param #int int +-- @param #cc.Node node -------------------------------- --- Pauses all running actions, returning a list of targets whose actions were paused. -- @function [parent=#ActionManager] pauseAllRunningActions -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- js ctor -- @function [parent=#ActionManager] ActionManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua b/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua index 0be42e90d1..9d6a8e14b4 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua @@ -9,38 +9,27 @@ -- @overload self, char, char -- @function [parent=#ActionManagerEx] playActionByName -- @param self --- @param #char jsonName --- @param #char actionName --- @param #cc.CallFunc func +-- @param #char char +-- @param #char char +-- @param #cc.CallFunc callfunc -- @return ActionObject#ActionObject ret (retunr value: ccs.ActionObject) -------------------------------- --- Gets an ActionObject with a name.
--- param jsonName UI file name
--- param actionName action name in the UI file.
--- return ActionObject which named as the param name -- @function [parent=#ActionManagerEx] getActionByName -- @param self --- @param #char jsonName --- @param #char actionName +-- @param #char char +-- @param #char char -- @return ActionObject#ActionObject ret (return value: ccs.ActionObject) -------------------------------- --- Release all actions. -- @function [parent=#ActionManagerEx] releaseActions -- @param self -------------------------------- --- Purges ActionManager point.
--- js purge
--- lua destroyActionManager -- @function [parent=#ActionManagerEx] destroyInstance -- @param self -------------------------------- --- Gets the static instance of ActionManager.
--- js getInstance
--- lua getInstance -- @function [parent=#ActionManagerEx] getInstance -- @param self -- @return ActionManagerEx#ActionManagerEx ret (return value: ccs.ActionManagerEx) diff --git a/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua index 64a695be06..3afb25896a 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua @@ -5,30 +5,22 @@ -- @parent_module ccs -------------------------------- --- Changes the move action position.
--- param the move action position. -- @function [parent=#ActionMoveFrame] setPosition -- @param self --- @param #vec2_table pos +-- @param #vec2_table vec2 -------------------------------- --- Gets the ActionInterval of ActionFrame.
--- parame duration the duration time of ActionFrame
--- return ActionInterval -- @function [parent=#ActionMoveFrame] getAction -- @param self --- @param #float duration +-- @param #float float -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- Gets the move action position.
--- return the move action position. -- @function [parent=#ActionMoveFrame] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Default constructor -- @function [parent=#ActionMoveFrame] ActionMoveFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionObject.lua b/cocos/scripting/lua-bindings/auto/api/ActionObject.lua index cd3a1a5bcf..93f6dec2ec 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionObject.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionObject.lua @@ -5,47 +5,35 @@ -- @parent_module ccs -------------------------------- --- Sets the current time of frame.
--- param fTime the current time of frame -- @function [parent=#ActionObject] setCurrentTime -- @param self --- @param #float fTime +-- @param #float float -------------------------------- --- Pause the action. -- @function [parent=#ActionObject] pause -- @param self -------------------------------- --- Sets name for object
--- param name name of object -- @function [parent=#ActionObject] setName -- @param self --- @param #char name +-- @param #char char -------------------------------- --- Sets the time interval of frame.
--- param fTime the time interval of frame -- @function [parent=#ActionObject] setUnitTime -- @param self --- @param #float fTime +-- @param #float float -------------------------------- --- Gets the total time of frame.
--- return the total time of frame -- @function [parent=#ActionObject] getTotalTime -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Gets name of object
--- return name of object -- @function [parent=#ActionObject] getName -- @param self -- @return char#char ret (return value: char) -------------------------------- --- Stop the action. -- @function [parent=#ActionObject] stop -- @param self @@ -54,71 +42,54 @@ -- @overload self -- @function [parent=#ActionObject] play -- @param self --- @param #cc.CallFunc func +-- @param #cc.CallFunc callfunc -------------------------------- --- Gets the current time of frame.
--- return the current time of frame -- @function [parent=#ActionObject] getCurrentTime -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Removes a ActionNode which play the action.
--- param node the ActionNode which play the action -- @function [parent=#ActionObject] removeActionNode -- @param self --- @param #ccs.ActionNode node +-- @param #ccs.ActionNode actionnode -------------------------------- --- Gets if the action will loop play.
--- return that if the action will loop play -- @function [parent=#ActionObject] getLoop -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Adds a ActionNode to play the action.
--- param node the ActionNode which will play the action -- @function [parent=#ActionObject] addActionNode -- @param self --- @param #ccs.ActionNode node +-- @param #ccs.ActionNode actionnode -------------------------------- --- Gets the time interval of frame.
--- return the time interval of frame -- @function [parent=#ActionObject] getUnitTime -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Return if the action is playing.
--- return true if the action is playing, false the otherwise -- @function [parent=#ActionObject] isPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ActionObject] updateToFrameByTime -- @param self --- @param #float fTime +-- @param #float float -------------------------------- --- Sets if the action will loop play.
--- param bLoop that if the action will loop play -- @function [parent=#ActionObject] setLoop -- @param self --- @param #bool bLoop +-- @param #bool bool -------------------------------- --- -- @function [parent=#ActionObject] simulationActionUpdate -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- Default constructor -- @function [parent=#ActionObject] ActionObject -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua index 3e1cf8fb83..267c36c133 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua @@ -5,30 +5,25 @@ -- @parent_module ccs -------------------------------- --- Changes rotate action rotation.
--- param rotation rotate action rotation. -- @function [parent=#ActionRotationFrame] setRotation -- @param self --- @param #float rotation +-- @param #float float -------------------------------- -- @overload self, float, ccs.ActionFrame -- @overload self, float -- @function [parent=#ActionRotationFrame] getAction -- @param self --- @param #float duration --- @param #ccs.ActionFrame srcFrame +-- @param #float float +-- @param #ccs.ActionFrame actionframe -- @return ActionInterval#ActionInterval ret (retunr value: cc.ActionInterval) -------------------------------- --- Gets the rotate action rotation.
--- return the rotate action rotation. -- @function [parent=#ActionRotationFrame] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Default constructor -- @function [parent=#ActionRotationFrame] ActionRotationFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua index f9f34cb2de..99c0180572 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua @@ -5,44 +5,32 @@ -- @parent_module ccs -------------------------------- --- Changes the scale action scaleY.
--- param rotation the scale action scaleY. -- @function [parent=#ActionScaleFrame] setScaleY -- @param self --- @param #float scaleY +-- @param #float float -------------------------------- --- Changes the scale action scaleX.
--- param the scale action scaleX. -- @function [parent=#ActionScaleFrame] setScaleX -- @param self --- @param #float scaleX +-- @param #float float -------------------------------- --- Gets the scale action scaleY.
--- return the the scale action scaleY. -- @function [parent=#ActionScaleFrame] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Gets the scale action scaleX.
--- return the scale action scaleX. -- @function [parent=#ActionScaleFrame] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Gets the ActionInterval of ActionFrame.
--- parame duration the duration time of ActionFrame
--- return ActionInterval -- @function [parent=#ActionScaleFrame] getAction -- @param self --- @param #float duration +-- @param #float float -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- Default constructor -- @function [parent=#ActionScaleFrame] ActionScaleFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua b/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua index b04785700d..5cc4299820 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua @@ -5,98 +5,79 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ActionTimeline] getTimelines -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- Get current frame. -- @function [parent=#ActionTimeline] getCurrentFrame -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Start frame index of this action -- @function [parent=#ActionTimeline] getStartFrame -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Pause the animation. -- @function [parent=#ActionTimeline] pause -- @param self -------------------------------- --- Set ActionTimeline's frame event callback function -- @function [parent=#ActionTimeline] setFrameEventCallFunc -- @param self --- @param #function listener +-- @param #function func -------------------------------- --- Resume the animation. -- @function [parent=#ActionTimeline] resume -- @param self -------------------------------- --- -- @function [parent=#ActionTimeline] getDuration -- @param self -- @return int#int ret (return value: int) -------------------------------- --- add Timeline to ActionTimeline -- @function [parent=#ActionTimeline] addTimeline -- @param self -- @param #ccs.Timeline timeline -------------------------------- --- End frame of this action.
--- When action play to this frame, if action is not loop, then it will stop,
--- or it will play from start frame again. -- @function [parent=#ActionTimeline] getEndFrame -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Set current frame index, this will cause action plays to this frame. -- @function [parent=#ActionTimeline] setCurrentFrame -- @param self --- @param #int frameIndex +-- @param #int int -------------------------------- --- Set the animation speed, this will speed up or slow down the speed. -- @function [parent=#ActionTimeline] setTimeSpeed -- @param self --- @param #float speed +-- @param #float float -------------------------------- --- -- @function [parent=#ActionTimeline] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- duration of the whole action -- @function [parent=#ActionTimeline] setDuration -- @param self --- @param #int duration +-- @param #int int -------------------------------- --- Get current animation speed. -- @function [parent=#ActionTimeline] getTimeSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Goto the specified frame index, and pause at this index.
--- param startIndex The animation will pause at this index. -- @function [parent=#ActionTimeline] gotoFrameAndPause -- @param self --- @param #int startIndex +-- @param #int int -------------------------------- --- Whether or not Action is playing. -- @function [parent=#ActionTimeline] isPlaying -- @param self -- @return bool#bool ret (return value: bool) @@ -108,61 +89,51 @@ -- @overload self, int, int, int, bool -- @function [parent=#ActionTimeline] gotoFrameAndPlay -- @param self --- @param #int startIndex --- @param #int endIndex --- @param #int currentFrameIndex --- @param #bool loop +-- @param #int int +-- @param #int int +-- @param #int int +-- @param #bool bool -------------------------------- --- -- @function [parent=#ActionTimeline] removeTimeline -- @param self -- @param #ccs.Timeline timeline -------------------------------- --- -- @function [parent=#ActionTimeline] clearFrameEventCallFunc -- @param self -------------------------------- --- -- @function [parent=#ActionTimeline] create -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- --- -- @function [parent=#ActionTimeline] step -- @param self --- @param #float delta +-- @param #float float -------------------------------- --- -- @function [parent=#ActionTimeline] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- Returns a clone of ActionTimeline -- @function [parent=#ActionTimeline] clone -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- --- Returns a reverse of ActionTimeline.
--- Not implement yet. -- @function [parent=#ActionTimeline] reverse -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- --- -- @function [parent=#ActionTimeline] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ActionTimeline] ActionTimeline -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua b/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua index 77e46aa629..b983d8bdcf 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua @@ -4,45 +4,38 @@ -- @parent_module ccs -------------------------------- --- Clone a action with the specified name from the container. -- @function [parent=#ActionTimelineCache] createAction -- @param self --- @param #string fileName +-- @param #string str -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- --- -- @function [parent=#ActionTimelineCache] purge -- @param self -------------------------------- --- -- @function [parent=#ActionTimelineCache] init -- @param self -------------------------------- --- -- @function [parent=#ActionTimelineCache] loadAnimationActionWithContent -- @param self --- @param #string fileName --- @param #string content +-- @param #string str +-- @param #string str -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- --- -- @function [parent=#ActionTimelineCache] loadAnimationActionWithFile -- @param self --- @param #string fileName +-- @param #string str -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- --- Remove action with filename, and also remove other resource relate with this file -- @function [parent=#ActionTimelineCache] removeAction -- @param self --- @param #string fileName +-- @param #string str -------------------------------- --- Destroys the singleton -- @function [parent=#ActionTimelineCache] destroyInstance -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua b/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua index 46806fa02f..bda764dad6 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua @@ -5,22 +5,19 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ActionTimelineData] setActionTag -- @param self --- @param #int actionTag +-- @param #int int -------------------------------- --- -- @function [parent=#ActionTimelineData] getActionTag -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#ActionTimelineData] create -- @param self --- @param #int actionTag +-- @param #int int -- @return ActionTimelineData#ActionTimelineData ret (return value: ccs.ActionTimelineData) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua index 540cbad47d..e965b182c8 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua @@ -5,30 +5,22 @@ -- @parent_module ccs -------------------------------- --- Gets the tint action color.
--- return the tint action color. -- @function [parent=#ActionTintFrame] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- Gets the ActionInterval of ActionFrame.
--- parame duration the duration time of ActionFrame
--- return ActionInterval -- @function [parent=#ActionTintFrame] getAction -- @param self --- @param #float duration +-- @param #float float -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- Changes the tint action color.
--- param ccolor the tint action color -- @function [parent=#ActionTintFrame] setColor -- @param self --- @param #color3b_table ccolor +-- @param #color3b_table color3b -------------------------------- --- Default constructor -- @function [parent=#ActionTintFrame] ActionTintFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTween.lua b/cocos/scripting/lua-bindings/auto/api/ActionTween.lua index f221754635..0ff2568643 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTween.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTween.lua @@ -5,35 +5,30 @@ -- @parent_module cc -------------------------------- --- creates an initializes the action with the property name (key), and the from and to parameters. -- @function [parent=#ActionTween] create -- @param self --- @param #float duration --- @param #string key --- @param #float from --- @param #float to +-- @param #float float +-- @param #string str +-- @param #float float +-- @param #float float -- @return ActionTween#ActionTween ret (return value: cc.ActionTween) -------------------------------- --- -- @function [parent=#ActionTween] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ActionTween] clone -- @param self -- @return ActionTween#ActionTween ret (return value: cc.ActionTween) -------------------------------- --- -- @function [parent=#ActionTween] update -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#ActionTween] reverse -- @param self -- @return ActionTween#ActionTween ret (return value: cc.ActionTween) diff --git a/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua b/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua index 4ad0e5ed07..1e4849c55d 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua @@ -5,31 +5,26 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#AnchorPointFrame] setAnchorPoint -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#AnchorPointFrame] getAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#AnchorPointFrame] create -- @param self -- @return AnchorPointFrame#AnchorPointFrame ret (return value: ccs.AnchorPointFrame) -------------------------------- --- -- @function [parent=#AnchorPointFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#AnchorPointFrame] AnchorPointFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Animate.lua b/cocos/scripting/lua-bindings/auto/api/Animate.lua index f3bf16dc52..de15070b65 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animate.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animate.lua @@ -12,45 +12,38 @@ -- @return Animation#Animation ret (retunr value: cc.Animation) -------------------------------- --- sets the Animation object to be animated -- @function [parent=#Animate] setAnimation -- @param self -- @param #cc.Animation animation -------------------------------- --- creates the action with an Animation and will restore the original frame when the animation is over -- @function [parent=#Animate] create -- @param self -- @param #cc.Animation animation -- @return Animate#Animate ret (return value: cc.Animate) -------------------------------- --- -- @function [parent=#Animate] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#Animate] clone -- @param self -- @return Animate#Animate ret (return value: cc.Animate) -------------------------------- --- -- @function [parent=#Animate] stop -- @param self -------------------------------- --- -- @function [parent=#Animate] reverse -- @param self -- @return Animate#Animate ret (return value: cc.Animate) -------------------------------- --- -- @function [parent=#Animate] update -- @param self --- @param #float t +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua index 7d8635c012..f49ae32b24 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Animate3D] setSpeed -- @param self --- @param #float speed +-- @param #float float -------------------------------- --- -- @function [parent=#Animate3D] setWeight -- @param self --- @param #float weight +-- @param #float float -------------------------------- --- get & set speed, negative speed means playing reverse -- @function [parent=#Animate3D] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- --- get & set blend weight, weight must positive -- @function [parent=#Animate3D] getWeight -- @param self -- @return float#float ret (return value: float) @@ -33,39 +29,34 @@ -- @overload self, cc.Animation3D -- @function [parent=#Animate3D] create -- @param self --- @param #cc.Animation3D animation --- @param #float fromTime --- @param #float duration +-- @param #cc.Animation3D animation3d +-- @param #float float +-- @param #float float -- @return Animate3D#Animate3D ret (retunr value: cc.Animate3D) -------------------------------- --- -- @function [parent=#Animate3D] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#Animate3D] step -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#Animate3D] clone -- @param self -- @return Animate3D#Animate3D ret (return value: cc.Animate3D) -------------------------------- --- -- @function [parent=#Animate3D] reverse -- @param self -- @return Animate3D#Animate3D ret (return value: cc.Animate3D) -------------------------------- --- -- @function [parent=#Animate3D] update -- @param self --- @param #float t +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Animation.lua b/cocos/scripting/lua-bindings/auto/api/Animation.lua index 4dc9976680..43b1d28a90 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animation.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animation.lua @@ -5,93 +5,74 @@ -- @parent_module cc -------------------------------- --- Gets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... -- @function [parent=#Animation] getLoops -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- Adds a SpriteFrame to a Animation.
--- The frame will be added with one "delay unit". -- @function [parent=#Animation] addSpriteFrame -- @param self --- @param #cc.SpriteFrame frame +-- @param #cc.SpriteFrame spriteframe -------------------------------- --- Sets whether to restore the original frame when animation finishes -- @function [parent=#Animation] setRestoreOriginalFrame -- @param self --- @param #bool restoreOriginalFrame +-- @param #bool bool -------------------------------- --- -- @function [parent=#Animation] clone -- @param self -- @return Animation#Animation ret (return value: cc.Animation) -------------------------------- --- Gets the duration in seconds of the whole animation. It is the result of totalDelayUnits * delayPerUnit -- @function [parent=#Animation] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Sets the array of AnimationFrames -- @function [parent=#Animation] setFrames -- @param self --- @param #array_table frames +-- @param #array_table array -------------------------------- --- Gets the array of AnimationFrames -- @function [parent=#Animation] getFrames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- Sets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... -- @function [parent=#Animation] setLoops -- @param self --- @param #unsigned int loops +-- @param #unsigned int int -------------------------------- --- Sets the delay in seconds of the "delay unit" -- @function [parent=#Animation] setDelayPerUnit -- @param self --- @param #float delayPerUnit +-- @param #float float -------------------------------- --- Adds a frame with an image filename. Internally it will create a SpriteFrame and it will add it.
--- The frame will be added with one "delay unit".
--- Added to facilitate the migration from v0.8 to v0.9. -- @function [parent=#Animation] addSpriteFrameWithFile -- @param self --- @param #string filename +-- @param #string str -------------------------------- --- Gets the total Delay units of the Animation. -- @function [parent=#Animation] getTotalDelayUnits -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Gets the delay in seconds of the "delay unit" -- @function [parent=#Animation] getDelayPerUnit -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Checks whether to restore the original frame when animation finishes. -- @function [parent=#Animation] getRestoreOriginalFrame -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Adds a frame with a texture and a rect. Internally it will create a SpriteFrame and it will add it.
--- The frame will be added with one "delay unit".
--- Added to facilitate the migration from v0.8 to v0.9. -- @function [parent=#Animation] addSpriteFrameWithTexture -- @param self --- @param #cc.Texture2D pobTexture +-- @param #cc.Texture2D texture2d -- @param #rect_table rect -------------------------------- @@ -99,18 +80,17 @@ -- @overload self -- @function [parent=#Animation] create -- @param self --- @param #array_table arrayOfAnimationFrameNames --- @param #float delayPerUnit --- @param #unsigned int loops +-- @param #array_table array +-- @param #float float +-- @param #unsigned int int -- @return Animation#Animation ret (retunr value: cc.Animation) -------------------------------- --- -- @function [parent=#Animation] createWithSpriteFrames -- @param self --- @param #array_table arrayOfSpriteFrameNames --- @param #float delay --- @param #unsigned int loops +-- @param #array_table array +-- @param #float float +-- @param #unsigned int int -- @return Animation#Animation ret (return value: cc.Animation) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Animation3D.lua b/cocos/scripting/lua-bindings/auto/api/Animation3D.lua index c04f1611bf..7eacf8e403 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animation3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animation3D.lua @@ -5,17 +5,15 @@ -- @parent_module cc -------------------------------- --- get duration -- @function [parent=#Animation3D] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- --- read all animation or only the animation with given animationName? animationName == "" read the first. -- @function [parent=#Animation3D] create -- @param self --- @param #string filename --- @param #string animationName +-- @param #string str +-- @param #string str -- @return Animation3D#Animation3D ret (return value: cc.Animation3D) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua b/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua index 4b8bab06a7..34e8325086 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua @@ -5,66 +5,48 @@ -- @parent_module cc -------------------------------- --- Returns a Animation that was previously added.
--- If the name is not found it will return nil.
--- You should retain the returned copy if you are going to use it. -- @function [parent=#AnimationCache] getAnimation -- @param self --- @param #string name +-- @param #string str -- @return Animation#Animation ret (return value: cc.Animation) -------------------------------- --- Adds a Animation with a name. -- @function [parent=#AnimationCache] addAnimation -- @param self -- @param #cc.Animation animation --- @param #string name +-- @param #string str -------------------------------- --- -- @function [parent=#AnimationCache] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Adds an animation from an NSDictionary
--- Make sure that the frames were previously loaded in the SpriteFrameCache.
--- param plist The path of the relative file,it use to find the plist path for load SpriteFrames.
--- since v1.1 -- @function [parent=#AnimationCache] addAnimationsWithDictionary -- @param self --- @param #map_table dictionary --- @param #string plist +-- @param #map_table map +-- @param #string str -------------------------------- --- Deletes a Animation from the cache. -- @function [parent=#AnimationCache] removeAnimation -- @param self --- @param #string name +-- @param #string str -------------------------------- --- Adds an animation from a plist file.
--- Make sure that the frames were previously loaded in the SpriteFrameCache.
--- since v1.1
--- js addAnimations
--- lua addAnimations -- @function [parent=#AnimationCache] addAnimationsWithFile -- @param self --- @param #string plist +-- @param #string str -------------------------------- --- Purges the cache. It releases all the Animation objects and the shared instance. -- @function [parent=#AnimationCache] destroyInstance -- @param self -------------------------------- --- Returns the shared instance of the Animation cache -- @function [parent=#AnimationCache] getInstance -- @param self -- @return AnimationCache#AnimationCache ret (return value: cc.AnimationCache) -------------------------------- --- js ctor -- @function [parent=#AnimationCache] AnimationCache -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AnimationData.lua b/cocos/scripting/lua-bindings/auto/api/AnimationData.lua index 3ed39cf262..f261470ff1 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnimationData.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnimationData.lua @@ -5,32 +5,27 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#AnimationData] getMovement -- @param self --- @param #string movementName +-- @param #string str -- @return MovementData#MovementData ret (return value: ccs.MovementData) -------------------------------- --- -- @function [parent=#AnimationData] getMovementCount -- @param self -- @return long#long ret (return value: long) -------------------------------- --- -- @function [parent=#AnimationData] addMovement -- @param self --- @param #ccs.MovementData movData +-- @param #ccs.MovementData movementdata -------------------------------- --- -- @function [parent=#AnimationData] create -- @param self -- @return AnimationData#AnimationData ret (return value: ccs.AnimationData) -------------------------------- --- js ctor -- @function [parent=#AnimationData] AnimationData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua b/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua index 8a6609349b..9bdd79a93c 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#AnimationFrame] setSpriteFrame -- @param self --- @param #cc.SpriteFrame frame +-- @param #cc.SpriteFrame spriteframe -------------------------------- -- @overload self @@ -18,43 +17,36 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- --- Sets the units of time the frame takes -- @function [parent=#AnimationFrame] setDelayUnits -- @param self --- @param #float delayUnits +-- @param #float float -------------------------------- --- -- @function [parent=#AnimationFrame] clone -- @param self -- @return AnimationFrame#AnimationFrame ret (return value: cc.AnimationFrame) -------------------------------- --- -- @function [parent=#AnimationFrame] getSpriteFrame -- @param self -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- --- Gets the units of time the frame takes -- @function [parent=#AnimationFrame] getDelayUnits -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Sets user infomation -- @function [parent=#AnimationFrame] setUserInfo -- @param self --- @param #map_table userInfo +-- @param #map_table map -------------------------------- --- Creates the animation frame with a spriteframe, number of delay units and a notification user info
--- since 3.0 -- @function [parent=#AnimationFrame] create -- @param self --- @param #cc.SpriteFrame spriteFrame --- @param #float delayUnits --- @param #map_table userInfo +-- @param #cc.SpriteFrame spriteframe +-- @param #float float +-- @param #map_table map -- @return AnimationFrame#AnimationFrame ret (return value: cc.AnimationFrame) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Application.lua b/cocos/scripting/lua-bindings/auto/api/Application.lua index f458be4bee..ed1bc8e3e4 100644 --- a/cocos/scripting/lua-bindings/auto/api/Application.lua +++ b/cocos/scripting/lua-bindings/auto/api/Application.lua @@ -4,35 +4,26 @@ -- @parent_module cc -------------------------------- --- brief Get target platform -- @function [parent=#Application] getTargetPlatform -- @param self -- @return int#int ret (return value: int) -------------------------------- --- brief Get current language iso 639-1 code
--- return Current language iso 639-1 code -- @function [parent=#Application] getCurrentLanguageCode -- @param self -- @return char#char ret (return value: char) -------------------------------- --- brief Get current language config
--- return Current language config -- @function [parent=#Application] getCurrentLanguage -- @param self -- @return int#int ret (return value: int) -------------------------------- --- brief Callback by Director to limit FPS.
--- param interval The time, expressed in seconds, between current frame and next. -- @function [parent=#Application] setAnimationInterval -- @param self --- @param #double interval +-- @param #double double -------------------------------- --- brief Get current application instance.
--- return Current application instance pointer. -- @function [parent=#Application] getInstance -- @param self -- @return Application#Application ret (return value: cc.Application) diff --git a/cocos/scripting/lua-bindings/auto/api/Armature.lua b/cocos/scripting/lua-bindings/auto/api/Armature.lua index 6aa0fd389f..3a64f91aad 100644 --- a/cocos/scripting/lua-bindings/auto/api/Armature.lua +++ b/cocos/scripting/lua-bindings/auto/api/Armature.lua @@ -5,70 +5,55 @@ -- @parent_module ccs -------------------------------- --- Get a bone with the specified name
--- param name The bone's name you want to get -- @function [parent=#Armature] getBone -- @param self --- @param #string name +-- @param #string str -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- --- Change a bone's parent with the specified parent name.
--- param bone The bone you want to change parent
--- param parentName The new parent's name. -- @function [parent=#Armature] changeBoneParent -- @param self -- @param #ccs.Bone bone --- @param #string parentName +-- @param #string str -------------------------------- --- -- @function [parent=#Armature] setAnimation -- @param self --- @param #ccs.ArmatureAnimation animation +-- @param #ccs.ArmatureAnimation armatureanimation -------------------------------- --- -- @function [parent=#Armature] getBoneAtPoint -- @param self --- @param #float x --- @param #float y +-- @param #float float +-- @param #float float -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- --- -- @function [parent=#Armature] getArmatureTransformDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Armature] setVersion -- @param self --- @param #float version +-- @param #float float -------------------------------- --- Set contentsize and Calculate anchor point. -- @function [parent=#Armature] updateOffsetPoint -- @param self -------------------------------- --- -- @function [parent=#Armature] getParentBone -- @param self -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- --- Remove a bone with the specified name. If recursion it will also remove child Bone recursionly.
--- param bone The bone you want to remove
--- param recursion Determine whether remove the bone's child recursion. -- @function [parent=#Armature] removeBone -- @param self -- @param #ccs.Bone bone --- @param #bool recursion +-- @param #bool bool -------------------------------- --- -- @function [parent=#Armature] getBatchNode -- @param self -- @return BatchNode#BatchNode ret (return value: ccs.BatchNode) @@ -79,63 +64,51 @@ -- @overload self, string, ccs.Bone -- @function [parent=#Armature] init -- @param self --- @param #string name --- @param #ccs.Bone parentBone +-- @param #string str +-- @param #ccs.Bone bone -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#Armature] setParentBone -- @param self --- @param #ccs.Bone parentBone +-- @param #ccs.Bone bone -------------------------------- --- -- @function [parent=#Armature] drawContour -- @param self -------------------------------- --- -- @function [parent=#Armature] setBatchNode -- @param self --- @param #ccs.BatchNode batchNode +-- @param #ccs.BatchNode batchnode -------------------------------- --- -- @function [parent=#Armature] setArmatureData -- @param self --- @param #ccs.ArmatureData armatureData +-- @param #ccs.ArmatureData armaturedata -------------------------------- --- Add a Bone to this Armature,
--- param bone The Bone you want to add to Armature
--- param parentName The parent Bone's name you want to add to . If it's nullptr, then set Armature to its parent -- @function [parent=#Armature] addBone -- @param self -- @param #ccs.Bone bone --- @param #string parentName +-- @param #string str -------------------------------- --- -- @function [parent=#Armature] getArmatureData -- @param self -- @return ArmatureData#ArmatureData ret (return value: ccs.ArmatureData) -------------------------------- --- -- @function [parent=#Armature] getVersion -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Armature] getAnimation -- @param self -- @return ArmatureAnimation#ArmatureAnimation ret (return value: ccs.ArmatureAnimation) -------------------------------- --- Get Armature's bone dictionary
--- return Armature's bone dictionary -- @function [parent=#Armature] getBoneDic -- @param self -- @return map_table#map_table ret (return value: map_table) @@ -146,50 +119,43 @@ -- @overload self, string, ccs.Bone -- @function [parent=#Armature] create -- @param self --- @param #string name --- @param #ccs.Bone parentBone +-- @param #string str +-- @param #ccs.Bone bone -- @return Armature#Armature ret (retunr value: ccs.Armature) -------------------------------- --- -- @function [parent=#Armature] setAnchorPoint -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#Armature] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#Armature] getAnchorPointInPoints -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#Armature] update -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#Armature] getNodeToParentTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- This boundingBox will calculate all bones' boundingBox every time -- @function [parent=#Armature] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- js ctor -- @function [parent=#Armature] Armature -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua index 6fdfc0e155..66320119c5 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua @@ -5,140 +5,103 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ArmatureAnimation] getSpeedScale -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Pause the Process -- @function [parent=#ArmatureAnimation] pause -- @param self -------------------------------- --- Scale animation play speed.
--- param animationScale Scale value -- @function [parent=#ArmatureAnimation] setSpeedScale -- @param self --- @param #float speedScale +-- @param #float float -------------------------------- --- Init with a Armature
--- param armature The Armature ArmatureAnimation will bind to -- @function [parent=#ArmatureAnimation] init -- @param self -- @param #ccs.Armature armature -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ArmatureAnimation] playWithIndexes -- @param self --- @param #array_table movementIndexes --- @param #int durationTo --- @param #bool loop +-- @param #array_table array +-- @param #int int +-- @param #bool bool -------------------------------- --- Play animation by animation name.
--- param animationName The animation name you want to play
--- param durationTo The frames between two animation changing-over.
--- It's meaning is changing to this animation need how many frames
--- -1 : use the value from MovementData get from flash design panel
--- param loop Whether the animation is loop
--- loop < 0 : use the value from MovementData get from flash design panel
--- loop = 0 : this animation is not loop
--- loop > 0 : this animation is loop -- @function [parent=#ArmatureAnimation] play -- @param self --- @param #string animationName --- @param #int durationTo --- @param #int loop +-- @param #string str +-- @param #int int +-- @param #int int -------------------------------- --- Go to specified frame and pause current movement. -- @function [parent=#ArmatureAnimation] gotoAndPause -- @param self --- @param #int frameIndex +-- @param #int int -------------------------------- --- Resume the Process -- @function [parent=#ArmatureAnimation] resume -- @param self -------------------------------- --- Stop the Process -- @function [parent=#ArmatureAnimation] stop -- @param self -------------------------------- --- -- @function [parent=#ArmatureAnimation] update -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#ArmatureAnimation] getAnimationData -- @param self -- @return AnimationData#AnimationData ret (return value: ccs.AnimationData) -------------------------------- --- -- @function [parent=#ArmatureAnimation] playWithIndex -- @param self --- @param #int animationIndex --- @param #int durationTo --- @param #int loop +-- @param #int int +-- @param #int int +-- @param #int int -------------------------------- --- Get current movementID
--- return The name of current movement -- @function [parent=#ArmatureAnimation] getCurrentMovementID -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#ArmatureAnimation] setAnimationData -- @param self --- @param #ccs.AnimationData data +-- @param #ccs.AnimationData animationdata -------------------------------- --- Go to specified frame and play current movement.
--- You need first switch to the movement you want to play, then call this function.
--- example : playByIndex(0);
--- gotoAndPlay(0);
--- playByIndex(1);
--- gotoAndPlay(0);
--- gotoAndPlay(15); -- @function [parent=#ArmatureAnimation] gotoAndPlay -- @param self --- @param #int frameIndex +-- @param #int int -------------------------------- --- -- @function [parent=#ArmatureAnimation] playWithNames -- @param self --- @param #array_table movementNames --- @param #int durationTo --- @param #bool loop +-- @param #array_table array +-- @param #int int +-- @param #bool bool -------------------------------- --- Get movement count -- @function [parent=#ArmatureAnimation] getMovementCount -- @param self -- @return long#long ret (return value: long) -------------------------------- --- Create with a Armature
--- param armature The Armature ArmatureAnimation will bind to -- @function [parent=#ArmatureAnimation] create -- @param self -- @param #ccs.Armature armature -- @return ArmatureAnimation#ArmatureAnimation ret (return value: ccs.ArmatureAnimation) -------------------------------- --- js ctor -- @function [parent=#ArmatureAnimation] ArmatureAnimation -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua index d22ae806e0..d8558c9910 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua @@ -5,32 +5,27 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ArmatureData] addBoneData -- @param self --- @param #ccs.BoneData boneData +-- @param #ccs.BoneData bonedata -------------------------------- --- -- @function [parent=#ArmatureData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ArmatureData] getBoneData -- @param self --- @param #string boneName +-- @param #string str -- @return BoneData#BoneData ret (return value: ccs.BoneData) -------------------------------- --- -- @function [parent=#ArmatureData] create -- @param self -- @return ArmatureData#ArmatureData ret (return value: ccs.ArmatureData) -------------------------------- --- js ctor -- @function [parent=#ArmatureData] ArmatureData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua index 690de6110a..8afaf2f804 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua @@ -5,143 +5,110 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ArmatureDataManager] getAnimationDatas -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- --- brief remove animation data
--- param id the id of the animation data -- @function [parent=#ArmatureDataManager] removeAnimationData -- @param self --- @param #string id +-- @param #string str -------------------------------- --- Add armature data
--- param id The id of the armature data
--- param armatureData ArmatureData * -- @function [parent=#ArmatureDataManager] addArmatureData -- @param self --- @param #string id --- @param #ccs.ArmatureData armatureData --- @param #string configFilePath +-- @param #string str +-- @param #ccs.ArmatureData armaturedata +-- @param #string str -------------------------------- -- @overload self, string, string, string -- @overload self, string -- @function [parent=#ArmatureDataManager] addArmatureFileInfo -- @param self --- @param #string imagePath --- @param #string plistPath --- @param #string configFilePath +-- @param #string str +-- @param #string str +-- @param #string str -------------------------------- --- -- @function [parent=#ArmatureDataManager] removeArmatureFileInfo -- @param self --- @param #string configFilePath +-- @param #string str -------------------------------- --- -- @function [parent=#ArmatureDataManager] getTextureDatas -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- --- brief get texture data
--- param id the id of the texture data you want to get
--- return TextureData * -- @function [parent=#ArmatureDataManager] getTextureData -- @param self --- @param #string id +-- @param #string str -- @return TextureData#TextureData ret (return value: ccs.TextureData) -------------------------------- --- brief get armature data
--- param id the id of the armature data you want to get
--- return ArmatureData * -- @function [parent=#ArmatureDataManager] getArmatureData -- @param self --- @param #string id +-- @param #string str -- @return ArmatureData#ArmatureData ret (return value: ccs.ArmatureData) -------------------------------- --- brief get animation data from _animationDatas(Dictionary)
--- param id the id of the animation data you want to get
--- return AnimationData * -- @function [parent=#ArmatureDataManager] getAnimationData -- @param self --- @param #string id +-- @param #string str -- @return AnimationData#AnimationData ret (return value: ccs.AnimationData) -------------------------------- --- brief add animation data
--- param id the id of the animation data
--- return AnimationData * -- @function [parent=#ArmatureDataManager] addAnimationData -- @param self --- @param #string id --- @param #ccs.AnimationData animationData --- @param #string configFilePath +-- @param #string str +-- @param #ccs.AnimationData animationdata +-- @param #string str -------------------------------- --- Init ArmatureDataManager -- @function [parent=#ArmatureDataManager] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- brief remove armature data
--- param id the id of the armature data you want to get -- @function [parent=#ArmatureDataManager] removeArmatureData -- @param self --- @param #string id +-- @param #string str -------------------------------- --- -- @function [parent=#ArmatureDataManager] getArmatureDatas -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- --- brief remove texture data
--- param id the id of the texture data you want to get -- @function [parent=#ArmatureDataManager] removeTextureData -- @param self --- @param #string id +-- @param #string str -------------------------------- --- brief add texture data
--- param id the id of the texture data
--- return TextureData * -- @function [parent=#ArmatureDataManager] addTextureData -- @param self --- @param #string id --- @param #ccs.TextureData textureData --- @param #string configFilePath +-- @param #string str +-- @param #ccs.TextureData texturedata +-- @param #string str -------------------------------- --- brief Juge whether or not need auto load sprite file -- @function [parent=#ArmatureDataManager] isAutoLoadSpriteFile -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- brief Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name -- @function [parent=#ArmatureDataManager] addSpriteFrameFromFile -- @param self --- @param #string plistPath --- @param #string imagePath --- @param #string configFilePath +-- @param #string str +-- @param #string str +-- @param #string str -------------------------------- --- -- @function [parent=#ArmatureDataManager] destroyInstance -- @param self -------------------------------- --- -- @function [parent=#ArmatureDataManager] getInstance -- @param self -- @return ArmatureDataManager#ArmatureDataManager ret (return value: ccs.ArmatureDataManager) diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua index 5fcd62e60d..450e398de0 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua @@ -5,13 +5,11 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ArmatureDisplayData] create -- @param self -- @return ArmatureDisplayData#ArmatureDisplayData ret (return value: ccs.ArmatureDisplayData) -------------------------------- --- js ctor -- @function [parent=#ArmatureDisplayData] ArmatureDisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua b/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua index c5ae73f466..364244e06f 100644 --- a/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua @@ -5,89 +5,75 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#AssetsManager] setStoragePath -- @param self --- @param #char storagePath +-- @param #char char -------------------------------- --- -- @function [parent=#AssetsManager] setPackageUrl -- @param self --- @param #char packageUrl +-- @param #char char -------------------------------- --- -- @function [parent=#AssetsManager] checkUpdate -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#AssetsManager] getStoragePath -- @param self -- @return char#char ret (return value: char) -------------------------------- --- -- @function [parent=#AssetsManager] update -- @param self -------------------------------- --- @brief Sets connection time out in seconds -- @function [parent=#AssetsManager] setConnectionTimeout -- @param self --- @param #unsigned int timeout +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#AssetsManager] setVersionFileUrl -- @param self --- @param #char versionFileUrl +-- @param #char char -------------------------------- --- -- @function [parent=#AssetsManager] getPackageUrl -- @param self -- @return char#char ret (return value: char) -------------------------------- --- @brief Gets connection time out in secondes -- @function [parent=#AssetsManager] getConnectionTimeout -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- -- @function [parent=#AssetsManager] getVersion -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#AssetsManager] getVersionFileUrl -- @param self -- @return char#char ret (return value: char) -------------------------------- --- -- @function [parent=#AssetsManager] deleteVersion -- @param self -------------------------------- --- -- @function [parent=#AssetsManager] create -- @param self --- @param #char packageUrl --- @param #char versionFileUrl --- @param #char storagePath --- @param #function errorCallback --- @param #function progressCallback --- @param #function successCallback +-- @param #char char +-- @param #char char +-- @param #char char +-- @param #function func +-- @param #function func +-- @param #function func -- @return AssetsManager#AssetsManager ret (return value: cc.AssetsManager) -------------------------------- --- -- @function [parent=#AssetsManager] AssetsManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua b/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua index e035dc27a9..d0a1fbd5b8 100644 --- a/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua @@ -5,93 +5,78 @@ -- @parent_module cc -------------------------------- --- updates the Atlas (indexed vertex array).
--- Shall be overridden in subclasses -- @function [parent=#AtlasNode] updateAtlasValues -- @param self -------------------------------- --- -- @function [parent=#AtlasNode] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- --- -- @function [parent=#AtlasNode] setTextureAtlas -- @param self --- @param #cc.TextureAtlas textureAtlas +-- @param #cc.TextureAtlas textureatlas -------------------------------- --- -- @function [parent=#AtlasNode] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- --- -- @function [parent=#AtlasNode] getQuadsToDraw -- @param self -- @return long#long ret (return value: long) -------------------------------- --- -- @function [parent=#AtlasNode] setTexture -- @param self --- @param #cc.Texture2D texture +-- @param #cc.Texture2D texture2d -------------------------------- --- -- @function [parent=#AtlasNode] setQuadsToDraw -- @param self --- @param #long quadsToDraw +-- @param #long long -------------------------------- --- creates a AtlasNode with an Atlas file the width and height of each item and the quantity of items to render -- @function [parent=#AtlasNode] create -- @param self --- @param #string filename --- @param #int tileWidth --- @param #int tileHeight --- @param #int itemsToRender +-- @param #string str +-- @param #int int +-- @param #int int +-- @param #int int -- @return AtlasNode#AtlasNode ret (return value: cc.AtlasNode) -------------------------------- --- -- @function [parent=#AtlasNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#AtlasNode] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#AtlasNode] setColor -- @param self --- @param #color3b_table color +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#AtlasNode] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- -- @function [parent=#AtlasNode] setOpacityModifyRGB -- @param self --- @param #bool isOpacityModifyRGB +-- @param #bool bool -------------------------------- --- -- @function [parent=#AtlasNode] setOpacity -- @param self --- @param #unsigned char opacity +-- @param #unsigned char char return nil diff --git a/cocos/scripting/lua-bindings/auto/api/AttachNode.lua b/cocos/scripting/lua-bindings/auto/api/AttachNode.lua index e61a0d0d48..dca12cf579 100644 --- a/cocos/scripting/lua-bindings/auto/api/AttachNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/AttachNode.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- creates an AttachNode
--- param attachBone The bone to which the AttachNode is going to attach, the attacheBone must be a bone of the AttachNode's parent -- @function [parent=#AttachNode] create -- @param self --- @param #cc.Bone3D attachBone +-- @param #cc.Bone3D bone3d -- @return AttachNode#AttachNode ret (return value: cc.AttachNode) -------------------------------- --- -- @function [parent=#AttachNode] getWorldToNodeTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- -- @function [parent=#AttachNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags +-- @param #mat4_table mat4 +-- @param #unsigned int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/BaseData.lua b/cocos/scripting/lua-bindings/auto/api/BaseData.lua index 78f4aafeff..2d2d36b6a1 100644 --- a/cocos/scripting/lua-bindings/auto/api/BaseData.lua +++ b/cocos/scripting/lua-bindings/auto/api/BaseData.lua @@ -5,25 +5,21 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#BaseData] getColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- --- -- @function [parent=#BaseData] setColor -- @param self --- @param #color4b_table color +-- @param #color4b_table color4b -------------------------------- --- -- @function [parent=#BaseData] create -- @param self -- @return BaseData#BaseData ret (return value: ccs.BaseData) -------------------------------- --- js ctor -- @function [parent=#BaseData] BaseData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/BatchNode.lua b/cocos/scripting/lua-bindings/auto/api/BatchNode.lua index 3e153863a9..dfb42d2e5e 100644 --- a/cocos/scripting/lua-bindings/auto/api/BatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/BatchNode.lua @@ -5,13 +5,11 @@ -- @parent_module ccs -------------------------------- --- js NA -- @function [parent=#BatchNode] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#BatchNode] create -- @param self -- @return BatchNode#BatchNode ret (return value: ccs.BatchNode) @@ -21,23 +19,21 @@ -- @overload self, cc.Node, int, int -- @function [parent=#BatchNode] addChild -- @param self --- @param #cc.Node pChild --- @param #int zOrder --- @param #int tag +-- @param #cc.Node node +-- @param #int int +-- @param #int int -------------------------------- --- -- @function [parent=#BatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#BatchNode] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleanup +-- @param #cc.Node node +-- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/BezierBy.lua b/cocos/scripting/lua-bindings/auto/api/BezierBy.lua index 85dc00405e..ed228fd60c 100644 --- a/cocos/scripting/lua-bindings/auto/api/BezierBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/BezierBy.lua @@ -5,27 +5,23 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#BezierBy] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#BezierBy] clone -- @param self -- @return BezierBy#BezierBy ret (return value: cc.BezierBy) -------------------------------- --- -- @function [parent=#BezierBy] reverse -- @param self -- @return BezierBy#BezierBy ret (return value: cc.BezierBy) -------------------------------- --- -- @function [parent=#BezierBy] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/BezierTo.lua b/cocos/scripting/lua-bindings/auto/api/BezierTo.lua index 6499108d03..5bec1c1882 100644 --- a/cocos/scripting/lua-bindings/auto/api/BezierTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/BezierTo.lua @@ -5,19 +5,16 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#BezierTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#BezierTo] clone -- @param self -- @return BezierTo#BezierTo ret (return value: cc.BezierTo) -------------------------------- --- -- @function [parent=#BezierTo] reverse -- @param self -- @return BezierTo#BezierTo ret (return value: cc.BezierTo) diff --git a/cocos/scripting/lua-bindings/auto/api/Blink.lua b/cocos/scripting/lua-bindings/auto/api/Blink.lua index d63a7f8329..91bbeeee69 100644 --- a/cocos/scripting/lua-bindings/auto/api/Blink.lua +++ b/cocos/scripting/lua-bindings/auto/api/Blink.lua @@ -5,40 +5,34 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#Blink] create -- @param self --- @param #float duration --- @param #int blinks +-- @param #float float +-- @param #int int -- @return Blink#Blink ret (return value: cc.Blink) -------------------------------- --- -- @function [parent=#Blink] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#Blink] clone -- @param self -- @return Blink#Blink ret (return value: cc.Blink) -------------------------------- --- -- @function [parent=#Blink] stop -- @param self -------------------------------- --- -- @function [parent=#Blink] reverse -- @param self -- @return Blink#Blink ret (return value: cc.Blink) -------------------------------- --- -- @function [parent=#Blink] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Bone.lua b/cocos/scripting/lua-bindings/auto/api/Bone.lua index 99606c4270..9b646e61db 100644 --- a/cocos/scripting/lua-bindings/auto/api/Bone.lua +++ b/cocos/scripting/lua-bindings/auto/api/Bone.lua @@ -5,200 +5,163 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#Bone] isTransformDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Bone] isIgnoreMovementBoneData -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Update zorder -- @function [parent=#Bone] updateZOrder -- @param self -------------------------------- --- -- @function [parent=#Bone] getDisplayRenderNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#Bone] isBlendDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Add a child to this bone, and it will let this child call setParent(Bone *parent) function to set self to it's parent
--- param child the child you want to add -- @function [parent=#Bone] addChildBone -- @param self --- @param #ccs.Bone child +-- @param #ccs.Bone bone -------------------------------- --- -- @function [parent=#Bone] getWorldInfo -- @param self -- @return BaseData#BaseData ret (return value: ccs.BaseData) -------------------------------- --- -- @function [parent=#Bone] getTween -- @param self -- @return Tween#Tween ret (return value: ccs.Tween) -------------------------------- --- Get parent bone
--- return parent bone -- @function [parent=#Bone] getParentBone -- @param self -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- --- Update color to render display -- @function [parent=#Bone] updateColor -- @param self -------------------------------- --- -- @function [parent=#Bone] setTransformDirty -- @param self --- @param #bool dirty +-- @param #bool bool -------------------------------- --- -- @function [parent=#Bone] getDisplayRenderNodeType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Bone] removeDisplay -- @param self --- @param #int index +-- @param #int int -------------------------------- --- -- @function [parent=#Bone] setBoneData -- @param self --- @param #ccs.BoneData boneData +-- @param #ccs.BoneData bonedata -------------------------------- -- @overload self, string -- @overload self -- @function [parent=#Bone] init -- @param self --- @param #string name +-- @param #string str -- @return bool#bool ret (retunr value: bool) -------------------------------- --- Set parent bone.
--- If parent is NUll, then also remove this bone from armature.
--- It will not set the Armature, if you want to add the bone to a Armature, you should use Armature::addBone(Bone *bone, const char* parentName).
--- param parent the parent bone.
--- nullptr : remove this bone from armature -- @function [parent=#Bone] setParentBone -- @param self --- @param #ccs.Bone parent +-- @param #ccs.Bone bone -------------------------------- -- @overload self, cc.Node, int -- @overload self, ccs.DisplayData, int -- @function [parent=#Bone] addDisplay -- @param self --- @param #ccs.DisplayData displayData --- @param #int index +-- @param #ccs.DisplayData displaydata +-- @param #int int -------------------------------- --- Remove itself from its parent.
--- param recursion whether or not to remove childBone's display -- @function [parent=#Bone] removeFromParent -- @param self --- @param #bool recursion +-- @param #bool bool -------------------------------- --- -- @function [parent=#Bone] getColliderDetector -- @param self -- @return ColliderDetector#ColliderDetector ret (return value: ccs.ColliderDetector) -------------------------------- --- -- @function [parent=#Bone] getChildArmature -- @param self -- @return Armature#Armature ret (return value: ccs.Armature) -------------------------------- --- -- @function [parent=#Bone] getTweenData -- @param self -- @return FrameData#FrameData ret (return value: ccs.FrameData) -------------------------------- --- -- @function [parent=#Bone] changeDisplayWithIndex -- @param self --- @param #int index --- @param #bool force +-- @param #int int +-- @param #bool bool -------------------------------- --- -- @function [parent=#Bone] changeDisplayWithName -- @param self --- @param #string name --- @param #bool force +-- @param #string str +-- @param #bool bool -------------------------------- --- -- @function [parent=#Bone] setArmature -- @param self -- @param #ccs.Armature armature -------------------------------- --- -- @function [parent=#Bone] setBlendDirty -- @param self --- @param #bool dirty +-- @param #bool bool -------------------------------- --- Removes a child Bone
--- param bone the bone you want to remove -- @function [parent=#Bone] removeChildBone -- @param self -- @param #ccs.Bone bone --- @param #bool recursion +-- @param #bool bool -------------------------------- --- -- @function [parent=#Bone] setChildArmature -- @param self --- @param #ccs.Armature childArmature +-- @param #ccs.Armature armature -------------------------------- --- -- @function [parent=#Bone] getNodeToArmatureTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- -- @function [parent=#Bone] getDisplayManager -- @param self -- @return DisplayManager#DisplayManager ret (return value: ccs.DisplayManager) -------------------------------- --- -- @function [parent=#Bone] getArmature -- @param self -- @return Armature#Armature ret (return value: ccs.Armature) -------------------------------- --- -- @function [parent=#Bone] getBoneData -- @param self -- @return BoneData#BoneData ret (return value: ccs.BoneData) @@ -208,41 +171,35 @@ -- @overload self -- @function [parent=#Bone] create -- @param self --- @param #string name +-- @param #string str -- @return Bone#Bone ret (retunr value: ccs.Bone) -------------------------------- --- -- @function [parent=#Bone] updateDisplayedColor -- @param self --- @param #color3b_table parentColor +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#Bone] setLocalZOrder -- @param self --- @param #int zOrder +-- @param #int int -------------------------------- --- -- @function [parent=#Bone] getNodeToWorldTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- -- @function [parent=#Bone] update -- @param self --- @param #float delta +-- @param #float float -------------------------------- --- -- @function [parent=#Bone] updateDisplayedOpacity -- @param self --- @param #unsigned char parentOpacity +-- @param #unsigned char char -------------------------------- --- js ctor -- @function [parent=#Bone] Bone -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/BoneData.lua b/cocos/scripting/lua-bindings/auto/api/BoneData.lua index 7cc0750efb..2b4eea933a 100644 --- a/cocos/scripting/lua-bindings/auto/api/BoneData.lua +++ b/cocos/scripting/lua-bindings/auto/api/BoneData.lua @@ -5,32 +5,27 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#BoneData] getDisplayData -- @param self --- @param #int index +-- @param #int int -- @return DisplayData#DisplayData ret (return value: ccs.DisplayData) -------------------------------- --- -- @function [parent=#BoneData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#BoneData] addDisplayData -- @param self --- @param #ccs.DisplayData displayData +-- @param #ccs.DisplayData displaydata -------------------------------- --- -- @function [parent=#BoneData] create -- @param self -- @return BoneData#BoneData ret (return value: ccs.BoneData) -------------------------------- --- js ctor -- @function [parent=#BoneData] BoneData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Button.lua b/cocos/scripting/lua-bindings/auto/api/Button.lua index 544762f02c..b0212c1988 100644 --- a/cocos/scripting/lua-bindings/auto/api/Button.lua +++ b/cocos/scripting/lua-bindings/auto/api/Button.lua @@ -5,215 +5,168 @@ -- @parent_module ccui -------------------------------- --- -- @function [parent=#Button] getTitleText -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Button] setTitleFontSize -- @param self --- @param #float size +-- @param #float float -------------------------------- --- Sets if button is using scale9 renderer.
--- param true that using scale9 renderer, false otherwise. -- @function [parent=#Button] setScale9Enabled -- @param self --- @param #bool able +-- @param #bool bool -------------------------------- --- brief Return a zoom scale -- @function [parent=#Button] getZoomScale -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Button] getCapInsetsDisabledRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- -- @function [parent=#Button] setTitleColor -- @param self --- @param #color3b_table color +-- @param #color3b_table color3b -------------------------------- --- Sets capinsets for button, if button is using scale9 renderer.
--- param capInsets capinsets for button -- @function [parent=#Button] setCapInsetsDisabledRenderer -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -------------------------------- --- Sets capinsets for button, if button is using scale9 renderer.
--- param capInsets capinsets for button -- @function [parent=#Button] setCapInsets -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -------------------------------- --- Load dark state texture for button.
--- param disabled dark state texture.
--- param texType @see TextureResType -- @function [parent=#Button] loadTextureDisabled -- @param self --- @param #string disabled --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- -- @function [parent=#Button] setTitleText -- @param self --- @param #string text +-- @param #string str -------------------------------- --- Sets capinsets for button, if button is using scale9 renderer.
--- param capInsets capinsets for button -- @function [parent=#Button] setCapInsetsNormalRenderer -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -------------------------------- --- Load selected state texture for button.
--- param selected selected state texture.
--- param texType @see TextureResType -- @function [parent=#Button] loadTexturePressed -- @param self --- @param #string selected --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- -- @function [parent=#Button] setTitleFontName -- @param self --- @param #string fontName +-- @param #string str -------------------------------- --- -- @function [parent=#Button] getCapInsetsNormalRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- -- @function [parent=#Button] getCapInsetsPressedRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- Load textures for button.
--- param normal normal state texture name.
--- param selected selected state texture name.
--- param disabled disabled state texture name.
--- param texType @see TextureResType -- @function [parent=#Button] loadTextures -- @param self --- @param #string normal --- @param #string selected --- @param #string disabled --- @param #int texType +-- @param #string str +-- @param #string str +-- @param #string str +-- @param #int texturerestype -------------------------------- --- -- @function [parent=#Button] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Load normal state texture for button.
--- param normal normal state texture.
--- param texType @see TextureResType -- @function [parent=#Button] loadTextureNormal -- @param self --- @param #string normal --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Sets capinsets for button, if button is using scale9 renderer.
--- param capInsets capinsets for button -- @function [parent=#Button] setCapInsetsPressedRenderer -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -------------------------------- --- -- @function [parent=#Button] getTitleFontSize -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Button] getTitleFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Button] getTitleColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- Changes if button can be clicked zoom effect.
--- param true that can be clicked zoom effect, false otherwise. -- @function [parent=#Button] setPressedActionEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- When user pressed the button, the button will zoom to a scale.
--- The final scale of the button equals (button original scale + _zoomScale) -- @function [parent=#Button] setZoomScale -- @param self --- @param #float scale +-- @param #float float -------------------------------- -- @overload self, string, string, string, int -- @overload self -- @function [parent=#Button] create -- @param self --- @param #string normalImage --- @param #string selectedImage --- @param #string disableImage --- @param #int texType +-- @param #string str +-- @param #string str +-- @param #string str +-- @param #int texturerestype -- @return Button#Button ret (retunr value: ccui.Button) -------------------------------- --- -- @function [parent=#Button] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#Button] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#Button] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Button] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#Button] ignoreContentAdaptWithSize -- @param self --- @param #bool ignore +-- @param #bool bool -------------------------------- --- Default constructor -- @function [parent=#Button] Button -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua b/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua index eddeeae1bd..1238d0c551 100644 --- a/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua @@ -5,234 +5,197 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#CCBAnimationManager] moveAnimationsFromNode -- @param self --- @param #cc.Node fromNode --- @param #cc.Node toNode +-- @param #cc.Node node +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#CCBAnimationManager] setAutoPlaySequenceId -- @param self --- @param #int autoPlaySequenceId +-- @param #int int -------------------------------- --- -- @function [parent=#CCBAnimationManager] getDocumentCallbackNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBAnimationManager] actionForSoundChannel -- @param self --- @param #cc.CCBSequenceProperty channel +-- @param #cc.CCBSequenceProperty ccbsequenceproperty -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- --- -- @function [parent=#CCBAnimationManager] setBaseValue -- @param self -- @param #cc.Value value --- @param #cc.Node pNode --- @param #string propName +-- @param #cc.Node node +-- @param #string str -------------------------------- --- -- @function [parent=#CCBAnimationManager] getDocumentOutletNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBAnimationManager] getLastCompletedSequenceName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#CCBAnimationManager] setRootNode -- @param self --- @param #cc.Node pRootNode +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#CCBAnimationManager] runAnimationsForSequenceNamedTweenDuration -- @param self --- @param #char pName --- @param #float fTweenDuration +-- @param #char char +-- @param #float float -------------------------------- --- -- @function [parent=#CCBAnimationManager] addDocumentOutletName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- -- @function [parent=#CCBAnimationManager] getSequences -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBAnimationManager] getRootContainerSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#CCBAnimationManager] setDocumentControllerName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- -- @function [parent=#CCBAnimationManager] setObject -- @param self --- @param #cc.Ref obj --- @param #cc.Node pNode --- @param #string propName +-- @param #cc.Ref ref +-- @param #cc.Node node +-- @param #string str -------------------------------- --- -- @function [parent=#CCBAnimationManager] getContainerSize -- @param self --- @param #cc.Node pNode +-- @param #cc.Node node -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#CCBAnimationManager] actionForCallbackChannel -- @param self --- @param #cc.CCBSequenceProperty channel +-- @param #cc.CCBSequenceProperty ccbsequenceproperty -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- --- -- @function [parent=#CCBAnimationManager] getDocumentOutletNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBAnimationManager] addDocumentCallbackControlEvents -- @param self --- @param #int eventType +-- @param #int eventtype -------------------------------- --- -- @function [parent=#CCBAnimationManager] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#CCBAnimationManager] getKeyframeCallbacks -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBAnimationManager] getDocumentCallbackControlEvents -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBAnimationManager] setRootContainerSize -- @param self --- @param #size_table rootContainerSize +-- @param #size_table size -------------------------------- --- -- @function [parent=#CCBAnimationManager] runAnimationsForSequenceIdTweenDuration -- @param self --- @param #int nSeqId --- @param #float fTweenDuraiton +-- @param #int int +-- @param #float float -------------------------------- --- -- @function [parent=#CCBAnimationManager] getRunningSequenceName -- @param self -- @return char#char ret (return value: char) -------------------------------- --- -- @function [parent=#CCBAnimationManager] getAutoPlaySequenceId -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#CCBAnimationManager] addDocumentCallbackName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- -- @function [parent=#CCBAnimationManager] getRootNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#CCBAnimationManager] addDocumentOutletNode -- @param self -- @param #cc.Node node -------------------------------- --- -- @function [parent=#CCBAnimationManager] getSequenceDuration -- @param self --- @param #char pSequenceName +-- @param #char char -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#CCBAnimationManager] addDocumentCallbackNode -- @param self -- @param #cc.Node node -------------------------------- --- -- @function [parent=#CCBAnimationManager] runAnimationsForSequenceNamed -- @param self --- @param #char pName +-- @param #char char -------------------------------- --- -- @function [parent=#CCBAnimationManager] getSequenceId -- @param self --- @param #char pSequenceName +-- @param #char char -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#CCBAnimationManager] getDocumentCallbackNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBAnimationManager] setSequences -- @param self --- @param #array_table seq +-- @param #array_table array -------------------------------- --- -- @function [parent=#CCBAnimationManager] debug -- @param self -------------------------------- --- -- @function [parent=#CCBAnimationManager] getDocumentControllerName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- js ctor -- @function [parent=#CCBAnimationManager] CCBAnimationManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CCBReader.lua b/cocos/scripting/lua-bindings/auto/api/CCBReader.lua index 78fba9b128..b6fe92d042 100644 --- a/cocos/scripting/lua-bindings/auto/api/CCBReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/CCBReader.lua @@ -5,122 +5,101 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#CCBReader] addOwnerOutletName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- -- @function [parent=#CCBReader] getOwnerCallbackNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBReader] addDocumentCallbackControlEvents -- @param self --- @param #int eventType +-- @param #int eventtype -------------------------------- --- -- @function [parent=#CCBReader] setCCBRootPath -- @param self --- @param #char ccbRootPath +-- @param #char char -------------------------------- --- -- @function [parent=#CCBReader] addOwnerOutletNode -- @param self -- @param #cc.Node node -------------------------------- --- -- @function [parent=#CCBReader] getOwnerCallbackNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBReader] readSoundKeyframesForSeq -- @param self --- @param #cc.CCBSequence seq +-- @param #cc.CCBSequence ccbsequence -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#CCBReader] getCCBRootPath -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#CCBReader] getOwnerCallbackControlEvents -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBReader] getOwnerOutletNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBReader] readUTF8 -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#CCBReader] addOwnerCallbackControlEvents -- @param self --- @param #int type +-- @param #int eventtype -------------------------------- --- -- @function [parent=#CCBReader] getOwnerOutletNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- js setActionManager
--- lua setActionManager -- @function [parent=#CCBReader] setAnimationManager -- @param self --- @param #cc.CCBAnimationManager pAnimationManager +-- @param #cc.CCBAnimationManager ccbanimationmanager -------------------------------- --- -- @function [parent=#CCBReader] readCallbackKeyframesForSeq -- @param self --- @param #cc.CCBSequence seq +-- @param #cc.CCBSequence ccbsequence -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#CCBReader] getAnimationManagersForNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#CCBReader] getNodesWithAnimationManagers -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- js getActionManager
--- lua getActionManager -- @function [parent=#CCBReader] getAnimationManager -- @param self -- @return CCBAnimationManager#CCBAnimationManager ret (return value: cc.CCBAnimationManager) -------------------------------- --- -- @function [parent=#CCBReader] setResolutionScale -- @param self --- @param #float scale +-- @param #float float -------------------------------- -- @overload self, cc.CCBReader @@ -128,9 +107,9 @@ -- @overload self -- @function [parent=#CCBReader] CCBReader -- @param self --- @param #cc.NodeLoaderLibrary pNodeLoaderLibrary --- @param #cc.CCBMemberVariableAssigner pCCBMemberVariableAssigner --- @param #cc.CCBSelectorResolver pCCBSelectorResolver --- @param #cc.NodeLoaderListener pNodeLoaderListener +-- @param #cc.NodeLoaderLibrary nodeloaderlibrary +-- @param #cc.CCBMemberVariableAssigner ccbmembervariableassigner +-- @param #cc.CCBSelectorResolver ccbselectorresolver +-- @param #cc.NodeLoaderListener nodeloaderlistener return nil diff --git a/cocos/scripting/lua-bindings/auto/api/CallFunc.lua b/cocos/scripting/lua-bindings/auto/api/CallFunc.lua index 678814b81e..f45623fe4b 100644 --- a/cocos/scripting/lua-bindings/auto/api/CallFunc.lua +++ b/cocos/scripting/lua-bindings/auto/api/CallFunc.lua @@ -5,36 +5,30 @@ -- @parent_module cc -------------------------------- --- executes the callback -- @function [parent=#CallFunc] execute -- @param self -------------------------------- --- -- @function [parent=#CallFunc] getTargetCallback -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#CallFunc] setTargetCallback -- @param self --- @param #cc.Ref sel +-- @param #cc.Ref ref -------------------------------- --- -- @function [parent=#CallFunc] clone -- @param self -- @return CallFunc#CallFunc ret (return value: cc.CallFunc) -------------------------------- --- -- @function [parent=#CallFunc] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#CallFunc] reverse -- @param self -- @return CallFunc#CallFunc ret (return value: cc.CallFunc) diff --git a/cocos/scripting/lua-bindings/auto/api/Camera.lua b/cocos/scripting/lua-bindings/auto/api/Camera.lua index 8f80b80254..af10889528 100644 --- a/cocos/scripting/lua-bindings/auto/api/Camera.lua +++ b/cocos/scripting/lua-bindings/auto/api/Camera.lua @@ -5,108 +5,79 @@ -- @parent_module cc -------------------------------- --- Gets the camera's projection matrix.
--- return The camera projection matrix. -- @function [parent=#Camera] getProjectionMatrix -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- get view projection matrix -- @function [parent=#Camera] getViewProjectionMatrix -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- Gets the camera's view matrix.
--- return The camera view matrix. -- @function [parent=#Camera] getViewMatrix -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- get & set Camera flag -- @function [parent=#Camera] getCameraFlag -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Gets the type of camera.
--- return The camera type. -- @function [parent=#Camera] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Creates a view matrix based on the specified input parameters.
--- param eyePosition The eye position.
--- param targetPosition The target's center position.
--- param up The up vector.
--- param dst A matrix to store the result in. -- @function [parent=#Camera] lookAt -- @param self --- @param #vec3_table target --- @param #vec3_table up +-- @param #vec3_table vec3 +-- @param #vec3_table vec3 -------------------------------- --- -- @function [parent=#Camera] setCameraFlag -- @param self --- @param #int flag +-- @param #int cameraflag -------------------------------- --- Convert the specified point of viewport from screenspace coordinate into the worldspace coordinate. -- @function [parent=#Camera] unproject -- @param self --- @param #size_table viewport --- @param #vec3_table src --- @param #vec3_table dst +-- @param #size_table size +-- @param #vec3_table vec3 +-- @param #vec3_table vec3 -------------------------------- --- create default camera, the camera type depends on Director::getProjection -- @function [parent=#Camera] create -- @param self -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- --- Creates a perspective camera.
--- param fieldOfView The field of view for the perspective camera (normally in the range of 40-60 degrees).
--- param aspectRatio The aspect ratio of the camera (normally the width of the viewport divided by the height of the viewport).
--- param nearPlane The near plane distance.
--- param farPlane The far plane distance. -- @function [parent=#Camera] createPerspective -- @param self --- @param #float fieldOfView --- @param #float aspectRatio --- @param #float nearPlane --- @param #float farPlane +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- --- Creates an orthographic camera.
--- param zoomX The zoom factor along the X-axis of the orthographic projection (the width of the ortho projection).
--- param zoomY The zoom factor along the Y-axis of the orthographic projection (the height of the ortho projection).
--- param aspectRatio The aspect ratio of the orthographic projection.
--- param nearPlane The near plane distance.
--- param farPlane The far plane distance. -- @function [parent=#Camera] createOrthographic -- @param self --- @param #float zoomX --- @param #float zoomY --- @param #float nearPlane --- @param #float farPlane +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- --- -- @function [parent=#Camera] getVisitingCamera -- @param self -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- --- Sets the position (X, Y, and Z) in its parent's coordinate system -- @function [parent=#Camera] setPosition3D -- @param self --- @param #vec3_table position +-- @param #vec3_table vec3 return nil diff --git a/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua b/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua index cc0fd9ca76..48c898c9ba 100644 --- a/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua @@ -5,31 +5,26 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#CardinalSplineBy] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#CardinalSplineBy] clone -- @param self -- @return CardinalSplineBy#CardinalSplineBy ret (return value: cc.CardinalSplineBy) -------------------------------- --- -- @function [parent=#CardinalSplineBy] updatePosition -- @param self --- @param #vec2_table newPos +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#CardinalSplineBy] reverse -- @param self -- @return CardinalSplineBy#CardinalSplineBy ret (return value: cc.CardinalSplineBy) -------------------------------- --- -- @function [parent=#CardinalSplineBy] CardinalSplineBy -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua b/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua index 324ca3035f..fd5bcb141b 100644 --- a/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua @@ -5,53 +5,44 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#CardinalSplineTo] getPoints -- @param self -- @return point_table#point_table ret (return value: point_table) -------------------------------- --- -- @function [parent=#CardinalSplineTo] updatePosition -- @param self --- @param #vec2_table newPos +-- @param #vec2_table vec2 -------------------------------- --- initializes the action with a duration and an array of points -- @function [parent=#CardinalSplineTo] initWithDuration -- @param self --- @param #float duration --- @param #point_table points --- @param #float tension +-- @param #float float +-- @param #point_table pointarray +-- @param #float float -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#CardinalSplineTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#CardinalSplineTo] clone -- @param self -- @return CardinalSplineTo#CardinalSplineTo ret (return value: cc.CardinalSplineTo) -------------------------------- --- -- @function [parent=#CardinalSplineTo] reverse -- @param self -- @return CardinalSplineTo#CardinalSplineTo ret (return value: cc.CardinalSplineTo) -------------------------------- --- -- @function [parent=#CardinalSplineTo] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- js NA
--- lua NA -- @function [parent=#CardinalSplineTo] CardinalSplineTo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua b/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua index fda07cef71..3b82d8aae6 100644 --- a/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua @@ -5,21 +5,18 @@ -- @parent_module cc -------------------------------- --- initializes the action with a duration and an array of points -- @function [parent=#CatmullRomBy] initWithDuration -- @param self --- @param #float dt --- @param #point_table points +-- @param #float float +-- @param #point_table pointarray -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#CatmullRomBy] clone -- @param self -- @return CatmullRomBy#CatmullRomBy ret (return value: cc.CatmullRomBy) -------------------------------- --- -- @function [parent=#CatmullRomBy] reverse -- @param self -- @return CatmullRomBy#CatmullRomBy ret (return value: cc.CatmullRomBy) diff --git a/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua b/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua index c0fba61301..104e624774 100644 --- a/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua @@ -5,21 +5,18 @@ -- @parent_module cc -------------------------------- --- initializes the action with a duration and an array of points -- @function [parent=#CatmullRomTo] initWithDuration -- @param self --- @param #float dt --- @param #point_table points +-- @param #float float +-- @param #point_table pointarray -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#CatmullRomTo] clone -- @param self -- @return CatmullRomTo#CatmullRomTo ret (return value: cc.CatmullRomTo) -------------------------------- --- -- @function [parent=#CatmullRomTo] reverse -- @param self -- @return CatmullRomTo#CatmullRomTo ret (return value: cc.CatmullRomTo) diff --git a/cocos/scripting/lua-bindings/auto/api/CheckBox.lua b/cocos/scripting/lua-bindings/auto/api/CheckBox.lua index 3ef7cf5013..cdbab92888 100644 --- a/cocos/scripting/lua-bindings/auto/api/CheckBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/CheckBox.lua @@ -5,123 +5,94 @@ -- @parent_module ccui -------------------------------- --- Load backGroundSelected texture for checkbox.
--- param backGroundSelected backGround selected state texture.
--- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureBackGroundSelected -- @param self --- @param #string backGroundSelected --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Load backGroundDisabled texture for checkbox.
--- param backGroundDisabled backGroundDisabled texture.
--- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureBackGroundDisabled -- @param self --- @param #string backGroundDisabled --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- -- @function [parent=#CheckBox] setSelected -- @param self --- @param #bool selected +-- @param #bool bool -------------------------------- --- -- @function [parent=#CheckBox] addEventListener -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- Load cross texture for checkbox.
--- param cross cross texture.
--- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureFrontCross -- @param self --- @param #string --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- -- @function [parent=#CheckBox] isSelected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Load textures for checkbox.
--- param backGround backGround texture.
--- param backGroundSelected backGround selected state texture.
--- param cross cross texture.
--- param frontCrossDisabled cross dark state texture.
--- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextures -- @param self --- @param #string backGround --- @param #string backGroundSelected --- @param #string cross --- @param #string backGroundDisabled --- @param #string frontCrossDisabled --- @param #int texType +-- @param #string str +-- @param #string str +-- @param #string str +-- @param #string str +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Load backGround texture for checkbox.
--- param backGround backGround texture.
--- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureBackGround -- @param self --- @param #string backGround --- @param #int type +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Load frontCrossDisabled texture for checkbox.
--- param frontCrossDisabled frontCrossDisabled texture.
--- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureFrontCrossDisabled -- @param self --- @param #string frontCrossDisabled --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- -- @overload self, string, string, string, string, string, int -- @overload self -- @function [parent=#CheckBox] create -- @param self --- @param #string backGround --- @param #string backGroundSeleted --- @param #string cross --- @param #string backGroundDisabled --- @param #string frontCrossDisabled --- @param #int texType +-- @param #string str +-- @param #string str +-- @param #string str +-- @param #string str +-- @param #string str +-- @param #int texturerestype -- @return CheckBox#CheckBox ret (retunr value: ccui.CheckBox) -------------------------------- --- -- @function [parent=#CheckBox] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#CheckBox] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#CheckBox] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#CheckBox] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Default constructor -- @function [parent=#CheckBox] CheckBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua b/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua index a8ac20c195..f9ac0622a2 100644 --- a/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua @@ -5,62 +5,48 @@ -- @parent_module cc -------------------------------- --- Inverted. If this is set to true,
--- the stencil is inverted, so the content is drawn where the stencil is NOT drawn.
--- This default to false. -- @function [parent=#ClippingNode] isInverted -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ClippingNode] setInverted -- @param self --- @param #bool inverted +-- @param #bool bool -------------------------------- --- -- @function [parent=#ClippingNode] setStencil -- @param self --- @param #cc.Node stencil +-- @param #cc.Node node -------------------------------- --- The alpha threshold.
--- The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.
--- Should be a float between 0 and 1.
--- This default to 1 (so alpha test is disabled). -- @function [parent=#ClippingNode] getAlphaThreshold -- @param self -- @return float#float ret (return value: float) -------------------------------- --- The Node to use as a stencil to do the clipping.
--- The stencil node will be retained.
--- This default to nil. -- @function [parent=#ClippingNode] getStencil -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#ClippingNode] setAlphaThreshold -- @param self --- @param #float alphaThreshold +-- @param #float float -------------------------------- -- @overload self, cc.Node -- @overload self -- @function [parent=#ClippingNode] create -- @param self --- @param #cc.Node stencil +-- @param #cc.Node node -- @return ClippingNode#ClippingNode ret (retunr value: cc.ClippingNode) -------------------------------- --- -- @function [parent=#ClippingNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags +-- @param #mat4_table mat4 +-- @param #unsigned int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua b/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua index 8d70edb97b..ba3389570c 100644 --- a/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua @@ -5,49 +5,41 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ColorFrame] getAlpha -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- --- -- @function [parent=#ColorFrame] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- -- @function [parent=#ColorFrame] setAlpha -- @param self --- @param #unsigned char alpha +-- @param #unsigned char char -------------------------------- --- -- @function [parent=#ColorFrame] setColor -- @param self --- @param #color3b_table color +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#ColorFrame] create -- @param self -- @return ColorFrame#ColorFrame ret (return value: ccs.ColorFrame) -------------------------------- --- -- @function [parent=#ColorFrame] apply -- @param self --- @param #float percent +-- @param #float float -------------------------------- --- -- @function [parent=#ColorFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#ColorFrame] ColorFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua b/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua index 4924c02278..ea707b9cd1 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua @@ -5,95 +5,82 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ComAttribute] getFloat -- @param self --- @param #string key --- @param #float def +-- @param #string str +-- @param #float float -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ComAttribute] getString -- @param self --- @param #string key --- @param #string def +-- @param #string str +-- @param #string str -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#ComAttribute] setFloat -- @param self --- @param #string key --- @param #float value +-- @param #string str +-- @param #float float -------------------------------- --- -- @function [parent=#ComAttribute] setString -- @param self --- @param #string key --- @param #string value +-- @param #string str +-- @param #string str -------------------------------- --- -- @function [parent=#ComAttribute] getBool -- @param self --- @param #string key --- @param #bool def +-- @param #string str +-- @param #bool bool -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ComAttribute] setInt -- @param self --- @param #string key --- @param #int value +-- @param #string str +-- @param #int int -------------------------------- --- -- @function [parent=#ComAttribute] parse -- @param self --- @param #string jsonFile +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ComAttribute] getInt -- @param self --- @param #string key --- @param #int def +-- @param #string str +-- @param #int int -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#ComAttribute] setBool -- @param self --- @param #string key --- @param #bool value +-- @param #string str +-- @param #bool bool -------------------------------- --- -- @function [parent=#ComAttribute] create -- @param self -- @return ComAttribute#ComAttribute ret (return value: ccs.ComAttribute) -------------------------------- --- -- @function [parent=#ComAttribute] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#ComAttribute] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ComAttribute] serialize -- @param self --- @param #void r +-- @param #void void -- @return bool#bool ret (return value: bool) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ComAudio.lua b/cocos/scripting/lua-bindings/auto/api/ComAudio.lua index a79ab68966..b7d19dbb4b 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComAudio.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComAudio.lua @@ -5,42 +5,35 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ComAudio] stopAllEffects -- @param self -------------------------------- --- -- @function [parent=#ComAudio] getEffectsVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ComAudio] stopEffect -- @param self --- @param #unsigned int nSoundId +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#ComAudio] getBackgroundMusicVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ComAudio] willPlayBackgroundMusic -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ComAudio] setBackgroundMusicVolume -- @param self --- @param #float volume +-- @param #float float -------------------------------- --- -- @function [parent=#ComAudio] end -- @param self @@ -49,40 +42,34 @@ -- @overload self, bool -- @function [parent=#ComAudio] stopBackgroundMusic -- @param self --- @param #bool bReleaseData +-- @param #bool bool -------------------------------- --- -- @function [parent=#ComAudio] pauseBackgroundMusic -- @param self -------------------------------- --- -- @function [parent=#ComAudio] isBackgroundMusicPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ComAudio] isLoop -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ComAudio] resumeAllEffects -- @param self -------------------------------- --- -- @function [parent=#ComAudio] pauseAllEffects -- @param self -------------------------------- --- -- @function [parent=#ComAudio] preloadBackgroundMusic -- @param self --- @param #char pszFilePath +-- @param #char char -------------------------------- -- @overload self, char @@ -90,8 +77,8 @@ -- @overload self -- @function [parent=#ComAudio] playBackgroundMusic -- @param self --- @param #char pszFilePath --- @param #bool bLoop +-- @param #char char +-- @param #bool bool -------------------------------- -- @overload self, char @@ -99,101 +86,85 @@ -- @overload self -- @function [parent=#ComAudio] playEffect -- @param self --- @param #char pszFilePath --- @param #bool bLoop +-- @param #char char +-- @param #bool bool -- @return unsigned int#unsigned int ret (retunr value: unsigned int) -------------------------------- --- -- @function [parent=#ComAudio] preloadEffect -- @param self --- @param #char pszFilePath +-- @param #char char -------------------------------- --- -- @function [parent=#ComAudio] setLoop -- @param self --- @param #bool bLoop +-- @param #bool bool -------------------------------- --- -- @function [parent=#ComAudio] unloadEffect -- @param self --- @param #char pszFilePath +-- @param #char char -------------------------------- --- -- @function [parent=#ComAudio] rewindBackgroundMusic -- @param self -------------------------------- --- -- @function [parent=#ComAudio] pauseEffect -- @param self --- @param #unsigned int nSoundId +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#ComAudio] resumeBackgroundMusic -- @param self -------------------------------- --- -- @function [parent=#ComAudio] setFile -- @param self --- @param #char pszFilePath +-- @param #char char -------------------------------- --- -- @function [parent=#ComAudio] setEffectsVolume -- @param self --- @param #float volume +-- @param #float float -------------------------------- --- -- @function [parent=#ComAudio] getFile -- @param self -- @return char#char ret (return value: char) -------------------------------- --- -- @function [parent=#ComAudio] resumeEffect -- @param self --- @param #unsigned int nSoundId +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#ComAudio] create -- @param self -- @return ComAudio#ComAudio ret (return value: ccs.ComAudio) -------------------------------- --- -- @function [parent=#ComAudio] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#ComAudio] setEnabled -- @param self --- @param #bool b +-- @param #bool bool -------------------------------- --- -- @function [parent=#ComAudio] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ComAudio] serialize -- @param self --- @param #void r +-- @param #void void -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ComAudio] init -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/ComController.lua b/cocos/scripting/lua-bindings/auto/api/ComController.lua index 9eed2a6c57..381558d96e 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComController.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComController.lua @@ -5,43 +5,36 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ComController] create -- @param self -- @return ComController#ComController ret (return value: ccs.ComController) -------------------------------- --- -- @function [parent=#ComController] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#ComController] setEnabled -- @param self --- @param #bool b +-- @param #bool bool -------------------------------- --- -- @function [parent=#ComController] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ComController] update -- @param self --- @param #float delta +-- @param #float float -------------------------------- --- -- @function [parent=#ComController] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- js ctor -- @function [parent=#ComController] ComController -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ComRender.lua b/cocos/scripting/lua-bindings/auto/api/ComRender.lua index afc835a203..9c69bbac35 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComRender.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComRender.lua @@ -5,13 +5,11 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ComRender] setNode -- @param self -- @param #cc.Node node -------------------------------- --- -- @function [parent=#ComRender] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) @@ -22,20 +20,18 @@ -- @function [parent=#ComRender] create -- @param self -- @param #cc.Node node --- @param #char comName +-- @param #char char -- @return ComRender#ComRender ret (retunr value: ccs.ComRender) -------------------------------- --- -- @function [parent=#ComRender] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#ComRender] serialize -- @param self --- @param #void r +-- @param #void void -- @return bool#bool ret (return value: bool) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Component.lua b/cocos/scripting/lua-bindings/auto/api/Component.lua index 1f4132282b..1c22bbb440 100644 --- a/cocos/scripting/lua-bindings/auto/api/Component.lua +++ b/cocos/scripting/lua-bindings/auto/api/Component.lua @@ -5,55 +5,46 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Component] setEnabled -- @param self --- @param #bool b +-- @param #bool bool -------------------------------- --- -- @function [parent=#Component] setName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- -- @function [parent=#Component] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Component] update -- @param self --- @param #float delta +-- @param #float float -------------------------------- --- -- @function [parent=#Component] getOwner -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#Component] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Component] setOwner -- @param self --- @param #cc.Node pOwner +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#Component] getName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Component] create -- @param self -- @return Component#Component ret (return value: cc.Component) diff --git a/cocos/scripting/lua-bindings/auto/api/Console.lua b/cocos/scripting/lua-bindings/auto/api/Console.lua index 25abbbf30c..cdca8f4060 100644 --- a/cocos/scripting/lua-bindings/auto/api/Console.lua +++ b/cocos/scripting/lua-bindings/auto/api/Console.lua @@ -5,28 +5,24 @@ -- @parent_module cc -------------------------------- --- stops the Console. 'stop' will be called at destruction time as well -- @function [parent=#Console] stop -- @param self -------------------------------- --- starts listening to specifed TCP port -- @function [parent=#Console] listenOnTCP -- @param self --- @param #int port +-- @param #int int -- @return bool#bool ret (return value: bool) -------------------------------- --- starts listening to specifed file descriptor -- @function [parent=#Console] listenOnFileDescriptor -- @param self --- @param #int fd +-- @param #int int -- @return bool#bool ret (return value: bool) -------------------------------- --- log something in the console -- @function [parent=#Console] log -- @param self --- @param #char buf +-- @param #char char return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ContourData.lua b/cocos/scripting/lua-bindings/auto/api/ContourData.lua index 078b7483de..f1a46b0aa1 100644 --- a/cocos/scripting/lua-bindings/auto/api/ContourData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ContourData.lua @@ -5,25 +5,21 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ContourData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ContourData] addVertex -- @param self --- @param #vec2_table vertex +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#ContourData] create -- @param self -- @return ContourData#ContourData ret (return value: ccs.ContourData) -------------------------------- --- js ctor -- @function [parent=#ContourData] ContourData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Control.lua b/cocos/scripting/lua-bindings/auto/api/Control.lua index df1f899b52..8e832134da 100644 --- a/cocos/scripting/lua-bindings/auto/api/Control.lua +++ b/cocos/scripting/lua-bindings/auto/api/Control.lua @@ -5,65 +5,53 @@ -- @parent_module cc -------------------------------- --- Tells whether the control is enabled. -- @function [parent=#Control] setEnabled -- @param self --- @param #bool bEnabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#Control] onTouchMoved -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- --- -- @function [parent=#Control] getState -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Control] onTouchEnded -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- --- Sends action messages for the given control events.
--- param controlEvents A bitmask whose set flags specify the control events for
--- which action messages are sent. See "CCControlEvent" for bitmask constants. -- @function [parent=#Control] sendActionsForControlEvents -- @param self --- @param #int controlEvents +-- @param #int eventtype -------------------------------- --- A Boolean value that determines the control selected state. -- @function [parent=#Control] setSelected -- @param self --- @param #bool bSelected +-- @param #bool bool -------------------------------- --- -- @function [parent=#Control] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Control] onTouchCancelled -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- --- Updates the control layout using its current internal state. -- @function [parent=#Control] needsLayout -- @param self -------------------------------- --- -- @function [parent=#Control] onTouchBegan -- @param self -- @param #cc.Touch touch @@ -71,64 +59,50 @@ -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Control] hasVisibleParents -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Control] isSelected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Returns a boolean value that indicates whether a touch is inside the bounds
--- of the receiver. The given touch must be relative to the world.
--- param touch A Touch object that represents a touch.
--- return Whether a touch is inside the receiver's rect. -- @function [parent=#Control] isTouchInside -- @param self -- @param #cc.Touch touch -- @return bool#bool ret (return value: bool) -------------------------------- --- A Boolean value that determines whether the control is highlighted. -- @function [parent=#Control] setHighlighted -- @param self --- @param #bool bHighlighted +-- @param #bool bool -------------------------------- --- Returns a point corresponding to the touh location converted into the
--- control space coordinates.
--- param touch A Touch object that represents a touch. -- @function [parent=#Control] getTouchLocation -- @param self -- @param #cc.Touch touch -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#Control] isHighlighted -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Creates a Control object -- @function [parent=#Control] create -- @param self -- @return Control#Control ret (return value: cc.Control) -------------------------------- --- -- @function [parent=#Control] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Control] setOpacityModifyRGB -- @param self --- @param #bool bOpacityModifyRGB +-- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua index 1d965170ff..005e6b28da 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua @@ -5,133 +5,102 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ControlButton] isPushed -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ControlButton] setSelected -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- Sets the title label to use for the specified state.
--- If a property is not specified for a state, the default is to use
--- the ButtonStateNormal value.
--- param label The title label to use for the specified state.
--- param state The state that uses the specified title. The values are described
--- in "CCControlState". -- @function [parent=#ControlButton] setTitleLabelForState -- @param self --- @param #cc.Node label +-- @param #cc.Node node -- @param #int state -------------------------------- --- -- @function [parent=#ControlButton] setAdjustBackgroundImage -- @param self --- @param #bool adjustBackgroundImage +-- @param #bool bool -------------------------------- --- -- @function [parent=#ControlButton] setHighlighted -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#ControlButton] setZoomOnTouchDown -- @param self --- @param #bool var +-- @param #bool bool -------------------------------- --- Sets the title string to use for the specified state.
--- If a property is not specified for a state, the default is to use
--- the ButtonStateNormal value.
--- param title The title string to use for the specified state.
--- param state The state that uses the specified title. The values are described
--- in "CCControlState". -- @function [parent=#ControlButton] setTitleForState -- @param self --- @param #string title +-- @param #string str -- @param #int state -------------------------------- --- -- @function [parent=#ControlButton] setLabelAnchorPoint -- @param self --- @param #vec2_table var +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#ControlButton] getLabelAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#ControlButton] getTitleTTFSizeForState -- @param self -- @param #int state -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlButton] setTitleTTFForState -- @param self --- @param #string fntFile +-- @param #string str -- @param #int state -------------------------------- --- -- @function [parent=#ControlButton] setTitleTTFSizeForState -- @param self --- @param #float size +-- @param #float float -- @param #int state -------------------------------- --- -- @function [parent=#ControlButton] setTitleLabel -- @param self --- @param #cc.Node var +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ControlButton] setPreferredSize -- @param self --- @param #size_table var +-- @param #size_table size -------------------------------- --- -- @function [parent=#ControlButton] getCurrentTitleColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- -- @function [parent=#ControlButton] setEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- Returns the background sprite used for a state.
--- param state The state that uses the background sprite. Possible values are
--- described in "CCControlState". -- @function [parent=#ControlButton] getBackgroundSpriteForState -- @param self -- @param #int state -- @return Scale9Sprite#Scale9Sprite ret (return value: cc.Scale9Sprite) -------------------------------- --- -- @function [parent=#ControlButton] getHorizontalOrigin -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#ControlButton] needsLayout -- @param self @@ -143,145 +112,105 @@ -- @return string#string ret (retunr value: string) -------------------------------- --- -- @function [parent=#ControlButton] getScaleRatio -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlButton] getTitleTTFForState -- @param self -- @param #int state -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#ControlButton] getBackgroundSprite -- @param self -- @return Scale9Sprite#Scale9Sprite ret (return value: cc.Scale9Sprite) -------------------------------- --- Returns the title color used for a state.
--- param state The state that uses the specified color. The values are described
--- in "CCControlState".
--- return The color of the title for the specified state. -- @function [parent=#ControlButton] getTitleColorForState -- @param self -- @param #int state -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- Sets the color of the title to use for the specified state.
--- param color The color of the title to use for the specified state.
--- param state The state that uses the specified color. The values are described
--- in "CCControlState". -- @function [parent=#ControlButton] setTitleColorForState -- @param self --- @param #color3b_table color +-- @param #color3b_table color3b -- @param #int state -------------------------------- --- Adjust the background image. YES by default. If the property is set to NO, the
--- background will use the prefered size of the background image. -- @function [parent=#ControlButton] doesAdjustBackgroundImage -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Sets the background spriteFrame to use for the specified button state.
--- param spriteFrame The background spriteFrame to use for the specified state.
--- param state The state that uses the specified image. The values are described
--- in "CCControlState". -- @function [parent=#ControlButton] setBackgroundSpriteFrameForState -- @param self --- @param #cc.SpriteFrame spriteFrame +-- @param #cc.SpriteFrame spriteframe -- @param #int state -------------------------------- --- Sets the background sprite to use for the specified button state.
--- param sprite The background sprite to use for the specified state.
--- param state The state that uses the specified image. The values are described
--- in "CCControlState". -- @function [parent=#ControlButton] setBackgroundSpriteForState -- @param self --- @param #cc.Scale9Sprite sprite +-- @param #cc.Scale9Sprite scale9sprite -- @param #int state -------------------------------- --- -- @function [parent=#ControlButton] setScaleRatio -- @param self --- @param #float var +-- @param #float float -------------------------------- --- -- @function [parent=#ControlButton] setBackgroundSprite -- @param self --- @param #cc.Scale9Sprite var +-- @param #cc.Scale9Sprite scale9sprite -------------------------------- --- -- @function [parent=#ControlButton] getTitleLabel -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#ControlButton] getPreferredSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#ControlButton] getVerticalMargin -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Returns the title label used for a state.
--- param state The state that uses the title label. Possible values are described
--- in "CCControlState". -- @function [parent=#ControlButton] getTitleLabelForState -- @param self -- @param #int state -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#ControlButton] setMargins -- @param self --- @param #int marginH --- @param #int marginV +-- @param #int int +-- @param #int int -------------------------------- --- Sets the font of the label, changes the label to a BMFont if neccessary.
--- param fntFile The name of the font to change to
--- param state The state that uses the specified fntFile. The values are described
--- in "CCControlState". -- @function [parent=#ControlButton] setTitleBMFontForState -- @param self --- @param #string fntFile +-- @param #string str -- @param #int state -------------------------------- --- -- @function [parent=#ControlButton] getTitleBMFontForState -- @param self -- @param #int state -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#ControlButton] getZoomOnTouchDown -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Returns the title used for a state.
--- param state The state that uses the title. Possible values are described in
--- "CCControlState".
--- return The title for the specified state. -- @function [parent=#ControlButton] getTitleForState -- @param self -- @param #int state @@ -294,58 +223,50 @@ -- @overload self, string, string, float -- @function [parent=#ControlButton] create -- @param self --- @param #string title --- @param #string fontName --- @param #float fontSize +-- @param #string str +-- @param #string str +-- @param #float float -- @return ControlButton#ControlButton ret (retunr value: cc.ControlButton) -------------------------------- --- -- @function [parent=#ControlButton] onTouchMoved -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlButton] onTouchEnded -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlButton] setColor -- @param self --- @param #color3b_table +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#ControlButton] onTouchCancelled -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlButton] setOpacity -- @param self --- @param #unsigned char var +-- @param #unsigned char char -------------------------------- --- -- @function [parent=#ControlButton] updateDisplayedOpacity -- @param self --- @param #unsigned char parentOpacity +-- @param #unsigned char char -------------------------------- --- -- @function [parent=#ControlButton] updateDisplayedColor -- @param self --- @param #color3b_table parentColor +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#ControlButton] onTouchBegan -- @param self -- @param #cc.Touch touch diff --git a/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua index b46d5e855b..f7e3e3cbe2 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua @@ -5,81 +5,68 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ControlColourPicker] setEnabled -- @param self --- @param #bool bEnabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#ControlColourPicker] getHuePicker -- @param self -- @return ControlHuePicker#ControlHuePicker ret (return value: cc.ControlHuePicker) -------------------------------- --- -- @function [parent=#ControlColourPicker] setColor -- @param self --- @param #color3b_table colorValue +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#ControlColourPicker] hueSliderValueChanged -- @param self --- @param #cc.Ref sender --- @param #int controlEvent +-- @param #cc.Ref ref +-- @param #int eventtype -------------------------------- --- -- @function [parent=#ControlColourPicker] getcolourPicker -- @param self -- @return ControlSaturationBrightnessPicker#ControlSaturationBrightnessPicker ret (return value: cc.ControlSaturationBrightnessPicker) -------------------------------- --- -- @function [parent=#ControlColourPicker] setBackground -- @param self --- @param #cc.Sprite var +-- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#ControlColourPicker] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ControlColourPicker] setcolourPicker -- @param self --- @param #cc.ControlSaturationBrightnessPicker var +-- @param #cc.ControlSaturationBrightnessPicker controlsaturationbrightnesspicker -------------------------------- --- -- @function [parent=#ControlColourPicker] colourSliderValueChanged -- @param self --- @param #cc.Ref sender --- @param #int controlEvent +-- @param #cc.Ref ref +-- @param #int eventtype -------------------------------- --- -- @function [parent=#ControlColourPicker] setHuePicker -- @param self --- @param #cc.ControlHuePicker var +-- @param #cc.ControlHuePicker controlhuepicker -------------------------------- --- -- @function [parent=#ControlColourPicker] getBackground -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlColourPicker] create -- @param self -- @return ControlColourPicker#ControlColourPicker ret (return value: cc.ControlColourPicker) -------------------------------- --- js ctor -- @function [parent=#ControlColourPicker] ControlColourPicker -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua index d907f2c9dd..bedc24c43a 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua @@ -5,98 +5,83 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ControlHuePicker] setEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#ControlHuePicker] initWithTargetAndPos -- @param self --- @param #cc.Node target --- @param #vec2_table pos +-- @param #cc.Node node +-- @param #vec2_table vec2 -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ControlHuePicker] setHue -- @param self --- @param #float val +-- @param #float float -------------------------------- --- -- @function [parent=#ControlHuePicker] getStartPos -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#ControlHuePicker] getHue -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlHuePicker] getSlider -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlHuePicker] setBackground -- @param self --- @param #cc.Sprite var +-- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#ControlHuePicker] setHuePercentage -- @param self --- @param #float val +-- @param #float float -------------------------------- --- -- @function [parent=#ControlHuePicker] getBackground -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlHuePicker] getHuePercentage -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlHuePicker] setSlider -- @param self --- @param #cc.Sprite var +-- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#ControlHuePicker] create -- @param self --- @param #cc.Node target --- @param #vec2_table pos +-- @param #cc.Node node +-- @param #vec2_table vec2 -- @return ControlHuePicker#ControlHuePicker ret (return value: cc.ControlHuePicker) -------------------------------- --- -- @function [parent=#ControlHuePicker] onTouchMoved -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlHuePicker] onTouchBegan -- @param self -- @param #cc.Touch touch --- @param #cc.Event pEvent +-- @param #cc.Event event -- @return bool#bool ret (return value: bool) -------------------------------- --- js ctor -- @function [parent=#ControlHuePicker] ControlHuePicker -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua b/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua index a5581e6695..0df5064b16 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua @@ -5,170 +5,143 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ControlPotentiometer] setPreviousLocation -- @param self --- @param #vec2_table var +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#ControlPotentiometer] setValue -- @param self --- @param #float value +-- @param #float float -------------------------------- --- -- @function [parent=#ControlPotentiometer] getProgressTimer -- @param self -- @return ProgressTimer#ProgressTimer ret (return value: cc.ProgressTimer) -------------------------------- --- -- @function [parent=#ControlPotentiometer] getMaximumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Returns the angle in degree between line1 and line2. -- @function [parent=#ControlPotentiometer] angleInDegreesBetweenLineFromPoint_toPoint_toLineFromPoint_toPoint -- @param self --- @param #vec2_table beginLineA --- @param #vec2_table endLineA --- @param #vec2_table beginLineB --- @param #vec2_table endLineB +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 -- @return float#float ret (return value: float) -------------------------------- --- Factorize the event dispath into these methods. -- @function [parent=#ControlPotentiometer] potentiometerBegan -- @param self --- @param #vec2_table location +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#ControlPotentiometer] setMaximumValue -- @param self --- @param #float maximumValue +-- @param #float float -------------------------------- --- -- @function [parent=#ControlPotentiometer] getMinimumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlPotentiometer] setThumbSprite -- @param self --- @param #cc.Sprite var +-- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#ControlPotentiometer] getValue -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlPotentiometer] getPreviousLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Returns the distance between the point1 and point2. -- @function [parent=#ControlPotentiometer] distanceBetweenPointAndPoint -- @param self --- @param #vec2_table point1 --- @param #vec2_table point2 +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlPotentiometer] potentiometerEnded -- @param self --- @param #vec2_table location +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#ControlPotentiometer] setProgressTimer -- @param self --- @param #cc.ProgressTimer var +-- @param #cc.ProgressTimer progresstimer -------------------------------- --- -- @function [parent=#ControlPotentiometer] setMinimumValue -- @param self --- @param #float minimumValue +-- @param #float float -------------------------------- --- -- @function [parent=#ControlPotentiometer] getThumbSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- Initializes a potentiometer with a track sprite and a progress bar.
--- param trackSprite Sprite, that is used as a background.
--- param progressTimer ProgressTimer, that is used as a progress bar. -- @function [parent=#ControlPotentiometer] initWithTrackSprite_ProgressTimer_ThumbSprite -- @param self --- @param #cc.Sprite trackSprite --- @param #cc.ProgressTimer progressTimer --- @param #cc.Sprite thumbSprite +-- @param #cc.Sprite sprite +-- @param #cc.ProgressTimer progresstimer +-- @param #cc.Sprite sprite -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ControlPotentiometer] potentiometerMoved -- @param self --- @param #vec2_table location +-- @param #vec2_table vec2 -------------------------------- --- Creates potentiometer with a track filename and a progress filename. -- @function [parent=#ControlPotentiometer] create -- @param self --- @param #char backgroundFile --- @param #char progressFile --- @param #char thumbFile +-- @param #char char +-- @param #char char +-- @param #char char -- @return ControlPotentiometer#ControlPotentiometer ret (return value: cc.ControlPotentiometer) -------------------------------- --- -- @function [parent=#ControlPotentiometer] isTouchInside -- @param self -- @param #cc.Touch touch -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ControlPotentiometer] setEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#ControlPotentiometer] onTouchMoved -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlPotentiometer] onTouchEnded -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlPotentiometer] onTouchBegan -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -- @return bool#bool ret (return value: bool) -------------------------------- --- js ctor -- @function [parent=#ControlPotentiometer] ControlPotentiometer -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua index 332012a086..83a6a99694 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua @@ -5,71 +5,60 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ControlSaturationBrightnessPicker] getShadow -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlSaturationBrightnessPicker] initWithTargetAndPos -- @param self --- @param #cc.Node target --- @param #vec2_table pos +-- @param #cc.Node node +-- @param #vec2_table vec2 -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ControlSaturationBrightnessPicker] getStartPos -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#ControlSaturationBrightnessPicker] getOverlay -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlSaturationBrightnessPicker] setEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#ControlSaturationBrightnessPicker] getSlider -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlSaturationBrightnessPicker] getBackground -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlSaturationBrightnessPicker] getSaturation -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlSaturationBrightnessPicker] getBrightness -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlSaturationBrightnessPicker] create -- @param self --- @param #cc.Node target --- @param #vec2_table pos +-- @param #cc.Node node +-- @param #vec2_table vec2 -- @return ControlSaturationBrightnessPicker#ControlSaturationBrightnessPicker ret (return value: cc.ControlSaturationBrightnessPicker) -------------------------------- --- js ctor -- @function [parent=#ControlSaturationBrightnessPicker] ControlSaturationBrightnessPicker -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua b/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua index 33e66b6ccf..d192cf7a93 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua @@ -5,91 +5,76 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ControlSlider] getSelectedThumbSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlSlider] locationFromTouch -- @param self -- @param #cc.Touch touch -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#ControlSlider] setSelectedThumbSprite -- @param self --- @param #cc.Sprite var +-- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#ControlSlider] setProgressSprite -- @param self --- @param #cc.Sprite var +-- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#ControlSlider] getMaximumAllowedValue -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlSlider] getMinimumAllowedValue -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlSlider] getMinimumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlSlider] setThumbSprite -- @param self --- @param #cc.Sprite var +-- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#ControlSlider] setMinimumValue -- @param self --- @param #float val +-- @param #float float -------------------------------- --- -- @function [parent=#ControlSlider] setMinimumAllowedValue -- @param self --- @param #float var +-- @param #float float -------------------------------- --- -- @function [parent=#ControlSlider] setEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#ControlSlider] setValue -- @param self --- @param #float val +-- @param #float float -------------------------------- --- -- @function [parent=#ControlSlider] setMaximumValue -- @param self --- @param #float val +-- @param #float float -------------------------------- --- -- @function [parent=#ControlSlider] needsLayout -- @param self -------------------------------- --- -- @function [parent=#ControlSlider] getBackgroundSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) @@ -99,54 +84,47 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite -- @function [parent=#ControlSlider] initWithSprites -- @param self --- @param #cc.Sprite backgroundSprite --- @param #cc.Sprite progressSprite --- @param #cc.Sprite thumbSprite --- @param #cc.Sprite selectedThumbSprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#ControlSlider] getMaximumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlSlider] isTouchInside -- @param self -- @param #cc.Touch touch -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ControlSlider] getValue -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ControlSlider] getThumbSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlSlider] getProgressSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlSlider] setBackgroundSprite -- @param self --- @param #cc.Sprite var +-- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#ControlSlider] setMaximumAllowedValue -- @param self --- @param #float var +-- @param #float float -------------------------------- -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite @@ -155,14 +133,13 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite -- @function [parent=#ControlSlider] create -- @param self --- @param #cc.Sprite backgroundSprite --- @param #cc.Sprite pogressSprite --- @param #cc.Sprite thumbSprite --- @param #cc.Sprite selectedThumbSprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite -- @return ControlSlider#ControlSlider ret (retunr value: cc.ControlSlider) -------------------------------- --- js ctor -- @function [parent=#ControlSlider] ControlSlider -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua b/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua index 0e5009c367..f7804e0d95 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua @@ -5,164 +5,138 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ControlStepper] setMinusSprite -- @param self --- @param #cc.Sprite var +-- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#ControlStepper] getMinusLabel -- @param self -- @return Label#Label ret (return value: cc.Label) -------------------------------- --- -- @function [parent=#ControlStepper] setWraps -- @param self --- @param #bool wraps +-- @param #bool bool -------------------------------- --- -- @function [parent=#ControlStepper] isContinuous -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ControlStepper] getMinusSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- Update the layout of the stepper with the given touch location. -- @function [parent=#ControlStepper] updateLayoutUsingTouchLocation -- @param self --- @param #vec2_table location +-- @param #vec2_table vec2 -------------------------------- --- Set the numeric value of the stepper. If send is true, the Control::EventType::VALUE_CHANGED is sent. -- @function [parent=#ControlStepper] setValueWithSendingEvent -- @param self --- @param #double value --- @param #bool send +-- @param #double double +-- @param #bool bool -------------------------------- --- -- @function [parent=#ControlStepper] getPlusLabel -- @param self -- @return Label#Label ret (return value: cc.Label) -------------------------------- --- Stop the autorepeat. -- @function [parent=#ControlStepper] stopAutorepeat -- @param self -------------------------------- --- -- @function [parent=#ControlStepper] setMinimumValue -- @param self --- @param #double minimumValue +-- @param #double double -------------------------------- --- -- @function [parent=#ControlStepper] getPlusSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#ControlStepper] setPlusSprite -- @param self --- @param #cc.Sprite var +-- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#ControlStepper] setMinusLabel -- @param self --- @param #cc.Label var +-- @param #cc.Label label -------------------------------- --- -- @function [parent=#ControlStepper] setValue -- @param self --- @param #double value +-- @param #double double -------------------------------- --- -- @function [parent=#ControlStepper] setStepValue -- @param self --- @param #double stepValue +-- @param #double double -------------------------------- --- -- @function [parent=#ControlStepper] setMaximumValue -- @param self --- @param #double maximumValue +-- @param #double double -------------------------------- --- -- @function [parent=#ControlStepper] update -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- Start the autorepeat increment/decrement. -- @function [parent=#ControlStepper] startAutorepeat -- @param self -------------------------------- --- -- @function [parent=#ControlStepper] initWithMinusSpriteAndPlusSprite -- @param self --- @param #cc.Sprite minusSprite --- @param #cc.Sprite plusSprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ControlStepper] getValue -- @param self -- @return double#double ret (return value: double) -------------------------------- --- -- @function [parent=#ControlStepper] setPlusLabel -- @param self --- @param #cc.Label var +-- @param #cc.Label label -------------------------------- --- -- @function [parent=#ControlStepper] create -- @param self --- @param #cc.Sprite minusSprite --- @param #cc.Sprite plusSprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite -- @return ControlStepper#ControlStepper ret (return value: cc.ControlStepper) -------------------------------- --- -- @function [parent=#ControlStepper] onTouchMoved -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlStepper] onTouchEnded -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlStepper] onTouchBegan -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -- @return bool#bool ret (return value: bool) -------------------------------- --- js ctor -- @function [parent=#ControlStepper] ControlStepper -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua b/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua index e7841e64f2..fdff4eddfa 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua @@ -5,21 +5,19 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ControlSwitch] setEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- -- @overload self, bool -- @overload self, bool, bool -- @function [parent=#ControlSwitch] setOn -- @param self --- @param #bool isOn --- @param #bool animated +-- @param #bool bool +-- @param #bool bool -------------------------------- --- -- @function [parent=#ControlSwitch] isOn -- @param self -- @return bool#bool ret (return value: bool) @@ -29,22 +27,20 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite -- @function [parent=#ControlSwitch] initWithMaskSprite -- @param self --- @param #cc.Sprite maskSprite --- @param #cc.Sprite onSprite --- @param #cc.Sprite offSprite --- @param #cc.Sprite thumbSprite --- @param #cc.Label onLabel --- @param #cc.Label offLabel +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite +-- @param #cc.Label label +-- @param #cc.Label label -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#ControlSwitch] hasMoved -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ControlSwitch] locationFromTouch -- @param self -- @param #cc.Touch touch @@ -55,45 +51,40 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite, cc.Label, cc.Label -- @function [parent=#ControlSwitch] create -- @param self --- @param #cc.Sprite maskSprite --- @param #cc.Sprite onSprite --- @param #cc.Sprite offSprite --- @param #cc.Sprite thumbSprite --- @param #cc.Label onLabel --- @param #cc.Label offLabel +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite +-- @param #cc.Sprite sprite +-- @param #cc.Label label +-- @param #cc.Label label -- @return ControlSwitch#ControlSwitch ret (retunr value: cc.ControlSwitch) -------------------------------- --- -- @function [parent=#ControlSwitch] onTouchMoved -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlSwitch] onTouchEnded -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlSwitch] onTouchCancelled -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#ControlSwitch] onTouchBegan -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -- @return bool#bool ret (return value: bool) -------------------------------- --- js ctor -- @function [parent=#ControlSwitch] ControlSwitch -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Controller.lua b/cocos/scripting/lua-bindings/auto/api/Controller.lua index 25246a3bf9..160b455817 100644 --- a/cocos/scripting/lua-bindings/auto/api/Controller.lua +++ b/cocos/scripting/lua-bindings/auto/api/Controller.lua @@ -4,66 +4,48 @@ -- @parent_module cc -------------------------------- --- Activate receives key event from external key. e.g. back,menu.
--- Controller receives only standard key which contained within enum Key by default.
--- warning The API only work on the android platform for support diversified game controller.
--- param externalKeyCode external key code
--- param receive true if external key event on this controller should be receive, false otherwise. -- @function [parent=#Controller] receiveExternalKeyEvent -- @param self --- @param #int externalKeyCode --- @param #bool receive +-- @param #int int +-- @param #bool bool -------------------------------- --- -- @function [parent=#Controller] getDeviceName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Controller] isConnected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Controller] getDeviceId -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Changes the tag that is used to identify the controller easily.
--- param tag A integer that identifies the controller. -- @function [parent=#Controller] setTag -- @param self --- @param #int tag +-- @param #int int -------------------------------- --- Returns a tag that is used to identify the controller easily.
--- return An integer that identifies the controller. -- @function [parent=#Controller] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- --- To start discovering new controllers
--- warning The API only work on the IOS platform.Empty implementation on Android -- @function [parent=#Controller] startDiscoveryController -- @param self -------------------------------- --- End the discovery process
--- warning The API only work on the IOS platform.Empty implementation on Android -- @function [parent=#Controller] stopDiscoveryController -- @param self -------------------------------- --- Gets a controller with its tag
--- param tag An identifier to find the controller. -- @function [parent=#Controller] getControllerByTag -- @param self --- @param #int tag +-- @param #int int -- @return Controller#Controller ret (return value: cc.Controller) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/DelayTime.lua b/cocos/scripting/lua-bindings/auto/api/DelayTime.lua index 295db25818..958ac24a6a 100644 --- a/cocos/scripting/lua-bindings/auto/api/DelayTime.lua +++ b/cocos/scripting/lua-bindings/auto/api/DelayTime.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#DelayTime] create -- @param self --- @param #float d +-- @param #float float -- @return DelayTime#DelayTime ret (return value: cc.DelayTime) -------------------------------- --- -- @function [parent=#DelayTime] clone -- @param self -- @return DelayTime#DelayTime ret (return value: cc.DelayTime) -------------------------------- --- -- @function [parent=#DelayTime] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#DelayTime] reverse -- @param self -- @return DelayTime#DelayTime ret (return value: cc.DelayTime) diff --git a/cocos/scripting/lua-bindings/auto/api/Director.lua b/cocos/scripting/lua-bindings/auto/api/Director.lua index 63ea6f6367..6d684c5988 100644 --- a/cocos/scripting/lua-bindings/auto/api/Director.lua +++ b/cocos/scripting/lua-bindings/auto/api/Director.lua @@ -4,418 +4,307 @@ -- @parent_module cc -------------------------------- --- Pauses the running scene.
--- The running scene will be _drawed_ but all scheduled timers will be paused
--- While paused, the draw rate will be 4 FPS to reduce CPU consumption -- @function [parent=#Director] pause -- @param self -------------------------------- --- Sets the EventDispatcher associated with this director
--- since v3.0 -- @function [parent=#Director] setEventDispatcher -- @param self --- @param #cc.EventDispatcher dispatcher +-- @param #cc.EventDispatcher eventdispatcher -------------------------------- --- Suspends the execution of the running scene, pushing it on the stack of suspended scenes.
--- The new scene will be executed.
--- Try to avoid big stacks of pushed scenes to reduce memory allocation.
--- ONLY call it if there is a running scene. -- @function [parent=#Director] pushScene -- @param self -- @param #cc.Scene scene -------------------------------- --- -- @function [parent=#Director] getDeltaTime -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Director] getContentScaleFactor -- @param self -- @return float#float ret (return value: float) -------------------------------- --- returns the size of the OpenGL view in pixels. -- @function [parent=#Director] getWinSizeInPixels -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#Director] getConsole -- @param self -- @return Console#Console ret (return value: cc.Console) -------------------------------- --- -- @function [parent=#Director] pushMatrix -- @param self --- @param #int type +-- @param #int matrix_stack_type -------------------------------- --- sets the OpenGL default values -- @function [parent=#Director] setGLDefaultValues -- @param self -------------------------------- --- Sets the ActionManager associated with this director
--- since v2.0 -- @function [parent=#Director] setActionManager -- @param self --- @param #cc.ActionManager actionManager +-- @param #cc.ActionManager actionmanager -------------------------------- --- enables/disables OpenGL alpha blending -- @function [parent=#Director] setAlphaBlending -- @param self --- @param #bool on +-- @param #bool bool -------------------------------- --- Pops out all scenes from the stack until the root scene in the queue.
--- This scene will replace the running one.
--- Internally it will call `popToSceneStackLevel(1)` -- @function [parent=#Director] popToRootScene -- @param self -------------------------------- --- -- @function [parent=#Director] loadMatrix -- @param self --- @param #int type --- @param #mat4_table mat +-- @param #int matrix_stack_type +-- @param #mat4_table mat4 -------------------------------- --- This object will be visited after the main scene is visited.
--- This object MUST implement the "visit" selector.
--- Useful to hook a notification object, like Notifications (http:github.com/manucorporat/CCNotifications)
--- since v0.99.5 -- @function [parent=#Director] getNotificationNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- returns the size of the OpenGL view in points. -- @function [parent=#Director] getWinSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#Director] getTextureCache -- @param self -- @return TextureCache#TextureCache ret (return value: cc.TextureCache) -------------------------------- --- Whether or not the replaced scene will receive the cleanup message.
--- If the new scene is pushed, then the old scene won't receive the "cleanup" message.
--- If the new scene replaces the old one, the it will receive the "cleanup" message.
--- since v0.99.0 -- @function [parent=#Director] isSendCleanupToScene -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- returns visible origin of the OpenGL view in points. -- @function [parent=#Director] getVisibleOrigin -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#Director] mainLoop -- @param self -------------------------------- --- enables/disables OpenGL depth test -- @function [parent=#Director] setDepthTest -- @param self --- @param #bool on +-- @param #bool bool -------------------------------- --- get Frame Rate -- @function [parent=#Director] getFrameRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- seconds per frame -- @function [parent=#Director] getSecondsPerFrame -- @param self -- @return float#float ret (return value: float) -------------------------------- --- converts an OpenGL coordinate to a UIKit coordinate
--- Useful to convert node points to window points for calls such as glScissor -- @function [parent=#Director] convertToUI -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- sets the default values based on the Configuration info -- @function [parent=#Director] setDefaultValues -- @param self -------------------------------- --- -- @function [parent=#Director] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Sets the Scheduler associated with this director
--- since v2.0 -- @function [parent=#Director] setScheduler -- @param self -- @param #cc.Scheduler scheduler -------------------------------- --- The main loop is triggered again.
--- Call this function only if [stopAnimation] was called earlier
--- warning Don't call this function to start the main loop. To run the main loop call runWithScene -- @function [parent=#Director] startAnimation -- @param self -------------------------------- --- Get the GLView, where everything is rendered
--- js NA
--- lua NA -- @function [parent=#Director] getOpenGLView -- @param self -- @return GLView#GLView ret (return value: cc.GLView) -------------------------------- --- Get current running Scene. Director can only run one Scene at a time -- @function [parent=#Director] getRunningScene -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- --- Sets the glViewport -- @function [parent=#Director] setViewport -- @param self -------------------------------- --- Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore.
--- If you don't want to pause your animation call [pause] instead. -- @function [parent=#Director] stopAnimation -- @param self -------------------------------- --- The size in pixels of the surface. It could be different than the screen size.
--- High-res devices might have a higher surface size than the screen size.
--- Only available when compiled using SDK >= 4.0.
--- since v0.99.4 -- @function [parent=#Director] setContentScaleFactor -- @param self --- @param #float scaleFactor +-- @param #float float -------------------------------- --- Pops out all scenes from the stack until it reaches `level`.
--- If level is 0, it will end the director.
--- If level is 1, it will pop all scenes until it reaches to root scene.
--- If level is <= than the current stack level, it won't do anything. -- @function [parent=#Director] popToSceneStackLevel -- @param self --- @param #int level +-- @param #int int -------------------------------- --- Resumes the paused scene
--- The scheduled timers will be activated again.
--- The "delta time" will be 0 (as if the game wasn't paused) -- @function [parent=#Director] resume -- @param self -------------------------------- --- -- @function [parent=#Director] isNextDeltaTimeZero -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Ends the execution, releases the running scene.
--- It doesn't remove the OpenGL view from its parent. You have to do it manually.
--- lua endToLua -- @function [parent=#Director] end -- @param self -------------------------------- --- -- @function [parent=#Director] setOpenGLView -- @param self --- @param #cc.GLView openGLView +-- @param #cc.GLView glview -------------------------------- --- converts a UIKit coordinate to an OpenGL coordinate
--- Useful to convert (multi) touch coordinates to the current layout (portrait or landscape) -- @function [parent=#Director] convertToGL -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Removes all cocos2d cached data.
--- It will purge the TextureCache, SpriteFrameCache, LabelBMFont cache
--- since v0.99.3 -- @function [parent=#Director] purgeCachedData -- @param self -------------------------------- --- How many frames were called since the director started -- @function [parent=#Director] getTotalFrames -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- Enters the Director's main loop with the given Scene.
--- Call it to run only your FIRST scene.
--- Don't call it if there is already a running scene.
--- It will call pushScene: and then it will call startAnimation -- @function [parent=#Director] runWithScene -- @param self -- @param #cc.Scene scene -------------------------------- --- -- @function [parent=#Director] setNotificationNode -- @param self -- @param #cc.Node node -------------------------------- --- Draw the scene.
--- This method is called every frame. Don't call it manually. -- @function [parent=#Director] drawScene -- @param self -------------------------------- --- / XXX: missing description -- @function [parent=#Director] getZEye -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Director] getMatrix -- @param self --- @param #int type +-- @param #int matrix_stack_type -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- Pops out a scene from the stack.
--- This scene will replace the running one.
--- The running scene will be deleted. If there are no more scenes in the stack the execution is terminated.
--- ONLY call it if there is a running scene. -- @function [parent=#Director] popScene -- @param self -------------------------------- --- Whether or not to display the FPS on the bottom-left corner -- @function [parent=#Director] isDisplayStats -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Director] setProjection -- @param self -- @param #int projection -------------------------------- --- -- @function [parent=#Director] loadIdentityMatrix -- @param self --- @param #int type +-- @param #int matrix_stack_type -------------------------------- --- -- @function [parent=#Director] setNextDeltaTimeZero -- @param self --- @param #bool nextDeltaTimeZero +-- @param #bool bool -------------------------------- --- -- @function [parent=#Director] resetMatrixStack -- @param self -------------------------------- --- -- @function [parent=#Director] popMatrix -- @param self --- @param #int type +-- @param #int matrix_stack_type -------------------------------- --- returns visible size of the OpenGL view in points.
--- the value is equal to getWinSize if don't invoke
--- GLView::setDesignResolutionSize() -- @function [parent=#Director] getVisibleSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Gets the Scheduler associated with this director
--- since v2.0 -- @function [parent=#Director] getScheduler -- @param self -- @return Scheduler#Scheduler ret (return value: cc.Scheduler) -------------------------------- --- Set the FPS value. -- @function [parent=#Director] setAnimationInterval -- @param self --- @param #double interval +-- @param #double double -------------------------------- --- Get the FPS value -- @function [parent=#Director] getAnimationInterval -- @param self -- @return double#double ret (return value: double) -------------------------------- --- Whether or not the Director is paused -- @function [parent=#Director] isPaused -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Display the FPS on the bottom-left corner -- @function [parent=#Director] setDisplayStats -- @param self --- @param #bool displayStats +-- @param #bool bool -------------------------------- --- Gets the EventDispatcher associated with this director
--- since v3.0 -- @function [parent=#Director] getEventDispatcher -- @param self -- @return EventDispatcher#EventDispatcher ret (return value: cc.EventDispatcher) -------------------------------- --- Replaces the running scene with a new one. The running scene is terminated.
--- ONLY call it if there is a running scene. -- @function [parent=#Director] replaceScene -- @param self -- @param #cc.Scene scene -------------------------------- --- -- @function [parent=#Director] multiplyMatrix -- @param self --- @param #int type --- @param #mat4_table mat +-- @param #int matrix_stack_type +-- @param #mat4_table mat4 -------------------------------- --- Gets the ActionManager associated with this director
--- since v2.0 -- @function [parent=#Director] getActionManager -- @param self -- @return ActionManager#ActionManager ret (return value: cc.ActionManager) -------------------------------- --- returns a shared instance of the director -- @function [parent=#Director] getInstance -- @param self -- @return Director#Director ret (return value: cc.Director) diff --git a/cocos/scripting/lua-bindings/auto/api/DisplayData.lua b/cocos/scripting/lua-bindings/auto/api/DisplayData.lua index 772d00d704..fc4a6c1930 100644 --- a/cocos/scripting/lua-bindings/auto/api/DisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/DisplayData.lua @@ -5,26 +5,22 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#DisplayData] copy -- @param self --- @param #ccs.DisplayData displayData +-- @param #ccs.DisplayData displaydata -------------------------------- --- -- @function [parent=#DisplayData] changeDisplayToTexture -- @param self --- @param #string displayName +-- @param #string str -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#DisplayData] create -- @param self -- @return DisplayData#DisplayData ret (return value: ccs.DisplayData) -------------------------------- --- js ctor -- @function [parent=#DisplayData] DisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua b/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua index efbcde86af..0739f44691 100644 --- a/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua @@ -5,50 +5,42 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#DisplayManager] getDisplayRenderNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#DisplayManager] getAnchorPointInPoints -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#DisplayManager] getDisplayRenderNodeType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#DisplayManager] removeDisplay -- @param self --- @param #int index +-- @param #int int -------------------------------- --- -- @function [parent=#DisplayManager] setForceChangeDisplay -- @param self --- @param #bool force +-- @param #bool bool -------------------------------- --- -- @function [parent=#DisplayManager] init -- @param self -- @param #ccs.Bone bone -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#DisplayManager] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#DisplayManager] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) @@ -58,85 +50,67 @@ -- @overload self, ccs.DisplayData, int -- @function [parent=#DisplayManager] addDisplay -- @param self --- @param #ccs.DisplayData displayData --- @param #int index +-- @param #ccs.DisplayData displaydata +-- @param #int int -------------------------------- -- @overload self, float, float -- @overload self, vec2_table -- @function [parent=#DisplayManager] containPoint -- @param self --- @param #float x --- @param #float y +-- @param #float float +-- @param #float float -- @return bool#bool ret (retunr value: bool) -------------------------------- --- Change display by index. You can just use this method to change display in the display list.
--- The display list is just used for this bone, and it is the displays you may use in every frame.
--- Note : if index is the same with prev index, the method will not effect
--- param index The index of the display you want to change
--- param force If true, then force change display to specified display, or current display will set to display index edit in the flash every key frame. -- @function [parent=#DisplayManager] changeDisplayWithIndex -- @param self --- @param #int index --- @param #bool force +-- @param #int int +-- @param #bool bool -------------------------------- --- -- @function [parent=#DisplayManager] changeDisplayWithName -- @param self --- @param #string name --- @param #bool force +-- @param #string str +-- @param #bool bool -------------------------------- --- -- @function [parent=#DisplayManager] isForceChangeDisplay -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#DisplayManager] getCurrentDisplayIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#DisplayManager] getAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#DisplayManager] getDecorativeDisplayList -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- Determines if the display is visible
--- see setVisible(bool)
--- return true if the node is visible, false if the node is hidden. -- @function [parent=#DisplayManager] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Sets whether the display is visible
--- The default value is true, a node is default to visible
--- param visible true if the node is visible, false if the node is hidden. -- @function [parent=#DisplayManager] setVisible -- @param self --- @param #bool visible +-- @param #bool bool -------------------------------- --- -- @function [parent=#DisplayManager] create -- @param self -- @param #ccs.Bone bone -- @return DisplayManager#DisplayManager ret (return value: ccs.DisplayManager) -------------------------------- --- -- @function [parent=#DisplayManager] DisplayManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/DrawNode.lua b/cocos/scripting/lua-bindings/auto/api/DrawNode.lua index 0e9687481b..381306a3a4 100644 --- a/cocos/scripting/lua-bindings/auto/api/DrawNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/DrawNode.lua @@ -5,76 +5,67 @@ -- @parent_module cc -------------------------------- --- draw a quadratic bezier curve with color and number of segments -- @function [parent=#DrawNode] drawQuadraticBezier -- @param self --- @param #vec2_table from --- @param #vec2_table control --- @param #vec2_table to --- @param #unsigned int segments --- @param #color4f_table color +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #unsigned int int +-- @param #color4f_table color4f -------------------------------- --- -- @function [parent=#DrawNode] onDraw -- @param self --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- Clear the geometry in the node's buffer. -- @function [parent=#DrawNode] clear -- @param self -------------------------------- --- draw a triangle with color -- @function [parent=#DrawNode] drawTriangle -- @param self --- @param #vec2_table p1 --- @param #vec2_table p2 --- @param #vec2_table p3 --- @param #color4f_table color +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #color4f_table color4f -------------------------------- --- draw a dot at a position, with a given radius and color -- @function [parent=#DrawNode] drawDot -- @param self --- @param #vec2_table pos --- @param #float radius --- @param #color4f_table color +-- @param #vec2_table vec2 +-- @param #float float +-- @param #color4f_table color4f -------------------------------- --- draw a cubic bezier curve with color and number of segments -- @function [parent=#DrawNode] drawCubicBezier -- @param self --- @param #vec2_table from --- @param #vec2_table control1 --- @param #vec2_table control2 --- @param #vec2_table to --- @param #unsigned int segments --- @param #color4f_table color +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #unsigned int int +-- @param #color4f_table color4f -------------------------------- --- draw a segment with a radius and color -- @function [parent=#DrawNode] drawSegment -- @param self --- @param #vec2_table from --- @param #vec2_table to --- @param #float radius --- @param #color4f_table color +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #float float +-- @param #color4f_table color4f -------------------------------- --- creates and initialize a DrawNode node -- @function [parent=#DrawNode] create -- @param self -- @return DrawNode#DrawNode ret (return value: cc.DrawNode) -------------------------------- --- -- @function [parent=#DrawNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua index 2186611bf2..850030d9c3 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseBackIn] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseBackIn#EaseBackIn ret (return value: cc.EaseBackIn) -------------------------------- --- -- @function [parent=#EaseBackIn] clone -- @param self -- @return EaseBackIn#EaseBackIn ret (return value: cc.EaseBackIn) -------------------------------- --- -- @function [parent=#EaseBackIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseBackIn] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua index bf34e1c7a7..035aeedbfb 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseBackInOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseBackInOut#EaseBackInOut ret (return value: cc.EaseBackInOut) -------------------------------- --- -- @function [parent=#EaseBackInOut] clone -- @param self -- @return EaseBackInOut#EaseBackInOut ret (return value: cc.EaseBackInOut) -------------------------------- --- -- @function [parent=#EaseBackInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseBackInOut] reverse -- @param self -- @return EaseBackInOut#EaseBackInOut ret (return value: cc.EaseBackInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua index 4c277e7572..c1bdda9357 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseBackOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseBackOut#EaseBackOut ret (return value: cc.EaseBackOut) -------------------------------- --- -- @function [parent=#EaseBackOut] clone -- @param self -- @return EaseBackOut#EaseBackOut ret (return value: cc.EaseBackOut) -------------------------------- --- -- @function [parent=#EaseBackOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseBackOut] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua b/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua index c04acabcb5..5b800810aa 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua @@ -5,35 +5,30 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EaseBezierAction] setBezierParamer -- @param self --- @param #float p0 --- @param #float p1 --- @param #float p2 --- @param #float p3 +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float -------------------------------- --- creates the action -- @function [parent=#EaseBezierAction] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseBezierAction#EaseBezierAction ret (return value: cc.EaseBezierAction) -------------------------------- --- -- @function [parent=#EaseBezierAction] clone -- @param self -- @return EaseBezierAction#EaseBezierAction ret (return value: cc.EaseBezierAction) -------------------------------- --- -- @function [parent=#EaseBezierAction] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseBezierAction] reverse -- @param self -- @return EaseBezierAction#EaseBezierAction ret (return value: cc.EaseBezierAction) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua index bd2089568e..037dce873b 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EaseBounce] clone -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) -------------------------------- --- -- @function [parent=#EaseBounce] reverse -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua index eb1e5bbd9d..0f7b0e7ea6 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseBounceIn] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseBounceIn#EaseBounceIn ret (return value: cc.EaseBounceIn) -------------------------------- --- -- @function [parent=#EaseBounceIn] clone -- @param self -- @return EaseBounceIn#EaseBounceIn ret (return value: cc.EaseBounceIn) -------------------------------- --- -- @function [parent=#EaseBounceIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseBounceIn] reverse -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua index 740d3c8704..e81ea374e4 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseBounceInOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseBounceInOut#EaseBounceInOut ret (return value: cc.EaseBounceInOut) -------------------------------- --- -- @function [parent=#EaseBounceInOut] clone -- @param self -- @return EaseBounceInOut#EaseBounceInOut ret (return value: cc.EaseBounceInOut) -------------------------------- --- -- @function [parent=#EaseBounceInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseBounceInOut] reverse -- @param self -- @return EaseBounceInOut#EaseBounceInOut ret (return value: cc.EaseBounceInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua index 64a284eede..1dc028dfdd 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseBounceOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseBounceOut#EaseBounceOut ret (return value: cc.EaseBounceOut) -------------------------------- --- -- @function [parent=#EaseBounceOut] clone -- @param self -- @return EaseBounceOut#EaseBounceOut ret (return value: cc.EaseBounceOut) -------------------------------- --- -- @function [parent=#EaseBounceOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseBounceOut] reverse -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua index 51b0b6490e..647f88bdd1 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseCircleActionIn] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseCircleActionIn#EaseCircleActionIn ret (return value: cc.EaseCircleActionIn) -------------------------------- --- -- @function [parent=#EaseCircleActionIn] clone -- @param self -- @return EaseCircleActionIn#EaseCircleActionIn ret (return value: cc.EaseCircleActionIn) -------------------------------- --- -- @function [parent=#EaseCircleActionIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseCircleActionIn] reverse -- @param self -- @return EaseCircleActionIn#EaseCircleActionIn ret (return value: cc.EaseCircleActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua index f879df09e5..bbe15b71c5 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseCircleActionInOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseCircleActionInOut#EaseCircleActionInOut ret (return value: cc.EaseCircleActionInOut) -------------------------------- --- -- @function [parent=#EaseCircleActionInOut] clone -- @param self -- @return EaseCircleActionInOut#EaseCircleActionInOut ret (return value: cc.EaseCircleActionInOut) -------------------------------- --- -- @function [parent=#EaseCircleActionInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseCircleActionInOut] reverse -- @param self -- @return EaseCircleActionInOut#EaseCircleActionInOut ret (return value: cc.EaseCircleActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua index 1a9f175414..bc8c231259 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseCircleActionOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseCircleActionOut#EaseCircleActionOut ret (return value: cc.EaseCircleActionOut) -------------------------------- --- -- @function [parent=#EaseCircleActionOut] clone -- @param self -- @return EaseCircleActionOut#EaseCircleActionOut ret (return value: cc.EaseCircleActionOut) -------------------------------- --- -- @function [parent=#EaseCircleActionOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseCircleActionOut] reverse -- @param self -- @return EaseCircleActionOut#EaseCircleActionOut ret (return value: cc.EaseCircleActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua index 0e53d65c72..4320a97977 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseCubicActionIn] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseCubicActionIn#EaseCubicActionIn ret (return value: cc.EaseCubicActionIn) -------------------------------- --- -- @function [parent=#EaseCubicActionIn] clone -- @param self -- @return EaseCubicActionIn#EaseCubicActionIn ret (return value: cc.EaseCubicActionIn) -------------------------------- --- -- @function [parent=#EaseCubicActionIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseCubicActionIn] reverse -- @param self -- @return EaseCubicActionIn#EaseCubicActionIn ret (return value: cc.EaseCubicActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua index fbbb49a273..adcc8e1bd2 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseCubicActionInOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseCubicActionInOut#EaseCubicActionInOut ret (return value: cc.EaseCubicActionInOut) -------------------------------- --- -- @function [parent=#EaseCubicActionInOut] clone -- @param self -- @return EaseCubicActionInOut#EaseCubicActionInOut ret (return value: cc.EaseCubicActionInOut) -------------------------------- --- -- @function [parent=#EaseCubicActionInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseCubicActionInOut] reverse -- @param self -- @return EaseCubicActionInOut#EaseCubicActionInOut ret (return value: cc.EaseCubicActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua index 2250af3226..e09318698c 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseCubicActionOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseCubicActionOut#EaseCubicActionOut ret (return value: cc.EaseCubicActionOut) -------------------------------- --- -- @function [parent=#EaseCubicActionOut] clone -- @param self -- @return EaseCubicActionOut#EaseCubicActionOut ret (return value: cc.EaseCubicActionOut) -------------------------------- --- -- @function [parent=#EaseCubicActionOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseCubicActionOut] reverse -- @param self -- @return EaseCubicActionOut#EaseCubicActionOut ret (return value: cc.EaseCubicActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua b/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua index aa8c965c02..6d9f1190ab 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- set period of the wave in radians. -- @function [parent=#EaseElastic] setPeriod -- @param self --- @param #float fPeriod +-- @param #float float -------------------------------- --- get period of the wave in radians. default is 0.3 -- @function [parent=#EaseElastic] getPeriod -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#EaseElastic] clone -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) -------------------------------- --- -- @function [parent=#EaseElastic] reverse -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua index be975202b7..b38769fd4d 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua @@ -9,24 +9,21 @@ -- @overload self, cc.ActionInterval, float -- @function [parent=#EaseElasticIn] create -- @param self --- @param #cc.ActionInterval action --- @param #float period +-- @param #cc.ActionInterval actioninterval +-- @param #float float -- @return EaseElasticIn#EaseElasticIn ret (retunr value: cc.EaseElasticIn) -------------------------------- --- -- @function [parent=#EaseElasticIn] clone -- @param self -- @return EaseElasticIn#EaseElasticIn ret (return value: cc.EaseElasticIn) -------------------------------- --- -- @function [parent=#EaseElasticIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseElasticIn] reverse -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua index cae6e19b10..5d836c34ae 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua @@ -9,24 +9,21 @@ -- @overload self, cc.ActionInterval, float -- @function [parent=#EaseElasticInOut] create -- @param self --- @param #cc.ActionInterval action --- @param #float period +-- @param #cc.ActionInterval actioninterval +-- @param #float float -- @return EaseElasticInOut#EaseElasticInOut ret (retunr value: cc.EaseElasticInOut) -------------------------------- --- -- @function [parent=#EaseElasticInOut] clone -- @param self -- @return EaseElasticInOut#EaseElasticInOut ret (return value: cc.EaseElasticInOut) -------------------------------- --- -- @function [parent=#EaseElasticInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseElasticInOut] reverse -- @param self -- @return EaseElasticInOut#EaseElasticInOut ret (return value: cc.EaseElasticInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua index 2b825cc636..a3a2498473 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua @@ -9,24 +9,21 @@ -- @overload self, cc.ActionInterval, float -- @function [parent=#EaseElasticOut] create -- @param self --- @param #cc.ActionInterval action --- @param #float period +-- @param #cc.ActionInterval actioninterval +-- @param #float float -- @return EaseElasticOut#EaseElasticOut ret (retunr value: cc.EaseElasticOut) -------------------------------- --- -- @function [parent=#EaseElasticOut] clone -- @param self -- @return EaseElasticOut#EaseElasticOut ret (return value: cc.EaseElasticOut) -------------------------------- --- -- @function [parent=#EaseElasticOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseElasticOut] reverse -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua index 21007fb6ee..75601c4396 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseExponentialIn] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseExponentialIn#EaseExponentialIn ret (return value: cc.EaseExponentialIn) -------------------------------- --- -- @function [parent=#EaseExponentialIn] clone -- @param self -- @return EaseExponentialIn#EaseExponentialIn ret (return value: cc.EaseExponentialIn) -------------------------------- --- -- @function [parent=#EaseExponentialIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseExponentialIn] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua index a61ad52653..c3985a8546 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseExponentialInOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseExponentialInOut#EaseExponentialInOut ret (return value: cc.EaseExponentialInOut) -------------------------------- --- -- @function [parent=#EaseExponentialInOut] clone -- @param self -- @return EaseExponentialInOut#EaseExponentialInOut ret (return value: cc.EaseExponentialInOut) -------------------------------- --- -- @function [parent=#EaseExponentialInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseExponentialInOut] reverse -- @param self -- @return EaseExponentialInOut#EaseExponentialInOut ret (return value: cc.EaseExponentialInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua index c434d595fd..e9a42c2a67 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseExponentialOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseExponentialOut#EaseExponentialOut ret (return value: cc.EaseExponentialOut) -------------------------------- --- -- @function [parent=#EaseExponentialOut] clone -- @param self -- @return EaseExponentialOut#EaseExponentialOut ret (return value: cc.EaseExponentialOut) -------------------------------- --- -- @function [parent=#EaseExponentialOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseExponentialOut] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseIn.lua index bda5e33379..139d6a7a70 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseIn.lua @@ -5,27 +5,23 @@ -- @parent_module cc -------------------------------- --- Creates the action with the inner action and the rate parameter -- @function [parent=#EaseIn] create -- @param self --- @param #cc.ActionInterval action --- @param #float rate +-- @param #cc.ActionInterval actioninterval +-- @param #float float -- @return EaseIn#EaseIn ret (return value: cc.EaseIn) -------------------------------- --- -- @function [parent=#EaseIn] clone -- @param self -- @return EaseIn#EaseIn ret (return value: cc.EaseIn) -------------------------------- --- -- @function [parent=#EaseIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseIn] reverse -- @param self -- @return EaseIn#EaseIn ret (return value: cc.EaseIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua index 76491459b1..965523b368 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua @@ -5,27 +5,23 @@ -- @parent_module cc -------------------------------- --- Creates the action with the inner action and the rate parameter -- @function [parent=#EaseInOut] create -- @param self --- @param #cc.ActionInterval action --- @param #float rate +-- @param #cc.ActionInterval actioninterval +-- @param #float float -- @return EaseInOut#EaseInOut ret (return value: cc.EaseInOut) -------------------------------- --- -- @function [parent=#EaseInOut] clone -- @param self -- @return EaseInOut#EaseInOut ret (return value: cc.EaseInOut) -------------------------------- --- -- @function [parent=#EaseInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseInOut] reverse -- @param self -- @return EaseInOut#EaseInOut ret (return value: cc.EaseInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseOut.lua index 3312ee56d7..ec630b401d 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseOut.lua @@ -5,27 +5,23 @@ -- @parent_module cc -------------------------------- --- Creates the action with the inner action and the rate parameter -- @function [parent=#EaseOut] create -- @param self --- @param #cc.ActionInterval action --- @param #float rate +-- @param #cc.ActionInterval actioninterval +-- @param #float float -- @return EaseOut#EaseOut ret (return value: cc.EaseOut) -------------------------------- --- -- @function [parent=#EaseOut] clone -- @param self -- @return EaseOut#EaseOut ret (return value: cc.EaseOut) -------------------------------- --- -- @function [parent=#EaseOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseOut] reverse -- @param self -- @return EaseOut#EaseOut ret (return value: cc.EaseOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua index 56ef34210f..0eab085d84 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseQuadraticActionIn] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseQuadraticActionIn#EaseQuadraticActionIn ret (return value: cc.EaseQuadraticActionIn) -------------------------------- --- -- @function [parent=#EaseQuadraticActionIn] clone -- @param self -- @return EaseQuadraticActionIn#EaseQuadraticActionIn ret (return value: cc.EaseQuadraticActionIn) -------------------------------- --- -- @function [parent=#EaseQuadraticActionIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseQuadraticActionIn] reverse -- @param self -- @return EaseQuadraticActionIn#EaseQuadraticActionIn ret (return value: cc.EaseQuadraticActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua index 2e31d2c428..531d387b79 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseQuadraticActionInOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseQuadraticActionInOut#EaseQuadraticActionInOut ret (return value: cc.EaseQuadraticActionInOut) -------------------------------- --- -- @function [parent=#EaseQuadraticActionInOut] clone -- @param self -- @return EaseQuadraticActionInOut#EaseQuadraticActionInOut ret (return value: cc.EaseQuadraticActionInOut) -------------------------------- --- -- @function [parent=#EaseQuadraticActionInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseQuadraticActionInOut] reverse -- @param self -- @return EaseQuadraticActionInOut#EaseQuadraticActionInOut ret (return value: cc.EaseQuadraticActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua index a457f90723..e5b5f69955 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseQuadraticActionOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseQuadraticActionOut#EaseQuadraticActionOut ret (return value: cc.EaseQuadraticActionOut) -------------------------------- --- -- @function [parent=#EaseQuadraticActionOut] clone -- @param self -- @return EaseQuadraticActionOut#EaseQuadraticActionOut ret (return value: cc.EaseQuadraticActionOut) -------------------------------- --- -- @function [parent=#EaseQuadraticActionOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseQuadraticActionOut] reverse -- @param self -- @return EaseQuadraticActionOut#EaseQuadraticActionOut ret (return value: cc.EaseQuadraticActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua index 71d6b84792..9763da5cce 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseQuarticActionIn] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseQuarticActionIn#EaseQuarticActionIn ret (return value: cc.EaseQuarticActionIn) -------------------------------- --- -- @function [parent=#EaseQuarticActionIn] clone -- @param self -- @return EaseQuarticActionIn#EaseQuarticActionIn ret (return value: cc.EaseQuarticActionIn) -------------------------------- --- -- @function [parent=#EaseQuarticActionIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseQuarticActionIn] reverse -- @param self -- @return EaseQuarticActionIn#EaseQuarticActionIn ret (return value: cc.EaseQuarticActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua index 9edd4fe4bd..49d5f23685 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseQuarticActionInOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseQuarticActionInOut#EaseQuarticActionInOut ret (return value: cc.EaseQuarticActionInOut) -------------------------------- --- -- @function [parent=#EaseQuarticActionInOut] clone -- @param self -- @return EaseQuarticActionInOut#EaseQuarticActionInOut ret (return value: cc.EaseQuarticActionInOut) -------------------------------- --- -- @function [parent=#EaseQuarticActionInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseQuarticActionInOut] reverse -- @param self -- @return EaseQuarticActionInOut#EaseQuarticActionInOut ret (return value: cc.EaseQuarticActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua index c19781f8e7..c63c378424 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseQuarticActionOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseQuarticActionOut#EaseQuarticActionOut ret (return value: cc.EaseQuarticActionOut) -------------------------------- --- -- @function [parent=#EaseQuarticActionOut] clone -- @param self -- @return EaseQuarticActionOut#EaseQuarticActionOut ret (return value: cc.EaseQuarticActionOut) -------------------------------- --- -- @function [parent=#EaseQuarticActionOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseQuarticActionOut] reverse -- @param self -- @return EaseQuarticActionOut#EaseQuarticActionOut ret (return value: cc.EaseQuarticActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua index 49f216a67e..a0ed09cfc3 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseQuinticActionIn] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseQuinticActionIn#EaseQuinticActionIn ret (return value: cc.EaseQuinticActionIn) -------------------------------- --- -- @function [parent=#EaseQuinticActionIn] clone -- @param self -- @return EaseQuinticActionIn#EaseQuinticActionIn ret (return value: cc.EaseQuinticActionIn) -------------------------------- --- -- @function [parent=#EaseQuinticActionIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseQuinticActionIn] reverse -- @param self -- @return EaseQuinticActionIn#EaseQuinticActionIn ret (return value: cc.EaseQuinticActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua index ecb66dde84..24231cae27 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseQuinticActionInOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseQuinticActionInOut#EaseQuinticActionInOut ret (return value: cc.EaseQuinticActionInOut) -------------------------------- --- -- @function [parent=#EaseQuinticActionInOut] clone -- @param self -- @return EaseQuinticActionInOut#EaseQuinticActionInOut ret (return value: cc.EaseQuinticActionInOut) -------------------------------- --- -- @function [parent=#EaseQuinticActionInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseQuinticActionInOut] reverse -- @param self -- @return EaseQuinticActionInOut#EaseQuinticActionInOut ret (return value: cc.EaseQuinticActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua index 3b44212159..b87c6d5fc2 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseQuinticActionOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseQuinticActionOut#EaseQuinticActionOut ret (return value: cc.EaseQuinticActionOut) -------------------------------- --- -- @function [parent=#EaseQuinticActionOut] clone -- @param self -- @return EaseQuinticActionOut#EaseQuinticActionOut ret (return value: cc.EaseQuinticActionOut) -------------------------------- --- -- @function [parent=#EaseQuinticActionOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseQuinticActionOut] reverse -- @param self -- @return EaseQuinticActionOut#EaseQuinticActionOut ret (return value: cc.EaseQuinticActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua b/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua index 4508d53990..2712d20ef1 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- set rate value for the actions -- @function [parent=#EaseRateAction] setRate -- @param self --- @param #float rate +-- @param #float float -------------------------------- --- get rate value for the actions -- @function [parent=#EaseRateAction] getRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#EaseRateAction] clone -- @param self -- @return EaseRateAction#EaseRateAction ret (return value: cc.EaseRateAction) -------------------------------- --- -- @function [parent=#EaseRateAction] reverse -- @param self -- @return EaseRateAction#EaseRateAction ret (return value: cc.EaseRateAction) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua index 8f77dfde52..fb85e63833 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseSineIn] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseSineIn#EaseSineIn ret (return value: cc.EaseSineIn) -------------------------------- --- -- @function [parent=#EaseSineIn] clone -- @param self -- @return EaseSineIn#EaseSineIn ret (return value: cc.EaseSineIn) -------------------------------- --- -- @function [parent=#EaseSineIn] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseSineIn] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua index 0425c998db..d1f4828dca 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseSineInOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseSineInOut#EaseSineInOut ret (return value: cc.EaseSineInOut) -------------------------------- --- -- @function [parent=#EaseSineInOut] clone -- @param self -- @return EaseSineInOut#EaseSineInOut ret (return value: cc.EaseSineInOut) -------------------------------- --- -- @function [parent=#EaseSineInOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseSineInOut] reverse -- @param self -- @return EaseSineInOut#EaseSineInOut ret (return value: cc.EaseSineInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua index b751bed6af..aae018e91f 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#EaseSineOut] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return EaseSineOut#EaseSineOut ret (return value: cc.EaseSineOut) -------------------------------- --- -- @function [parent=#EaseSineOut] clone -- @param self -- @return EaseSineOut#EaseSineOut ret (return value: cc.EaseSineOut) -------------------------------- --- -- @function [parent=#EaseSineOut] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#EaseSineOut] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EditBox.lua b/cocos/scripting/lua-bindings/auto/api/EditBox.lua index 7aae0b17ee..35579ac4c8 100644 --- a/cocos/scripting/lua-bindings/auto/api/EditBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/EditBox.lua @@ -5,177 +5,129 @@ -- @parent_module cc -------------------------------- --- 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) -------------------------------- --- Set the placeholder's font name.
--- param pFontName The font name. -- @function [parent=#EditBox] setPlaceholderFontName -- @param self --- @param #char pFontName +-- @param #char char -------------------------------- --- 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 +-- @param #char char -------------------------------- --- Set the placeholder's font size.
--- param fontSize The font size. -- @function [parent=#EditBox] setPlaceholderFontSize -- @param self --- @param #int fontSize +-- @param #int int -------------------------------- --- 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 +-- @param #int inputmode -------------------------------- --- 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 +-- @param #color3b_table color3b -------------------------------- --- Set the font color of the widget's text. -- @function [parent=#EditBox] setFontColor -- @param self --- @param #color3b_table color +-- @param #color3b_table color3b -------------------------------- --- 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 +-- @param #char char +-- @param #int int -------------------------------- --- Set the font size.
--- param fontSize The font size. -- @function [parent=#EditBox] setFontSize -- @param self --- @param #int fontSize +-- @param #int int -------------------------------- --- Init edit box with specified size. This method should be invoked right after constructor.
--- param size The size of edit box. -- @function [parent=#EditBox] initWithSizeAndBackgroundSprite -- @param self -- @param #size_table size --- @param #cc.Scale9Sprite pNormal9SpriteBg +-- @param #cc.Scale9Sprite scale9sprite -- @return bool#bool ret (return 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 +-- @param #char char -------------------------------- --- 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 +-- @param #int keyboardreturntype -------------------------------- --- 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 +-- @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 +-- @param #char char -------------------------------- --- 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 +-- @param #int int -------------------------------- --- 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 +-- @param #char char +-- @param #int int -------------------------------- --- create a edit box with size.
--- return An autorelease pointer of EditBox, you don't need to release it only if you retain it again. -- @function [parent=#EditBox] create -- @param self -- @param #size_table size --- @param #cc.Scale9Sprite pNormal9SpriteBg --- @param #cc.Scale9Sprite pPressed9SpriteBg --- @param #cc.Scale9Sprite pDisabled9SpriteBg +-- @param #cc.Scale9Sprite scale9sprite +-- @param #cc.Scale9Sprite scale9sprite +-- @param #cc.Scale9Sprite scale9sprite -- @return EditBox#EditBox ret (return value: cc.EditBox) -------------------------------- --- -- @function [parent=#EditBox] setAnchorPoint -- @param self --- @param #vec2_table anchorPoint +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#EditBox] setPosition -- @param self --- @param #vec2_table pos +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#EditBox] setVisible -- @param self --- @param #bool visible +-- @param #bool bool -------------------------------- --- -- @function [parent=#EditBox] setContentSize -- @param self -- @param #size_table size -------------------------------- --- Constructor.
--- js ctor -- @function [parent=#EditBox] EditBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Event.lua b/cocos/scripting/lua-bindings/auto/api/Event.lua index 62e8c8347e..aebf35b831 100644 --- a/cocos/scripting/lua-bindings/auto/api/Event.lua +++ b/cocos/scripting/lua-bindings/auto/api/Event.lua @@ -5,28 +5,21 @@ -- @parent_module cc -------------------------------- --- Checks whether the event has been stopped -- @function [parent=#Event] isStopped -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Gets the event type -- @function [parent=#Event] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- @brief Gets current target of the event
--- return The target with which the event associates.
--- note It onlys be available when the event listener is associated with node.
--- It returns 0 when the listener is associated with fixed priority. -- @function [parent=#Event] getCurrentTarget -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Stops propagation for current event -- @function [parent=#Event] stopPropagation -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/EventController.lua b/cocos/scripting/lua-bindings/auto/api/EventController.lua index 108baafc32..e727158d6f 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventController.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventController.lua @@ -5,37 +5,31 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EventController] getControllerEventType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#EventController] setConnectStatus -- @param self --- @param #bool isConnected +-- @param #bool bool -------------------------------- --- -- @function [parent=#EventController] isConnected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#EventController] setKeyCode -- @param self --- @param #int keyCode +-- @param #int int -------------------------------- --- -- @function [parent=#EventController] getController -- @param self -- @return Controller#Controller ret (return value: cc.Controller) -------------------------------- --- -- @function [parent=#EventController] getKeyCode -- @param self -- @return int#int ret (return value: int) @@ -45,8 +39,8 @@ -- @overload self, int, cc.Controller, int -- @function [parent=#EventController] EventController -- @param self --- @param #int type +-- @param #int controllereventtype -- @param #cc.Controller controller --- @param #int keyCode +-- @param #int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventCustom.lua b/cocos/scripting/lua-bindings/auto/api/EventCustom.lua index 645d85e0a7..2f8ebe818d 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventCustom.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventCustom.lua @@ -5,15 +5,13 @@ -- @parent_module cc -------------------------------- --- Gets event name -- @function [parent=#EventCustom] getEventName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Constructor -- @function [parent=#EventCustom] EventCustom -- @param self --- @param #string eventName +-- @param #string str return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua b/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua index 2db1cfbe9a..84c8901a93 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua @@ -5,111 +5,83 @@ -- @parent_module cc -------------------------------- --- Pauses all listeners which are associated the specified target. -- @function [parent=#EventDispatcher] pauseEventListenersForTarget -- @param self --- @param #cc.Node target --- @param #bool recursive +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- Adds a event listener for a specified event with the priority of scene graph.
--- param listener The listener of a specified event.
--- param node The priority of the listener is based on the draw order of this node.
--- note The priority of scene graph will be fixed value 0. So the order of listener item
--- in the vector will be ' <0, scene graph (0 priority), >0'. -- @function [parent=#EventDispatcher] addEventListenerWithSceneGraphPriority -- @param self --- @param #cc.EventListener listener +-- @param #cc.EventListener eventlistener -- @param #cc.Node node -------------------------------- --- Whether to enable dispatching events -- @function [parent=#EventDispatcher] setEnabled -- @param self --- @param #bool isEnabled +-- @param #bool bool -------------------------------- --- Adds a event listener for a specified event with the fixed priority.
--- param listener The listener of a specified event.
--- param fixedPriority The fixed priority of the listener.
--- note A lower priority will be called before the ones that have a higher value.
--- 0 priority is forbidden for fixed priority since it's used for scene graph based priority. -- @function [parent=#EventDispatcher] addEventListenerWithFixedPriority -- @param self --- @param #cc.EventListener listener --- @param #int fixedPriority +-- @param #cc.EventListener eventlistener +-- @param #int int -------------------------------- --- Remove a listener
--- param listener The specified event listener which needs to be removed. -- @function [parent=#EventDispatcher] removeEventListener -- @param self --- @param #cc.EventListener listener +-- @param #cc.EventListener eventlistener -------------------------------- --- Resumes all listeners which are associated the specified target. -- @function [parent=#EventDispatcher] resumeEventListenersForTarget -- @param self --- @param #cc.Node target --- @param #bool recursive +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- Removes all listeners which are associated with the specified target. -- @function [parent=#EventDispatcher] removeEventListenersForTarget -- @param self --- @param #cc.Node target --- @param #bool recursive +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- Sets listener's priority with fixed value. -- @function [parent=#EventDispatcher] setPriority -- @param self --- @param #cc.EventListener listener --- @param #int fixedPriority +-- @param #cc.EventListener eventlistener +-- @param #int int -------------------------------- --- Adds a Custom event listener.
--- It will use a fixed priority of 1.
--- return the generated event. Needed in order to remove the event from the dispather -- @function [parent=#EventDispatcher] addCustomEventListener -- @param self --- @param #string eventName --- @param #function callback +-- @param #string str +-- @param #function func -- @return EventListenerCustom#EventListenerCustom ret (return value: cc.EventListenerCustom) -------------------------------- --- Dispatches the event
--- Also removes all EventListeners marked for deletion from the
--- event dispatcher list. -- @function [parent=#EventDispatcher] dispatchEvent -- @param self -- @param #cc.Event event -------------------------------- --- Removes all listeners -- @function [parent=#EventDispatcher] removeAllEventListeners -- @param self -------------------------------- --- Removes all custom listeners with the same event name -- @function [parent=#EventDispatcher] removeCustomEventListeners -- @param self --- @param #string customEventName +-- @param #string str -------------------------------- --- Checks whether dispatching events is enabled -- @function [parent=#EventDispatcher] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Removes all listeners with the same event listener type -- @function [parent=#EventDispatcher] removeEventListenersForType -- @param self --- @param #int listenerType +-- @param #int type -------------------------------- --- Constructor of EventDispatcher -- @function [parent=#EventDispatcher] EventDispatcher -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/EventFocus.lua b/cocos/scripting/lua-bindings/auto/api/EventFocus.lua index 29c49daf43..3aa39d96ff 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventFocus.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventFocus.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EventFocus] EventFocus -- @param self --- @param #ccui.Widget widgetLoseFocus --- @param #ccui.Widget widgetGetFocus +-- @param #ccui.Widget widget +-- @param #ccui.Widget widget return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventFrame.lua b/cocos/scripting/lua-bindings/auto/api/EventFrame.lua index 67930d7f4c..2638ad42bc 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventFrame.lua @@ -5,31 +5,26 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#EventFrame] setEvent -- @param self --- @param #string event +-- @param #string str -------------------------------- --- -- @function [parent=#EventFrame] getEvent -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#EventFrame] create -- @param self -- @return EventFrame#EventFrame ret (return value: ccs.EventFrame) -------------------------------- --- -- @function [parent=#EventFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#EventFrame] EventFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua b/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua index 23861ac190..86f722ae6b 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EventKeyboard] EventKeyboard -- @param self --- @param #int keyCode --- @param #bool isPressed +-- @param #int keycode +-- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventListener.lua b/cocos/scripting/lua-bindings/auto/api/EventListener.lua index 220f4b3901..2bd1addba5 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListener.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListener.lua @@ -5,29 +5,21 @@ -- @parent_module cc -------------------------------- --- Enables or disables the listener
--- note Only listeners with `enabled` state will be able to receive events.
--- When an listener was initialized, it's enabled by default.
--- An event listener can receive events when it is enabled and is not paused.
--- paused state is always false when it is a fixed priority listener. -- @function [parent=#EventListener] setEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- Clones the listener, its subclasses have to override this method. -- @function [parent=#EventListener] clone -- @param self -- @return EventListener#EventListener ret (return value: cc.EventListener) -------------------------------- --- Checks whether the listener is enabled -- @function [parent=#EventListener] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Checks whether the listener is available. -- @function [parent=#EventListener] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua index 33760d7da4..0ac7abb066 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- / Overrides -- @function [parent=#EventListenerAcceleration] clone -- @param self -- @return EventListenerAcceleration#EventListenerAcceleration ret (return value: cc.EventListenerAcceleration) -------------------------------- --- -- @function [parent=#EventListenerAcceleration] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua index 362d380c5b..338b93fcd1 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua @@ -5,19 +5,16 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EventListenerController] create -- @param self -- @return EventListenerController#EventListenerController ret (return value: cc.EventListenerController) -------------------------------- --- -- @function [parent=#EventListenerController] clone -- @param self -- @return EventListenerController#EventListenerController ret (return value: cc.EventListenerController) -------------------------------- --- / Overrides -- @function [parent=#EventListenerController] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua index c634a11605..c8d4281472 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EventListenerCustom] clone -- @param self -- @return EventListenerCustom#EventListenerCustom ret (return value: cc.EventListenerCustom) -------------------------------- --- / Overrides -- @function [parent=#EventListenerCustom] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua index 7e6c399722..038a145fa7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- / Overrides -- @function [parent=#EventListenerFocus] clone -- @param self -- @return EventListenerFocus#EventListenerFocus ret (return value: cc.EventListenerFocus) -------------------------------- --- -- @function [parent=#EventListenerFocus] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua index 9c8fcc5110..ff9594630a 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- / Overrides -- @function [parent=#EventListenerKeyboard] clone -- @param self -- @return EventListenerKeyboard#EventListenerKeyboard ret (return value: cc.EventListenerKeyboard) -------------------------------- --- -- @function [parent=#EventListenerKeyboard] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua index 4015a24615..fc04e71698 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- / Overrides -- @function [parent=#EventListenerMouse] clone -- @param self -- @return EventListenerMouse#EventListenerMouse ret (return value: cc.EventListenerMouse) -------------------------------- --- -- @function [parent=#EventListenerMouse] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua index 02039547f8..5c9d1e6fc5 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua @@ -5,19 +5,16 @@ -- @parent_module cc -------------------------------- --- create the listener -- @function [parent=#EventListenerPhysicsContact] create -- @param self -- @return EventListenerPhysicsContact#EventListenerPhysicsContact ret (return value: cc.EventListenerPhysicsContact) -------------------------------- --- -- @function [parent=#EventListenerPhysicsContact] clone -- @param self -- @return EventListenerPhysicsContact#EventListenerPhysicsContact ret (return value: cc.EventListenerPhysicsContact) -------------------------------- --- -- @function [parent=#EventListenerPhysicsContact] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua index 02b608e263..88e8610634 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua @@ -5,23 +5,20 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EventListenerPhysicsContactWithBodies] hitTest -- @param self --- @param #cc.PhysicsShape shapeA --- @param #cc.PhysicsShape shapeB +-- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape physicsshape -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#EventListenerPhysicsContactWithBodies] create -- @param self --- @param #cc.PhysicsBody bodyA --- @param #cc.PhysicsBody bodyB +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody -- @return EventListenerPhysicsContactWithBodies#EventListenerPhysicsContactWithBodies ret (return value: cc.EventListenerPhysicsContactWithBodies) -------------------------------- --- -- @function [parent=#EventListenerPhysicsContactWithBodies] clone -- @param self -- @return EventListenerPhysicsContactWithBodies#EventListenerPhysicsContactWithBodies ret (return value: cc.EventListenerPhysicsContactWithBodies) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua index 0222b32314..73c3f799f2 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua @@ -5,22 +5,19 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EventListenerPhysicsContactWithGroup] hitTest -- @param self --- @param #cc.PhysicsShape shapeA --- @param #cc.PhysicsShape shapeB +-- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape physicsshape -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#EventListenerPhysicsContactWithGroup] create -- @param self --- @param #int group +-- @param #int int -- @return EventListenerPhysicsContactWithGroup#EventListenerPhysicsContactWithGroup ret (return value: cc.EventListenerPhysicsContactWithGroup) -------------------------------- --- -- @function [parent=#EventListenerPhysicsContactWithGroup] clone -- @param self -- @return EventListenerPhysicsContactWithGroup#EventListenerPhysicsContactWithGroup ret (return value: cc.EventListenerPhysicsContactWithGroup) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua index 96f49e33c7..902a390148 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua @@ -5,23 +5,20 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EventListenerPhysicsContactWithShapes] hitTest -- @param self --- @param #cc.PhysicsShape shapeA --- @param #cc.PhysicsShape shapeB +-- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape physicsshape -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#EventListenerPhysicsContactWithShapes] create -- @param self --- @param #cc.PhysicsShape shapeA --- @param #cc.PhysicsShape shapeB +-- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape physicsshape -- @return EventListenerPhysicsContactWithShapes#EventListenerPhysicsContactWithShapes ret (return value: cc.EventListenerPhysicsContactWithShapes) -------------------------------- --- -- @function [parent=#EventListenerPhysicsContactWithShapes] clone -- @param self -- @return EventListenerPhysicsContactWithShapes#EventListenerPhysicsContactWithShapes ret (return value: cc.EventListenerPhysicsContactWithShapes) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua index 3c6425d423..fd7e487488 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- / Overrides -- @function [parent=#EventListenerTouchAllAtOnce] clone -- @param self -- @return EventListenerTouchAllAtOnce#EventListenerTouchAllAtOnce ret (return value: cc.EventListenerTouchAllAtOnce) -------------------------------- --- -- @function [parent=#EventListenerTouchAllAtOnce] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua index adfc237d07..1da5fcb02e 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EventListenerTouchOneByOne] isSwallowTouches -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#EventListenerTouchOneByOne] setSwallowTouches -- @param self --- @param #bool needSwallow +-- @param #bool bool -------------------------------- --- / Overrides -- @function [parent=#EventListenerTouchOneByOne] clone -- @param self -- @return EventListenerTouchOneByOne#EventListenerTouchOneByOne ret (return value: cc.EventListenerTouchOneByOne) -------------------------------- --- -- @function [parent=#EventListenerTouchOneByOne] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventMouse.lua b/cocos/scripting/lua-bindings/auto/api/EventMouse.lua index 4021c695a2..4d991e49e3 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventMouse.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventMouse.lua @@ -5,101 +5,85 @@ -- @parent_module cc -------------------------------- --- returns the previous touch location in screen coordinates -- @function [parent=#EventMouse] getPreviousLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- returns the current touch location in OpenGL coordinates -- @function [parent=#EventMouse] getLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#EventMouse] getMouseButton -- @param self -- @return int#int ret (return value: int) -------------------------------- --- returns the previous touch location in OpenGL coordinates -- @function [parent=#EventMouse] getPreviousLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- returns the delta of 2 current touches locations in screen coordinates -- @function [parent=#EventMouse] getDelta -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Set mouse scroll data -- @function [parent=#EventMouse] setScrollData -- @param self --- @param #float scrollX --- @param #float scrollY +-- @param #float float +-- @param #float float -------------------------------- --- returns the start touch location in screen coordinates -- @function [parent=#EventMouse] getStartLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- returns the start touch location in OpenGL coordinates -- @function [parent=#EventMouse] getStartLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#EventMouse] setMouseButton -- @param self --- @param #int button +-- @param #int int -------------------------------- --- returns the current touch location in screen coordinates -- @function [parent=#EventMouse] getLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#EventMouse] getScrollY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#EventMouse] getScrollX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#EventMouse] getCursorX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#EventMouse] getCursorY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#EventMouse] setCursorPosition -- @param self --- @param #float x --- @param #float y +-- @param #float float +-- @param #float float -------------------------------- --- -- @function [parent=#EventMouse] EventMouse -- @param self --- @param #int mouseEventCode +-- @param #int mouseeventtype return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventTouch.lua b/cocos/scripting/lua-bindings/auto/api/EventTouch.lua index 16567c6908..d32256fd93 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventTouch.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventTouch.lua @@ -5,19 +5,16 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#EventTouch] getEventCode -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#EventTouch] setEventCode -- @param self --- @param #int eventCode +-- @param #int eventcode -------------------------------- --- -- @function [parent=#EventTouch] EventTouch -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/FadeIn.lua b/cocos/scripting/lua-bindings/auto/api/FadeIn.lua index 9b21453127..f9875e7109 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeIn.lua @@ -5,32 +5,27 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#FadeIn] setReverseAction -- @param self --- @param #cc.FadeTo ac +-- @param #cc.FadeTo fadeto -------------------------------- --- creates the action -- @function [parent=#FadeIn] create -- @param self --- @param #float d +-- @param #float float -- @return FadeIn#FadeIn ret (return value: cc.FadeIn) -------------------------------- --- -- @function [parent=#FadeIn] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#FadeIn] clone -- @param self -- @return FadeIn#FadeIn ret (return value: cc.FadeIn) -------------------------------- --- -- @function [parent=#FadeIn] reverse -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOut.lua b/cocos/scripting/lua-bindings/auto/api/FadeOut.lua index 8d4ec375af..e49935eb6e 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOut.lua @@ -5,32 +5,27 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#FadeOut] setReverseAction -- @param self --- @param #cc.FadeTo ac +-- @param #cc.FadeTo fadeto -------------------------------- --- creates the action -- @function [parent=#FadeOut] create -- @param self --- @param #float d +-- @param #float float -- @return FadeOut#FadeOut ret (return value: cc.FadeOut) -------------------------------- --- -- @function [parent=#FadeOut] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#FadeOut] clone -- @param self -- @return FadeOut#FadeOut ret (return value: cc.FadeOut) -------------------------------- --- -- @function [parent=#FadeOut] reverse -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua index 52afec3aa4..6936709eaf 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua @@ -5,25 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action with the grid size and the duration -- @function [parent=#FadeOutBLTiles] create -- @param self --- @param #float duration --- @param #size_table gridSize +-- @param #float float +-- @param #size_table size -- @return FadeOutBLTiles#FadeOutBLTiles ret (return value: cc.FadeOutBLTiles) -------------------------------- --- -- @function [parent=#FadeOutBLTiles] clone -- @param self -- @return FadeOutBLTiles#FadeOutBLTiles ret (return value: cc.FadeOutBLTiles) -------------------------------- --- -- @function [parent=#FadeOutBLTiles] testFunc -- @param self --- @param #size_table pos --- @param #float time +-- @param #size_table size +-- @param #float float -- @return float#float ret (return value: float) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua index 111e762731..0fdf8f3c1b 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua @@ -5,25 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action with the grid size and the duration -- @function [parent=#FadeOutDownTiles] create -- @param self --- @param #float duration --- @param #size_table gridSize +-- @param #float float +-- @param #size_table size -- @return FadeOutDownTiles#FadeOutDownTiles ret (return value: cc.FadeOutDownTiles) -------------------------------- --- -- @function [parent=#FadeOutDownTiles] clone -- @param self -- @return FadeOutDownTiles#FadeOutDownTiles ret (return value: cc.FadeOutDownTiles) -------------------------------- --- -- @function [parent=#FadeOutDownTiles] testFunc -- @param self --- @param #size_table pos --- @param #float time +-- @param #size_table size +-- @param #float float -- @return float#float ret (return value: float) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua index 6315647ab9..127a804281 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua @@ -5,50 +5,43 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#FadeOutTRTiles] turnOnTile -- @param self --- @param #vec2_table pos +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#FadeOutTRTiles] turnOffTile -- @param self --- @param #vec2_table pos +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#FadeOutTRTiles] transformTile -- @param self --- @param #vec2_table pos --- @param #float distance +-- @param #vec2_table vec2 +-- @param #float float -------------------------------- --- -- @function [parent=#FadeOutTRTiles] testFunc -- @param self --- @param #size_table pos --- @param #float time +-- @param #size_table size +-- @param #float float -- @return float#float ret (return value: float) -------------------------------- --- creates the action with the grid size and the duration -- @function [parent=#FadeOutTRTiles] create -- @param self --- @param #float duration --- @param #size_table gridSize +-- @param #float float +-- @param #size_table size -- @return FadeOutTRTiles#FadeOutTRTiles ret (return value: cc.FadeOutTRTiles) -------------------------------- --- -- @function [parent=#FadeOutTRTiles] clone -- @param self -- @return FadeOutTRTiles#FadeOutTRTiles ret (return value: cc.FadeOutTRTiles) -------------------------------- --- -- @function [parent=#FadeOutTRTiles] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua index 9d871f5f51..22a5bae741 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua @@ -5,32 +5,28 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#FadeOutUpTiles] transformTile -- @param self --- @param #vec2_table pos --- @param #float distance +-- @param #vec2_table vec2 +-- @param #float float -------------------------------- --- creates the action with the grid size and the duration -- @function [parent=#FadeOutUpTiles] create -- @param self --- @param #float duration --- @param #size_table gridSize +-- @param #float float +-- @param #size_table size -- @return FadeOutUpTiles#FadeOutUpTiles ret (return value: cc.FadeOutUpTiles) -------------------------------- --- -- @function [parent=#FadeOutUpTiles] clone -- @param self -- @return FadeOutUpTiles#FadeOutUpTiles ret (return value: cc.FadeOutUpTiles) -------------------------------- --- -- @function [parent=#FadeOutUpTiles] testFunc -- @param self --- @param #size_table pos --- @param #float time +-- @param #size_table size +-- @param #float float -- @return float#float ret (return value: float) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeTo.lua b/cocos/scripting/lua-bindings/auto/api/FadeTo.lua index 81cf2e8fec..854e4047ba 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeTo.lua @@ -5,35 +5,30 @@ -- @parent_module cc -------------------------------- --- creates an action with duration and opacity -- @function [parent=#FadeTo] create -- @param self --- @param #float duration --- @param #unsigned char opacity +-- @param #float float +-- @param #unsigned char char -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) -------------------------------- --- -- @function [parent=#FadeTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#FadeTo] clone -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) -------------------------------- --- -- @function [parent=#FadeTo] reverse -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) -------------------------------- --- -- @function [parent=#FadeTo] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FileUtils.lua b/cocos/scripting/lua-bindings/auto/api/FileUtils.lua index 8f3aa1f787..465eafc67b 100644 --- a/cocos/scripting/lua-bindings/auto/api/FileUtils.lua +++ b/cocos/scripting/lua-bindings/auto/api/FileUtils.lua @@ -4,320 +4,166 @@ -- @parent_module cc -------------------------------- --- Returns the fullpath for a given filename.
--- First it will try to get a new filename from the "filenameLookup" dictionary.
--- If a new filename can't be found on the dictionary, it will use the original filename.
--- Then it will try to obtain the full path of the filename using the FileUtils search rules: resolutions, and search paths.
--- The file search is based on the array element order of search paths and resolution directories.
--- For instance:
--- We set two elements("/mnt/sdcard/", "internal_dir/") to search paths vector by setSearchPaths,
--- and set three elements("resources-ipadhd/", "resources-ipad/", "resources-iphonehd")
--- to resolutions vector by setSearchResolutionsOrder. The "internal_dir" is relative to "Resources/".
--- If we have a file named 'sprite.png', the mapping in fileLookup dictionary contains `key: sprite.png -> value: sprite.pvr.gz`.
--- Firstly, it will replace 'sprite.png' with 'sprite.pvr.gz', then searching the file sprite.pvr.gz as follows:
--- /mnt/sdcard/resources-ipadhd/sprite.pvr.gz (if not found, search next)
--- /mnt/sdcard/resources-ipad/sprite.pvr.gz (if not found, search next)
--- /mnt/sdcard/resources-iphonehd/sprite.pvr.gz (if not found, search next)
--- /mnt/sdcard/sprite.pvr.gz (if not found, search next)
--- internal_dir/resources-ipadhd/sprite.pvr.gz (if not found, search next)
--- internal_dir/resources-ipad/sprite.pvr.gz (if not found, search next)
--- internal_dir/resources-iphonehd/sprite.pvr.gz (if not found, search next)
--- internal_dir/sprite.pvr.gz (if not found, return "sprite.png")
--- If the filename contains relative path like "gamescene/uilayer/sprite.png",
--- and the mapping in fileLookup dictionary contains `key: gamescene/uilayer/sprite.png -> value: gamescene/uilayer/sprite.pvr.gz`.
--- The file search order will be:
--- /mnt/sdcard/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next)
--- /mnt/sdcard/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next)
--- /mnt/sdcard/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next)
--- /mnt/sdcard/gamescene/uilayer/sprite.pvr.gz (if not found, search next)
--- internal_dir/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next)
--- internal_dir/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next)
--- internal_dir/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next)
--- internal_dir/gamescene/uilayer/sprite.pvr.gz (if not found, return "gamescene/uilayer/sprite.png")
--- If the new file can't be found on the file system, it will return the parameter filename directly.
--- This method was added to simplify multiplatform support. Whether you are using cocos2d-js or any cross-compilation toolchain like StellaSDK or Apportable,
--- you might need to load different resources for a given file in the different platforms.
--- since v2.1 -- @function [parent=#FileUtils] fullPathForFilename -- @param self --- @param #string filename +-- @param #string str -- @return string#string ret (return value: string) -------------------------------- --- Gets string from a file. -- @function [parent=#FileUtils] getStringFromFile -- @param self --- @param #string filename +-- @param #string str -- @return string#string ret (return value: string) -------------------------------- --- Sets the filenameLookup dictionary.
--- param pFilenameLookupDict The dictionary for replacing filename.
--- since v2.1 -- @function [parent=#FileUtils] setFilenameLookupDictionary -- @param self --- @param #map_table filenameLookupDict +-- @param #map_table map -------------------------------- --- Remove a file
--- param filepath The full path of the file, it must be an absolute path.
--- return true if the file have been removed successfully, otherwise it will return false. -- @function [parent=#FileUtils] removeFile -- @param self --- @param #string filepath +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- Checks whether the path is an absolute path.
--- note On Android, if the parameter passed in is relative to "assets/", this method will treat it as an absolute path.
--- Also on Blackberry, path starts with "app/native/Resources/" is treated as an absolute path.
--- param strPath The path that needs to be checked.
--- return true if it's an absolute path, otherwise it will return false. -- @function [parent=#FileUtils] isAbsolutePath -- @param self --- @param #string path +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- Rename a file under the given directory
--- param path The parent directory path of the file, it must be an absolute path.
--- param oldname The current name of the file.
--- param name The new name of the file.
--- return true if the file have been renamed successfully, otherwise it will return false. -- @function [parent=#FileUtils] renameFile -- @param self --- @param #string path --- @param #string oldname --- @param #string name +-- @param #string str +-- @param #string str +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- Loads the filenameLookup dictionary from the contents of a filename.
--- note The plist file name should follow the format below:
--- code
---
---
---
---
--- filenames
---
--- sounds/click.wav
--- sounds/click.caf
--- sounds/endgame.wav
--- sounds/endgame.caf
--- sounds/gem-0.wav
--- sounds/gem-0.caf
---

--- metadata
---
--- version
--- 1
---

---

---

--- endcode
--- param filename The plist file name.
--- since v2.1
--- js loadFilenameLookup
--- lua loadFilenameLookup -- @function [parent=#FileUtils] loadFilenameLookupDictionaryFromFile -- @param self --- @param #string filename +-- @param #string str -------------------------------- --- -- @function [parent=#FileUtils] isPopupNotify -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Converts the contents of a file to a ValueVector.
--- note This method is used internally. -- @function [parent=#FileUtils] getValueVectorFromFile -- @param self --- @param #string filename +-- @param #string str -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- Gets the array of search paths.
--- return The array of search paths.
--- see fullPathForFilename(const char*).
--- lua NA -- @function [parent=#FileUtils] getSearchPaths -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- Write a ValueMap to a plist file.
--- note This method is used internally. -- @function [parent=#FileUtils] writeToFile -- @param self --- @param #map_table dict --- @param #string fullPath +-- @param #map_table map +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- Converts the contents of a file to a ValueMap.
--- note This method is used internally. -- @function [parent=#FileUtils] getValueMapFromFile -- @param self --- @param #string filename +-- @param #string str -- @return map_table#map_table ret (return value: map_table) -------------------------------- --- Converts the contents of a file to a ValueMap.
--- note This method is used internally. -- @function [parent=#FileUtils] getValueMapFromData -- @param self --- @param #char filedata --- @param #int filesize +-- @param #char char +-- @param #int int -- @return map_table#map_table ret (return value: map_table) -------------------------------- --- Remove a directory
--- param dirPath The full path of the directory, it must be an absolute path.
--- return true if the directory have been removed successfully, otherwise it will return false. -- @function [parent=#FileUtils] removeDirectory -- @param self --- @param #string dirPath +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- Sets the array of search paths.
--- You can use this array to modify the search path of the resources.
--- If you want to use "themes" or search resources in the "cache", you can do it easily by adding new entries in this array.
--- note This method could access relative path and absolute path.
--- If the relative path was passed to the vector, FileUtils will add the default resource directory before the relative path.
--- For instance:
--- On Android, the default resource root path is "assets/".
--- If "/mnt/sdcard/" and "resources-large" were set to the search paths vector,
--- "resources-large" will be converted to "assets/resources-large" since it was a relative path.
--- param searchPaths The array contains search paths.
--- see fullPathForFilename(const char*)
--- since v2.1
--- In js:var setSearchPaths(var jsval);
--- lua NA -- @function [parent=#FileUtils] setSearchPaths -- @param self --- @param #array_table searchPaths +-- @param #array_table array -------------------------------- --- Retrieve the file size
--- note If a relative path was passed in, it will be inserted a default root path at the beginning.
--- param filepath The path of the file, it could be a relative or absolute path.
--- return The file size. -- @function [parent=#FileUtils] getFileSize -- @param self --- @param #string filepath +-- @param #string str -- @return long#long ret (return value: long) -------------------------------- --- Sets the array that contains the search order of the resources.
--- param searchResolutionsOrder The source array that contains the search order of the resources.
--- see getSearchResolutionsOrder(void), fullPathForFilename(const char*).
--- since v2.1
--- In js:var setSearchResolutionsOrder(var jsval)
--- lua NA -- @function [parent=#FileUtils] setSearchResolutionsOrder -- @param self --- @param #array_table searchResolutionsOrder +-- @param #array_table array -------------------------------- --- Append search order of the resources.
--- see setSearchResolutionsOrder(), fullPathForFilename().
--- since v2.1 -- @function [parent=#FileUtils] addSearchResolutionsOrder -- @param self --- @param #string order --- @param #bool front +-- @param #string str +-- @param #bool bool -------------------------------- --- Add search path.
--- since v2.1 -- @function [parent=#FileUtils] addSearchPath -- @param self --- @param #string path --- @param #bool front +-- @param #string str +-- @param #bool bool -------------------------------- --- Checks whether a file exists.
--- note If a relative path was passed in, it will be inserted a default root path at the beginning.
--- param strFilePath The path of the file, it could be a relative or absolute path.
--- return true if the file exists, otherwise it will return false. -- @function [parent=#FileUtils] isFileExist -- @param self --- @param #string filename +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- Purges the file searching cache.
--- note It should be invoked after the resources were updated.
--- For instance, in the CocosPlayer sample, every time you run application from CocosBuilder,
--- All the resources will be downloaded to the writable folder, before new js app launchs,
--- this method should be invoked to clean the file search cache. -- @function [parent=#FileUtils] purgeCachedEntries -- @param self -------------------------------- --- Gets full path from a file name and the path of the reletive file.
--- param filename The file name.
--- param pszRelativeFile The path of the relative file.
--- return The full path.
--- e.g. filename: hello.png, pszRelativeFile: /User/path1/path2/hello.plist
--- Return: /User/path1/path2/hello.pvr (If there a a key(hello.png)-value(hello.pvr) in FilenameLookup dictionary. ) -- @function [parent=#FileUtils] fullPathFromRelativeFile -- @param self --- @param #string filename --- @param #string relativeFile +-- @param #string str +-- @param #string str -- @return string#string ret (return value: string) -------------------------------- --- Sets/Gets whether to pop-up a message box when failed to load an image. -- @function [parent=#FileUtils] setPopupNotify -- @param self --- @param #bool notify +-- @param #bool bool -------------------------------- --- Checks whether the path is a directory
--- param dirPath The path of the directory, it could be a relative or an absolute path.
--- return true if the directory exists, otherwise it will return false. -- @function [parent=#FileUtils] isDirectoryExist -- @param self --- @param #string dirPath +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- Gets the array that contains the search order of the resources.
--- see setSearchResolutionsOrder(const std::vector&), fullPathForFilename(const char*).
--- since v2.1
--- lua NA -- @function [parent=#FileUtils] getSearchResolutionsOrder -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- Creates a directory
--- param dirPath The path of the directory, it must be an absolute path.
--- return true if the directory have been created successfully, otherwise it will return false. -- @function [parent=#FileUtils] createDirectory -- @param self --- @param #string dirPath +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- Gets the writable path.
--- return The path that can be write/read a file in -- @function [parent=#FileUtils] getWritablePath -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Destroys the instance of FileUtils. -- @function [parent=#FileUtils] destroyInstance -- @param self -------------------------------- --- Gets the instance of FileUtils. -- @function [parent=#FileUtils] getInstance -- @param self -- @return FileUtils#FileUtils ret (return value: cc.FileUtils) diff --git a/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua b/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua index c14f9aba2e..a89deabc3f 100644 --- a/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- set duration in seconds of the action -- @function [parent=#FiniteTimeAction] setDuration -- @param self --- @param #float duration +-- @param #float float -------------------------------- --- get duration in seconds of the action -- @function [parent=#FiniteTimeAction] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#FiniteTimeAction] clone -- @param self -- @return FiniteTimeAction#FiniteTimeAction ret (return value: cc.FiniteTimeAction) -------------------------------- --- -- @function [parent=#FiniteTimeAction] reverse -- @param self -- @return FiniteTimeAction#FiniteTimeAction ret (return value: cc.FiniteTimeAction) diff --git a/cocos/scripting/lua-bindings/auto/api/FlipX.lua b/cocos/scripting/lua-bindings/auto/api/FlipX.lua index 530a3978cb..ab9ca2096d 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipX.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipX.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- create the action -- @function [parent=#FlipX] create -- @param self --- @param #bool x +-- @param #bool bool -- @return FlipX#FlipX ret (return value: cc.FlipX) -------------------------------- --- -- @function [parent=#FlipX] clone -- @param self -- @return FlipX#FlipX ret (return value: cc.FlipX) -------------------------------- --- -- @function [parent=#FlipX] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#FlipX] reverse -- @param self -- @return FlipX#FlipX ret (return value: cc.FlipX) diff --git a/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua b/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua index b948ef4880..4823e905f5 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua @@ -5,22 +5,19 @@ -- @parent_module cc -------------------------------- --- creates the action with duration -- @function [parent=#FlipX3D] create -- @param self --- @param #float duration +-- @param #float float -- @return FlipX3D#FlipX3D ret (return value: cc.FlipX3D) -------------------------------- --- -- @function [parent=#FlipX3D] clone -- @param self -- @return FlipX3D#FlipX3D ret (return value: cc.FlipX3D) -------------------------------- --- -- @function [parent=#FlipX3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FlipY.lua b/cocos/scripting/lua-bindings/auto/api/FlipY.lua index f0d76b4a1e..bb8be4aa66 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipY.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipY.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- create the action -- @function [parent=#FlipY] create -- @param self --- @param #bool y +-- @param #bool bool -- @return FlipY#FlipY ret (return value: cc.FlipY) -------------------------------- --- -- @function [parent=#FlipY] clone -- @param self -- @return FlipY#FlipY ret (return value: cc.FlipY) -------------------------------- --- -- @function [parent=#FlipY] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#FlipY] reverse -- @param self -- @return FlipY#FlipY ret (return value: cc.FlipY) diff --git a/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua b/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua index 47b8104226..dda47890cb 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua @@ -5,22 +5,19 @@ -- @parent_module cc -------------------------------- --- creates the action with duration -- @function [parent=#FlipY3D] create -- @param self --- @param #float duration +-- @param #float float -- @return FlipY3D#FlipY3D ret (return value: cc.FlipY3D) -------------------------------- --- -- @function [parent=#FlipY3D] clone -- @param self -- @return FlipY3D#FlipY3D ret (return value: cc.FlipY3D) -------------------------------- --- -- @function [parent=#FlipY3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Follow.lua b/cocos/scripting/lua-bindings/auto/api/Follow.lua index c4cc29986b..ebc67f26dc 100644 --- a/cocos/scripting/lua-bindings/auto/api/Follow.lua +++ b/cocos/scripting/lua-bindings/auto/api/Follow.lua @@ -5,53 +5,42 @@ -- @parent_module cc -------------------------------- --- alter behavior - turn on/off boundary -- @function [parent=#Follow] setBoudarySet -- @param self --- @param #bool value +-- @param #bool bool -------------------------------- --- -- @function [parent=#Follow] isBoundarySet -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Creates the action with a set boundary or with no boundary.
--- param followedNode The node to be followed.
--- param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work
--- with no boundary. -- @function [parent=#Follow] create -- @param self --- @param #cc.Node followedNode +-- @param #cc.Node node -- @param #rect_table rect -- @return Follow#Follow ret (return value: cc.Follow) -------------------------------- --- -- @function [parent=#Follow] step -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#Follow] clone -- @param self -- @return Follow#Follow ret (return value: cc.Follow) -------------------------------- --- -- @function [parent=#Follow] stop -- @param self -------------------------------- --- -- @function [parent=#Follow] reverse -- @param self -- @return Follow#Follow ret (return value: cc.Follow) -------------------------------- --- -- @function [parent=#Follow] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/Frame.lua b/cocos/scripting/lua-bindings/auto/api/Frame.lua index a2f7cb095d..e339312138 100644 --- a/cocos/scripting/lua-bindings/auto/api/Frame.lua +++ b/cocos/scripting/lua-bindings/auto/api/Frame.lua @@ -5,61 +5,51 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#Frame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#Frame] setNode -- @param self -- @param #cc.Node node -------------------------------- --- -- @function [parent=#Frame] setTimeline -- @param self -- @param #ccs.Timeline timeline -------------------------------- --- -- @function [parent=#Frame] getFrameIndex -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- -- @function [parent=#Frame] apply -- @param self --- @param #float percent +-- @param #float float -------------------------------- --- -- @function [parent=#Frame] isTween -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Frame] setFrameIndex -- @param self --- @param #unsigned int frameIndex +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#Frame] setTween -- @param self --- @param #bool tween +-- @param #bool bool -------------------------------- --- -- @function [parent=#Frame] getTimeline -- @param self -- @return Timeline#Timeline ret (return value: ccs.Timeline) -------------------------------- --- -- @function [parent=#Frame] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) diff --git a/cocos/scripting/lua-bindings/auto/api/FrameData.lua b/cocos/scripting/lua-bindings/auto/api/FrameData.lua index 3bc8f4334f..038aa1923b 100644 --- a/cocos/scripting/lua-bindings/auto/api/FrameData.lua +++ b/cocos/scripting/lua-bindings/auto/api/FrameData.lua @@ -5,19 +5,16 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#FrameData] copy -- @param self --- @param #ccs.BaseData baseData +-- @param #ccs.BaseData basedata -------------------------------- --- -- @function [parent=#FrameData] create -- @param self -- @return FrameData#FrameData ret (return value: ccs.FrameData) -------------------------------- --- js ctor -- @function [parent=#FrameData] FrameData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgram.lua b/cocos/scripting/lua-bindings/auto/api/GLProgram.lua index 125f68811d..21a267ccf7 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgram.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgram.lua @@ -5,34 +5,29 @@ -- @parent_module cc -------------------------------- --- returns the fragmentShader error log -- @function [parent=#GLProgram] getFragmentShaderLog -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#GLProgram] initWithByteArrays -- @param self --- @param #char vShaderByteArray --- @param #char fShaderByteArray +-- @param #char char +-- @param #char char -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#GLProgram] initWithFilenames -- @param self --- @param #string vShaderFilename --- @param #string fShaderFilename +-- @param #string str +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- it will call glUseProgram() -- @function [parent=#GLProgram] use -- @param self -------------------------------- --- returns the vertexShader error log -- @function [parent=#GLProgram] getVertexShaderLog -- @param self -- @return string#string ret (return value: string) @@ -42,74 +37,54 @@ -- @overload self -- @function [parent=#GLProgram] setUniformsForBuiltins -- @param self --- @param #mat4_table modelView +-- @param #mat4_table mat4 -------------------------------- --- It will create 4 uniforms:
--- - kUniformPMatrix
--- - kUniformMVMatrix
--- - kUniformMVPMatrix
--- - GLProgram::UNIFORM_SAMPLER
--- And it will bind "GLProgram::UNIFORM_SAMPLER" to 0 -- @function [parent=#GLProgram] updateUniforms -- @param self -------------------------------- --- calls glUniform1i only if the values are different than the previous call for this same shader program.
--- js setUniformLocationI32
--- lua setUniformLocationI32 -- @function [parent=#GLProgram] setUniformLocationWith1i -- @param self --- @param #int location --- @param #int i1 +-- @param #int int +-- @param #int int -------------------------------- --- -- @function [parent=#GLProgram] reset -- @param self -------------------------------- --- It will add a new attribute to the shader by calling glBindAttribLocation -- @function [parent=#GLProgram] bindAttribLocation -- @param self --- @param #string attributeName --- @param #unsigned int index +-- @param #string str +-- @param #unsigned int int -------------------------------- --- calls glGetAttribLocation -- @function [parent=#GLProgram] getAttribLocation -- @param self --- @param #string attributeName +-- @param #string str -- @return int#int ret (return value: int) -------------------------------- --- links the glProgram -- @function [parent=#GLProgram] link -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Initializes the GLProgram with a vertex and fragment with bytes array
--- js initWithString
--- lua initWithString -- @function [parent=#GLProgram] createWithByteArrays -- @param self --- @param #char vShaderByteArray --- @param #char fShaderByteArray +-- @param #char char +-- @param #char char -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- --- Initializes the GLProgram with a vertex and fragment with contents of filenames
--- js init
--- lua init -- @function [parent=#GLProgram] createWithFilenames -- @param self --- @param #string vShaderFilename --- @param #string fShaderFilename +-- @param #string str +-- @param #string str -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- --- -- @function [parent=#GLProgram] GLProgram -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua b/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua index 405063fd94..a7ddd24ba7 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua @@ -5,42 +5,35 @@ -- @parent_module cc -------------------------------- --- adds a GLProgram to the cache for a given name -- @function [parent=#GLProgramCache] addGLProgram -- @param self --- @param #cc.GLProgram program --- @param #string key +-- @param #cc.GLProgram glprogram +-- @param #string str -------------------------------- --- returns a GL program for a given key -- @function [parent=#GLProgramCache] getGLProgram -- @param self --- @param #string key +-- @param #string str -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- --- reload the default shaders -- @function [parent=#GLProgramCache] reloadDefaultGLPrograms -- @param self -------------------------------- --- loads the default shaders -- @function [parent=#GLProgramCache] loadDefaultGLPrograms -- @param self -------------------------------- --- purges the cache. It releases the retained instance. -- @function [parent=#GLProgramCache] destroyInstance -- @param self -------------------------------- --- returns the shared instance -- @function [parent=#GLProgramCache] getInstance -- @param self -- @return GLProgramCache#GLProgramCache ret (return value: cc.GLProgramCache) -------------------------------- --- js ctor -- @function [parent=#GLProgramCache] GLProgramCache -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua b/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua index 0cd5f93193..45e1e90168 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua @@ -11,37 +11,32 @@ -- @overload self, int, unsigned int -- @function [parent=#GLProgramState] setUniformTexture -- @param self --- @param #int uniformLocation --- @param #unsigned int textureId +-- @param #int int +-- @param #unsigned int int -------------------------------- -- @overload self, int, mat4_table -- @overload self, string, mat4_table -- @function [parent=#GLProgramState] setUniformMat4 -- @param self --- @param #string uniformName --- @param #mat4_table value +-- @param #string str +-- @param #mat4_table mat4 -------------------------------- --- -- @function [parent=#GLProgramState] applyUniforms -- @param self -------------------------------- --- -- @function [parent=#GLProgramState] applyGLProgram -- @param self --- @param #mat4_table modelView +-- @param #mat4_table mat4 -------------------------------- --- -- @function [parent=#GLProgramState] getUniformCount -- @param self -- @return long#long ret (return value: long) -------------------------------- --- apply vertex attributes
--- param applyAttribFlags Call GL::enableVertexAttribs(_vertexAttribsFlags) or not -- @function [parent=#GLProgramState] applyAttributes -- @param self @@ -50,27 +45,26 @@ -- @overload self, string, float -- @function [parent=#GLProgramState] setUniformFloat -- @param self --- @param #string uniformName --- @param #float value +-- @param #string str +-- @param #float float -------------------------------- -- @overload self, int, vec3_table -- @overload self, string, vec3_table -- @function [parent=#GLProgramState] setUniformVec3 -- @param self --- @param #string uniformName --- @param #vec3_table value +-- @param #string str +-- @param #vec3_table vec3 -------------------------------- -- @overload self, int, int -- @overload self, string, int -- @function [parent=#GLProgramState] setUniformInt -- @param self --- @param #string uniformName --- @param #int value +-- @param #string str +-- @param #int int -------------------------------- --- -- @function [parent=#GLProgramState] getVertexAttribCount -- @param self -- @return long#long ret (return value: long) @@ -80,11 +74,10 @@ -- @overload self, string, vec4_table -- @function [parent=#GLProgramState] setUniformVec4 -- @param self --- @param #string uniformName --- @param #vec4_table value +-- @param #string str +-- @param #vec4_table vec4 -------------------------------- --- -- @function [parent=#GLProgramState] setGLProgram -- @param self -- @param #cc.GLProgram glprogram @@ -94,43 +87,37 @@ -- @overload self, string, vec2_table -- @function [parent=#GLProgramState] setUniformVec2 -- @param self --- @param #string uniformName --- @param #vec2_table value +-- @param #string str +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#GLProgramState] getVertexAttribsFlags -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- -- @function [parent=#GLProgramState] apply -- @param self --- @param #mat4_table modelView +-- @param #mat4_table mat4 -------------------------------- --- -- @function [parent=#GLProgramState] getGLProgram -- @param self -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- --- returns a new instance of GLProgramState for a given GLProgram -- @function [parent=#GLProgramState] create -- @param self -- @param #cc.GLProgram glprogram -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- --- gets-or-creates an instance of GLProgramState for a given GLProgramName -- @function [parent=#GLProgramState] getOrCreateWithGLProgramName -- @param self --- @param #string glProgramName +-- @param #string str -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- --- gets-or-creates an instance of GLProgramState for a given GLProgram -- @function [parent=#GLProgramState] getOrCreateWithGLProgram -- @param self -- @param #cc.GLProgram glprogram diff --git a/cocos/scripting/lua-bindings/auto/api/GLView.lua b/cocos/scripting/lua-bindings/auto/api/GLView.lua index 85456927f0..fd42bfe851 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLView.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLView.lua @@ -5,203 +5,163 @@ -- @parent_module cc -------------------------------- --- Set the frame size of EGL view. -- @function [parent=#GLView] setFrameSize -- @param self --- @param #float width --- @param #float height +-- @param #float float +-- @param #float float -------------------------------- --- Get the opengl view port rectangle. -- @function [parent=#GLView] getViewPortRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- only works on ios platform -- @function [parent=#GLView] setContentScaleFactor -- @param self --- @param #float scaleFactor +-- @param #float float -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#GLView] getContentScaleFactor -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Open or close IME keyboard , subclass must implement this method. -- @function [parent=#GLView] setIMEKeyboardState -- @param self --- @param #bool open +-- @param #bool bool -------------------------------- --- Set Scissor rectangle with points. -- @function [parent=#GLView] setScissorInPoints -- @param self --- @param #float x --- @param #float y --- @param #float w --- @param #float h +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float -------------------------------- --- -- @function [parent=#GLView] getViewName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Get whether opengl render system is ready, subclass must implement this method. -- @function [parent=#GLView] isOpenGLReady -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Force destroying EGL view, subclass must implement this method. -- @function [parent=#GLView] end -- @param self -------------------------------- --- Get scale factor of the vertical direction. -- @function [parent=#GLView] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Get scale factor of the horizontal direction. -- @function [parent=#GLView] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Get the visible origin point of opengl viewport. -- @function [parent=#GLView] getVisibleOrigin -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Get the frame size of EGL view.
--- In general, it returns the screen size since the EGL view is a fullscreen view. -- @function [parent=#GLView] getFrameSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Set and get zoom factor for frame. This two methods are for
--- debugging big resolution (e.g.new ipad) app on desktop. -- @function [parent=#GLView] setFrameZoomFactor -- @param self --- @param #float zoomFactor +-- @param #float float -------------------------------- --- -- @function [parent=#GLView] getFrameZoomFactor -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Get design resolution size.
--- Default resolution size is the same as 'getFrameSize'. -- @function [parent=#GLView] getDesignResolutionSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#GLView] windowShouldClose -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Exchanges the front and back buffers, subclass must implement this method. -- @function [parent=#GLView] swapBuffers -- @param self -------------------------------- --- Set the design resolution size.
--- param width Design resolution width.
--- param height Design resolution height.
--- param resolutionPolicy The resolution policy desired, you may choose:
--- [1] EXACT_FIT Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched.
--- [2] NO_BORDER Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut.
--- [3] SHOW_ALL Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown. -- @function [parent=#GLView] setDesignResolutionSize -- @param self --- @param #float width --- @param #float height --- @param #int resolutionPolicy +-- @param #float float +-- @param #float float +-- @param #int resolutionpolicy -------------------------------- --- returns the current Resolution policy -- @function [parent=#GLView] getResolutionPolicy -- @param self -- @return int#int ret (return value: int) -------------------------------- --- returns whether or not the view is in Retina Display mode -- @function [parent=#GLView] isRetinaDisplay -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Set opengl view port rectangle with points. -- @function [parent=#GLView] setViewPortInPoints -- @param self --- @param #float x --- @param #float y --- @param #float w --- @param #float h +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float -------------------------------- --- Get the current scissor rectangle -- @function [parent=#GLView] getScissorRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- Get retina factor -- @function [parent=#GLView] getRetinaFactor -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#GLView] setViewName -- @param self --- @param #string viewname +-- @param #string str -------------------------------- --- Get the visible rectangle of opengl viewport. -- @function [parent=#GLView] getVisibleRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- Get the visible area size of opengl viewport. -- @function [parent=#GLView] getVisibleSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Get whether GL_SCISSOR_TEST is enable -- @function [parent=#GLView] isScissorEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#GLView] pollEvents -- @param self -------------------------------- --- -- @function [parent=#GLView] setGLContextAttrs -- @param self --- @param #GLContextAttrs glContextAttrs +-- @param #GLContextAttrs glcontextattrs -------------------------------- --- -- @function [parent=#GLView] getGLContextAttrs -- @param self -- @return GLContextAttrs#GLContextAttrs ret (return value: GLContextAttrs) diff --git a/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua b/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua index 433292ff64..37b80b7f7e 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua @@ -5,36 +5,31 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#GLViewImpl] createWithRect -- @param self --- @param #string viewName +-- @param #string str -- @param #rect_table rect --- @param #float frameZoomFactor +-- @param #float float -- @return GLViewImpl#GLViewImpl ret (return value: cc.GLViewImpl) -------------------------------- --- -- @function [parent=#GLViewImpl] create -- @param self --- @param #string viewname +-- @param #string str -- @return GLViewImpl#GLViewImpl ret (return value: cc.GLViewImpl) -------------------------------- --- -- @function [parent=#GLViewImpl] createWithFullScreen -- @param self --- @param #string viewName +-- @param #string str -- @return GLViewImpl#GLViewImpl ret (return value: cc.GLViewImpl) -------------------------------- --- -- @function [parent=#GLViewImpl] setIMEKeyboardState -- @param self --- @param #bool bOpen +-- @param #bool bool -------------------------------- --- -- @function [parent=#GLViewImpl] isOpenGLReady -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/GUIReader.lua b/cocos/scripting/lua-bindings/auto/api/GUIReader.lua index cd73bb0fce..b32f8d0270 100644 --- a/cocos/scripting/lua-bindings/auto/api/GUIReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/GUIReader.lua @@ -5,45 +5,38 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#GUIReader] setFilePath -- @param self --- @param #string strFilePath +-- @param #string str -------------------------------- --- -- @function [parent=#GUIReader] widgetFromJsonFile -- @param self --- @param #char fileName +-- @param #char char -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- -- @function [parent=#GUIReader] getFilePath -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#GUIReader] widgetFromBinaryFile -- @param self --- @param #char fileName +-- @param #char char -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- -- @function [parent=#GUIReader] getVersionInteger -- @param self --- @param #char str +-- @param #char char -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#GUIReader] destroyInstance -- @param self -------------------------------- --- -- @function [parent=#GUIReader] getInstance -- @param self -- @return GUIReader#GUIReader ret (return value: ccs.GUIReader) diff --git a/cocos/scripting/lua-bindings/auto/api/Grid3D.lua b/cocos/scripting/lua-bindings/auto/api/Grid3D.lua index b20675bf6f..8adbad9174 100644 --- a/cocos/scripting/lua-bindings/auto/api/Grid3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Grid3D.lua @@ -9,28 +9,24 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#Grid3D] create -- @param self --- @param #size_table gridSize --- @param #cc.Texture2D texture --- @param #bool flipped +-- @param #size_table size +-- @param #cc.Texture2D texture2d +-- @param #bool bool -- @return Grid3D#Grid3D ret (retunr value: cc.Grid3D) -------------------------------- --- -- @function [parent=#Grid3D] calculateVertexPoints -- @param self -------------------------------- --- -- @function [parent=#Grid3D] blit -- @param self -------------------------------- --- -- @function [parent=#Grid3D] reuse -- @param self -------------------------------- --- js ctor -- @function [parent=#Grid3D] Grid3D -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua b/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua index d4dec67c66..5863941c70 100644 --- a/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- returns the grid -- @function [parent=#Grid3DAction] getGrid -- @param self -- @return GridBase#GridBase ret (return value: cc.GridBase) -------------------------------- --- -- @function [parent=#Grid3DAction] clone -- @param self -- @return Grid3DAction#Grid3DAction ret (return value: cc.Grid3DAction) diff --git a/cocos/scripting/lua-bindings/auto/api/GridAction.lua b/cocos/scripting/lua-bindings/auto/api/GridAction.lua index b9d8e572bc..4f6abb4c43 100644 --- a/cocos/scripting/lua-bindings/auto/api/GridAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/GridAction.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- returns the grid -- @function [parent=#GridAction] getGrid -- @param self -- @return GridBase#GridBase ret (return value: cc.GridBase) -------------------------------- --- -- @function [parent=#GridAction] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#GridAction] clone -- @param self -- @return GridAction#GridAction ret (return value: cc.GridAction) -------------------------------- --- -- @function [parent=#GridAction] reverse -- @param self -- @return GridAction#GridAction ret (return value: cc.GridAction) diff --git a/cocos/scripting/lua-bindings/auto/api/GridBase.lua b/cocos/scripting/lua-bindings/auto/api/GridBase.lua index bfea6b3f12..e42656495f 100644 --- a/cocos/scripting/lua-bindings/auto/api/GridBase.lua +++ b/cocos/scripting/lua-bindings/auto/api/GridBase.lua @@ -5,75 +5,62 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#GridBase] setGridSize -- @param self --- @param #size_table gridSize +-- @param #size_table size -------------------------------- --- -- @function [parent=#GridBase] calculateVertexPoints -- @param self -------------------------------- --- -- @function [parent=#GridBase] afterDraw -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#GridBase] beforeDraw -- @param self -------------------------------- --- is texture flipped -- @function [parent=#GridBase] isTextureFlipped -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- size of the grid -- @function [parent=#GridBase] getGridSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- pixels between the grids -- @function [parent=#GridBase] getStep -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#GridBase] set2DProjection -- @param self -------------------------------- --- -- @function [parent=#GridBase] setStep -- @param self --- @param #vec2_table step +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#GridBase] setTextureFlipped -- @param self --- @param #bool flipped +-- @param #bool bool -------------------------------- --- -- @function [parent=#GridBase] blit -- @param self -------------------------------- --- -- @function [parent=#GridBase] setActive -- @param self --- @param #bool active +-- @param #bool bool -------------------------------- --- number of times that the grid will be reused -- @function [parent=#GridBase] getReuseGrid -- @param self -- @return int#int ret (return value: int) @@ -83,25 +70,22 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#GridBase] initWithSize -- @param self --- @param #size_table gridSize --- @param #cc.Texture2D texture --- @param #bool flipped +-- @param #size_table size +-- @param #cc.Texture2D texture2d +-- @param #bool bool -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#GridBase] setReuseGrid -- @param self --- @param #int reuseGrid +-- @param #int int -------------------------------- --- whether or not the grid is active -- @function [parent=#GridBase] isActive -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#GridBase] reuse -- @param self @@ -110,9 +94,9 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#GridBase] create -- @param self --- @param #size_table gridSize --- @param #cc.Texture2D texture --- @param #bool flipped +-- @param #size_table size +-- @param #cc.Texture2D texture2d +-- @param #bool bool -- @return GridBase#GridBase ret (retunr value: cc.GridBase) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/HBox.lua b/cocos/scripting/lua-bindings/auto/api/HBox.lua index cec73b279a..54ce53f9e3 100644 --- a/cocos/scripting/lua-bindings/auto/api/HBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/HBox.lua @@ -13,7 +13,6 @@ -- @return HBox#HBox ret (retunr value: ccui.HBox) -------------------------------- --- Default constructor -- @function [parent=#HBox] HBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Helper.lua b/cocos/scripting/lua-bindings/auto/api/Helper.lua index 539ae88abb..f7d6579957 100644 --- a/cocos/scripting/lua-bindings/auto/api/Helper.lua +++ b/cocos/scripting/lua-bindings/auto/api/Helper.lua @@ -4,46 +4,32 @@ -- @parent_module ccui -------------------------------- --- brief Get a UTF8 substring from a std::string with a given start position and length
--- Sample: std::string str = "中国中国中国”; substr = getSubStringOfUTF8String(str,0,2) will = "中国"
--- param start The start position of the substring.
--- param length The length of the substring in UTF8 count
--- return a UTF8 substring -- @function [parent=#Helper] getSubStringOfUTF8String -- @param self -- @param #string str --- @param #unsigned long start --- @param #unsigned long length +-- @param #unsigned long long +-- @param #unsigned long long -- @return string#string ret (return value: string) -------------------------------- --- Finds a widget whose tag equals to param tag from root widget.
--- param root widget which will be seeked.
--- tag tag value.
--- return finded result. -- @function [parent=#Helper] seekWidgetByTag -- @param self --- @param #ccui.Widget root --- @param #int tag +-- @param #ccui.Widget widget +-- @param #int int -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- -- @function [parent=#Helper] seekActionWidgetByActionTag -- @param self --- @param #ccui.Widget root --- @param #int tag +-- @param #ccui.Widget widget +-- @param #int int -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- Finds a widget whose name equals to param name from root widget.
--- param root widget which will be seeked.
--- name name value.
--- return finded result. -- @function [parent=#Helper] seekWidgetByName -- @param self --- @param #ccui.Widget root --- @param #string name +-- @param #ccui.Widget widget +-- @param #string str -- @return Widget#Widget ret (return value: ccui.Widget) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Hide.lua b/cocos/scripting/lua-bindings/auto/api/Hide.lua index 4aa81b057e..b40dbd8ea7 100644 --- a/cocos/scripting/lua-bindings/auto/api/Hide.lua +++ b/cocos/scripting/lua-bindings/auto/api/Hide.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- Allocates and initializes the action -- @function [parent=#Hide] create -- @param self -- @return Hide#Hide ret (return value: cc.Hide) -------------------------------- --- -- @function [parent=#Hide] clone -- @param self -- @return Hide#Hide ret (return value: cc.Hide) -------------------------------- --- -- @function [parent=#Hide] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#Hide] reverse -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) diff --git a/cocos/scripting/lua-bindings/auto/api/Image.lua b/cocos/scripting/lua-bindings/auto/api/Image.lua index bc93b29571..4ce6cd8d50 100644 --- a/cocos/scripting/lua-bindings/auto/api/Image.lua +++ b/cocos/scripting/lua-bindings/auto/api/Image.lua @@ -5,89 +5,69 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Image] hasPremultipliedAlpha -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- brief Save Image data to the specified file, with specified format.
--- param filePath the file's absolute path, including file suffix.
--- param isToRGB whether the image is saved as RGB format. -- @function [parent=#Image] saveToFile -- @param self --- @param #string filename --- @param #bool isToRGB +-- @param #string str +-- @param #bool bool -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Image] hasAlpha -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Image] isCompressed -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Image] getHeight -- @param self -- @return int#int ret (return value: int) -------------------------------- --- brief Load the image from the specified path.
--- param path the absolute file path.
--- return true if loaded correctly. -- @function [parent=#Image] initWithImageFile -- @param self --- @param #string path +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Image] getWidth -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Image] getBitPerPixel -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Image] getFileType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Image] getNumberOfMipmaps -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Image] getRenderFormat -- @param self -- @return int#int ret (return value: int) -------------------------------- --- treats (or not) PVR files as if they have alpha premultiplied.
--- Since it is impossible to know at runtime if the PVR images have the alpha channel premultiplied, it is
--- possible load them as if they have (or not) the alpha channel premultiplied.
--- By default it is disabled. -- @function [parent=#Image] setPVRImagesHavePremultipliedAlpha -- @param self --- @param #bool haveAlphaPremultiplied +-- @param #bool bool -------------------------------- --- js ctor -- @function [parent=#Image] Image -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ImageView.lua b/cocos/scripting/lua-bindings/auto/api/ImageView.lua index 6bfec98e56..395449e067 100644 --- a/cocos/scripting/lua-bindings/auto/api/ImageView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ImageView.lua @@ -5,43 +5,32 @@ -- @parent_module ccui -------------------------------- --- Load texture for imageview.
--- param fileName file name of texture.
--- param texType @see TextureResType -- @function [parent=#ImageView] loadTexture -- @param self --- @param #string fileName --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Sets if imageview is using scale9 renderer.
--- param able true that using scale9 renderer, false otherwise. -- @function [parent=#ImageView] setScale9Enabled -- @param self --- @param #bool able +-- @param #bool bool -------------------------------- --- Updates the texture rect of the ImageView in points.
--- It will call setTextureRect:rotated:untrimmedSize with rotated = NO, and utrimmedSize = rect.size. -- @function [parent=#ImageView] setTextureRect -- @param self -- @param #rect_table rect -------------------------------- --- Sets capinsets for imageview, if imageview is using scale9 renderer.
--- param capInsets capinsets for imageview -- @function [parent=#ImageView] setCapInsets -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -------------------------------- --- -- @function [parent=#ImageView] getCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- -- @function [parent=#ImageView] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) @@ -51,42 +40,36 @@ -- @overload self -- @function [parent=#ImageView] create -- @param self --- @param #string imageFileName --- @param #int texType +-- @param #string str +-- @param #int texturerestype -- @return ImageView#ImageView ret (retunr value: ccui.ImageView) -------------------------------- --- -- @function [parent=#ImageView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#ImageView] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#ImageView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#ImageView] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#ImageView] ignoreContentAdaptWithSize -- @param self --- @param #bool ignore +-- @param #bool bool -------------------------------- --- Default constructor -- @function [parent=#ImageView] ImageView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua b/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua index 1ca735b5ef..5de5259f53 100644 --- a/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua @@ -5,43 +5,36 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#InnerActionFrame] getInnerActionType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#InnerActionFrame] setStartFrameIndex -- @param self --- @param #int frameIndex +-- @param #int int -------------------------------- --- -- @function [parent=#InnerActionFrame] setInnerActionType -- @param self --- @param #int type +-- @param #int inneractiontype -------------------------------- --- -- @function [parent=#InnerActionFrame] getStartFrameIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#InnerActionFrame] create -- @param self -- @return InnerActionFrame#InnerActionFrame ret (return value: ccs.InnerActionFrame) -------------------------------- --- -- @function [parent=#InnerActionFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#InnerActionFrame] InnerActionFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/JumpBy.lua b/cocos/scripting/lua-bindings/auto/api/JumpBy.lua index 14eb4a8885..d507b67485 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpBy.lua @@ -5,37 +5,32 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#JumpBy] create -- @param self --- @param #float duration --- @param #vec2_table position --- @param #float height --- @param #int jumps +-- @param #float float +-- @param #vec2_table vec2 +-- @param #float float +-- @param #int int -- @return JumpBy#JumpBy ret (return value: cc.JumpBy) -------------------------------- --- -- @function [parent=#JumpBy] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#JumpBy] clone -- @param self -- @return JumpBy#JumpBy ret (return value: cc.JumpBy) -------------------------------- --- -- @function [parent=#JumpBy] reverse -- @param self -- @return JumpBy#JumpBy ret (return value: cc.JumpBy) -------------------------------- --- -- @function [parent=#JumpBy] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua index dd54c6becf..53c834be5b 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua @@ -5,49 +5,42 @@ -- @parent_module cc -------------------------------- --- amplitude rate -- @function [parent=#JumpTiles3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#JumpTiles3D] setAmplitude -- @param self --- @param #float amplitude +-- @param #float float -------------------------------- --- -- @function [parent=#JumpTiles3D] setAmplitudeRate -- @param self --- @param #float amplitudeRate +-- @param #float float -------------------------------- --- amplitude of the sin -- @function [parent=#JumpTiles3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- --- creates the action with the number of jumps, the sin amplitude, the grid size and the duration -- @function [parent=#JumpTiles3D] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #unsigned int numberOfJumps --- @param #float amplitude +-- @param #float float +-- @param #size_table size +-- @param #unsigned int int +-- @param #float float -- @return JumpTiles3D#JumpTiles3D ret (return value: cc.JumpTiles3D) -------------------------------- --- -- @function [parent=#JumpTiles3D] clone -- @param self -- @return JumpTiles3D#JumpTiles3D ret (return value: cc.JumpTiles3D) -------------------------------- --- -- @function [parent=#JumpTiles3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/JumpTo.lua b/cocos/scripting/lua-bindings/auto/api/JumpTo.lua index daeb353815..d2e4081e8d 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpTo.lua @@ -5,29 +5,25 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#JumpTo] create -- @param self --- @param #float duration --- @param #vec2_table position --- @param #float height --- @param #int jumps +-- @param #float float +-- @param #vec2_table vec2 +-- @param #float float +-- @param #int int -- @return JumpTo#JumpTo ret (return value: cc.JumpTo) -------------------------------- --- -- @function [parent=#JumpTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#JumpTo] clone -- @param self -- @return JumpTo#JumpTo ret (return value: cc.JumpTo) -------------------------------- --- -- @function [parent=#JumpTo] reverse -- @param self -- @return JumpTo#JumpTo ret (return value: cc.JumpTo) diff --git a/cocos/scripting/lua-bindings/auto/api/Label.lua b/cocos/scripting/lua-bindings/auto/api/Label.lua index ccd1e9e660..52319e86ec 100644 --- a/cocos/scripting/lua-bindings/auto/api/Label.lua +++ b/cocos/scripting/lua-bindings/auto/api/Label.lua @@ -5,157 +5,123 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Label] isClipMarginEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Enable shadow for the label
--- todo support blur for shadow effect -- @function [parent=#Label] enableShadow -- @param self -------------------------------- --- Sets the untransformed size of the label in a more efficient way. -- @function [parent=#Label] setDimensions -- @param self --- @param #unsigned int width --- @param #unsigned int height +-- @param #unsigned int int +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#Label] getString -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Label] getHeight -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- disable shadow/outline/glow rendering -- @function [parent=#Label] disableEffect -- @param self -------------------------------- --- set TTF configuration for Label -- @function [parent=#Label] setTTFConfig -- @param self --- @param #cc._ttfConfig ttfConfig +-- @param #cc._ttfConfig _ttfconfig -- @return bool#bool ret (return value: bool) -------------------------------- --- Returns the text color of this label
--- Only support for TTF and system font
--- warning Different from the color of Node. -- @function [parent=#Label] getTextColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- --- Sets the untransformed size of the label.
--- The label's width be used for text align if the set value not equal zero.
--- The label's max line width will be equal to the same value. -- @function [parent=#Label] setWidth -- @param self --- @param #unsigned int width +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#Label] getMaxLineWidth -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- -- @function [parent=#Label] getHorizontalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- --- clip upper and lower margin for reduce height of label. -- @function [parent=#Label] setClipMarginEnabled -- @param self --- @param #bool clipEnabled +-- @param #bool bool -------------------------------- --- changes the string to render
--- warning It is as expensive as changing the string if you haven't set up TTF/BMFont/CharMap for the label. -- @function [parent=#Label] setString -- @param self --- @param #string text +-- @param #string str -------------------------------- --- -- @function [parent=#Label] setSystemFontName -- @param self --- @param #string systemFont +-- @param #string str -------------------------------- --- -- @function [parent=#Label] setBMFontFilePath -- @param self --- @param #string bmfontFilePath --- @param #vec2_table imageOffset +-- @param #string str +-- @param #vec2_table vec2 -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Label] getFontAtlas -- @param self -- @return FontAtlas#FontAtlas ret (return value: cc.FontAtlas) -------------------------------- --- Sets the line height of the label
--- warning Not support system font
--- since v3.2.0 -- @function [parent=#Label] setLineHeight -- @param self --- @param #float height +-- @param #float float -------------------------------- --- -- @function [parent=#Label] setSystemFontSize -- @param self --- @param #float fontSize +-- @param #float float -------------------------------- --- update content immediately. -- @function [parent=#Label] updateContent -- @param self -------------------------------- --- -- @function [parent=#Label] getStringLength -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Label] setLineBreakWithoutSpace -- @param self --- @param #bool breakWithoutSpace +-- @param #bool bool -------------------------------- --- -- @function [parent=#Label] getStringNumLines -- @param self -- @return int#int ret (return value: int) -------------------------------- --- only support for TTF -- @function [parent=#Label] enableOutline -- @param self --- @param #color4b_table outlineColor --- @param #int outlineSize +-- @param #color4b_table color4b +-- @param #int int -------------------------------- --- Returns the additional kerning of this label
--- warning Not support system font
--- since v3.2.0 -- @function [parent=#Label] getAdditionalKerning -- @param self -- @return float#float ret (return value: float) @@ -166,145 +132,117 @@ -- @overload self, string -- @function [parent=#Label] setCharMap -- @param self --- @param #string charMapFile --- @param #int itemWidth --- @param #int itemHeight --- @param #int startCharMap +-- @param #string str +-- @param #int int +-- @param #int int +-- @param #int int -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#Label] getDimensions -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Sets the max line width of the label.
--- The label's max line width be used for force line breaks if the set value not equal zero.
--- The label's width and max line width has not always to be equal. -- @function [parent=#Label] setMaxLineWidth -- @param self --- @param #unsigned int maxLineWidth +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#Label] getSystemFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Label] setVerticalAlignment -- @param self --- @param #int vAlignment +-- @param #int textvalignment -------------------------------- --- Returns the line height of this label
--- warning Not support system font -- @function [parent=#Label] getLineHeight -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Label] getTTFConfig -- @param self -- @return _ttfConfig#_ttfConfig ret (return value: cc._ttfConfig) -------------------------------- --- -- @function [parent=#Label] getVerticalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Sets the text color of the label
--- Only support for TTF and system font
--- warning Different from the color of Node. -- @function [parent=#Label] setTextColor -- @param self --- @param #color4b_table color +-- @param #color4b_table color4b -------------------------------- --- Sets the untransformed size of the label.
--- The label's height be used for text align if the set value not equal zero.
--- The text will display of incomplete when the size of label not enough to support display all text. -- @function [parent=#Label] setHeight -- @param self --- @param #unsigned int height +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#Label] getWidth -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- only support for TTF -- @function [parent=#Label] enableGlow -- @param self --- @param #color4b_table glowColor +-- @param #color4b_table color4b -------------------------------- --- -- @function [parent=#Label] getLetter -- @param self --- @param #int lettetIndex +-- @param #int int -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- Sets the additional kerning of the label
--- warning Not support system font
--- since v3.2.0 -- @function [parent=#Label] setAdditionalKerning -- @param self --- @param #float space +-- @param #float float -------------------------------- --- -- @function [parent=#Label] getSystemFontSize -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Label] getTextAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Label] getBMFontFilePath -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Label] setHorizontalAlignment -- @param self --- @param #int hAlignment +-- @param #int texthalignment -------------------------------- -- @overload self, int, int -- @overload self, int -- @function [parent=#Label] setAlignment -- @param self --- @param #int hAlignment --- @param #int vAlignment +-- @param #int texthalignment +-- @param #int textvalignment -------------------------------- --- -- @function [parent=#Label] createWithBMFont -- @param self --- @param #string bmfontFilePath --- @param #string text --- @param #int alignment --- @param #int maxLineWidth --- @param #vec2_table imageOffset +-- @param #string str +-- @param #string str +-- @param #int texthalignment +-- @param #int int +-- @param #vec2_table vec2 -- @return Label#Label ret (return value: cc.Label) -------------------------------- --- -- @function [parent=#Label] create -- @param self -- @return Label#Label ret (return value: cc.Label) @@ -315,130 +253,111 @@ -- @overload self, string -- @function [parent=#Label] createWithCharMap -- @param self --- @param #string charMapFile --- @param #int itemWidth --- @param #int itemHeight --- @param #int startCharMap +-- @param #string str +-- @param #int int +-- @param #int int +-- @param #int int -- @return Label#Label ret (retunr value: cc.Label) -------------------------------- --- Creates a label with an initial string,font[font name or font file],font size, dimension in points, horizontal alignment and vertical alignment.
--- warning It will generate texture by the platform-dependent code -- @function [parent=#Label] createWithSystemFont -- @param self --- @param #string text --- @param #string font --- @param #float fontSize --- @param #size_table dimensions --- @param #int hAlignment --- @param #int vAlignment +-- @param #string str +-- @param #string str +-- @param #float float +-- @param #size_table size +-- @param #int texthalignment +-- @param #int textvalignment -- @return Label#Label ret (return value: cc.Label) -------------------------------- --- -- @function [parent=#Label] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#Label] addChild -- @param self --- @param #cc.Node child --- @param #int zOrder --- @param #int tag +-- @param #cc.Node node +-- @param #int int +-- @param #int int -------------------------------- --- -- @function [parent=#Label] setScaleY -- @param self --- @param #float scaleY +-- @param #float float -------------------------------- --- -- @function [parent=#Label] setScaleX -- @param self --- @param #float scaleX +-- @param #float float -------------------------------- --- -- @function [parent=#Label] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Label] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Label] setBlendFunc -- @param self --- @param #cc.BlendFunc blendFunc +-- @param #cc.BlendFunc blendfunc -------------------------------- --- -- @function [parent=#Label] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#Label] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Label] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Label] setOpacityModifyRGB -- @param self --- @param #bool isOpacityModifyRGB +-- @param #bool bool -------------------------------- --- -- @function [parent=#Label] setScale -- @param self --- @param #float scale +-- @param #float float -------------------------------- --- -- @function [parent=#Label] sortAllChildren -- @param self -------------------------------- --- -- @function [parent=#Label] updateDisplayedOpacity -- @param self --- @param #unsigned char parentOpacity +-- @param #unsigned char char -------------------------------- --- -- @function [parent=#Label] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#Label] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- -- @function [parent=#Label] updateDisplayedColor -- @param self --- @param #color3b_table parentColor +-- @param #color3b_table color3b return nil diff --git a/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua b/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua index 53d042dc5f..50753ea4c0 100644 --- a/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua +++ b/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#LabelAtlas] setString -- @param self --- @param #string label +-- @param #string str -------------------------------- -- @overload self, string, string @@ -16,20 +15,18 @@ -- @overload self, string, cc.Texture2D, int, int, int -- @function [parent=#LabelAtlas] initWithString -- @param self --- @param #string string --- @param #cc.Texture2D texture --- @param #int itemWidth --- @param #int itemHeight --- @param #int startCharMap +-- @param #string str +-- @param #cc.Texture2D texture2d +-- @param #int int +-- @param #int int +-- @param #int int -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#LabelAtlas] updateAtlasValues -- @param self -------------------------------- --- -- @function [parent=#LabelAtlas] getString -- @param self -- @return string#string ret (return value: string) @@ -40,15 +37,14 @@ -- @overload self, string, string -- @function [parent=#LabelAtlas] create -- @param self --- @param #string string --- @param #string charMapFile --- @param #int itemWidth --- @param #int itemHeight --- @param #int startCharMap +-- @param #string str +-- @param #string str +-- @param #int int +-- @param #int int +-- @param #int int -- @return LabelAtlas#LabelAtlas ret (retunr value: cc.LabelAtlas) -------------------------------- --- -- @function [parent=#LabelAtlas] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/Layer.lua b/cocos/scripting/lua-bindings/auto/api/Layer.lua index cca3874464..8918c08dbe 100644 --- a/cocos/scripting/lua-bindings/auto/api/Layer.lua +++ b/cocos/scripting/lua-bindings/auto/api/Layer.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- creates a fullscreen black layer -- @function [parent=#Layer] create -- @param self -- @return Layer#Layer ret (return value: cc.Layer) -------------------------------- --- -- @function [parent=#Layer] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/LayerColor.lua b/cocos/scripting/lua-bindings/auto/api/LayerColor.lua index c4cdc21e89..6a190c9eb1 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerColor.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerColor.lua @@ -5,24 +5,20 @@ -- @parent_module cc -------------------------------- --- change width and height in Points
--- since v0.8 -- @function [parent=#LayerColor] changeWidthAndHeight -- @param self --- @param #float w --- @param #float h +-- @param #float float +-- @param #float float -------------------------------- --- change height in Points -- @function [parent=#LayerColor] changeHeight -- @param self --- @param #float h +-- @param #float float -------------------------------- --- change width in Points -- @function [parent=#LayerColor] changeWidth -- @param self --- @param #float w +-- @param #float float -------------------------------- -- @overload self, color4b_table, float, float @@ -30,29 +26,26 @@ -- @overload self, color4b_table -- @function [parent=#LayerColor] create -- @param self --- @param #color4b_table color --- @param #float width --- @param #float height +-- @param #color4b_table color4b +-- @param #float float +-- @param #float float -- @return LayerColor#LayerColor ret (retunr value: cc.LayerColor) -------------------------------- --- -- @function [parent=#LayerColor] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#LayerColor] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#LayerColor] setContentSize -- @param self --- @param #size_table var +-- @param #size_table size return nil diff --git a/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua b/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua index fda8a00876..8f18269408 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua @@ -5,78 +5,64 @@ -- @parent_module cc -------------------------------- --- Returns the start color of the gradient -- @function [parent=#LayerGradient] getStartColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- -- @function [parent=#LayerGradient] isCompressedInterpolation -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Returns the start opacity of the gradient -- @function [parent=#LayerGradient] getStartOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- --- Sets the directional vector that will be used for the gradient.
--- The default value is vertical direction (0,-1). -- @function [parent=#LayerGradient] setVector -- @param self --- @param #vec2_table alongVector +-- @param #vec2_table vec2 -------------------------------- --- Returns the start opacity of the gradient -- @function [parent=#LayerGradient] setStartOpacity -- @param self --- @param #unsigned char startOpacity +-- @param #unsigned char char -------------------------------- --- Whether or not the interpolation will be compressed in order to display all the colors of the gradient both in canonical and non canonical vectors
--- Default: true -- @function [parent=#LayerGradient] setCompressedInterpolation -- @param self --- @param #bool compressedInterpolation +-- @param #bool bool -------------------------------- --- Returns the end opacity of the gradient -- @function [parent=#LayerGradient] setEndOpacity -- @param self --- @param #unsigned char endOpacity +-- @param #unsigned char char -------------------------------- --- Returns the directional vector used for the gradient -- @function [parent=#LayerGradient] getVector -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Sets the end color of the gradient -- @function [parent=#LayerGradient] setEndColor -- @param self --- @param #color3b_table endColor +-- @param #color3b_table color3b -------------------------------- --- Returns the end color of the gradient -- @function [parent=#LayerGradient] getEndColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- Returns the end opacity of the gradient -- @function [parent=#LayerGradient] getEndOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- --- Sets the start color of the gradient -- @function [parent=#LayerGradient] setStartColor -- @param self --- @param #color3b_table startColor +-- @param #color3b_table color3b -------------------------------- -- @overload self, color4b_table, color4b_table @@ -84,13 +70,12 @@ -- @overload self, color4b_table, color4b_table, vec2_table -- @function [parent=#LayerGradient] create -- @param self --- @param #color4b_table start --- @param #color4b_table end --- @param #vec2_table v +-- @param #color4b_table color4b +-- @param #color4b_table color4b +-- @param #vec2_table vec2 -- @return LayerGradient#LayerGradient ret (retunr value: cc.LayerGradient) -------------------------------- --- -- @function [parent=#LayerGradient] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua b/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua index b413d3dd25..3f577da04d 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua @@ -5,27 +5,21 @@ -- @parent_module cc -------------------------------- --- release the current layer and switches to another layer indexed by n.
--- The current (old) layer will be removed from it's parent with 'cleanup=true'. -- @function [parent=#LayerMultiplex] switchToAndReleaseMe -- @param self --- @param #int n +-- @param #int int -------------------------------- --- -- @function [parent=#LayerMultiplex] addLayer -- @param self -- @param #cc.Layer layer -------------------------------- --- switches to a certain layer indexed by n.
--- The current (old) layer will be removed from it's parent with 'cleanup=true'. -- @function [parent=#LayerMultiplex] switchTo -- @param self --- @param #int n +-- @param #int int -------------------------------- --- -- @function [parent=#LayerMultiplex] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/Layout.lua b/cocos/scripting/lua-bindings/auto/api/Layout.lua index 4612380c7a..fc0c574ce7 100644 --- a/cocos/scripting/lua-bindings/auto/api/Layout.lua +++ b/cocos/scripting/lua-bindings/auto/api/Layout.lua @@ -5,223 +5,177 @@ -- @parent_module ccui -------------------------------- --- Sets background color vector for layout, if color type is BackGroundColorType::GRADIENT
--- param vector -- @function [parent=#Layout] setBackGroundColorVector -- @param self --- @param #vec2_table vector +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#Layout] setClippingType -- @param self --- @param #int type +-- @param #int clippingtype -------------------------------- --- Sets Color Type for layout.
--- param type @see LayoutBackGroundColorType. -- @function [parent=#Layout] setBackGroundColorType -- @param self --- @param #int type +-- @param #int backgroundcolortype -------------------------------- --- If a layout is loop focused which means that the focus movement will be inside the layout
--- param loop pass true to let the focus movement loop inside the layout -- @function [parent=#Layout] setLoopFocus -- @param self --- @param #bool loop +-- @param #bool bool -------------------------------- --- -- @function [parent=#Layout] setBackGroundImageColor -- @param self --- @param #color3b_table color +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#Layout] getBackGroundColorVector -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#Layout] getClippingType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- return If focus loop is enabled, then it will return true, otherwise it returns false. The default value is false. -- @function [parent=#Layout] isLoopFocus -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Remove the background image of layout. -- @function [parent=#Layout] removeBackGroundImage -- @param self -------------------------------- --- -- @function [parent=#Layout] getBackGroundColorOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- --- Gets if layout is clipping enabled.
--- return if layout is clipping enabled. -- @function [parent=#Layout] isClippingEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Layout] setBackGroundImageOpacity -- @param self --- @param #unsigned char opacity +-- @param #unsigned char char -------------------------------- --- Sets a background image for layout
--- param fileName image file path.
--- param texType @see TextureResType. TextureResType::LOCAL means local file, TextureResType::PLIST means sprite frame. -- @function [parent=#Layout] setBackGroundImage -- @param self --- @param #string fileName --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- -- @overload self, color3b_table, color3b_table -- @overload self, color3b_table -- @function [parent=#Layout] setBackGroundColor -- @param self --- @param #color3b_table startColor --- @param #color3b_table endColor +-- @param #color3b_table color3b +-- @param #color3b_table color3b -------------------------------- --- request to refresh widget layout -- @function [parent=#Layout] requestDoLayout -- @param self -------------------------------- --- -- @function [parent=#Layout] getBackGroundImageCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- -- @function [parent=#Layout] getBackGroundColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- Changes if layout can clip it's content and child.
--- If you really need this, please enable it. But it would reduce the rendering efficiency.
--- param clipping enabled. -- @function [parent=#Layout] setClippingEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#Layout] getBackGroundImageColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- -- @function [parent=#Layout] isBackGroundImageScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Layout] getBackGroundColorType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Layout] getBackGroundEndColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- Sets background opacity layout.
--- param opacity -- @function [parent=#Layout] setBackGroundColorOpacity -- @param self --- @param #unsigned char opacity +-- @param #unsigned char char -------------------------------- --- -- @function [parent=#Layout] getBackGroundImageOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- --- return To query whether the layout will pass the focus to its children or not. The default value is true -- @function [parent=#Layout] isPassFocusToChild -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Sets a background image capinsets for layout, if the background image is a scale9 render.
--- param capinsets of background image. -- @function [parent=#Layout] setBackGroundImageCapInsets -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -------------------------------- --- Gets background image texture size.
--- return background image texture size. -- @function [parent=#Layout] getBackGroundImageTextureSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- force refresh widget layout -- @function [parent=#Layout] forceDoLayout -- @param self -------------------------------- --- -- @function [parent=#Layout] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- param pass To specify whether the layout pass its focus to its child -- @function [parent=#Layout] setPassFocusToChild -- @param self --- @param #bool pass +-- @param #bool bool -------------------------------- --- -- @function [parent=#Layout] getBackGroundStartColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- Sets background iamge use scale9 renderer.
--- param enabled true that use scale9 renderer, false otherwise. -- @function [parent=#Layout] setBackGroundImageScale9Enabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#Layout] setLayoutType -- @param self -- @param #int type -------------------------------- --- Allocates and initializes a layout. -- @function [parent=#Layout] create -- @param self -- @return Layout#Layout ret (return value: ccui.Layout) -------------------------------- --- -- @function [parent=#Layout] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) @@ -233,52 +187,38 @@ -- @overload self, cc.Node, int, string -- @function [parent=#Layout] addChild -- @param self --- @param #cc.Node child --- @param #int zOrder --- @param #string name +-- @param #cc.Node node +-- @param #int int +-- @param #string str -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#Layout] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
--- param cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
--- js removeAllChildren
--- lua removeAllChildren -- @function [parent=#Layout] removeAllChildrenWithCleanup -- @param self --- @param #bool cleanup +-- @param #bool bool -------------------------------- --- Removes all children from the container with a cleanup.
--- see `removeAllChildrenWithCleanup(bool)` -- @function [parent=#Layout] removeAllChildren -- @param self -------------------------------- --- When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
--- If the widget is not in a layout, it will return itself
--- param dir the direction to look for the next focused widget in a layout
--- param current the current focused widget
--- return the next focused widget in a layout -- @function [parent=#Layout] findNextFocusedWidget -- @param self --- @param #int direction --- @param #ccui.Widget current +-- @param #int focusdirection +-- @param #ccui.Widget widget -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- -- @function [parent=#Layout] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleanup +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- Default constructor -- @function [parent=#Layout] Layout -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua b/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua index 93f935f428..590f5ea26d 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua @@ -5,40 +5,31 @@ -- @parent_module ccui -------------------------------- --- -- @function [parent=#LayoutParameter] clone -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- --- Gets LayoutParameterType of LayoutParameter.
--- see LayoutParameterType
--- return LayoutParameterType -- @function [parent=#LayoutParameter] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#LayoutParameter] createCloneInstance -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- --- -- @function [parent=#LayoutParameter] copyProperties -- @param self --- @param #ccui.LayoutParameter model +-- @param #ccui.LayoutParameter layoutparameter -------------------------------- --- Allocates and initializes.
--- return A initialized LayoutParameter which is marked as "autorelease". -- @function [parent=#LayoutParameter] create -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- --- Default constructor -- @function [parent=#LayoutParameter] LayoutParameter -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Lens3D.lua b/cocos/scripting/lua-bindings/auto/api/Lens3D.lua index 780fef9f24..2bfdba6006 100644 --- a/cocos/scripting/lua-bindings/auto/api/Lens3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Lens3D.lua @@ -5,55 +5,47 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Lens3D] setPosition -- @param self --- @param #vec2_table position +-- @param #vec2_table vec2 -------------------------------- --- Set whether lens is concave -- @function [parent=#Lens3D] setConcave -- @param self --- @param #bool concave +-- @param #bool bool -------------------------------- --- Set lens center position -- @function [parent=#Lens3D] setLensEffect -- @param self --- @param #float lensEffect +-- @param #float float -------------------------------- --- -- @function [parent=#Lens3D] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Get lens center position -- @function [parent=#Lens3D] getLensEffect -- @param self -- @return float#float ret (return value: float) -------------------------------- --- creates the action with center position, radius, a grid size and duration -- @function [parent=#Lens3D] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #vec2_table position --- @param #float radius +-- @param #float float +-- @param #size_table size +-- @param #vec2_table vec2 +-- @param #float float -- @return Lens3D#Lens3D ret (return value: cc.Lens3D) -------------------------------- --- -- @function [parent=#Lens3D] clone -- @param self -- @return Lens3D#Lens3D ret (return value: cc.Lens3D) -------------------------------- --- -- @function [parent=#Lens3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua b/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua index 0b73c6dce6..81db029efb 100644 --- a/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua +++ b/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua @@ -5,42 +5,31 @@ -- @parent_module ccui -------------------------------- --- Sets LinearGravity parameter for LayoutParameter.
--- see LinearGravity
--- param LinearGravity -- @function [parent=#LinearLayoutParameter] setGravity -- @param self --- @param #int gravity +-- @param #int lineargravity -------------------------------- --- Gets LinearGravity parameter for LayoutParameter.
--- see LinearGravity
--- return LinearGravity -- @function [parent=#LinearLayoutParameter] getGravity -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Allocates and initializes.
--- return A initialized LayoutParameter which is marked as "autorelease". -- @function [parent=#LinearLayoutParameter] create -- @param self -- @return LinearLayoutParameter#LinearLayoutParameter ret (return value: ccui.LinearLayoutParameter) -------------------------------- --- -- @function [parent=#LinearLayoutParameter] createCloneInstance -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- --- -- @function [parent=#LinearLayoutParameter] copyProperties -- @param self --- @param #ccui.LayoutParameter model +-- @param #ccui.LayoutParameter layoutparameter -------------------------------- --- Default constructor -- @function [parent=#LinearLayoutParameter] LinearLayoutParameter -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Liquid.lua b/cocos/scripting/lua-bindings/auto/api/Liquid.lua index d572cb528b..1d70bc7690 100644 --- a/cocos/scripting/lua-bindings/auto/api/Liquid.lua +++ b/cocos/scripting/lua-bindings/auto/api/Liquid.lua @@ -5,49 +5,42 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Liquid] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Liquid] setAmplitude -- @param self --- @param #float amplitude +-- @param #float float -------------------------------- --- -- @function [parent=#Liquid] setAmplitudeRate -- @param self --- @param #float amplitudeRate +-- @param #float float -------------------------------- --- -- @function [parent=#Liquid] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- --- creates the action with amplitude, a grid and duration -- @function [parent=#Liquid] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #unsigned int waves --- @param #float amplitude +-- @param #float float +-- @param #size_table size +-- @param #unsigned int int +-- @param #float float -- @return Liquid#Liquid ret (return value: cc.Liquid) -------------------------------- --- -- @function [parent=#Liquid] clone -- @param self -- @return Liquid#Liquid ret (return value: cc.Liquid) -------------------------------- --- -- @function [parent=#Liquid] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ListView.lua b/cocos/scripting/lua-bindings/auto/api/ListView.lua index 550f7ede5d..eb0b32815d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ListView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ListView.lua @@ -5,133 +5,103 @@ -- @parent_module ccui -------------------------------- --- Returns the index of item.
--- param item the item which need to be checked.
--- return the index of item. -- @function [parent=#ListView] getIndex -- @param self --- @param #ccui.Widget item +-- @param #ccui.Widget widget -- @return long#long ret (return value: long) -------------------------------- --- -- @function [parent=#ListView] removeAllItems -- @param self -------------------------------- --- Changes the gravity of listview.
--- see ListViewGravity -- @function [parent=#ListView] setGravity -- @param self -- @param #int gravity -------------------------------- --- Push back custom item into listview. -- @function [parent=#ListView] pushBackCustomItem -- @param self --- @param #ccui.Widget item +-- @param #ccui.Widget widget -------------------------------- --- Returns the item container. -- @function [parent=#ListView] getItems -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- Removes a item whose index is same as the parameter.
--- param index of item. -- @function [parent=#ListView] removeItem -- @param self --- @param #long index +-- @param #long long -------------------------------- --- -- @function [parent=#ListView] getCurSelectedIndex -- @param self -- @return long#long ret (return value: long) -------------------------------- --- Insert a default item(create by a cloned model) into listview. -- @function [parent=#ListView] insertDefaultItem -- @param self --- @param #long index +-- @param #long long -------------------------------- --- -- @function [parent=#ListView] requestRefreshView -- @param self -------------------------------- --- Changes the margin between each item.
--- param margin -- @function [parent=#ListView] setItemsMargin -- @param self --- @param #float margin +-- @param #float float -------------------------------- --- -- @function [parent=#ListView] refreshView -- @param self -------------------------------- --- Removes the last item of listview. -- @function [parent=#ListView] removeLastItem -- @param self -------------------------------- --- -- @function [parent=#ListView] getItemsMargin -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ListView] addEventListener -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- Returns a item whose index is same as the parameter.
--- param index of item.
--- return the item widget. -- @function [parent=#ListView] getItem -- @param self --- @param #long index +-- @param #long long -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- Sets a item model for listview
--- A model will be cloned for adding default item.
--- param model item model for listview -- @function [parent=#ListView] setItemModel -- @param self --- @param #ccui.Widget model +-- @param #ccui.Widget widget -------------------------------- --- -- @function [parent=#ListView] doLayout -- @param self -------------------------------- --- Push back a default item(create by a cloned model) into listview. -- @function [parent=#ListView] pushBackDefaultItem -- @param self -------------------------------- --- Insert custom item into listview. -- @function [parent=#ListView] insertCustomItem -- @param self --- @param #ccui.Widget item --- @param #long index +-- @param #ccui.Widget widget +-- @param #long long -------------------------------- --- Allocates and initializes. -- @function [parent=#ListView] create -- @param self -- @return ListView#ListView ret (return value: ccui.ListView) -------------------------------- --- -- @function [parent=#ListView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) @@ -143,44 +113,36 @@ -- @overload self, cc.Node, int, string -- @function [parent=#ListView] addChild -- @param self --- @param #cc.Node child --- @param #int zOrder --- @param #string name +-- @param #cc.Node node +-- @param #int int +-- @param #string str -------------------------------- --- Changes scroll direction of scrollview.
--- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
--- param dir, set the list view's scroll direction -- @function [parent=#ListView] setDirection -- @param self --- @param #int dir +-- @param #int direction -------------------------------- --- -- @function [parent=#ListView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#ListView] removeAllChildrenWithCleanup -- @param self --- @param #bool cleanup +-- @param #bool bool -------------------------------- --- -- @function [parent=#ListView] removeAllChildren -- @param self -------------------------------- --- -- @function [parent=#ListView] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleaup +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- Default constructor -- @function [parent=#ListView] ListView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua b/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua index bb0fa5deff..132912332c 100644 --- a/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua +++ b/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua @@ -5,66 +5,47 @@ -- @parent_module ccui -------------------------------- --- Changes the progress direction of loadingbar.
--- param percent percent value from 1 to 100. -- @function [parent=#LoadingBar] setPercent -- @param self --- @param #float percent +-- @param #float float -------------------------------- --- Load texture for loadingbar.
--- param texture file name of texture.
--- param texType @see TextureResType -- @function [parent=#LoadingBar] loadTexture -- @param self --- @param #string texture --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Changes the progress direction of loadingbar.
--- see Direction LEFT means progress left to right, RIGHT otherwise.
--- param direction Direction -- @function [parent=#LoadingBar] setDirection -- @param self -- @param #int direction -------------------------------- --- Sets if loadingbar is using scale9 renderer.
--- param enabled true that using scale9 renderer, false otherwise. -- @function [parent=#LoadingBar] setScale9Enabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- Sets capinsets for loadingbar, if loadingbar is using scale9 renderer.
--- param capInsets capinsets for loadingbar -- @function [parent=#LoadingBar] setCapInsets -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -------------------------------- --- Gets the progress direction of loadingbar.
--- see Direction LEFT means progress left to right, RIGHT otherwise.
--- return Direction -- @function [parent=#LoadingBar] getDirection -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#LoadingBar] getCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- -- @function [parent=#LoadingBar] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Gets the progress direction of loadingbar.
--- return percent value from 1 to 100. -- @function [parent=#LoadingBar] getPercent -- @param self -- @return float#float ret (return value: float) @@ -74,42 +55,36 @@ -- @overload self -- @function [parent=#LoadingBar] create -- @param self --- @param #string textureName --- @param #float percentage +-- @param #string str +-- @param #float float -- @return LoadingBar#LoadingBar ret (retunr value: ccui.LoadingBar) -------------------------------- --- -- @function [parent=#LoadingBar] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#LoadingBar] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#LoadingBar] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#LoadingBar] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#LoadingBar] ignoreContentAdaptWithSize -- @param self --- @param #bool ignore +-- @param #bool bool -------------------------------- --- Default constructor -- @function [parent=#LoadingBar] LoadingBar -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Menu.lua b/cocos/scripting/lua-bindings/auto/api/Menu.lua index 9c5f8e0bc4..3a228e3443 100644 --- a/cocos/scripting/lua-bindings/auto/api/Menu.lua +++ b/cocos/scripting/lua-bindings/auto/api/Menu.lua @@ -5,38 +5,30 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Menu] setEnabled -- @param self --- @param #bool value +-- @param #bool bool -------------------------------- --- align items vertically -- @function [parent=#Menu] alignItemsVertically -- @param self -------------------------------- --- -- @function [parent=#Menu] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- align items horizontally with padding
--- since v0.7.2 -- @function [parent=#Menu] alignItemsHorizontallyWithPadding -- @param self --- @param #float padding +-- @param #float float -------------------------------- --- align items vertically with padding
--- since v0.7.2 -- @function [parent=#Menu] alignItemsVerticallyWithPadding -- @param self --- @param #float padding +-- @param #float float -------------------------------- --- align items horizontally -- @function [parent=#Menu] alignItemsHorizontally -- @param self @@ -47,33 +39,29 @@ -- @overload self, cc.Node, int, string -- @function [parent=#Menu] addChild -- @param self --- @param #cc.Node child --- @param #int zOrder --- @param #string name +-- @param #cc.Node node +-- @param #int int +-- @param #string str -------------------------------- --- -- @function [parent=#Menu] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Menu] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Menu] setOpacityModifyRGB -- @param self --- @param #bool bValue +-- @param #bool bool -------------------------------- --- -- @function [parent=#Menu] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleanup +-- @param #cc.Node node +-- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItem.lua b/cocos/scripting/lua-bindings/auto/api/MenuItem.lua index b525b9112c..12a0238e4c 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItem.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItem.lua @@ -5,46 +5,38 @@ -- @parent_module cc -------------------------------- --- enables or disables the item -- @function [parent=#MenuItem] setEnabled -- @param self --- @param #bool value +-- @param #bool bool -------------------------------- --- Activate the item -- @function [parent=#MenuItem] activate -- @param self -------------------------------- --- returns whether or not the item is enabled -- @function [parent=#MenuItem] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- The item was selected (not activated), similar to "mouse-over" -- @function [parent=#MenuItem] selected -- @param self -------------------------------- --- returns whether or not the item is selected -- @function [parent=#MenuItem] isSelected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- The item was unselected -- @function [parent=#MenuItem] unselected -- @param self -------------------------------- --- Returns the outside box -- @function [parent=#MenuItem] rect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- -- @function [parent=#MenuItem] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua index fd9baf15a8..7f0c2f5767 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua @@ -5,59 +5,43 @@ -- @parent_module cc -------------------------------- --- get font size
--- js getFontSize -- @function [parent=#MenuItemFont] getFontSizeObj -- @param self -- @return int#int ret (return value: int) -------------------------------- --- returns the name of the Font
--- js getFontNameObj -- @function [parent=#MenuItemFont] getFontNameObj -- @param self -- @return string#string ret (return value: string) -------------------------------- --- set font size
--- c++ can not overload static and non-static member functions with the same parameter types
--- so change the name to setFontSizeObj
--- js setFontSize -- @function [parent=#MenuItemFont] setFontSizeObj -- @param self --- @param #int size +-- @param #int int -------------------------------- --- set the font name
--- c++ can not overload static and non-static member functions with the same parameter types
--- so change the name to setFontNameObj
--- js setFontName -- @function [parent=#MenuItemFont] setFontNameObj -- @param self --- @param #string name +-- @param #string str -------------------------------- --- set the default font name -- @function [parent=#MenuItemFont] setFontName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- get default font size -- @function [parent=#MenuItemFont] getFontSize -- @param self -- @return int#int ret (return value: int) -------------------------------- --- get the default font name -- @function [parent=#MenuItemFont] getFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- set default font size -- @function [parent=#MenuItemFont] setFontSize -- @param self --- @param #int size +-- @param #int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua index bdad1c852f..81b37760cd 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua @@ -5,21 +5,18 @@ -- @parent_module cc -------------------------------- --- sets the sprite frame for the disabled image -- @function [parent=#MenuItemImage] setDisabledSpriteFrame -- @param self --- @param #cc.SpriteFrame frame +-- @param #cc.SpriteFrame spriteframe -------------------------------- --- sets the sprite frame for the selected image -- @function [parent=#MenuItemImage] setSelectedSpriteFrame -- @param self --- @param #cc.SpriteFrame frame +-- @param #cc.SpriteFrame spriteframe -------------------------------- --- sets the sprite frame for the normal image -- @function [parent=#MenuItemImage] setNormalSpriteFrame -- @param self --- @param #cc.SpriteFrame frame +-- @param #cc.SpriteFrame spriteframe return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua index 9048226099..177d9f914b 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua @@ -5,53 +5,44 @@ -- @parent_module cc -------------------------------- --- Gets the color that will be used to disable the item -- @function [parent=#MenuItemLabel] getDisabledColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- sets a new string to the inner label -- @function [parent=#MenuItemLabel] setString -- @param self --- @param #string label +-- @param #string str -------------------------------- --- Sets the label that is rendered. -- @function [parent=#MenuItemLabel] setLabel -- @param self -- @param #cc.Node node -------------------------------- --- Sets the color that will be used to disable the item -- @function [parent=#MenuItemLabel] setDisabledColor -- @param self --- @param #color3b_table color +-- @param #color3b_table color3b -------------------------------- --- Gets the label that is rendered. -- @function [parent=#MenuItemLabel] getLabel -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#MenuItemLabel] setEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#MenuItemLabel] activate -- @param self -------------------------------- --- -- @function [parent=#MenuItemLabel] unselected -- @param self -------------------------------- --- -- @function [parent=#MenuItemLabel] selected -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua index 5af7c2fd8e..881f690df1 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua @@ -5,54 +5,45 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#MenuItemSprite] setEnabled -- @param self --- @param #bool bEnabled +-- @param #bool bool -------------------------------- --- since v0.99.5 -- @function [parent=#MenuItemSprite] selected -- @param self -------------------------------- --- Sets the image used when the item is not selected -- @function [parent=#MenuItemSprite] setNormalImage -- @param self --- @param #cc.Node image +-- @param #cc.Node node -------------------------------- --- Sets the image used when the item is disabled -- @function [parent=#MenuItemSprite] setDisabledImage -- @param self --- @param #cc.Node image +-- @param #cc.Node node -------------------------------- --- Sets the image used when the item is selected -- @function [parent=#MenuItemSprite] setSelectedImage -- @param self --- @param #cc.Node image +-- @param #cc.Node node -------------------------------- --- Gets the image used when the item is disabled -- @function [parent=#MenuItemSprite] getDisabledImage -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Gets the image used when the item is selected -- @function [parent=#MenuItemSprite] getSelectedImage -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Gets the image used when the item is not selected -- @function [parent=#MenuItemSprite] getNormalImage -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#MenuItemSprite] unselected -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua index a2e32d4499..7442feb1b5 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua @@ -5,53 +5,44 @@ -- @parent_module cc -------------------------------- --- Sets the array that contains the subitems. -- @function [parent=#MenuItemToggle] setSubItems -- @param self --- @param #array_table items +-- @param #array_table array -------------------------------- --- Gets the index of the selected item -- @function [parent=#MenuItemToggle] getSelectedIndex -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- add more menu item -- @function [parent=#MenuItemToggle] addSubItem -- @param self --- @param #cc.MenuItem item +-- @param #cc.MenuItem menuitem -------------------------------- --- return the selected item -- @function [parent=#MenuItemToggle] getSelectedItem -- @param self -- @return MenuItem#MenuItem ret (return value: cc.MenuItem) -------------------------------- --- Sets the index of the selected item -- @function [parent=#MenuItemToggle] setSelectedIndex -- @param self --- @param #unsigned int index +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#MenuItemToggle] setEnabled -- @param self --- @param #bool var +-- @param #bool bool -------------------------------- --- -- @function [parent=#MenuItemToggle] activate -- @param self -------------------------------- --- -- @function [parent=#MenuItemToggle] unselected -- @param self -------------------------------- --- -- @function [parent=#MenuItemToggle] selected -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Mesh.lua b/cocos/scripting/lua-bindings/auto/api/Mesh.lua index 2b58a7a1dc..b9b817d4f2 100644 --- a/cocos/scripting/lua-bindings/auto/api/Mesh.lua +++ b/cocos/scripting/lua-bindings/auto/api/Mesh.lua @@ -5,7 +5,6 @@ -- @parent_module cc -------------------------------- --- get mesh vertex attribute count -- @function [parent=#Mesh] getMeshVertexAttribCount -- @param self -- @return long#long ret (return value: long) @@ -15,110 +14,93 @@ -- @overload self, string -- @function [parent=#Mesh] setTexture -- @param self --- @param #string texPath +-- @param #string str -------------------------------- --- mesh index data getter -- @function [parent=#Mesh] getMeshIndexData -- @param self -- @return MeshIndexData#MeshIndexData ret (return value: cc.MeshIndexData) -------------------------------- --- -- @function [parent=#Mesh] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- --- skin getter -- @function [parent=#Mesh] getSkin -- @param self -- @return MeshSkin#MeshSkin ret (return value: cc.MeshSkin) -------------------------------- --- name getter -- @function [parent=#Mesh] getName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Mesh] setBlendFunc -- @param self --- @param #cc.BlendFunc blendFunc +-- @param #cc.BlendFunc blendfunc -------------------------------- --- get index format -- @function [parent=#Mesh] getIndexFormat -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- get per vertex size in bytes -- @function [parent=#Mesh] getVertexSizeInBytes -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Mesh] getBlendFunc -- @param self -- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) -------------------------------- --- get GLProgramState -- @function [parent=#Mesh] getGLProgramState -- @param self -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- --- get index count -- @function [parent=#Mesh] getIndexCount -- @param self -- @return long#long ret (return value: long) -------------------------------- --- get vertex buffer -- @function [parent=#Mesh] getVertexBuffer -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- get MeshVertexAttribute by index -- @function [parent=#Mesh] getMeshVertexAttribute -- @param self --- @param #int idx +-- @param #int int -- @return MeshVertexAttrib#MeshVertexAttrib ret (return value: cc.MeshVertexAttrib) -------------------------------- --- -- @function [parent=#Mesh] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- get index buffer -- @function [parent=#Mesh] getIndexBuffer -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- has vertex attribute? -- @function [parent=#Mesh] hasVertexAttrib -- @param self --- @param #int attrib +-- @param #int int -- @return bool#bool ret (return value: bool) -------------------------------- --- get primitive type -- @function [parent=#Mesh] getPrimitiveType -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- visible getter and setter -- @function [parent=#Mesh] setVisible -- @param self --- @param #bool visible +-- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua b/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua index 63d586f109..47f6c9dbeb 100644 --- a/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua +++ b/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua @@ -5,108 +5,92 @@ -- @parent_module cc -------------------------------- --- Remove all living segments of the ribbon -- @function [parent=#MotionStreak] reset -- @param self -------------------------------- --- -- @function [parent=#MotionStreak] setTexture -- @param self --- @param #cc.Texture2D texture +-- @param #cc.Texture2D texture2d -------------------------------- --- -- @function [parent=#MotionStreak] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- --- color used for the tint -- @function [parent=#MotionStreak] tintWithColor -- @param self --- @param #color3b_table colors +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#MotionStreak] setStartingPositionInitialized -- @param self --- @param #bool bStartingPositionInitialized +-- @param #bool bool -------------------------------- --- -- @function [parent=#MotionStreak] isStartingPositionInitialized -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- When fast mode is enabled, new points are added faster but with lower precision -- @function [parent=#MotionStreak] isFastMode -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#MotionStreak] setFastMode -- @param self --- @param #bool bFastMode +-- @param #bool bool -------------------------------- -- @overload self, float, float, float, color3b_table, cc.Texture2D -- @overload self, float, float, float, color3b_table, string -- @function [parent=#MotionStreak] create -- @param self --- @param #float fade --- @param #float minSeg --- @param #float stroke --- @param #color3b_table color --- @param #string path +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #color3b_table color3b +-- @param #string str -- @return MotionStreak#MotionStreak ret (retunr value: cc.MotionStreak) -------------------------------- --- -- @function [parent=#MotionStreak] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#MotionStreak] setPositionY -- @param self --- @param #float y +-- @param #float float -------------------------------- --- -- @function [parent=#MotionStreak] setPositionX -- @param self --- @param #float x +-- @param #float float -------------------------------- --- -- @function [parent=#MotionStreak] getPositionY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#MotionStreak] getPositionX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#MotionStreak] setOpacity -- @param self --- @param #unsigned char opacity +-- @param #unsigned char char -------------------------------- --- -- @function [parent=#MotionStreak] setOpacityModifyRGB -- @param self --- @param #bool value +-- @param #bool bool -------------------------------- --- -- @function [parent=#MotionStreak] getOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) @@ -116,15 +100,15 @@ -- @overload self, vec2_table -- @function [parent=#MotionStreak] setPosition -- @param self --- @param #float x --- @param #float y +-- @param #float float +-- @param #float float -------------------------------- -- @overload self, float, float -- @overload self -- @function [parent=#MotionStreak] getPosition -- @param self --- @param #float x --- @param #float y +-- @param #float float +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MoveBy.lua b/cocos/scripting/lua-bindings/auto/api/MoveBy.lua index ee6d677fce..c478aff92a 100644 --- a/cocos/scripting/lua-bindings/auto/api/MoveBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/MoveBy.lua @@ -5,35 +5,30 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#MoveBy] create -- @param self --- @param #float duration --- @param #vec2_table deltaPosition +-- @param #float float +-- @param #vec2_table vec2 -- @return MoveBy#MoveBy ret (return value: cc.MoveBy) -------------------------------- --- -- @function [parent=#MoveBy] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#MoveBy] clone -- @param self -- @return MoveBy#MoveBy ret (return value: cc.MoveBy) -------------------------------- --- -- @function [parent=#MoveBy] reverse -- @param self -- @return MoveBy#MoveBy ret (return value: cc.MoveBy) -------------------------------- --- -- @function [parent=#MoveBy] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MoveTo.lua b/cocos/scripting/lua-bindings/auto/api/MoveTo.lua index 0212565eda..432c2baff3 100644 --- a/cocos/scripting/lua-bindings/auto/api/MoveTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/MoveTo.lua @@ -5,21 +5,18 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#MoveTo] create -- @param self --- @param #float duration --- @param #vec2_table position +-- @param #float float +-- @param #vec2_table vec2 -- @return MoveTo#MoveTo ret (return value: cc.MoveTo) -------------------------------- --- -- @function [parent=#MoveTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#MoveTo] clone -- @param self -- @return MoveTo#MoveTo ret (return value: cc.MoveTo) diff --git a/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua b/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua index c6c456be00..89f032a8ad 100644 --- a/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua +++ b/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua @@ -5,32 +5,27 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#MovementBoneData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#MovementBoneData] getFrameData -- @param self --- @param #int index +-- @param #int int -- @return FrameData#FrameData ret (return value: ccs.FrameData) -------------------------------- --- -- @function [parent=#MovementBoneData] addFrameData -- @param self --- @param #ccs.FrameData frameData +-- @param #ccs.FrameData framedata -------------------------------- --- -- @function [parent=#MovementBoneData] create -- @param self -- @return MovementBoneData#MovementBoneData ret (return value: ccs.MovementBoneData) -------------------------------- --- js ctor -- @function [parent=#MovementBoneData] MovementBoneData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/MovementData.lua b/cocos/scripting/lua-bindings/auto/api/MovementData.lua index 3bc6b1b16a..0e79adf323 100644 --- a/cocos/scripting/lua-bindings/auto/api/MovementData.lua +++ b/cocos/scripting/lua-bindings/auto/api/MovementData.lua @@ -5,26 +5,22 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#MovementData] getMovementBoneData -- @param self --- @param #string boneName +-- @param #string str -- @return MovementBoneData#MovementBoneData ret (return value: ccs.MovementBoneData) -------------------------------- --- -- @function [parent=#MovementData] addMovementBoneData -- @param self --- @param #ccs.MovementBoneData movBoneData +-- @param #ccs.MovementBoneData movementbonedata -------------------------------- --- -- @function [parent=#MovementData] create -- @param self -- @return MovementData#MovementData ret (return value: ccs.MovementData) -------------------------------- --- js ctor -- @function [parent=#MovementData] MovementData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index 3fc9d7d51d..e97163ead5 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -11,57 +11,42 @@ -- @overload self, cc.Node, int, string -- @function [parent=#Node] addChild -- @param self --- @param #cc.Node child --- @param #int localZOrder --- @param #string name +-- @param #cc.Node node +-- @param #int int +-- @param #string str -------------------------------- -- @overload self, cc.Component -- @overload self, string -- @function [parent=#Node] removeComponent -- @param self --- @param #string name +-- @param #string str -- @return bool#bool ret (retunr value: bool) -------------------------------- --- set the PhysicsBody that let the sprite effect with physics
--- note This method will set anchor point to Vec2::ANCHOR_MIDDLE if body not null, and you cann't change anchor point if node has a physics body. -- @function [parent=#Node] setPhysicsBody -- @param self --- @param #cc.PhysicsBody body +-- @param #cc.PhysicsBody physicsbody -------------------------------- --- Gets the description string. It makes debugging easier.
--- return A string
--- js NA
--- lua NA -- @function [parent=#Node] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
--- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
--- while the second one uses the real skew function.
--- 0 is the default rotation angle.
--- Positive values rotate node clockwise, and negative values for anti-clockwise.
--- param rotationY The Y rotation in degrees.
--- warning The physics body doesn't support this. -- @function [parent=#Node] setRotationSkewY -- @param self --- @param #float rotationY +-- @param #float float -------------------------------- --- -- @function [parent=#Node] setOpacityModifyRGB -- @param self --- @param #bool value +-- @param #bool bool -------------------------------- --- -- @function [parent=#Node] setCascadeOpacityEnabled -- @param self --- @param #bool cascadeOpacityEnabled +-- @param #bool bool -------------------------------- -- @overload self @@ -71,237 +56,159 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- --- -- @function [parent=#Node] setOnExitCallback -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- Pauses all scheduled selectors, actions and event listeners..
--- This method is called internally by onExit -- @function [parent=#Node] pause -- @param self -------------------------------- --- Converts a local Vec2 to world space coordinates.The result is in Points.
--- treating the returned/received node point as anchor relative. -- @function [parent=#Node] convertToWorldSpaceAR -- @param self --- @param #vec2_table nodePoint +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Gets whether the anchor point will be (0,0) when you position this node.
--- see `ignoreAnchorPointForPosition(bool)`
--- return true if the anchor point will be (0,0) when you position this node. -- @function [parent=#Node] isIgnoreAnchorPointForPosition -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Gets a child from the container with its name
--- param name An identifier to find the child node.
--- return a Node object whose name equals to the input parameter
--- since v3.2 -- @function [parent=#Node] getChildByName -- @param self --- @param #string name +-- @param #string str -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#Node] updateDisplayedOpacity -- @param self --- @param #unsigned char parentOpacity +-- @param #unsigned char char -------------------------------- --- get & set camera mask, the node is visible by the camera whose camera flag & node's camera mask is true -- @function [parent=#Node] getCameraMask -- @param self -- @return unsigned short#unsigned short ret (return value: unsigned short) -------------------------------- --- Sets the rotation (angle) of the node in degrees.
--- 0 is the default rotation angle.
--- Positive values rotate node clockwise, and negative values for anti-clockwise.
--- param rotation The rotation of the node in degrees. -- @function [parent=#Node] setRotation -- @param self --- @param #float rotation +-- @param #float float -------------------------------- --- Changes the scale factor on Z axis of this node
--- The Default value is 1.0 if you haven't changed it before.
--- param scaleY The scale factor on Y axis.
--- warning The physics body doesn't support this. -- @function [parent=#Node] setScaleZ -- @param self --- @param #float scaleZ +-- @param #float float -------------------------------- --- Sets the scale (y) of the node.
--- It is a scaling factor that multiplies the height of the node and its children.
--- param scaleY The scale factor on Y axis.
--- warning The physics body doesn't support this. -- @function [parent=#Node] setScaleY -- @param self --- @param #float scaleY +-- @param #float float -------------------------------- --- Sets the scale (x) of the node.
--- It is a scaling factor that multiplies the width of the node and its children.
--- param scaleX The scale factor on X axis.
--- warning The physics body doesn't support this. -- @function [parent=#Node] setScaleX -- @param self --- @param #float scaleX +-- @param #float float -------------------------------- --- Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
--- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
--- while the second one uses the real skew function.
--- 0 is the default rotation angle.
--- Positive values rotate node clockwise, and negative values for anti-clockwise.
--- param rotationX The X rotation in degrees which performs a horizontal rotational skew.
--- warning The physics body doesn't support this. -- @function [parent=#Node] setRotationSkewX -- @param self --- @param #float rotationX +-- @param #float float -------------------------------- --- -- @function [parent=#Node] setonEnterTransitionDidFinishCallback -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- removes all components -- @function [parent=#Node] removeAllComponents -- @param self -------------------------------- --- -- @function [parent=#Node] _setLocalZOrder -- @param self --- @param #int z +-- @param #int int -------------------------------- --- -- @function [parent=#Node] setCameraMask -- @param self --- @param #unsigned short mask --- @param #bool applyChildren +-- @param #unsigned short short +-- @param #bool bool -------------------------------- --- Returns a tag that is used to identify the node easily.
--- return An integer that identifies the node.
--- Please use `getTag()` instead. -- @function [parent=#Node] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- --- / @{/ @name GLProgram
--- Return the GLProgram (shader) currently used for this node
--- return The GLProgram (shader) currently used for this node -- @function [parent=#Node] getGLProgram -- @param self -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- --- Returns the world affine transform matrix. The matrix is in Pixels. -- @function [parent=#Node] getNodeToWorldTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- returns the position (X,Y,Z) in its parent's coordinate system -- @function [parent=#Node] getPosition3D -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- --- Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
--- param child The child node which will be removed.
--- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#Node] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleanup +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- Converts a Vec2 to world space coordinates. The result is in Points. -- @function [parent=#Node] convertToWorldSpace -- @param self --- @param #vec2_table nodePoint +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Returns the Scene that contains the Node.
--- It returns `nullptr` if the node doesn't belong to any Scene.
--- This function recursively calls parent->getScene() until parent is a Scene object. The results are not cached. It is that the user caches the results in case this functions is being used inside a loop. -- @function [parent=#Node] getScene -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- --- -- @function [parent=#Node] getEventDispatcher -- @param self -- @return EventDispatcher#EventDispatcher ret (return value: cc.EventDispatcher) -------------------------------- --- Changes the X skew angle of the node in degrees.
--- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
--- while the second one uses the real skew function.
--- This angle describes the shear distortion in the X direction.
--- Thus, it is the angle between the Y coordinate and the left edge of the shape
--- The default skewX angle is 0. Positive values distort the node in a CW direction.
--- param skewX The X skew angle of the node in degrees.
--- warning The physics body doesn't support this. -- @function [parent=#Node] setSkewX -- @param self --- @param #float skewX +-- @param #float float -------------------------------- --- -- @function [parent=#Node] setGLProgramState -- @param self --- @param #cc.GLProgramState glProgramState +-- @param #cc.GLProgramState glprogramstate -------------------------------- --- -- @function [parent=#Node] setOnEnterCallback -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- -- @function [parent=#Node] getOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- --- Sets the position (x,y) using values between 0 and 1.
--- The positions in pixels is calculated like the following:
--- code pseudo code
--- void setNormalizedPosition(Vec2 pos) {
--- Size s = getParent()->getContentSize();
--- _position = pos * s;
--- }
--- endcode -- @function [parent=#Node] setNormalizedPosition -- @param self --- @param #vec2_table position +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#Node] setonExitTransitionDidStartCallback -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- convenience methods which take a Touch instead of Vec2 -- @function [parent=#Node] convertTouchToNodeSpace -- @param self -- @param #cc.Touch touch @@ -312,70 +219,55 @@ -- @overload self -- @function [parent=#Node] removeAllChildrenWithCleanup -- @param self --- @param #bool cleanup +-- @param #bool bool -------------------------------- --- -- @function [parent=#Node] getNodeToParentAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- --- -- @function [parent=#Node] isCascadeOpacityEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Sets the parent node
--- param parent A pointer to the parent node -- @function [parent=#Node] setParent -- @param self --- @param #cc.Node parent +-- @param #cc.Node node -------------------------------- --- Returns a string that is used to identify the node.
--- return A string that identifies the node.
--- since v3.2 -- @function [parent=#Node] getName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- returns the rotation (X,Y,Z) in degrees. -- @function [parent=#Node] getRotation3D -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- --- Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
--- The matrix is in Pixels. -- @function [parent=#Node] getNodeToParentTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- converts a Touch (world coordinates) into a local coordinate. This method is AR (Anchor Relative). -- @function [parent=#Node] convertTouchToNodeSpaceAR -- @param self -- @param #cc.Touch touch -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Converts a Vec2 to node (local) space coordinates. The result is in Points. -- @function [parent=#Node] convertToNodeSpace -- @param self --- @param #vec2_table worldPoint +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Resumes all scheduled selectors, actions and event listeners.
--- This method is called internally by onEnter -- @function [parent=#Node] resume -- @param self -------------------------------- --- get the PhysicsBody the sprite have -- @function [parent=#Node] getPhysicsBody -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) @@ -385,178 +277,108 @@ -- @overload self, vec2_table -- @function [parent=#Node] setPosition -- @param self --- @param #float x --- @param #float y +-- @param #float float +-- @param #float float -------------------------------- --- Removes an action from the running action list by its tag.
--- param tag A tag that indicates the action to be removed. -- @function [parent=#Node] stopActionByTag -- @param self --- @param #int tag +-- @param #int int -------------------------------- --- Reorders a child according to a new z value.
--- param child An already added child node. It MUST be already added.
--- param localZOrder Z order for drawing priority. Please refer to setLocalZOrder(int) -- @function [parent=#Node] reorderChild -- @param self --- @param #cc.Node child --- @param #int localZOrder +-- @param #cc.Node node +-- @param #int int -------------------------------- --- Sets whether the anchor point will be (0,0) when you position this node.
--- This is an internal method, only used by Layer and Scene. Don't call it outside framework.
--- The default value is false, while in Layer and Scene are true
--- param ignore true if anchor point will be (0,0) when you position this node
--- todo This method should be renamed as setIgnoreAnchorPointForPosition(bool) or something with "set" -- @function [parent=#Node] ignoreAnchorPointForPosition -- @param self --- @param #bool ignore +-- @param #bool bool -------------------------------- --- Changes the Y skew angle of the node in degrees.
--- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
--- while the second one uses the real skew function.
--- This angle describes the shear distortion in the Y direction.
--- Thus, it is the angle between the X coordinate and the bottom edge of the shape
--- The default skewY angle is 0. Positive values distort the node in a CCW direction.
--- param skewY The Y skew angle of the node in degrees.
--- warning The physics body doesn't support this. -- @function [parent=#Node] setSkewY -- @param self --- @param #float skewY +-- @param #float float -------------------------------- --- Sets the 'z' coordinate in the position. It is the OpenGL Z vertex value.
--- The OpenGL depth buffer and depth testing are disabled by default. You need to turn them on
--- in order to use this property correctly.
--- `setPositionZ()` also sets the `setGlobalZValue()` with the positionZ as value.
--- see `setGlobalZValue()`
--- param vertexZ OpenGL Z vertex of this node. -- @function [parent=#Node] setPositionZ -- @param self --- @param #float positionZ +-- @param #float float -------------------------------- --- Sets the rotation (X,Y,Z) in degrees.
--- Useful for 3d rotations
--- warning The physics body doesn't support this. -- @function [parent=#Node] setRotation3D -- @param self --- @param #vec3_table rotation +-- @param #vec3_table vec3 -------------------------------- --- Gets/Sets x or y coordinate individually for position.
--- These methods are used in Lua and Javascript Bindings -- @function [parent=#Node] setPositionX -- @param self --- @param #float x +-- @param #float float -------------------------------- --- Sets the Transformation matrix manually. -- @function [parent=#Node] setNodeToParentTransform -- @param self --- @param #mat4_table transform +-- @param #mat4_table mat4 -------------------------------- --- Returns the anchor point in percent.
--- see `setAnchorPoint(const Vec2&)`
--- return The anchor point of node. -- @function [parent=#Node] getAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
--- Composable actions are counted as 1 action. Example:
--- If you are running 1 Sequence of 7 actions, it will return 1.
--- If you are running 7 Sequences of 2 actions, it will return 7.
--- todo Rename to getNumberOfRunningActions()
--- return The number of actions that are running plus the ones that are schedule to run -- @function [parent=#Node] getNumberOfRunningActions -- @param self -- @return long#long ret (return value: long) -------------------------------- --- Calls children's updateTransform() method recursively.
--- This method is moved from Sprite, so it's no longer specific to Sprite.
--- As the result, you apply SpriteBatchNode's optimization on your customed Node.
--- e.g., `batchNode->addChild(myCustomNode)`, while you can only addChild(sprite) before. -- @function [parent=#Node] updateTransform -- @param self -------------------------------- --- Sets the shader program for this node
--- Since v2.0, each rendering node must set its shader program.
--- It should be set in initialize phase.
--- code
--- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));
--- endcode
--- param shaderProgram The shader program -- @function [parent=#Node] setGLProgram -- @param self -- @param #cc.GLProgram glprogram -------------------------------- --- Determines if the node is visible
--- see `setVisible(bool)`
--- return true if the node is visible, false if the node is hidden. -- @function [parent=#Node] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Returns the amount of children
--- return The amount of children. -- @function [parent=#Node] getChildrenCount -- @param self -- @return long#long ret (return value: long) -------------------------------- --- Converts a Vec2 to node (local) space coordinates. The result is in Points.
--- treating the returned/received node point as anchor relative. -- @function [parent=#Node] convertToNodeSpaceAR -- @param self --- @param #vec2_table worldPoint +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- adds a component -- @function [parent=#Node] addComponent -- @param self -- @param #cc.Component component -- @return bool#bool ret (return value: bool) -------------------------------- --- Executes an action, and returns the action that is executed.
--- This node becomes the action's target. Refer to Action::getTarget()
--- warning Actions don't retain their target.
--- return An Action pointer -- @function [parent=#Node] runAction -- @param self -- @param #cc.Action action -- @return Action#Action ret (return value: cc.Action) -------------------------------- --- -- @function [parent=#Node] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Returns the rotation of the node in degrees.
--- see `setRotation(float)`
--- return The rotation of the node in degrees. -- @function [parent=#Node] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Returns the anchorPoint in absolute pixels.
--- warning You can only read it. If you wish to modify it, use anchorPoint instead.
--- see `getAnchorPoint()`
--- return The anchor point in absolute pixels. -- @function [parent=#Node] getAnchorPointInPoints -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) @@ -567,93 +389,68 @@ -- @function [parent=#Node] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
--- param name A string that identifies a child node
--- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#Node] removeChildByName -- @param self --- @param #string name --- @param #bool cleanup +-- @param #string str +-- @param #bool bool -------------------------------- --- -- @function [parent=#Node] getGLProgramState -- @param self -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- --- Sets a Scheduler object that is used to schedule all "updates" and timers.
--- warning If you set a new Scheduler, then previously created timers/update are going to be removed.
--- param scheduler A Shdeduler object that is used to schedule all "update" and timers. -- @function [parent=#Node] setScheduler -- @param self -- @param #cc.Scheduler scheduler -------------------------------- --- Stops and removes all actions from the running action list . -- @function [parent=#Node] stopAllActions -- @param self -------------------------------- --- Returns the X skew angle of the node in degrees.
--- see `setSkewX(float)`
--- return The X skew angle of the node in degrees. -- @function [parent=#Node] getSkewX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Returns the Y skew angle of the node in degrees.
--- see `setSkewY(float)`
--- return The Y skew angle of the node in degrees. -- @function [parent=#Node] getSkewY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Node] getDisplayedColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- Gets an action from the running action list by its tag.
--- see `setTag(int)`, `getTag()`.
--- return The action object with the given tag. -- @function [parent=#Node] getActionByTag -- @param self --- @param #int tag +-- @param #int int -- @return Action#Action ret (return value: cc.Action) -------------------------------- --- Changes the name that is used to identify the node easily.
--- param name A string that identifies the node.
--- since v3.2 -- @function [parent=#Node] setName -- @param self --- @param #string name +-- @param #string str -------------------------------- -- @overload self, cc.AffineTransform -- @overload self, mat4_table -- @function [parent=#Node] setAdditionalTransform -- @param self --- @param #mat4_table additionalTransform +-- @param #mat4_table mat4 -------------------------------- --- -- @function [parent=#Node] getDisplayedOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- --- Gets the local Z order of this node.
--- see `setLocalZOrder(int)`
--- return The local (relative to its siblings) Z order. -- @function [parent=#Node] getLocalZOrder -- @param self -- @return int#int ret (return value: int) @@ -666,37 +463,26 @@ -- @return Scheduler#Scheduler ret (retunr value: cc.Scheduler) -------------------------------- --- -- @function [parent=#Node] getParentToNodeAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- --- Returns the arrival order, indicates which children is added previously.
--- see `setOrderOfArrival(unsigned int)`
--- return The arrival order. -- @function [parent=#Node] getOrderOfArrival -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Sets the ActionManager object that is used by all actions.
--- warning If you set a new ActionManager, then previously created actions will be removed.
--- param actionManager A ActionManager object that is used by all actions. -- @function [parent=#Node] setActionManager -- @param self --- @param #cc.ActionManager actionManager +-- @param #cc.ActionManager actionmanager -------------------------------- --- -- @function [parent=#Node] setColor -- @param self --- @param #color3b_table color +-- @param #color3b_table color3b -------------------------------- --- Returns whether or not the node is "running".
--- If the node is running it will accept event callbacks like onEnter(), onExit(), update()
--- return Whether or not the node is running. -- @function [parent=#Node] isRunning -- @param self -- @return bool#bool ret (return value: bool) @@ -709,218 +495,146 @@ -- @return Node#Node ret (retunr value: cc.Node) -------------------------------- --- Gets position Z coordinate of this node.
--- see setPositionZ(float)
--- return the position Z coordinate of this node. -- @function [parent=#Node] getPositionZ -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Node] getPositionY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Node] getPositionX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
--- param tag An interger number that identifies a child node
--- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise.
--- Please use `removeChildByName` instead. -- @function [parent=#Node] removeChildByTag -- @param self --- @param #int tag --- @param #bool cleanup +-- @param #int int +-- @param #bool bool -------------------------------- --- -- @function [parent=#Node] setPositionY -- @param self --- @param #float y +-- @param #float float -------------------------------- --- -- @function [parent=#Node] getNodeToWorldAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- --- -- @function [parent=#Node] updateDisplayedColor -- @param self --- @param #color3b_table parentColor +-- @param #color3b_table color3b -------------------------------- --- Sets whether the node is visible
--- The default value is true, a node is default to visible
--- param visible true if the node is visible, false if the node is hidden. -- @function [parent=#Node] setVisible -- @param self --- @param #bool visible +-- @param #bool bool -------------------------------- --- Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
--- The matrix is in Pixels. -- @function [parent=#Node] getParentToNodeTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- Defines the oder in which the nodes are renderer.
--- Nodes that have a Global Z Order lower, are renderer first.
--- In case two or more nodes have the same Global Z Order, the oder is not guaranteed.
--- The only exception if the Nodes have a Global Z Order == 0. In that case, the Scene Graph order is used.
--- By default, all nodes have a Global Z Order = 0. That means that by default, the Scene Graph order is used to render the nodes.
--- Global Z Order is useful when you need to render nodes in an order different than the Scene Graph order.
--- Limitations: Global Z Order can't be used used by Nodes that have SpriteBatchNode as one of their acenstors.
--- And if ClippingNode is one of the ancestors, then "global Z order" will be relative to the ClippingNode.
--- see `setLocalZOrder()`
--- see `setVertexZ()`
--- since v3.0 -- @function [parent=#Node] setGlobalZOrder -- @param self --- @param #float globalZOrder +-- @param #float float -------------------------------- -- @overload self, float, float -- @overload self, float -- @function [parent=#Node] setScale -- @param self --- @param #float scaleX --- @param #float scaleY +-- @param #float float +-- @param #float float -------------------------------- --- Gets a child from the container with its tag
--- param tag An identifier to find the child node.
--- return a Node object whose tag equals to the input parameter
--- Please use `getChildByName()` instead -- @function [parent=#Node] getChildByTag -- @param self --- @param #int tag +-- @param #int int -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Sets the arrival order when this node has a same ZOrder with other children.
--- A node which called addChild subsequently will take a larger arrival order,
--- If two children have the same Z order, the child with larger arrival order will be drawn later.
--- warning This method is used internally for localZOrder sorting, don't change this manually
--- param orderOfArrival The arrival order. -- @function [parent=#Node] setOrderOfArrival -- @param self --- @param #int orderOfArrival +-- @param #int int -------------------------------- --- Returns the scale factor on Z axis of this node
--- see `setScaleZ(float)`
--- return The scale factor on Z axis. -- @function [parent=#Node] getScaleZ -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Returns the scale factor on Y axis of this node
--- see `setScaleY(float)`
--- return The scale factor on Y axis. -- @function [parent=#Node] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Returns the scale factor on X axis of this node
--- see setScaleX(float)
--- return The scale factor on X axis. -- @function [parent=#Node] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- LocalZOrder is the 'key' used to sort the node relative to its siblings.
--- The Node's parent will sort all its children based ont the LocalZOrder value.
--- If two nodes have the same LocalZOrder, then the node that was added first to the children's array will be in front of the other node in the array.
--- Also, the Scene Graph is traversed using the "In-Order" tree traversal algorithm ( http:en.wikipedia.org/wiki/Tree_traversal#In-order )
--- And Nodes that have LocalZOder values < 0 are the "left" subtree
--- While Nodes with LocalZOder >=0 are the "right" subtree.
--- see `setGlobalZOrder`
--- see `setVertexZ` -- @function [parent=#Node] setLocalZOrder -- @param self --- @param #int localZOrder +-- @param #int int -------------------------------- --- -- @function [parent=#Node] getWorldToNodeAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- --- -- @function [parent=#Node] setCascadeColorEnabled -- @param self --- @param #bool cascadeColorEnabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#Node] setOpacity -- @param self --- @param #unsigned char opacity +-- @param #unsigned char char -------------------------------- --- Stops all running actions and schedulers -- @function [parent=#Node] cleanup -- @param self -------------------------------- --- / @{/ @name component functions
--- gets a component by its name -- @function [parent=#Node] getComponent -- @param self --- @param #string name +-- @param #string str -- @return Component#Component ret (return value: cc.Component) -------------------------------- --- Returns the untransformed size of the node.
--- see `setContentSize(const Size&)`
--- return The untransformed size of the node. -- @function [parent=#Node] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Removes all actions from the running action list by its tag.
--- param tag A tag that indicates the action to be removed. -- @function [parent=#Node] stopAllActionsByTag -- @param self --- @param #int tag +-- @param #int int -------------------------------- --- -- @function [parent=#Node] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- Returns an AABB (axis-aligned bounding-box) in its parent's coordinate system.
--- return An AABB (axis-aligned bounding-box) in its parent's coordinate system -- @function [parent=#Node] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- -- @function [parent=#Node] setEventDispatcher -- @param self --- @param #cc.EventDispatcher dispatcher +-- @param #cc.EventDispatcher eventdispatcher -------------------------------- --- Returns the Node's Global Z Order.
--- see `setGlobalZOrder(int)`
--- return The node's global Z order -- @function [parent=#Node] getGlobalZOrder -- @param self -- @return float#float ret (return value: float) @@ -931,101 +645,71 @@ -- @function [parent=#Node] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- Returns a user assigned Object
--- Similar to UserData, but instead of holding a void* it holds an object.
--- The UserObject will be retained once in this method,
--- and the previous UserObject (if existed) will be released.
--- The UserObject will be released in Node's destructor.
--- param userObject A user assigned Object -- @function [parent=#Node] setUserObject -- @param self --- @param #cc.Ref userObject +-- @param #cc.Ref ref -------------------------------- -- @overload self, bool -- @overload self -- @function [parent=#Node] removeFromParentAndCleanup -- @param self --- @param #bool cleanup +-- @param #bool bool -------------------------------- --- Sets the position (X, Y, and Z) in its parent's coordinate system -- @function [parent=#Node] setPosition3D -- @param self --- @param #vec3_table position +-- @param #vec3_table vec3 -------------------------------- --- -- @function [parent=#Node] update -- @param self --- @param #float delta +-- @param #float float -------------------------------- --- Sorts the children array once before drawing, instead of every time when a child is added or reordered.
--- This appraoch can improves the performance massively.
--- note Don't call this manually unless a child added needs to be removed in the same frame -- @function [parent=#Node] sortAllChildren -- @param self -------------------------------- --- Returns the inverse world affine transform matrix. The matrix is in Pixels. -- @function [parent=#Node] getWorldToNodeTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- Gets the scale factor of the node, when X and Y have the same scale factor.
--- warning Assert when `_scaleX != _scaleY`
--- see setScale(float)
--- return The scale factor of the node. -- @function [parent=#Node] getScale -- @param self -- @return float#float ret (return value: float) -------------------------------- --- returns the normalized position -- @function [parent=#Node] getNormalizedPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew.
--- see `setRotationSkewX(float)`
--- return The X rotation in degrees. -- @function [parent=#Node] getRotationSkewX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
--- see `setRotationSkewY(float)`
--- return The Y rotation in degrees. -- @function [parent=#Node] getRotationSkewY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Changes the tag that is used to identify the node easily.
--- Please refer to getTag for the sample code.
--- param tag A integer that identifies the node.
--- Please use `setName()` instead. -- @function [parent=#Node] setTag -- @param self --- @param #int tag +-- @param #int int -------------------------------- --- -- @function [parent=#Node] isCascadeColorEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Stops and removes an action from the running action list.
--- param action The action object to be removed. -- @function [parent=#Node] stopAction -- @param self -- @param #cc.Action action @@ -1038,8 +722,6 @@ -- @return ActionManager#ActionManager ret (retunr value: cc.ActionManager) -------------------------------- --- Allocates and initializes a node.
--- return A initialized node which is marked as "autorelease". -- @function [parent=#Node] create -- @param self -- @return Node#Node ret (return value: cc.Node) diff --git a/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua b/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua index 7ccb4f01c2..2d99049a3c 100644 --- a/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua +++ b/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#NodeGrid] setTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- -- @overload self @@ -18,24 +17,20 @@ -- @return GridBase#GridBase ret (retunr value: cc.GridBase) -------------------------------- --- Changes a grid object that is used when applying effects
--- param grid A Grid object that is used when applying effects -- @function [parent=#NodeGrid] setGrid -- @param self --- @param #cc.GridBase grid +-- @param #cc.GridBase gridbase -------------------------------- --- -- @function [parent=#NodeGrid] create -- @param self -- @return NodeGrid#NodeGrid ret (return value: cc.NodeGrid) -------------------------------- --- -- @function [parent=#NodeGrid] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags +-- @param #mat4_table mat4 +-- @param #unsigned int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/NodeReader.lua b/cocos/scripting/lua-bindings/auto/api/NodeReader.lua index 989c2ae99b..51e345250a 100644 --- a/cocos/scripting/lua-bindings/auto/api/NodeReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/NodeReader.lua @@ -4,67 +4,56 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#NodeReader] setJsonPath -- @param self --- @param #string jsonPath +-- @param #string str -------------------------------- --- -- @function [parent=#NodeReader] createNode -- @param self --- @param #string filename +-- @param #string str -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#NodeReader] loadNodeWithFile -- @param self --- @param #string fileName +-- @param #string str -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#NodeReader] purge -- @param self -------------------------------- --- -- @function [parent=#NodeReader] init -- @param self -------------------------------- --- -- @function [parent=#NodeReader] loadNodeWithContent -- @param self --- @param #string content +-- @param #string str -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#NodeReader] isRecordJsonPath -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#NodeReader] getJsonPath -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#NodeReader] setRecordJsonPath -- @param self --- @param #bool record +-- @param #bool bool -------------------------------- --- -- @function [parent=#NodeReader] destroyInstance -- @param self -------------------------------- --- -- @function [parent=#NodeReader] NodeReader -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua b/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua index 9919cf681e..c4130a75c8 100644 --- a/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua +++ b/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua @@ -5,34 +5,30 @@ -- @parent_module cc -------------------------------- --- creates a OrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX -- @function [parent=#OrbitCamera] create -- @param self --- @param #float t --- @param #float radius --- @param #float deltaRadius --- @param #float angleZ --- @param #float deltaAngleZ --- @param #float angleX --- @param #float deltaAngleX +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float -- @return OrbitCamera#OrbitCamera ret (return value: cc.OrbitCamera) -------------------------------- --- -- @function [parent=#OrbitCamera] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#OrbitCamera] clone -- @param self -- @return OrbitCamera#OrbitCamera ret (return value: cc.OrbitCamera) -------------------------------- --- -- @function [parent=#OrbitCamera] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua b/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua index 2d17a6451a..aa9eff0b3d 100644 --- a/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua @@ -5,23 +5,20 @@ -- @parent_module cc -------------------------------- --- create the action -- @function [parent=#PageTurn3D] create -- @param self --- @param #float duration --- @param #size_table gridSize +-- @param #float float +-- @param #size_table size -- @return PageTurn3D#PageTurn3D ret (return value: cc.PageTurn3D) -------------------------------- --- -- @function [parent=#PageTurn3D] clone -- @param self -- @return PageTurn3D#PageTurn3D ret (return value: cc.PageTurn3D) -------------------------------- --- -- @function [parent=#PageTurn3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PageView.lua b/cocos/scripting/lua-bindings/auto/api/PageView.lua index f32fed2e39..f68253b507 100644 --- a/cocos/scripting/lua-bindings/auto/api/PageView.lua +++ b/cocos/scripting/lua-bindings/auto/api/PageView.lua @@ -5,150 +5,114 @@ -- @parent_module ccui -------------------------------- --- brief Return user defined scroll page threshold -- @function [parent=#PageView] getCustomScrollThreshold -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Gets current page index.
--- return current page index. -- @function [parent=#PageView] getCurPageIndex -- @param self -- @return long#long ret (return value: long) -------------------------------- --- Add a widget to a page of pageview.
--- param widget widget to be added to pageview.
--- param pageIdx index of page.
--- param forceCreate if force create and there is no page exsit, pageview would create a default page for adding widget. -- @function [parent=#PageView] addWidgetToPage -- @param self -- @param #ccui.Widget widget --- @param #long pageIdx --- @param #bool forceCreate +-- @param #long long +-- @param #bool bool -------------------------------- --- brief Query whether we are using user defined scroll page threshold or not -- @function [parent=#PageView] isUsingCustomScrollThreshold -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#PageView] getPage -- @param self --- @param #long index +-- @param #long long -- @return Layout#Layout ret (return value: ccui.Layout) -------------------------------- --- Remove a page of pageview.
--- param page page which will be removed. -- @function [parent=#PageView] removePage -- @param self --- @param #ccui.Layout page +-- @param #ccui.Layout layout -------------------------------- --- -- @function [parent=#PageView] addEventListener -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- brief Set using user defined scroll page threshold or not
--- If you set it to false, then the default scroll threshold is pageView.width / 2 -- @function [parent=#PageView] setUsingCustomScrollThreshold -- @param self --- @param #bool flag +-- @param #bool bool -------------------------------- --- brief If you don't specify the value, the pageView will scroll when half pageview width reached -- @function [parent=#PageView] setCustomScrollThreshold -- @param self --- @param #float threshold +-- @param #float float -------------------------------- --- Insert a page to pageview.
--- param page page to be added to pageview. -- @function [parent=#PageView] insertPage -- @param self --- @param #ccui.Layout page --- @param #int idx +-- @param #ccui.Layout layout +-- @param #int int -------------------------------- --- scroll pageview to index.
--- param idx index of page. -- @function [parent=#PageView] scrollToPage -- @param self --- @param #long idx +-- @param #long long -------------------------------- --- Remove a page at index of pageview.
--- param index index of page. -- @function [parent=#PageView] removePageAtIndex -- @param self --- @param #long index +-- @param #long long -------------------------------- --- -- @function [parent=#PageView] getPages -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#PageView] removeAllPages -- @param self -------------------------------- --- Push back a page to pageview.
--- param page page to be added to pageview. -- @function [parent=#PageView] addPage -- @param self --- @param #ccui.Layout page +-- @param #ccui.Layout layout -------------------------------- --- Allocates and initializes. -- @function [parent=#PageView] create -- @param self -- @return PageView#PageView ret (return value: ccui.PageView) -------------------------------- --- -- @function [parent=#PageView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- Gets LayoutType.
--- see LayoutType
--- return LayoutType -- @function [parent=#PageView] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#PageView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#PageView] update -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- Sets LayoutType.
--- see LayoutType
--- param type LayoutType -- @function [parent=#PageView] setLayoutType -- @param self -- @param #int type -------------------------------- --- Default constructor -- @function [parent=#PageView] PageView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua b/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua index 08e5385b90..3a55ee2e5a 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua @@ -5,22 +5,19 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParallaxNode] addChild -- @param self --- @param #cc.Node child --- @param #int z --- @param #vec2_table parallaxRatio --- @param #vec2_table positionOffset +-- @param #cc.Node node +-- @param #int int +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#ParallaxNode] removeAllChildrenWithCleanup -- @param self --- @param #bool cleanup +-- @param #bool bool -------------------------------- --- -- @function [parent=#ParallaxNode] create -- @param self -- @return ParallaxNode#ParallaxNode ret (return value: cc.ParallaxNode) @@ -30,23 +27,21 @@ -- @overload self, cc.Node, int, int -- @function [parent=#ParallaxNode] addChild -- @param self --- @param #cc.Node child --- @param #int zOrder --- @param #int tag +-- @param #cc.Node node +-- @param #int int +-- @param #int int -------------------------------- --- -- @function [parent=#ParallaxNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#ParallaxNode] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleanup +-- @param #cc.Node node +-- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua b/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua index 7207e4e41e..1adde946b7 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua @@ -5,69 +5,59 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleBatchNode] setTexture -- @param self --- @param #cc.Texture2D texture +-- @param #cc.Texture2D texture2d -------------------------------- --- disables a particle by inserting a 0'd quad into the texture atlas -- @function [parent=#ParticleBatchNode] disableParticle -- @param self --- @param #int particleIndex +-- @param #int int -------------------------------- --- -- @function [parent=#ParticleBatchNode] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- --- Sets the texture atlas used for drawing the quads -- @function [parent=#ParticleBatchNode] setTextureAtlas -- @param self --- @param #cc.TextureAtlas atlas +-- @param #cc.TextureAtlas textureatlas -------------------------------- --- -- @function [parent=#ParticleBatchNode] removeAllChildrenWithCleanup -- @param self --- @param #bool doCleanup +-- @param #bool bool -------------------------------- --- Gets the texture atlas used for drawing the quads -- @function [parent=#ParticleBatchNode] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- --- Inserts a child into the ParticleBatchNode -- @function [parent=#ParticleBatchNode] insertChild -- @param self --- @param #cc.ParticleSystem system --- @param #int index +-- @param #cc.ParticleSystem particlesystem +-- @param #int int -------------------------------- --- -- @function [parent=#ParticleBatchNode] removeChildAtIndex -- @param self --- @param #int index --- @param #bool doCleanup +-- @param #int int +-- @param #bool bool -------------------------------- --- initializes the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles -- @function [parent=#ParticleBatchNode] create -- @param self --- @param #string fileImage --- @param #int capacity +-- @param #string str +-- @param #int int -- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode) -------------------------------- --- initializes the particle system with Texture2D, a capacity of particles, which particle system to use -- @function [parent=#ParticleBatchNode] createWithTexture -- @param self --- @param #cc.Texture2D tex --- @param #int capacity +-- @param #cc.Texture2D texture2d +-- @param #int int -- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode) -------------------------------- @@ -75,38 +65,34 @@ -- @overload self, cc.Node, int, int -- @function [parent=#ParticleBatchNode] addChild -- @param self --- @param #cc.Node child --- @param #int zOrder --- @param #int tag +-- @param #cc.Node node +-- @param #int int +-- @param #int int -------------------------------- --- -- @function [parent=#ParticleBatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#ParticleBatchNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#ParticleBatchNode] reorderChild -- @param self --- @param #cc.Node child --- @param #int zOrder +-- @param #cc.Node node +-- @param #int int -------------------------------- --- -- @function [parent=#ParticleBatchNode] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleanup +-- @param #cc.Node node +-- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua b/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua index 7e2361d90e..d9f24aa9d7 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua @@ -5,13 +5,11 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ParticleDisplayData] create -- @param self -- @return ParticleDisplayData#ParticleDisplayData ret (return value: ccs.ParticleDisplayData) -------------------------------- --- js ctor -- @function [parent=#ParticleDisplayData] ParticleDisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua b/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua index 5fded9bb0f..693f1ebd46 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleExplosion] create -- @param self -- @return ParticleExplosion#ParticleExplosion ret (return value: cc.ParticleExplosion) -------------------------------- --- -- @function [parent=#ParticleExplosion] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleExplosion#ParticleExplosion ret (return value: cc.ParticleExplosion) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua b/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua index d26181214a..1c9d89cda7 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleFire] create -- @param self -- @return ParticleFire#ParticleFire ret (return value: cc.ParticleFire) -------------------------------- --- -- @function [parent=#ParticleFire] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleFire#ParticleFire ret (return value: cc.ParticleFire) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua b/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua index cf8cc88409..3a6549d5ab 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleFireworks] create -- @param self -- @return ParticleFireworks#ParticleFireworks ret (return value: cc.ParticleFireworks) -------------------------------- --- -- @function [parent=#ParticleFireworks] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleFireworks#ParticleFireworks ret (return value: cc.ParticleFireworks) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua b/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua index 1d69ebf5ec..55c7f9cd33 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleFlower] create -- @param self -- @return ParticleFlower#ParticleFlower ret (return value: cc.ParticleFlower) -------------------------------- --- -- @function [parent=#ParticleFlower] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleFlower#ParticleFlower ret (return value: cc.ParticleFlower) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua b/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua index 5ec68f2b85..c99c2ead77 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleGalaxy] create -- @param self -- @return ParticleGalaxy#ParticleGalaxy ret (return value: cc.ParticleGalaxy) -------------------------------- --- -- @function [parent=#ParticleGalaxy] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleGalaxy#ParticleGalaxy ret (return value: cc.ParticleGalaxy) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua b/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua index ed1c10d29f..556a9f56ca 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleMeteor] create -- @param self -- @return ParticleMeteor#ParticleMeteor ret (return value: cc.ParticleMeteor) -------------------------------- --- -- @function [parent=#ParticleMeteor] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleMeteor#ParticleMeteor ret (return value: cc.ParticleMeteor) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua b/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua index 602a43e5fc..36921412b2 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleRain] create -- @param self -- @return ParticleRain#ParticleRain ret (return value: cc.ParticleRain) -------------------------------- --- -- @function [parent=#ParticleRain] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleRain#ParticleRain ret (return value: cc.ParticleRain) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua index 8ba9f90ca0..61c5124bf6 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleSmoke] create -- @param self -- @return ParticleSmoke#ParticleSmoke ret (return value: cc.ParticleSmoke) -------------------------------- --- -- @function [parent=#ParticleSmoke] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleSmoke#ParticleSmoke ret (return value: cc.ParticleSmoke) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua index 4b872058bb..9f72153785 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleSnow] create -- @param self -- @return ParticleSnow#ParticleSnow ret (return value: cc.ParticleSnow) -------------------------------- --- -- @function [parent=#ParticleSnow] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleSnow#ParticleSnow ret (return value: cc.ParticleSnow) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua index 6f653e601d..0179b56720 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleSpiral] create -- @param self -- @return ParticleSpiral#ParticleSpiral ret (return value: cc.ParticleSpiral) -------------------------------- --- -- @function [parent=#ParticleSpiral] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleSpiral#ParticleSpiral ret (return value: cc.ParticleSpiral) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua index d702a58839..93f07dafde 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ParticleSun] create -- @param self -- @return ParticleSun#ParticleSun ret (return value: cc.ParticleSun) -------------------------------- --- -- @function [parent=#ParticleSun] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleSun#ParticleSun ret (return value: cc.ParticleSun) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua index 5151144bb3..3a36b92a5c 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua @@ -5,613 +5,506 @@ -- @parent_module cc -------------------------------- --- size variance in pixels of each particle -- @function [parent=#ParticleSystem] getStartSizeVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- --- whether or not the system is full -- @function [parent=#ParticleSystem] isFull -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ParticleSystem] getBatchNode -- @param self -- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode) -------------------------------- --- start color of each particle -- @function [parent=#ParticleSystem] getStartColor -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- --- particles movement type: Free or Grouped
--- since v0.8 -- @function [parent=#ParticleSystem] getPositionType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#ParticleSystem] setPosVar -- @param self --- @param #vec2_table pos +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#ParticleSystem] getEndSpin -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setRotatePerSecondVar -- @param self --- @param #float degrees +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] getStartSpinVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] getRadialAccelVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- end size variance in pixels of each particle -- @function [parent=#ParticleSystem] getEndSizeVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setRotation -- @param self --- @param #float newRotation +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setTangentialAccel -- @param self --- @param #float t +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setScaleY -- @param self --- @param #float newScaleY +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setScaleX -- @param self --- @param #float newScaleX +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] getRadialAccel -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setStartRadius -- @param self --- @param #float startRadius +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setRotatePerSecond -- @param self --- @param #float degrees +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setEndSize -- @param self --- @param #float endSize +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] getGravity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#ParticleSystem] getTangentialAccel -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setEndRadius -- @param self --- @param #float endRadius +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- --- angle and angle variation of each particle -- @function [parent=#ParticleSystem] getAngle -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setEndColor -- @param self --- @param #color4f_table color +-- @param #color4f_table color4f -------------------------------- --- -- @function [parent=#ParticleSystem] setStartSpin -- @param self --- @param #float spin +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setDuration -- @param self --- @param #float duration +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setTexture -- @param self --- @param #cc.Texture2D texture +-- @param #cc.Texture2D texture2d -------------------------------- --- Position variance of the emitter -- @function [parent=#ParticleSystem] getPosVar -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#ParticleSystem] updateWithNoTime -- @param self -------------------------------- --- -- @function [parent=#ParticleSystem] isBlendAdditive -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ParticleSystem] getSpeedVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setPositionType -- @param self --- @param #int type +-- @param #int positiontype -------------------------------- --- stop emitting particles. Running particles will continue to run until they die -- @function [parent=#ParticleSystem] stopSystem -- @param self -------------------------------- --- sourcePosition of the emitter -- @function [parent=#ParticleSystem] getSourcePosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#ParticleSystem] setLifeVar -- @param self --- @param #float lifeVar +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setTotalParticles -- @param self --- @param #int totalParticles +-- @param #int int -------------------------------- --- -- @function [parent=#ParticleSystem] setEndColorVar -- @param self --- @param #color4f_table color +-- @param #color4f_table color4f -------------------------------- --- -- @function [parent=#ParticleSystem] getAtlasIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- --- start size in pixels of each particle -- @function [parent=#ParticleSystem] getStartSize -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setStartSpinVar -- @param self --- @param #float pinVar +-- @param #float float -------------------------------- --- Kill all living particles. -- @function [parent=#ParticleSystem] resetSystem -- @param self -------------------------------- --- -- @function [parent=#ParticleSystem] setAtlasIndex -- @param self --- @param #int index +-- @param #int int -------------------------------- --- -- @function [parent=#ParticleSystem] setTangentialAccelVar -- @param self --- @param #float t +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setEndRadiusVar -- @param self --- @param #float endRadiusVar +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] getEndRadius -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ParticleSystem] isActive -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ParticleSystem] setRadialAccelVar -- @param self --- @param #float t +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setStartSize -- @param self --- @param #float startSize +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setSpeed -- @param self --- @param #float speed +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] getStartSpin -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] getRotatePerSecond -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setEmitterMode -- @param self -- @param #int mode -------------------------------- --- How many seconds the emitter will run. -1 means 'forever' -- @function [parent=#ParticleSystem] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setSourcePosition -- @param self --- @param #vec2_table pos +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#ParticleSystem] getEndSpinVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setBlendAdditive -- @param self --- @param #bool value +-- @param #bool bool -------------------------------- --- -- @function [parent=#ParticleSystem] setLife -- @param self --- @param #float life +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setAngleVar -- @param self --- @param #float angleVar +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setRotationIsDir -- @param self --- @param #bool t +-- @param #bool bool -------------------------------- --- -- @function [parent=#ParticleSystem] setEndSizeVar -- @param self --- @param #float sizeVar +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setAngle -- @param self --- @param #float angle +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setBatchNode -- @param self --- @param #cc.ParticleBatchNode batchNode +-- @param #cc.ParticleBatchNode particlebatchnode -------------------------------- --- -- @function [parent=#ParticleSystem] getTangentialAccelVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Switch between different kind of emitter modes:
--- - kParticleModeGravity: uses gravity, speed, radial and tangential acceleration
--- - kParticleModeRadius: uses radius movement + rotation -- @function [parent=#ParticleSystem] getEmitterMode -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#ParticleSystem] setEndSpinVar -- @param self --- @param #float endSpinVar +-- @param #float float -------------------------------- --- angle variance of each particle -- @function [parent=#ParticleSystem] getAngleVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setStartColor -- @param self --- @param #color4f_table color +-- @param #color4f_table color4f -------------------------------- --- -- @function [parent=#ParticleSystem] getRotatePerSecondVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- end size in pixels of each particle -- @function [parent=#ParticleSystem] getEndSize -- @param self -- @return float#float ret (return value: float) -------------------------------- --- life, and life variation of each particle -- @function [parent=#ParticleSystem] getLife -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setSpeedVar -- @param self --- @param #float speed +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setAutoRemoveOnFinish -- @param self --- @param #bool var +-- @param #bool bool -------------------------------- --- -- @function [parent=#ParticleSystem] setGravity -- @param self --- @param #vec2_table g +-- @param #vec2_table vec2 -------------------------------- --- should be overridden by subclasses -- @function [parent=#ParticleSystem] postStep -- @param self -------------------------------- --- -- @function [parent=#ParticleSystem] setEmissionRate -- @param self --- @param #float rate +-- @param #float float -------------------------------- --- end color variance of each particle -- @function [parent=#ParticleSystem] getEndColorVar -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- --- -- @function [parent=#ParticleSystem] getRotationIsDir -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ParticleSystem] setScale -- @param self --- @param #float s +-- @param #float float -------------------------------- --- emission rate of the particles -- @function [parent=#ParticleSystem] getEmissionRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- end color and end color variation of each particle -- @function [parent=#ParticleSystem] getEndColor -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- --- life variance of each particle -- @function [parent=#ParticleSystem] getLifeVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setStartSizeVar -- @param self --- @param #float sizeVar +-- @param #float float -------------------------------- --- does the alpha value modify color -- @function [parent=#ParticleSystem] setOpacityModifyRGB -- @param self --- @param #bool opacityModifyRGB +-- @param #bool bool -------------------------------- --- Add a particle to the emitter -- @function [parent=#ParticleSystem] addParticle -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#ParticleSystem] getStartRadius -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Quantity of particles that are being simulated at the moment -- @function [parent=#ParticleSystem] getParticleCount -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- -- @function [parent=#ParticleSystem] getStartRadiusVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ParticleSystem] setStartColorVar -- @param self --- @param #color4f_table color +-- @param #color4f_table color4f -------------------------------- --- -- @function [parent=#ParticleSystem] setEndSpin -- @param self --- @param #float endSpin +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] setRadialAccel -- @param self --- @param #float t +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] isAutoRemoveOnFinish -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- maximum particles of the system -- @function [parent=#ParticleSystem] getTotalParticles -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#ParticleSystem] setStartRadiusVar -- @param self --- @param #float startRadiusVar +-- @param #float float -------------------------------- --- -- @function [parent=#ParticleSystem] getEndRadiusVar -- @param self -- @return float#float ret (return value: float) -------------------------------- --- start color variance of each particle -- @function [parent=#ParticleSystem] getStartColorVar -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- --- creates an initializes a ParticleSystem from a plist file.
--- This plist files can be created manually or with Particle Designer:
--- http:particledesigner.71squared.com/
--- since v2.0 -- @function [parent=#ParticleSystem] create -- @param self --- @param #string plistFile +-- @param #string str -- @return ParticleSystem#ParticleSystem ret (return value: cc.ParticleSystem) -------------------------------- --- create a system with a fixed number of particles -- @function [parent=#ParticleSystem] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleSystem#ParticleSystem ret (return value: cc.ParticleSystem) -------------------------------- --- -- @function [parent=#ParticleSystem] update -- @param self --- @param #float dt +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua index b4efdc78a4..92e7402676 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua @@ -5,30 +5,20 @@ -- @parent_module cc -------------------------------- --- Sets a new SpriteFrame as particle.
--- WARNING: this method is experimental. Use setTextureWithRect instead.
--- since v0.99.4 -- @function [parent=#ParticleSystemQuad] setDisplayFrame -- @param self --- @param #cc.SpriteFrame spriteFrame +-- @param #cc.SpriteFrame spriteframe -------------------------------- --- Sets a new texture with a rect. The rect is in Points.
--- since v0.99.4
--- js NA
--- lua NA -- @function [parent=#ParticleSystemQuad] setTextureWithRect -- @param self --- @param #cc.Texture2D texture +-- @param #cc.Texture2D texture2d -- @param #rect_table rect -------------------------------- --- listen the event that renderer was recreated on Android/WP8
--- js NA
--- lua NA -- @function [parent=#ParticleSystemQuad] listenRendererRecreated -- @param self --- @param #cc.EventCustom event +-- @param #cc.EventCustom eventcustom -------------------------------- -- @overload self, string @@ -36,18 +26,16 @@ -- @overload self, map_table -- @function [parent=#ParticleSystemQuad] create -- @param self --- @param #map_table dictionary +-- @param #map_table map -- @return ParticleSystemQuad#ParticleSystemQuad ret (retunr value: cc.ParticleSystemQuad) -------------------------------- --- creates a Particle Emitter with a number of particles -- @function [parent=#ParticleSystemQuad] createWithTotalParticles -- @param self --- @param #int numberOfParticles +-- @param #int int -- @return ParticleSystemQuad#ParticleSystemQuad ret (return value: cc.ParticleSystemQuad) -------------------------------- --- -- @function [parent=#ParticleSystemQuad] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua index 62e4933a0b..6e90f80f52 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua @@ -5,56 +5,45 @@ -- @parent_module cc -------------------------------- --- whether this physics body is affected by the physics world’s gravitational force. -- @function [parent=#PhysicsBody] isGravityEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- reset all the force applied to body. -- @function [parent=#PhysicsBody] resetForces -- @param self -------------------------------- --- get the max of velocity -- @function [parent=#PhysicsBody] getVelocityLimit -- @param self -- @return float#float ret (return value: float) -------------------------------- --- set the group of body
--- Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index)
--- it have high priority than bit masks -- @function [parent=#PhysicsBody] setGroup -- @param self --- @param #int group +-- @param #int int -------------------------------- --- get the body mass. -- @function [parent=#PhysicsBody] getMass -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Return bitmask of first shape, if there is no shape in body, return default value.(0xFFFFFFFF) -- @function [parent=#PhysicsBody] getCollisionBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- --- set the body rotation offset -- @function [parent=#PhysicsBody] getRotationOffset -- @param self -- @return float#float ret (return value: float) -------------------------------- --- get the body rotation. -- @function [parent=#PhysicsBody] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- --- get the body moment of inertia. -- @function [parent=#PhysicsBody] getMoment -- @param self -- @return float#float ret (return value: float) @@ -64,204 +53,166 @@ -- @overload self, vec2_table -- @function [parent=#PhysicsBody] applyImpulse -- @param self --- @param #vec2_table impulse --- @param #vec2_table offset +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 -------------------------------- --- set body rotation offset, it's the rotation witch relative to node -- @function [parent=#PhysicsBody] setRotationOffset -- @param self --- @param #float rotation +-- @param #float float -------------------------------- -- @overload self, vec2_table, vec2_table -- @overload self, vec2_table -- @function [parent=#PhysicsBody] applyForce -- @param self --- @param #vec2_table force --- @param #vec2_table offset +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#PhysicsBody] addShape -- @param self --- @param #cc.PhysicsShape shape --- @param #bool addMassAndMoment +-- @param #cc.PhysicsShape physicsshape +-- @param #bool bool -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- --- Applies a torque force to body. -- @function [parent=#PhysicsBody] applyTorque -- @param self --- @param #float torque +-- @param #float float -------------------------------- --- get the max of angular velocity -- @function [parent=#PhysicsBody] getAngularVelocityLimit -- @param self -- @return float#float ret (return value: float) -------------------------------- --- set the max of angular velocity -- @function [parent=#PhysicsBody] setAngularVelocityLimit -- @param self --- @param #float limit +-- @param #float float -------------------------------- --- get the velocity of a body -- @function [parent=#PhysicsBody] getVelocity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- get linear damping. -- @function [parent=#PhysicsBody] getLinearDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsBody] removeAllShapes -- @param self -------------------------------- --- set angular damping.
--- it is used to simulate fluid or air friction forces on the body.
--- the value is 0.0f to 1.0f. -- @function [parent=#PhysicsBody] setAngularDamping -- @param self --- @param #float damping +-- @param #float float -------------------------------- --- set the max of velocity -- @function [parent=#PhysicsBody] setVelocityLimit -- @param self --- @param #float limit +-- @param #float float -------------------------------- --- set body to rest -- @function [parent=#PhysicsBody] setResting -- @param self --- @param #bool rest +-- @param #bool bool -------------------------------- --- get body position offset. -- @function [parent=#PhysicsBody] getPositionOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- A mask that defines which categories this physics body belongs to.
--- Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions.
--- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsBody] setCategoryBitmask -- @param self --- @param #int bitmask +-- @param #int int -------------------------------- --- get the world body added to. -- @function [parent=#PhysicsBody] getWorld -- @param self -- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld) -------------------------------- --- get the angular velocity of a body -- @function [parent=#PhysicsBody] getAngularVelocity -- @param self -- @return float#float ret (return value: float) -------------------------------- --- get the body position. -- @function [parent=#PhysicsBody] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- set the enable value.
--- if the body it isn't enabled, it will not has simulation by world -- @function [parent=#PhysicsBody] setEnable -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- --- set the body is affected by the physics world's gravitational force or not. -- @function [parent=#PhysicsBody] setGravityEnable -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- --- Return group of first shape, if there is no shape in body, return default value.(0) -- @function [parent=#PhysicsBody] getGroup -- @param self -- @return int#int ret (return value: int) -------------------------------- --- brief set the body moment of inertia.
--- note if you need add/subtract moment to body, don't use setMoment(getMoment() +/- moment), because the moment of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMoment() instead. -- @function [parent=#PhysicsBody] setMoment -- @param self --- @param #float moment +-- @param #float float -------------------------------- --- get the body's tag -- @function [parent=#PhysicsBody] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- --- convert the local point to world -- @function [parent=#PhysicsBody] local2World -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Return bitmask of first shape, if there is no shape in body, return default value.(0xFFFFFFFF) -- @function [parent=#PhysicsBody] getCategoryBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- --- brief set dynamic to body.
--- a dynamic body will effect with gravity. -- @function [parent=#PhysicsBody] setDynamic -- @param self --- @param #bool dynamic +-- @param #bool bool -------------------------------- --- -- @function [parent=#PhysicsBody] getFirstShape -- @param self -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- --- -- @function [parent=#PhysicsBody] getShapes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- Return bitmask of first shape, if there is no shape in body, return default value.(0x00000000) -- @function [parent=#PhysicsBody] getContactTestBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- --- set the angular velocity of a body -- @function [parent=#PhysicsBody] setAngularVelocity -- @param self --- @param #float velocity +-- @param #float float -------------------------------- --- convert the world point to local -- @function [parent=#PhysicsBody] world2Local -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- whether the body is enabled
--- if the body it isn't enabled, it will not has simulation by world -- @function [parent=#PhysicsBody] isEnabled -- @param self -- @return bool#bool ret (return value: bool) @@ -271,160 +222,121 @@ -- @overload self, cc.PhysicsShape, bool -- @function [parent=#PhysicsBody] removeShape -- @param self --- @param #cc.PhysicsShape shape --- @param #bool reduceMassAndMoment +-- @param #cc.PhysicsShape physicsshape +-- @param #bool bool -------------------------------- --- brief set the body mass.
--- note if you need add/subtract mass to body, don't use setMass(getMass() +/- mass), because the mass of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMass() instead. -- @function [parent=#PhysicsBody] setMass -- @param self --- @param #float mass +-- @param #float float -------------------------------- --- brief add moment of inertia to body.
--- if _moment(moment of the body) == PHYSICS_INFINITY, it remains.
--- if moment == PHYSICS_INFINITY, _moment will be PHYSICS_INFINITY.
--- if moment == -PHYSICS_INFINITY, _moment will not change.
--- if moment + _moment <= 0, _moment will equal to MASS_DEFAULT(1.0)
--- other wise, moment = moment + _moment; -- @function [parent=#PhysicsBody] addMoment -- @param self --- @param #float moment +-- @param #float float -------------------------------- --- set the velocity of a body -- @function [parent=#PhysicsBody] setVelocity -- @param self --- @param #vec2_table velocity +-- @param #vec2_table vec2 -------------------------------- --- set linear damping.
--- it is used to simulate fluid or air friction forces on the body.
--- the value is 0.0f to 1.0f. -- @function [parent=#PhysicsBody] setLinearDamping -- @param self --- @param #float damping +-- @param #float float -------------------------------- --- A mask that defines which categories of physics bodies can collide with this physics body.
--- When two physics bodies contact each other, a collision may occur. This body’s collision mask is compared to the other body’s category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body’s velocity.
--- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsBody] setCollisionBitmask -- @param self --- @param #int bitmask +-- @param #int int -------------------------------- --- set body position offset, it's the position witch relative to node -- @function [parent=#PhysicsBody] setPositionOffset -- @param self --- @param #vec2_table position +-- @param #vec2_table vec2 -------------------------------- --- set the body is allow rotation or not -- @function [parent=#PhysicsBody] setRotationEnable -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- --- whether the body can rotation -- @function [parent=#PhysicsBody] isRotationEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- get angular damping. -- @function [parent=#PhysicsBody] getAngularDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- --- get the angular velocity of a body at a local point -- @function [parent=#PhysicsBody] getVelocityAtLocalPoint -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- whether the body is at rest -- @function [parent=#PhysicsBody] isResting -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- brief add mass to body.
--- if _mass(mass of the body) == PHYSICS_INFINITY, it remains.
--- if mass == PHYSICS_INFINITY, _mass will be PHYSICS_INFINITY.
--- if mass == -PHYSICS_INFINITY, _mass will not change.
--- if mass + _mass <= 0, _mass will equal to MASS_DEFAULT(1.0)
--- other wise, mass = mass + _mass; -- @function [parent=#PhysicsBody] addMass -- @param self --- @param #float mass +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsBody] getShape -- @param self --- @param #int tag +-- @param #int int -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- --- set the body's tag -- @function [parent=#PhysicsBody] setTag -- @param self --- @param #int tag +-- @param #int int -------------------------------- --- get the angular velocity of a body at a world point -- @function [parent=#PhysicsBody] getVelocityAtWorldPoint -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- A mask that defines which categories of bodies cause intersection notifications with this physics body.
--- When two bodies share the same space, each body’s category mask is tested against the other body’s contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
--- The default value is 0x00000000 (all bits cleared). -- @function [parent=#PhysicsBody] setContactTestBitmask -- @param self --- @param #int bitmask +-- @param #int int -------------------------------- --- remove the body from the world it added to -- @function [parent=#PhysicsBody] removeFromWorld -- @param self -------------------------------- --- brief test the body is dynamic or not.
--- a dynamic body will effect with gravity. -- @function [parent=#PhysicsBody] isDynamic -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- get the sprite the body set to. -- @function [parent=#PhysicsBody] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Create a body contains a box shape. -- @function [parent=#PhysicsBody] createBox -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial material --- @param #vec2_table offset +-- @param #cc.PhysicsMaterial physicsmaterial +-- @param #vec2_table vec2 -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- --- Create a body contains a EdgeSegment shape. -- @function [parent=#PhysicsBody] createEdgeSegment -- @param self --- @param #vec2_table a --- @param #vec2_table b --- @param #cc.PhysicsMaterial material --- @param #float border +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #cc.PhysicsMaterial physicsmaterial +-- @param #float float -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- @@ -433,27 +345,25 @@ -- @overload self, float, float -- @function [parent=#PhysicsBody] create -- @param self --- @param #float mass --- @param #float moment +-- @param #float float +-- @param #float float -- @return PhysicsBody#PhysicsBody ret (retunr value: cc.PhysicsBody) -------------------------------- --- Create a body contains a EdgeBox shape. -- @function [parent=#PhysicsBody] createEdgeBox -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial material --- @param #float border --- @param #vec2_table offset +-- @param #cc.PhysicsMaterial physicsmaterial +-- @param #float float +-- @param #vec2_table vec2 -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- --- Create a body contains a circle shape. -- @function [parent=#PhysicsBody] createCircle -- @param self --- @param #float radius --- @param #cc.PhysicsMaterial material --- @param #vec2_table offset +-- @param #float float +-- @param #cc.PhysicsMaterial physicsmaterial +-- @param #vec2_table vec2 -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua index c7fce04e0a..30d6f985d3 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua @@ -5,31 +5,26 @@ -- @parent_module cc -------------------------------- --- get contact data -- @function [parent=#PhysicsContact] getContactData -- @param self -- @return PhysicsContactData#PhysicsContactData ret (return value: cc.PhysicsContactData) -------------------------------- --- get the event code -- @function [parent=#PhysicsContact] getEventCode -- @param self -- @return int#int ret (return value: int) -------------------------------- --- get previous contact data -- @function [parent=#PhysicsContact] getPreContactData -- @param self -- @return PhysicsContactData#PhysicsContactData ret (return value: cc.PhysicsContactData) -------------------------------- --- get contact shape A. -- @function [parent=#PhysicsContact] getShapeA -- @param self -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- --- get contact shape B. -- @function [parent=#PhysicsContact] getShapeB -- @param self -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua index 15b4e7932a..30efdef896 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua @@ -4,19 +4,16 @@ -- @parent_module cc -------------------------------- --- get friction between two bodies -- @function [parent=#PhysicsContactPostSolve] getFriction -- @param self -- @return float#float ret (return value: float) -------------------------------- --- get surface velocity between two bodies -- @function [parent=#PhysicsContactPostSolve] getSurfaceVelocity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- get restitution between two bodies -- @function [parent=#PhysicsContactPostSolve] getRestitution -- @param self -- @return float#float ret (return value: float) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua index 911ca67ece..fdf2df8e50 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua @@ -4,44 +4,37 @@ -- @parent_module cc -------------------------------- --- get friction between two bodies -- @function [parent=#PhysicsContactPreSolve] getFriction -- @param self -- @return float#float ret (return value: float) -------------------------------- --- get restitution between two bodies -- @function [parent=#PhysicsContactPreSolve] getRestitution -- @param self -- @return float#float ret (return value: float) -------------------------------- --- set the friction -- @function [parent=#PhysicsContactPreSolve] setFriction -- @param self --- @param #float friction +-- @param #float float -------------------------------- --- ignore the rest of the contact presolve and postsolve callbacks -- @function [parent=#PhysicsContactPreSolve] ignore -- @param self -------------------------------- --- get surface velocity between two bodies -- @function [parent=#PhysicsContactPreSolve] getSurfaceVelocity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- set the surface velocity -- @function [parent=#PhysicsContactPreSolve] setSurfaceVelocity -- @param self --- @param #vec2_table velocity +-- @param #vec2_table vec2 -------------------------------- --- set the restitution -- @function [parent=#PhysicsContactPreSolve] setRestitution -- @param self --- @param #float restitution +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua index bd755d2459..93cffc0a79 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua @@ -4,80 +4,67 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJoint] getBodyA -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- --- -- @function [parent=#PhysicsJoint] getBodyB -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- --- Get the max force setting -- @function [parent=#PhysicsJoint] getMaxForce -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Set the max force between two bodies -- @function [parent=#PhysicsJoint] setMaxForce -- @param self --- @param #float force +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJoint] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Enable/Disable the joint -- @function [parent=#PhysicsJoint] setEnable -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- --- Enable/disable the collision between two bodies -- @function [parent=#PhysicsJoint] setCollisionEnable -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- --- -- @function [parent=#PhysicsJoint] getWorld -- @param self -- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld) -------------------------------- --- -- @function [parent=#PhysicsJoint] setTag -- @param self --- @param #int tag +-- @param #int int -------------------------------- --- Remove the joint from the world -- @function [parent=#PhysicsJoint] removeFormWorld -- @param self -------------------------------- --- -- @function [parent=#PhysicsJoint] isCollisionEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#PhysicsJoint] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Distory the joint -- @function [parent=#PhysicsJoint] destroy -- @param self --- @param #cc.PhysicsJoint joint +-- @param #cc.PhysicsJoint physicsjoint return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua index 2bfabc2470..854ab0a0da 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua @@ -5,25 +5,22 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointDistance] setDistance -- @param self --- @param #float distance +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointDistance] getDistance -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointDistance] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #vec2_table anchr1 --- @param #vec2_table anchr2 +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 -- @return PhysicsJointDistance#PhysicsJointDistance ret (return value: cc.PhysicsJointDistance) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua index a4f86b1dc5..b3daf9fcb2 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua @@ -5,12 +5,11 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointFixed] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #vec2_table anchr +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #vec2_table vec2 -- @return PhysicsJointFixed#PhysicsJointFixed ret (return value: cc.PhysicsJointFixed) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua index 80c94bce3b..08c0c858cf 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua @@ -5,37 +5,32 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointGear] setRatio -- @param self --- @param #float ratchet +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointGear] getPhase -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointGear] setPhase -- @param self --- @param #float phase +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointGear] getRatio -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointGear] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #float phase --- @param #float ratio +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #float float +-- @param #float float -- @return PhysicsJointGear#PhysicsJointGear ret (return value: cc.PhysicsJointGear) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua index 1e0c0f8b9e..9f71e7cfc6 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua @@ -5,50 +5,43 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointGroove] setAnchr2 -- @param self --- @param #vec2_table anchr2 +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#PhysicsJointGroove] setGrooveA -- @param self --- @param #vec2_table grooveA +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#PhysicsJointGroove] setGrooveB -- @param self --- @param #vec2_table grooveB +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#PhysicsJointGroove] getGrooveA -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsJointGroove] getGrooveB -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsJointGroove] getAnchr2 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsJointGroove] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #vec2_table grooveA --- @param #vec2_table grooveB --- @param #vec2_table anchr2 +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 -- @return PhysicsJointGroove#PhysicsJointGroove ret (return value: cc.PhysicsJointGroove) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua index 6b4a92acd8..796d4143c2 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua @@ -5,64 +5,56 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointLimit] setAnchr2 -- @param self --- @param #vec2_table anchr2 +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#PhysicsJointLimit] setAnchr1 -- @param self --- @param #vec2_table anchr1 +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#PhysicsJointLimit] setMax -- @param self --- @param #float max +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointLimit] getAnchr2 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsJointLimit] getAnchr1 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsJointLimit] getMin -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointLimit] getMax -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointLimit] setMin -- @param self --- @param #float min +-- @param #float float -------------------------------- -- @overload self, cc.PhysicsBody, cc.PhysicsBody, vec2_table, vec2_table, float, float -- @overload self, cc.PhysicsBody, cc.PhysicsBody, vec2_table, vec2_table -- @function [parent=#PhysicsJointLimit] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #vec2_table anchr1 --- @param #vec2_table anchr2 --- @param #float min --- @param #float max +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #float float +-- @param #float float -- @return PhysicsJointLimit#PhysicsJointLimit ret (retunr value: cc.PhysicsJointLimit) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua index 27f44d36aa..733df66a22 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua @@ -5,24 +5,21 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointMotor] setRate -- @param self --- @param #float rate +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointMotor] getRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointMotor] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #float rate +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #float float -- @return PhysicsJointMotor#PhysicsJointMotor ret (return value: cc.PhysicsJointMotor) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua index c45189c216..0934a2f851 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua @@ -5,12 +5,11 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointPin] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #vec2_table anchr +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #vec2_table vec2 -- @return PhysicsJointPin#PhysicsJointPin ret (return value: cc.PhysicsJointPin) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua index f61f444ffd..7002033ba4 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua @@ -5,49 +5,42 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointRatchet] getAngle -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointRatchet] setAngle -- @param self --- @param #float angle +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointRatchet] setPhase -- @param self --- @param #float phase +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointRatchet] getPhase -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointRatchet] setRatchet -- @param self --- @param #float ratchet +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointRatchet] getRatchet -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointRatchet] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #float phase --- @param #float ratchet +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #float float +-- @param #float float -- @return PhysicsJointRatchet#PhysicsJointRatchet ret (return value: cc.PhysicsJointRatchet) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua index 8feaf87785..db5d66222e 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointRotaryLimit] getMax -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointRotaryLimit] setMin -- @param self --- @param #float min +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointRotaryLimit] setMax -- @param self --- @param #float max +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointRotaryLimit] getMin -- @param self -- @return float#float ret (return value: float) @@ -33,10 +29,10 @@ -- @overload self, cc.PhysicsBody, cc.PhysicsBody, float, float -- @function [parent=#PhysicsJointRotaryLimit] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #float min --- @param #float max +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #float float +-- @param #float float -- @return PhysicsJointRotaryLimit#PhysicsJointRotaryLimit ret (retunr value: cc.PhysicsJointRotaryLimit) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua index e8df535554..56e2bc4242 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua @@ -5,49 +5,42 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointRotarySpring] getDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointRotarySpring] setRestAngle -- @param self --- @param #float restAngle +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointRotarySpring] getStiffness -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointRotarySpring] setStiffness -- @param self --- @param #float stiffness +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointRotarySpring] setDamping -- @param self --- @param #float damping +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointRotarySpring] getRestAngle -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointRotarySpring] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #float stiffness --- @param #float damping +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #float float +-- @param #float float -- @return PhysicsJointRotarySpring#PhysicsJointRotarySpring ret (return value: cc.PhysicsJointRotarySpring) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua index 0b177ac1f4..b3c3b916b6 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua @@ -5,75 +5,64 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsJointSpring] setAnchr2 -- @param self --- @param #vec2_table anchr2 +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#PhysicsJointSpring] setAnchr1 -- @param self --- @param #vec2_table anchr1 +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#PhysicsJointSpring] getDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointSpring] setStiffness -- @param self --- @param #float stiffness +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointSpring] getRestLength -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointSpring] getAnchr2 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsJointSpring] getAnchr1 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsJointSpring] getStiffness -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsJointSpring] setRestLength -- @param self --- @param #float restLength +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointSpring] setDamping -- @param self --- @param #float damping +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsJointSpring] construct -- @param self --- @param #cc.PhysicsBody a --- @param #cc.PhysicsBody b --- @param #vec2_table anchr1 --- @param #vec2_table anchr2 --- @param #float stiffness --- @param #float damping +-- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody physicsbody +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #float float +-- @param #float float -- @return PhysicsJointSpring#PhysicsJointSpring ret (return value: cc.PhysicsJointSpring) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua index f3ee8f5126..56d5538836 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua @@ -5,184 +5,147 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsShape] getFriction -- @param self -- @return float#float ret (return value: float) -------------------------------- --- set the group of body
--- Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index)
--- it have high priority than bit masks -- @function [parent=#PhysicsShape] setGroup -- @param self --- @param #int group +-- @param #int int -------------------------------- --- -- @function [parent=#PhysicsShape] setDensity -- @param self --- @param #float density +-- @param #float float -------------------------------- --- get mass -- @function [parent=#PhysicsShape] getMass -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsShape] getMaterial -- @param self -- @return PhysicsMaterial#PhysicsMaterial ret (return value: cc.PhysicsMaterial) -------------------------------- --- -- @function [parent=#PhysicsShape] getCollisionBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- --- return the area of this shape -- @function [parent=#PhysicsShape] getArea -- @param self -- @return float#float ret (return value: float) -------------------------------- --- A mask that defines which categories this physics body belongs to.
--- Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions.
--- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsShape] setCategoryBitmask -- @param self --- @param #int bitmask +-- @param #int int -------------------------------- --- -- @function [parent=#PhysicsShape] getGroup -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Set moment, it will change the body's moment this shape attaches -- @function [parent=#PhysicsShape] setMoment -- @param self --- @param #float moment +-- @param #float float -------------------------------- --- Test point is in shape or not -- @function [parent=#PhysicsShape] containsPoint -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#PhysicsShape] getCategoryBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Return the type of this shape -- @function [parent=#PhysicsShape] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#PhysicsShape] getContactTestBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Get center of this shape -- @function [parent=#PhysicsShape] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsShape] getDensity -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Set mass, it will change the body's mass this shape attaches -- @function [parent=#PhysicsShape] setMass -- @param self --- @param #float mass +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsShape] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Calculate the default moment value -- @function [parent=#PhysicsShape] calculateDefaultMoment -- @param self -- @return float#float ret (return value: float) -------------------------------- --- A mask that defines which categories of physics bodies can collide with this physics body.
--- When two physics bodies contact each other, a collision may occur. This body’s collision mask is compared to the other body’s category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body’s velocity.
--- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsShape] setCollisionBitmask -- @param self --- @param #int bitmask +-- @param #int int -------------------------------- --- get moment -- @function [parent=#PhysicsShape] getMoment -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Get offset -- @function [parent=#PhysicsShape] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsShape] getRestitution -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsShape] setFriction -- @param self --- @param #float friction +-- @param #float float -------------------------------- --- -- @function [parent=#PhysicsShape] setMaterial -- @param self --- @param #cc.PhysicsMaterial material +-- @param #cc.PhysicsMaterial physicsmaterial -------------------------------- --- -- @function [parent=#PhysicsShape] setTag -- @param self --- @param #int tag +-- @param #int int -------------------------------- --- A mask that defines which categories of bodies cause intersection notifications with this physics body.
--- When two bodies share the same space, each body’s category mask is tested against the other body’s contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
--- The default value is 0x00000000 (all bits cleared). -- @function [parent=#PhysicsShape] setContactTestBitmask -- @param self --- @param #int bitmask +-- @param #int int -------------------------------- --- -- @function [parent=#PhysicsShape] setRestitution -- @param self --- @param #float restitution +-- @param #float float -------------------------------- --- Get the body that this shape attaches -- @function [parent=#PhysicsShape] getBody -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua index a2a6c2a5ac..338ac5add2 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua @@ -5,22 +5,19 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsShapeBox] getSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#PhysicsShapeBox] create -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial material --- @param #vec2_table offset +-- @param #cc.PhysicsMaterial physicsmaterial +-- @param #vec2_table vec2 -- @return PhysicsShapeBox#PhysicsShapeBox ret (return value: cc.PhysicsShapeBox) -------------------------------- --- -- @function [parent=#PhysicsShapeBox] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua index 324465d163..2fb52b6df9 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua @@ -5,44 +5,38 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsShapeCircle] getRadius -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsShapeCircle] create -- @param self --- @param #float radius --- @param #cc.PhysicsMaterial material --- @param #vec2_table offset +-- @param #float float +-- @param #cc.PhysicsMaterial physicsmaterial +-- @param #vec2_table vec2 -- @return PhysicsShapeCircle#PhysicsShapeCircle ret (return value: cc.PhysicsShapeCircle) -------------------------------- --- -- @function [parent=#PhysicsShapeCircle] calculateArea -- @param self --- @param #float radius +-- @param #float float -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsShapeCircle] calculateMoment -- @param self --- @param #float mass --- @param #float radius --- @param #vec2_table offset +-- @param #float float +-- @param #float float +-- @param #vec2_table vec2 -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsShapeCircle] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsShapeCircle] calculateDefaultMoment -- @param self -- @return float#float ret (return value: float) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua index 14fe760243..6e879ad541 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua @@ -5,17 +5,15 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsShapeEdgeBox] create -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial material --- @param #float border --- @param #vec2_table offset +-- @param #cc.PhysicsMaterial physicsmaterial +-- @param #float float +-- @param #vec2_table vec2 -- @return PhysicsShapeEdgeBox#PhysicsShapeEdgeBox ret (return value: cc.PhysicsShapeEdgeBox) -------------------------------- --- -- @function [parent=#PhysicsShapeEdgeBox] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua index 40b42cf74a..d4dc91703e 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsShapeEdgeChain] getPointsCount -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#PhysicsShapeEdgeChain] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua index de1165c4ae..d2bbb2d42e 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsShapeEdgePolygon] getPointsCount -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#PhysicsShapeEdgePolygon] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua index 852c62a8af..c4588a7bf8 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua @@ -5,29 +5,25 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsShapeEdgeSegment] getPointB -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsShapeEdgeSegment] getPointA -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsShapeEdgeSegment] create -- @param self --- @param #vec2_table a --- @param #vec2_table b --- @param #cc.PhysicsMaterial material --- @param #float border +-- @param #vec2_table vec2 +-- @param #vec2_table vec2 +-- @param #cc.PhysicsMaterial physicsmaterial +-- @param #float float -- @return PhysicsShapeEdgeSegment#PhysicsShapeEdgeSegment ret (return value: cc.PhysicsShapeEdgeSegment) -------------------------------- --- -- @function [parent=#PhysicsShapeEdgeSegment] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua index 81c6bf76c1..c924c1a867 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#PhysicsShapePolygon] getPointsCount -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#PhysicsShapePolygon] getPoint -- @param self --- @param #int i +-- @param #int int -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PhysicsShapePolygon] calculateDefaultMoment -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PhysicsShapePolygon] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua index 7a15ac9d59..6c16ea6dc4 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua @@ -4,44 +4,35 @@ -- @parent_module cc -------------------------------- --- set the gravity value -- @function [parent=#PhysicsWorld] setGravity -- @param self --- @param #vec2_table gravity +-- @param #vec2_table vec2 -------------------------------- --- Get all the bodys that in the physics world. -- @function [parent=#PhysicsWorld] getAllBodies -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- get the bebug draw mask -- @function [parent=#PhysicsWorld] getDebugDrawMask -- @param self -- @return int#int ret (return value: int) -------------------------------- --- To control the step of physics, if you want control it by yourself( fixed-timestep for example ), you can set this to false and call step by yourself.
--- Defaut value is true.
--- Note: if you set auto step to false, setSpeed and setUpdateRate won't work, you need to control the time step by yourself. -- @function [parent=#PhysicsWorld] setAutoStep -- @param self --- @param #bool autoStep +-- @param #bool bool -------------------------------- --- Adds a joint to the physics world. -- @function [parent=#PhysicsWorld] addJoint -- @param self --- @param #cc.PhysicsJoint joint +-- @param #cc.PhysicsJoint physicsjoint -------------------------------- --- Remove all joints from physics world. -- @function [parent=#PhysicsWorld] removeAllJoints -- @param self -------------------------------- --- Get the auto step -- @function [parent=#PhysicsWorld] isAutoStep -- @param self -- @return bool#bool ret (return value: bool) @@ -51,86 +42,69 @@ -- @overload self, cc.PhysicsBody -- @function [parent=#PhysicsWorld] removeBody -- @param self --- @param #cc.PhysicsBody body +-- @param #cc.PhysicsBody physicsbody -------------------------------- --- Remove a joint from physics world. -- @function [parent=#PhysicsWorld] removeJoint -- @param self --- @param #cc.PhysicsJoint joint --- @param #bool destroy +-- @param #cc.PhysicsJoint physicsjoint +-- @param #bool bool -------------------------------- --- Get phsyics shapes that contains the point. -- @function [parent=#PhysicsWorld] getShapes -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- The step for physics world, The times passing for simulate the physics.
--- Note: you need to setAutoStep(false) first before it can work. -- @function [parent=#PhysicsWorld] step -- @param self --- @param #float delta +-- @param #float float -------------------------------- --- set the debug draw mask -- @function [parent=#PhysicsWorld] setDebugDrawMask -- @param self --- @param #int mask +-- @param #int int -------------------------------- --- get the gravity value -- @function [parent=#PhysicsWorld] getGravity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- set the update rate of physics world, update rate is the value of EngineUpdateTimes/PhysicsWorldUpdateTimes.
--- set it higher can improve performance, set it lower can improve accuracy of physics world simulation.
--- default value is 1.0
--- Note: if you setAutoStep(false), this won't work. -- @function [parent=#PhysicsWorld] setUpdateRate -- @param self --- @param #int rate +-- @param #int int -------------------------------- --- get the speed of physics world -- @function [parent=#PhysicsWorld] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- --- get the update rate -- @function [parent=#PhysicsWorld] getUpdateRate -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Remove all bodies from physics world. -- @function [parent=#PhysicsWorld] removeAllBodies -- @param self -------------------------------- --- Set the speed of physics world, speed is the rate at which the simulation executes. default value is 1.0
--- Note: if you setAutoStep(false), this won't work. -- @function [parent=#PhysicsWorld] setSpeed -- @param self --- @param #float speed +-- @param #float float -------------------------------- --- return physics shape that contains the point. -- @function [parent=#PhysicsWorld] getShape -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- --- Get body by tag -- @function [parent=#PhysicsWorld] getBody -- @param self --- @param #int tag +-- @param #int int -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Place.lua b/cocos/scripting/lua-bindings/auto/api/Place.lua index 8592661d0f..11fb95222a 100644 --- a/cocos/scripting/lua-bindings/auto/api/Place.lua +++ b/cocos/scripting/lua-bindings/auto/api/Place.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates a Place action with a position -- @function [parent=#Place] create -- @param self --- @param #vec2_table pos +-- @param #vec2_table vec2 -- @return Place#Place ret (return value: cc.Place) -------------------------------- --- -- @function [parent=#Place] clone -- @param self -- @return Place#Place ret (return value: cc.Place) -------------------------------- --- -- @function [parent=#Place] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#Place] reverse -- @param self -- @return Place#Place ret (return value: cc.Place) diff --git a/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua b/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua index 8f31161282..1fa6573504 100644 --- a/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua @@ -5,61 +5,51 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#PositionFrame] getX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PositionFrame] getY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#PositionFrame] setPosition -- @param self --- @param #vec2_table position +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#PositionFrame] setX -- @param self --- @param #float x +-- @param #float float -------------------------------- --- -- @function [parent=#PositionFrame] setY -- @param self --- @param #float y +-- @param #float float -------------------------------- --- -- @function [parent=#PositionFrame] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#PositionFrame] create -- @param self -- @return PositionFrame#PositionFrame ret (return value: ccs.PositionFrame) -------------------------------- --- -- @function [parent=#PositionFrame] apply -- @param self --- @param #float percent +-- @param #float float -------------------------------- --- -- @function [parent=#PositionFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#PositionFrame] PositionFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua b/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua index 426f309feb..2b24b53b37 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua @@ -5,36 +5,31 @@ -- @parent_module cc -------------------------------- --- Creates and initializes the action with a duration, a "from" percentage and a "to" percentage -- @function [parent=#ProgressFromTo] create -- @param self --- @param #float duration --- @param #float fromPercentage --- @param #float toPercentage +-- @param #float float +-- @param #float float +-- @param #float float -- @return ProgressFromTo#ProgressFromTo ret (return value: cc.ProgressFromTo) -------------------------------- --- -- @function [parent=#ProgressFromTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ProgressFromTo] clone -- @param self -- @return ProgressFromTo#ProgressFromTo ret (return value: cc.ProgressFromTo) -------------------------------- --- -- @function [parent=#ProgressFromTo] reverse -- @param self -- @return ProgressFromTo#ProgressFromTo ret (return value: cc.ProgressFromTo) -------------------------------- --- -- @function [parent=#ProgressFromTo] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua b/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua index 7182839fc3..d19cf74354 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua @@ -5,59 +5,41 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ProgressTimer] isReverseDirection -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- This allows the bar type to move the component at a specific rate
--- Set the component to 0 to make sure it stays at 100%.
--- For example you want a left to right bar but not have the height stay 100%
--- Set the rate to be Vec2(0,1); and set the midpoint to = Vec2(0,.5f); -- @function [parent=#ProgressTimer] setBarChangeRate -- @param self --- @param #vec2_table barChangeRate +-- @param #vec2_table vec2 -------------------------------- --- Percentages are from 0 to 100 -- @function [parent=#ProgressTimer] getPercentage -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ProgressTimer] setSprite -- @param self -- @param #cc.Sprite sprite -------------------------------- --- Change the percentage to change progress. -- @function [parent=#ProgressTimer] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- The image to show the progress percentage, retain -- @function [parent=#ProgressTimer] getSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- Midpoint is used to modify the progress start position.
--- If you're using radials type then the midpoint changes the center point
--- If you're using bar type the the midpoint changes the bar growth
--- it expands from the center but clamps to the sprites edge so:
--- you want a left to right then set the midpoint all the way to Vec2(0,y)
--- you want a right to left then set the midpoint all the way to Vec2(1,y)
--- you want a bottom to top then set the midpoint all the way to Vec2(x,0)
--- you want a top to bottom then set the midpoint all the way to Vec2(x,1) -- @function [parent=#ProgressTimer] setMidpoint -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -------------------------------- --- Returns the BarChangeRate -- @function [parent=#ProgressTimer] getBarChangeRate -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) @@ -67,67 +49,57 @@ -- @overload self, bool -- @function [parent=#ProgressTimer] setReverseDirection -- @param self --- @param #bool reverse +-- @param #bool bool -------------------------------- --- Returns the Midpoint -- @function [parent=#ProgressTimer] getMidpoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#ProgressTimer] setPercentage -- @param self --- @param #float percentage +-- @param #float float -------------------------------- --- -- @function [parent=#ProgressTimer] setType -- @param self -- @param #int type -------------------------------- --- Creates a progress timer with the sprite as the shape the timer goes through -- @function [parent=#ProgressTimer] create -- @param self --- @param #cc.Sprite sp +-- @param #cc.Sprite sprite -- @return ProgressTimer#ProgressTimer ret (return value: cc.ProgressTimer) -------------------------------- --- -- @function [parent=#ProgressTimer] setAnchorPoint -- @param self --- @param #vec2_table anchorPoint +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#ProgressTimer] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#ProgressTimer] setColor -- @param self --- @param #color3b_table color +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#ProgressTimer] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- -- @function [parent=#ProgressTimer] setOpacity -- @param self --- @param #unsigned char opacity +-- @param #unsigned char char -------------------------------- --- -- @function [parent=#ProgressTimer] getOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua b/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua index 1cf3d03f21..1eed2eefe4 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua @@ -5,35 +5,30 @@ -- @parent_module cc -------------------------------- --- Creates and initializes with a duration and a percent -- @function [parent=#ProgressTo] create -- @param self --- @param #float duration --- @param #float percent +-- @param #float float +-- @param #float float -- @return ProgressTo#ProgressTo ret (return value: cc.ProgressTo) -------------------------------- --- -- @function [parent=#ProgressTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ProgressTo] clone -- @param self -- @return ProgressTo#ProgressTo ret (return value: cc.ProgressTo) -------------------------------- --- -- @function [parent=#ProgressTo] reverse -- @param self -- @return ProgressTo#ProgressTo ret (return value: cc.ProgressTo) -------------------------------- --- -- @function [parent=#ProgressTo] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua b/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua index c49c9574ad..64c2d01165 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua @@ -10,106 +10,78 @@ -- @overload self, cc.Node, int, int -- @function [parent=#ProtectedNode] addProtectedChild -- @param self --- @param #cc.Node child --- @param #int localZOrder --- @param #int tag +-- @param #cc.Node node +-- @param #int int +-- @param #int int -------------------------------- --- -- @function [parent=#ProtectedNode] disableCascadeColor -- @param self -------------------------------- --- Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
--- param tag An interger number that identifies a child node
--- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#ProtectedNode] removeProtectedChildByTag -- @param self --- @param #int tag --- @param #bool cleanup +-- @param #int int +-- @param #bool bool -------------------------------- --- Reorders a child according to a new z value.
--- param child An already added child node. It MUST be already added.
--- param localZOrder Z order for drawing priority. Please refer to setLocalZOrder(int) -- @function [parent=#ProtectedNode] reorderProtectedChild -- @param self --- @param #cc.Node child --- @param #int localZOrder +-- @param #cc.Node node +-- @param #int int -------------------------------- --- Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
--- param cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
--- js removeAllChildren
--- lua removeAllChildren -- @function [parent=#ProtectedNode] removeAllProtectedChildrenWithCleanup -- @param self --- @param #bool cleanup +-- @param #bool bool -------------------------------- --- -- @function [parent=#ProtectedNode] disableCascadeOpacity -- @param self -------------------------------- --- Sorts the children array once before drawing, instead of every time when a child is added or reordered.
--- This appraoch can improves the performance massively.
--- note Don't call this manually unless a child added needs to be removed in the same frame -- @function [parent=#ProtectedNode] sortAllProtectedChildren -- @param self -------------------------------- --- Gets a child from the container with its tag
--- param tag An identifier to find the child node.
--- return a Node object whose tag equals to the input parameter -- @function [parent=#ProtectedNode] getProtectedChildByTag -- @param self --- @param #int tag +-- @param #int int -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
--- param child The child node which will be removed.
--- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#ProtectedNode] removeProtectedChild -- @param self --- @param #cc.Node child --- @param #bool cleanup +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- Removes all children from the container with a cleanup.
--- see `removeAllChildrenWithCleanup(bool)` -- @function [parent=#ProtectedNode] removeAllProtectedChildren -- @param self -------------------------------- --- -- @function [parent=#ProtectedNode] create -- @param self -- @return ProtectedNode#ProtectedNode ret (return value: cc.ProtectedNode) -------------------------------- --- / @} end of Children and Parent -- @function [parent=#ProtectedNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#ProtectedNode] updateDisplayedOpacity -- @param self --- @param #unsigned char parentOpacity +-- @param #unsigned char char -------------------------------- --- -- @function [parent=#ProtectedNode] updateDisplayedColor -- @param self --- @param #color3b_table parentColor +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#ProtectedNode] cleanup -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Ref.lua b/cocos/scripting/lua-bindings/auto/api/Ref.lua index 8ab85e5d9f..23aa688f85 100644 --- a/cocos/scripting/lua-bindings/auto/api/Ref.lua +++ b/cocos/scripting/lua-bindings/auto/api/Ref.lua @@ -4,27 +4,14 @@ -- @parent_module cc -------------------------------- --- Releases the ownership immediately.
--- This decrements the Ref's reference count.
--- If the reference count reaches 0 after the descrement, this Ref is
--- destructed.
--- see retain, autorelease
--- js NA -- @function [parent=#Ref] release -- @param self -------------------------------- --- Retains the ownership.
--- This increases the Ref's reference count.
--- see release, autorelease
--- js NA -- @function [parent=#Ref] retain -- @param self -------------------------------- --- Returns the Ref's current reference count.
--- returns The Ref's reference count.
--- js NA -- @function [parent=#Ref] getReferenceCount -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) diff --git a/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua b/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua index b919424813..a12a3b8f4a 100644 --- a/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua @@ -13,7 +13,6 @@ -- @return RelativeBox#RelativeBox ret (retunr value: ccui.RelativeBox) -------------------------------- --- Default constructor -- @function [parent=#RelativeBox] RelativeBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua b/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua index d40ea5f727..ec81d4f44e 100644 --- a/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua +++ b/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua @@ -5,70 +5,51 @@ -- @parent_module ccui -------------------------------- --- Sets RelativeAlign parameter for LayoutParameter.
--- see RelativeAlign
--- param RelativeAlign -- @function [parent=#RelativeLayoutParameter] setAlign -- @param self --- @param #int align +-- @param #int relativealign -------------------------------- --- Sets a key for LayoutParameter. Witch widget named this is relative to.
--- param name -- @function [parent=#RelativeLayoutParameter] setRelativeToWidgetName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- Gets a name in Relative Layout of LayoutParameter.
--- return name -- @function [parent=#RelativeLayoutParameter] getRelativeName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Gets the key of LayoutParameter. Witch widget named this is relative to.
--- return name -- @function [parent=#RelativeLayoutParameter] getRelativeToWidgetName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Sets a name in Relative Layout for LayoutParameter.
--- param name -- @function [parent=#RelativeLayoutParameter] setRelativeName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- Gets RelativeAlign parameter for LayoutParameter.
--- see RelativeAlign
--- return RelativeAlign -- @function [parent=#RelativeLayoutParameter] getAlign -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Allocates and initializes.
--- return A initialized LayoutParameter which is marked as "autorelease". -- @function [parent=#RelativeLayoutParameter] create -- @param self -- @return RelativeLayoutParameter#RelativeLayoutParameter ret (return value: ccui.RelativeLayoutParameter) -------------------------------- --- -- @function [parent=#RelativeLayoutParameter] createCloneInstance -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- --- -- @function [parent=#RelativeLayoutParameter] copyProperties -- @param self --- @param #ccui.LayoutParameter model +-- @param #ccui.LayoutParameter layoutparameter -------------------------------- --- Default constructor -- @function [parent=#RelativeLayoutParameter] RelativeLayoutParameter -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua b/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua index c477540f27..27ef10c677 100644 --- a/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua +++ b/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- create the action -- @function [parent=#RemoveSelf] create -- @param self -- @return RemoveSelf#RemoveSelf ret (return value: cc.RemoveSelf) -------------------------------- --- -- @function [parent=#RemoveSelf] clone -- @param self -- @return RemoveSelf#RemoveSelf ret (return value: cc.RemoveSelf) -------------------------------- --- -- @function [parent=#RemoveSelf] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#RemoveSelf] reverse -- @param self -- @return RemoveSelf#RemoveSelf ret (return value: cc.RemoveSelf) diff --git a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua index d7f705032c..661a25c17e 100644 --- a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua +++ b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua @@ -5,75 +5,62 @@ -- @parent_module cc -------------------------------- --- Used for grab part of screen to a texture.rtBegin: the position of renderTexture on the fullRectfullRect: the total size of screenfullViewport: the total viewportSize -- @function [parent=#RenderTexture] setVirtualViewport -- @param self --- @param #vec2_table rtBegin --- @param #rect_table fullRect --- @param #rect_table fullViewport +-- @param #vec2_table vec2 +-- @param #rect_table rect +-- @param #rect_table rect -------------------------------- --- clears the texture with a specified stencil value -- @function [parent=#RenderTexture] clearStencil -- @param self --- @param #int stencilValue +-- @param #int int -------------------------------- --- Value for clearDepth. Valid only when "autoDraw" is true. -- @function [parent=#RenderTexture] getClearDepth -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Value for clear Stencil. Valid only when "autoDraw" is true -- @function [parent=#RenderTexture] getClearStencil -- @param self -- @return int#int ret (return value: int) -------------------------------- --- ends grabbing -- @function [parent=#RenderTexture] end -- @param self -------------------------------- --- -- @function [parent=#RenderTexture] setClearStencil -- @param self --- @param #int clearStencil +-- @param #int int -------------------------------- --- Sets the Sprite being used. -- @function [parent=#RenderTexture] setSprite -- @param self -- @param #cc.Sprite sprite -------------------------------- --- Gets the Sprite being used. -- @function [parent=#RenderTexture] getSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons.
--- Will be enabled in the future. -- @function [parent=#RenderTexture] isAutoDraw -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#RenderTexture] setKeepMatrix -- @param self --- @param #bool keepMatrix +-- @param #bool bool -------------------------------- --- -- @function [parent=#RenderTexture] setClearFlags -- @param self --- @param #unsigned int clearFlags +-- @param #unsigned int int -------------------------------- --- starts grabbing -- @function [parent=#RenderTexture] begin -- @param self @@ -82,26 +69,23 @@ -- @overload self, string, bool, function -- @function [parent=#RenderTexture] saveToFile -- @param self --- @param #string filename +-- @param #string str -- @param #int format --- @param #bool isRGBA --- @param #function callback +-- @param #bool bool +-- @param #function func -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#RenderTexture] setAutoDraw -- @param self --- @param #bool isAutoDraw +-- @param #bool bool -------------------------------- --- -- @function [parent=#RenderTexture] setClearColor -- @param self --- @param #color4f_table clearColor +-- @param #color4f_table color4f -------------------------------- --- end is key word of lua, use other name to export to lua. -- @function [parent=#RenderTexture] endToLua -- @param self @@ -111,61 +95,55 @@ -- @overload self, float, float, float, float, float, int -- @function [parent=#RenderTexture] beginWithClear -- @param self --- @param #float r --- @param #float g --- @param #float b --- @param #float a --- @param #float depthValue --- @param #int stencilValue +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #int int -------------------------------- --- clears the texture with a specified depth value -- @function [parent=#RenderTexture] clearDepth -- @param self --- @param #float depthValue +-- @param #float float -------------------------------- --- Clear color value. Valid only when "autoDraw" is true. -- @function [parent=#RenderTexture] getClearColor -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- --- clears the texture with a color -- @function [parent=#RenderTexture] clear -- @param self --- @param #float r --- @param #float g --- @param #float b --- @param #float a +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float -------------------------------- --- Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw" is true. -- @function [parent=#RenderTexture] getClearFlags -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- -- @function [parent=#RenderTexture] newImage -- @param self -- @return Image#Image ret (return value: cc.Image) -------------------------------- --- -- @function [parent=#RenderTexture] setClearDepth -- @param self --- @param #float clearDepth +-- @param #float float -------------------------------- -- @overload self, int, int, int, unsigned int -- @overload self, int, int, int -- @function [parent=#RenderTexture] initWithWidthAndHeight -- @param self --- @param #int w --- @param #int h --- @param #int format --- @param #unsigned int depthStencilFormat +-- @param #int int +-- @param #int int +-- @param #int pixelformat +-- @param #unsigned int int -- @return bool#bool ret (retunr value: bool) -------------------------------- @@ -174,30 +152,27 @@ -- @overload self, int, int -- @function [parent=#RenderTexture] create -- @param self --- @param #int w --- @param #int h --- @param #int format --- @param #unsigned int depthStencilFormat +-- @param #int int +-- @param #int int +-- @param #int pixelformat +-- @param #unsigned int int -- @return RenderTexture#RenderTexture ret (retunr value: cc.RenderTexture) -------------------------------- --- -- @function [parent=#RenderTexture] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#RenderTexture] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#RenderTexture] RenderTexture -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Repeat.lua b/cocos/scripting/lua-bindings/auto/api/Repeat.lua index 6416570584..0fceefb74c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Repeat.lua +++ b/cocos/scripting/lua-bindings/auto/api/Repeat.lua @@ -5,56 +5,47 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Repeat] setInnerAction -- @param self --- @param #cc.FiniteTimeAction action +-- @param #cc.FiniteTimeAction finitetimeaction -------------------------------- --- -- @function [parent=#Repeat] getInnerAction -- @param self -- @return FiniteTimeAction#FiniteTimeAction ret (return value: cc.FiniteTimeAction) -------------------------------- --- creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30) -- @function [parent=#Repeat] create -- @param self --- @param #cc.FiniteTimeAction action --- @param #unsigned int times +-- @param #cc.FiniteTimeAction finitetimeaction +-- @param #unsigned int int -- @return Repeat#Repeat ret (return value: cc.Repeat) -------------------------------- --- -- @function [parent=#Repeat] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#Repeat] reverse -- @param self -- @return Repeat#Repeat ret (return value: cc.Repeat) -------------------------------- --- -- @function [parent=#Repeat] clone -- @param self -- @return Repeat#Repeat ret (return value: cc.Repeat) -------------------------------- --- -- @function [parent=#Repeat] stop -- @param self -------------------------------- --- -- @function [parent=#Repeat] update -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#Repeat] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua b/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua index bd2f1b1b8f..d846b49287 100644 --- a/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua +++ b/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua @@ -5,52 +5,44 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#RepeatForever] setInnerAction -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -------------------------------- --- -- @function [parent=#RepeatForever] getInnerAction -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- creates the action -- @function [parent=#RepeatForever] create -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return RepeatForever#RepeatForever ret (return value: cc.RepeatForever) -------------------------------- --- -- @function [parent=#RepeatForever] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#RepeatForever] clone -- @param self -- @return RepeatForever#RepeatForever ret (return value: cc.RepeatForever) -------------------------------- --- -- @function [parent=#RepeatForever] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#RepeatForever] reverse -- @param self -- @return RepeatForever#RepeatForever ret (return value: cc.RepeatForever) -------------------------------- --- -- @function [parent=#RepeatForever] step -- @param self --- @param #float dt +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua b/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua index d5d09ff12e..d36121c163 100644 --- a/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua +++ b/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua @@ -5,26 +5,22 @@ -- @parent_module cc -------------------------------- --- creates an action with the number of times that the current grid will be reused -- @function [parent=#ReuseGrid] create -- @param self --- @param #int times +-- @param #int int -- @return ReuseGrid#ReuseGrid ret (return value: cc.ReuseGrid) -------------------------------- --- -- @function [parent=#ReuseGrid] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ReuseGrid] clone -- @param self -- @return ReuseGrid#ReuseGrid ret (return value: cc.ReuseGrid) -------------------------------- --- -- @function [parent=#ReuseGrid] reverse -- @param self -- @return ReuseGrid#ReuseGrid ret (return value: cc.ReuseGrid) diff --git a/cocos/scripting/lua-bindings/auto/api/RichElement.lua b/cocos/scripting/lua-bindings/auto/api/RichElement.lua index dcb76df400..6043d0bf08 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElement.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElement.lua @@ -5,16 +5,14 @@ -- @parent_module ccui -------------------------------- --- -- @function [parent=#RichElement] init -- @param self --- @param #int tag --- @param #color3b_table color --- @param #unsigned char opacity +-- @param #int int +-- @param #color3b_table color3b +-- @param #unsigned char char -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#RichElement] RichElement -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua b/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua index 12663cbf56..df0910149b 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua @@ -5,27 +5,24 @@ -- @parent_module ccui -------------------------------- --- -- @function [parent=#RichElementCustomNode] init -- @param self --- @param #int tag --- @param #color3b_table color --- @param #unsigned char opacity --- @param #cc.Node customNode +-- @param #int int +-- @param #color3b_table color3b +-- @param #unsigned char char +-- @param #cc.Node node -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#RichElementCustomNode] create -- @param self --- @param #int tag --- @param #color3b_table color --- @param #unsigned char opacity --- @param #cc.Node customNode +-- @param #int int +-- @param #color3b_table color3b +-- @param #unsigned char char +-- @param #cc.Node node -- @return RichElementCustomNode#RichElementCustomNode ret (return value: ccui.RichElementCustomNode) -------------------------------- --- -- @function [parent=#RichElementCustomNode] RichElementCustomNode -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua b/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua index bbccb743f8..c94db3c5cc 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua @@ -5,27 +5,24 @@ -- @parent_module ccui -------------------------------- --- -- @function [parent=#RichElementImage] init -- @param self --- @param #int tag --- @param #color3b_table color --- @param #unsigned char opacity --- @param #string filePath +-- @param #int int +-- @param #color3b_table color3b +-- @param #unsigned char char +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#RichElementImage] create -- @param self --- @param #int tag --- @param #color3b_table color --- @param #unsigned char opacity --- @param #string filePath +-- @param #int int +-- @param #color3b_table color3b +-- @param #unsigned char char +-- @param #string str -- @return RichElementImage#RichElementImage ret (return value: ccui.RichElementImage) -------------------------------- --- -- @function [parent=#RichElementImage] RichElementImage -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementText.lua b/cocos/scripting/lua-bindings/auto/api/RichElementText.lua index 35ceb7e869..e92a8c5916 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementText.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementText.lua @@ -5,31 +5,28 @@ -- @parent_module ccui -------------------------------- --- -- @function [parent=#RichElementText] init -- @param self --- @param #int tag --- @param #color3b_table color --- @param #unsigned char opacity --- @param #string text --- @param #string fontName --- @param #float fontSize +-- @param #int int +-- @param #color3b_table color3b +-- @param #unsigned char char +-- @param #string str +-- @param #string str +-- @param #float float -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#RichElementText] create -- @param self --- @param #int tag --- @param #color3b_table color --- @param #unsigned char opacity --- @param #string text --- @param #string fontName --- @param #float fontSize +-- @param #int int +-- @param #color3b_table color3b +-- @param #unsigned char char +-- @param #string str +-- @param #string str +-- @param #float float -- @return RichElementText#RichElementText ret (return value: ccui.RichElementText) -------------------------------- --- -- @function [parent=#RichElementText] RichElementText -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichText.lua b/cocos/scripting/lua-bindings/auto/api/RichText.lua index ff84a62b20..c332a6f8e7 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichText.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichText.lua @@ -5,38 +5,32 @@ -- @parent_module ccui -------------------------------- --- -- @function [parent=#RichText] insertElement -- @param self --- @param #ccui.RichElement element --- @param #int index +-- @param #ccui.RichElement richelement +-- @param #int int -------------------------------- --- -- @function [parent=#RichText] setAnchorPoint -- @param self --- @param #vec2_table pt +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#RichText] pushBackElement -- @param self --- @param #ccui.RichElement element +-- @param #ccui.RichElement richelement -------------------------------- --- -- @function [parent=#RichText] ignoreContentAdaptWithSize -- @param self --- @param #bool ignore +-- @param #bool bool -------------------------------- --- -- @function [parent=#RichText] setVerticalSpace -- @param self --- @param #float space +-- @param #float float -------------------------------- --- -- @function [parent=#RichText] formatText -- @param self @@ -45,28 +39,24 @@ -- @overload self, int -- @function [parent=#RichText] removeElement -- @param self --- @param #int index +-- @param #int int -------------------------------- --- -- @function [parent=#RichText] create -- @param self -- @return RichText#RichText ret (return value: ccui.RichText) -------------------------------- --- -- @function [parent=#RichText] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#RichText] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#RichText] RichText -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua b/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua index d335042d84..22ecc16a89 100644 --- a/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua @@ -5,63 +5,54 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Ripple3D] setAmplitudeRate -- @param self --- @param #float fAmplitudeRate +-- @param #float float -------------------------------- --- -- @function [parent=#Ripple3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Ripple3D] setAmplitude -- @param self --- @param #float fAmplitude +-- @param #float float -------------------------------- --- -- @function [parent=#Ripple3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- --- set center position -- @function [parent=#Ripple3D] setPosition -- @param self --- @param #vec2_table position +-- @param #vec2_table vec2 -------------------------------- --- get center position -- @function [parent=#Ripple3D] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- creates the action with radius, number of waves, amplitude, a grid size and duration -- @function [parent=#Ripple3D] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #vec2_table position --- @param #float radius --- @param #unsigned int waves --- @param #float amplitude +-- @param #float float +-- @param #size_table size +-- @param #vec2_table vec2 +-- @param #float float +-- @param #unsigned int int +-- @param #float float -- @return Ripple3D#Ripple3D ret (return value: cc.Ripple3D) -------------------------------- --- -- @function [parent=#Ripple3D] clone -- @param self -- @return Ripple3D#Ripple3D ret (return value: cc.Ripple3D) -------------------------------- --- -- @function [parent=#Ripple3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/RotateBy.lua b/cocos/scripting/lua-bindings/auto/api/RotateBy.lua index 05a24a7f5a..8d1d33c55e 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotateBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotateBy.lua @@ -10,33 +10,29 @@ -- @overload self, float, vec3_table -- @function [parent=#RotateBy] create -- @param self --- @param #float duration --- @param #float deltaAngleZ_X --- @param #float deltaAngleZ_Y +-- @param #float float +-- @param #float float +-- @param #float float -- @return RotateBy#RotateBy ret (retunr value: cc.RotateBy) -------------------------------- --- -- @function [parent=#RotateBy] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#RotateBy] clone -- @param self -- @return RotateBy#RotateBy ret (return value: cc.RotateBy) -------------------------------- --- -- @function [parent=#RotateBy] reverse -- @param self -- @return RotateBy#RotateBy ret (return value: cc.RotateBy) -------------------------------- --- -- @function [parent=#RotateBy] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/RotateTo.lua b/cocos/scripting/lua-bindings/auto/api/RotateTo.lua index 9a03166d87..1631a28fbd 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotateTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotateTo.lua @@ -10,33 +10,29 @@ -- @overload self, float, vec3_table -- @function [parent=#RotateTo] create -- @param self --- @param #float duration --- @param #float dstAngleX --- @param #float dstAngleY +-- @param #float float +-- @param #float float +-- @param #float float -- @return RotateTo#RotateTo ret (retunr value: cc.RotateTo) -------------------------------- --- -- @function [parent=#RotateTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#RotateTo] clone -- @param self -- @return RotateTo#RotateTo ret (return value: cc.RotateTo) -------------------------------- --- -- @function [parent=#RotateTo] reverse -- @param self -- @return RotateTo#RotateTo ret (return value: cc.RotateTo) -------------------------------- --- -- @function [parent=#RotateTo] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua b/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua index 6be076892d..0d0e14cd48 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua @@ -5,37 +5,31 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#RotationFrame] setRotation -- @param self --- @param #float rotation +-- @param #float float -------------------------------- --- -- @function [parent=#RotationFrame] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#RotationFrame] create -- @param self -- @return RotationFrame#RotationFrame ret (return value: ccs.RotationFrame) -------------------------------- --- -- @function [parent=#RotationFrame] apply -- @param self --- @param #float percent +-- @param #float float -------------------------------- --- -- @function [parent=#RotationFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#RotationFrame] RotationFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua b/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua index 340f6f167e..7fb9190a5b 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua @@ -5,25 +5,21 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#RotationSkewFrame] create -- @param self -- @return RotationSkewFrame#RotationSkewFrame ret (return value: ccs.RotationSkewFrame) -------------------------------- --- -- @function [parent=#RotationSkewFrame] apply -- @param self --- @param #float percent +-- @param #float float -------------------------------- --- -- @function [parent=#RotationSkewFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#RotationSkewFrame] RotationSkewFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua index 6264f3826f..3e353cf61d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua @@ -5,82 +5,65 @@ -- @parent_module ccui -------------------------------- --- -- @function [parent=#Scale9Sprite] disableCascadeColor -- @param self -------------------------------- --- -- @function [parent=#Scale9Sprite] updateWithSprite -- @param self -- @param #cc.Sprite sprite -- @param #rect_table rect --- @param #bool rotated --- @param #rect_table capInsets +-- @param #bool bool +-- @param #rect_table rect -- @return bool#bool ret (return value: bool) -------------------------------- --- Returns the flag which indicates whether the widget is flipped horizontally or not.
--- It only flips the texture of the widget, and not the texture of the widget's children.
--- Also, flipping the texture doesn't alter the anchorPoint.
--- If you want to flip the anchorPoint too, and/or to flip the children too use:
--- widget->setScaleX(sprite->getScaleX() * -1);
--- return true if the widget is flipped horizaontally, false otherwise. -- @function [parent=#Scale9Sprite] isFlippedX -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Sets whether the widget should be flipped vertically or not.
--- param bFlippedY true if the widget should be flipped vertically, flase otherwise. -- @function [parent=#Scale9Sprite] setFlippedY -- @param self --- @param #bool flippedY +-- @param #bool bool -------------------------------- --- Sets whether the widget should be flipped horizontally or not.
--- param bFlippedX true if the widget should be flipped horizaontally, false otherwise. -- @function [parent=#Scale9Sprite] setFlippedX -- @param self --- @param #bool flippedX +-- @param #bool bool -------------------------------- --- -- @function [parent=#Scale9Sprite] setScale9Enabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#Scale9Sprite] disableCascadeOpacity -- @param self -------------------------------- --- -- @function [parent=#Scale9Sprite] setInsetBottom -- @param self --- @param #float bottomInset +-- @param #float float -------------------------------- -- @overload self, string -- @overload self, string, rect_table -- @function [parent=#Scale9Sprite] initWithSpriteFrameName -- @param self --- @param #string spriteFrameName --- @param #rect_table capInsets +-- @param #string str +-- @param #rect_table rect -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#Scale9Sprite] getSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#Scale9Sprite] setInsetTop -- @param self --- @param #float topInset +-- @param #float float -------------------------------- -- @overload self, cc.Sprite, rect_table, bool, rect_table @@ -90,59 +73,47 @@ -- @param self -- @param #cc.Sprite sprite -- @param #rect_table rect --- @param #bool rotated --- @param #rect_table capInsets +-- @param #bool bool +-- @param #rect_table rect -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#Scale9Sprite] setPreferredSize -- @param self -- @param #size_table size -------------------------------- --- -- @function [parent=#Scale9Sprite] getInsetRight -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Scale9Sprite] setSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteFrame +-- @param #cc.SpriteFrame spriteframe -------------------------------- --- -- @function [parent=#Scale9Sprite] getInsetBottom -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Creates and returns a new sprite object with the specified cap insets.
--- You use this method to add cap insets to a sprite or to change the existing
--- cap insets of a sprite. In both cases, you get back a new image and the
--- original sprite remains untouched.
--- param capInsets The values to use for the cap insets. -- @function [parent=#Scale9Sprite] resizableSpriteWithCapInsets -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -- @return Scale9Sprite#Scale9Sprite ret (return value: ccui.Scale9Sprite) -------------------------------- --- -- @function [parent=#Scale9Sprite] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Scale9Sprite] getCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- -- @function [parent=#Scale9Sprite] getOriginalSize -- @param self -- @return size_table#size_table ret (return value: size_table) @@ -154,66 +125,54 @@ -- @overload self, string -- @function [parent=#Scale9Sprite] initWithFile -- @param self --- @param #string file +-- @param #string str +-- @param #rect_table rect -- @param #rect_table rect --- @param #rect_table capInsets -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#Scale9Sprite] getInsetTop -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Scale9Sprite] setInsetLeft -- @param self --- @param #float leftInset +-- @param #float float -------------------------------- -- @overload self, cc.SpriteFrame -- @overload self, cc.SpriteFrame, rect_table -- @function [parent=#Scale9Sprite] initWithSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteFrame --- @param #rect_table capInsets +-- @param #cc.SpriteFrame spriteframe +-- @param #rect_table rect -- @return bool#bool ret (retunr value: bool) -------------------------------- --- -- @function [parent=#Scale9Sprite] getPreferredSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#Scale9Sprite] setCapInsets -- @param self -- @param #rect_table rect -------------------------------- --- Return the flag which indicates whether the widget is flipped vertically or not.
--- It only flips the texture of the widget, and not the texture of the widget's children.
--- Also, flipping the texture doesn't alter the anchorPoint.
--- If you want to flip the anchorPoint too, and/or to flip the children too use:
--- widget->setScaleY(widget->getScaleY() * -1);
--- return true if the widget is flipped vertically, flase otherwise. -- @function [parent=#Scale9Sprite] isFlippedY -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Scale9Sprite] getInsetLeft -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Scale9Sprite] setInsetRight -- @param self --- @param #float rightInset +-- @param #float float -------------------------------- -- @overload self, string, rect_table, rect_table @@ -223,9 +182,9 @@ -- @overload self, string -- @function [parent=#Scale9Sprite] create -- @param self --- @param #string file +-- @param #string str +-- @param #rect_table rect -- @param #rect_table rect --- @param #rect_table capInsets -- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite) -------------------------------- @@ -233,8 +192,8 @@ -- @overload self, string -- @function [parent=#Scale9Sprite] createWithSpriteFrameName -- @param self --- @param #string spriteFrameName --- @param #rect_table capInsets +-- @param #string str +-- @param #rect_table rect -- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite) -------------------------------- @@ -242,41 +201,35 @@ -- @overload self, cc.SpriteFrame -- @function [parent=#Scale9Sprite] createWithSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteFrame --- @param #rect_table capInsets +-- @param #cc.SpriteFrame spriteframe +-- @param #rect_table rect -- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite) -------------------------------- --- -- @function [parent=#Scale9Sprite] setAnchorPoint -- @param self --- @param #vec2_table anchorPoint +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#Scale9Sprite] updateDisplayedOpacity -- @param self --- @param #unsigned char parentOpacity +-- @param #unsigned char char -------------------------------- --- -- @function [parent=#Scale9Sprite] cleanup -- @param self -------------------------------- --- -- @function [parent=#Scale9Sprite] updateDisplayedColor -- @param self --- @param #color3b_table parentColor +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#Scale9Sprite] setContentSize -- @param self -- @param #size_table size -------------------------------- --- js ctor -- @function [parent=#Scale9Sprite] Scale9Sprite -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua b/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua index f7e93e6bfb..3d2e657b72 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua @@ -10,26 +10,23 @@ -- @overload self, float, float, float, float -- @function [parent=#ScaleBy] create -- @param self --- @param #float duration --- @param #float sx --- @param #float sy --- @param #float sz +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float -- @return ScaleBy#ScaleBy ret (retunr value: cc.ScaleBy) -------------------------------- --- -- @function [parent=#ScaleBy] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ScaleBy] clone -- @param self -- @return ScaleBy#ScaleBy ret (return value: cc.ScaleBy) -------------------------------- --- -- @function [parent=#ScaleBy] reverse -- @param self -- @return ScaleBy#ScaleBy ret (return value: cc.ScaleBy) diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua b/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua index e7bca6756f..d8fa8f909b 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua @@ -5,55 +5,46 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ScaleFrame] setScaleY -- @param self --- @param #float scaleY +-- @param #float float -------------------------------- --- -- @function [parent=#ScaleFrame] setScaleX -- @param self --- @param #float scaleX +-- @param #float float -------------------------------- --- -- @function [parent=#ScaleFrame] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ScaleFrame] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#ScaleFrame] setScale -- @param self --- @param #float scale +-- @param #float float -------------------------------- --- -- @function [parent=#ScaleFrame] create -- @param self -- @return ScaleFrame#ScaleFrame ret (return value: ccs.ScaleFrame) -------------------------------- --- -- @function [parent=#ScaleFrame] apply -- @param self --- @param #float percent +-- @param #float float -------------------------------- --- -- @function [parent=#ScaleFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#ScaleFrame] ScaleFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua b/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua index 7709deadf1..3869dffc97 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua @@ -10,34 +10,30 @@ -- @overload self, float, float, float, float -- @function [parent=#ScaleTo] create -- @param self --- @param #float duration --- @param #float sx --- @param #float sy --- @param #float sz +-- @param #float float +-- @param #float float +-- @param #float float +-- @param #float float -- @return ScaleTo#ScaleTo ret (retunr value: cc.ScaleTo) -------------------------------- --- -- @function [parent=#ScaleTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ScaleTo] clone -- @param self -- @return ScaleTo#ScaleTo ret (return value: cc.ScaleTo) -------------------------------- --- -- @function [parent=#ScaleTo] reverse -- @param self -- @return ScaleTo#ScaleTo ret (return value: cc.ScaleTo) -------------------------------- --- -- @function [parent=#ScaleTo] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Scene.lua b/cocos/scripting/lua-bindings/auto/api/Scene.lua index 671e74d783..ba1bec9356 100644 --- a/cocos/scripting/lua-bindings/auto/api/Scene.lua +++ b/cocos/scripting/lua-bindings/auto/api/Scene.lua @@ -5,55 +5,48 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Scene] getPhysicsWorld -- @param self -- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld) -------------------------------- --- creates a new Scene object with a predefined Size -- @function [parent=#Scene] createWithSize -- @param self -- @param #size_table size -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- --- creates a new Scene object -- @function [parent=#Scene] create -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- --- -- @function [parent=#Scene] createWithPhysics -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- --- -- @function [parent=#Scene] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Scene] getScene -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- --- -- @function [parent=#Scene] update -- @param self --- @param #float delta +-- @param #float float -------------------------------- -- @overload self, cc.Node, int, string -- @overload self, cc.Node, int, int -- @function [parent=#Scene] addChild -- @param self --- @param #cc.Node child --- @param #int zOrder --- @param #int tag +-- @param #cc.Node node +-- @param #int int +-- @param #int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SceneReader.lua b/cocos/scripting/lua-bindings/auto/api/SceneReader.lua index eb30a5ff16..7ea99e4d21 100644 --- a/cocos/scripting/lua-bindings/auto/api/SceneReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/SceneReader.lua @@ -4,46 +4,38 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#SceneReader] setTarget -- @param self --- @param #function selector +-- @param #function func -------------------------------- --- -- @function [parent=#SceneReader] createNodeWithSceneFile -- @param self --- @param #string fileName --- @param #int attachComponent +-- @param #string str +-- @param #int attachcomponenttype -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#SceneReader] getAttachComponentType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#SceneReader] getNodeByTag -- @param self --- @param #int nTag +-- @param #int int -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- js purge
--- lua destroySceneReader -- @function [parent=#SceneReader] destroyInstance -- @param self -------------------------------- --- -- @function [parent=#SceneReader] sceneReaderVersion -- @param self -- @return char#char ret (return value: char) -------------------------------- --- -- @function [parent=#SceneReader] getInstance -- @param self -- @return SceneReader#SceneReader ret (return value: ccs.SceneReader) diff --git a/cocos/scripting/lua-bindings/auto/api/Scheduler.lua b/cocos/scripting/lua-bindings/auto/api/Scheduler.lua index b1b7d560f3..7a3870c4d6 100644 --- a/cocos/scripting/lua-bindings/auto/api/Scheduler.lua +++ b/cocos/scripting/lua-bindings/auto/api/Scheduler.lua @@ -5,24 +5,16 @@ -- @parent_module cc -------------------------------- --- Modifies the time of all scheduled callbacks.
--- You can use this property to create a 'slow motion' or 'fast forward' effect.
--- Default is 1.0. To create a 'slow motion' effect, use values below 1.0.
--- To create a 'fast forward' effect, use values higher than 1.0.
--- since v0.8
--- warning It will affect EVERY scheduled selector / action. -- @function [parent=#Scheduler] setTimeScale -- @param self --- @param #float timeScale +-- @param #float float -------------------------------- --- -- @function [parent=#Scheduler] getTimeScale -- @param self -- @return float#float ret (return value: float) -------------------------------- --- js ctor -- @function [parent=#Scheduler] Scheduler -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ScrollView.lua b/cocos/scripting/lua-bindings/auto/api/ScrollView.lua index 1cd19f24c4..f1a9bab896 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScrollView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScrollView.lua @@ -5,221 +5,177 @@ -- @parent_module ccui -------------------------------- --- Scroll inner container to top boundary of scrollview. -- @function [parent=#ScrollView] scrollToTop -- @param self --- @param #float time --- @param #bool attenuated +-- @param #float float +-- @param #bool bool -------------------------------- --- Scroll inner container to horizontal percent position of scrollview. -- @function [parent=#ScrollView] scrollToPercentHorizontal -- @param self --- @param #float percent --- @param #float time --- @param #bool attenuated +-- @param #float float +-- @param #float float +-- @param #bool bool -------------------------------- --- -- @function [parent=#ScrollView] isInertiaScrollEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Scroll inner container to both direction percent position of scrollview. -- @function [parent=#ScrollView] scrollToPercentBothDirection -- @param self --- @param #vec2_table percent --- @param #float time --- @param #bool attenuated +-- @param #vec2_table vec2 +-- @param #float float +-- @param #bool bool -------------------------------- --- Gets scroll direction of scrollview.
--- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
--- return Direction -- @function [parent=#ScrollView] getDirection -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Scroll inner container to bottom and left boundary of scrollview. -- @function [parent=#ScrollView] scrollToBottomLeft -- @param self --- @param #float time --- @param #bool attenuated +-- @param #float float +-- @param #bool bool -------------------------------- --- Gets inner container of scrollview.
--- Inner container is the container of scrollview's children.
--- return inner container. -- @function [parent=#ScrollView] getInnerContainer -- @param self -- @return Layout#Layout ret (return value: ccui.Layout) -------------------------------- --- Move inner container to bottom boundary of scrollview. -- @function [parent=#ScrollView] jumpToBottom -- @param self -------------------------------- --- Changes scroll direction of scrollview.
--- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
--- param dir -- @function [parent=#ScrollView] setDirection -- @param self --- @param #int dir +-- @param #int direction -------------------------------- --- Scroll inner container to top and left boundary of scrollview. -- @function [parent=#ScrollView] scrollToTopLeft -- @param self --- @param #float time --- @param #bool attenuated +-- @param #float float +-- @param #bool bool -------------------------------- --- Move inner container to top and right boundary of scrollview. -- @function [parent=#ScrollView] jumpToTopRight -- @param self -------------------------------- --- Move inner container to bottom and left boundary of scrollview. -- @function [parent=#ScrollView] jumpToBottomLeft -- @param self -------------------------------- --- Changes inner container size of scrollview.
--- Inner container size must be larger than or equal scrollview's size.
--- param inner container size. -- @function [parent=#ScrollView] setInnerContainerSize -- @param self -- @param #size_table size -------------------------------- --- Gets inner container size of scrollview.
--- Inner container size must be larger than or equal scrollview's size.
--- return inner container size. -- @function [parent=#ScrollView] getInnerContainerSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#ScrollView] isBounceEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Move inner container to vertical percent position of scrollview. -- @function [parent=#ScrollView] jumpToPercentVertical -- @param self --- @param #float percent +-- @param #float float -------------------------------- --- -- @function [parent=#ScrollView] addEventListener -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- -- @function [parent=#ScrollView] setInertiaScrollEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- Move inner container to top and left boundary of scrollview. -- @function [parent=#ScrollView] jumpToTopLeft -- @param self -------------------------------- --- Move inner container to horizontal percent position of scrollview. -- @function [parent=#ScrollView] jumpToPercentHorizontal -- @param self --- @param #float percent +-- @param #float float -------------------------------- --- Move inner container to bottom and right boundary of scrollview. -- @function [parent=#ScrollView] jumpToBottomRight -- @param self -------------------------------- --- -- @function [parent=#ScrollView] setBounceEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- Move inner container to top boundary of scrollview. -- @function [parent=#ScrollView] jumpToTop -- @param self -------------------------------- --- Scroll inner container to left boundary of scrollview. -- @function [parent=#ScrollView] scrollToLeft -- @param self --- @param #float time --- @param #bool attenuated +-- @param #float float +-- @param #bool bool -------------------------------- --- Move inner container to both direction percent position of scrollview. -- @function [parent=#ScrollView] jumpToPercentBothDirection -- @param self --- @param #vec2_table percent +-- @param #vec2_table vec2 -------------------------------- --- Scroll inner container to vertical percent position of scrollview. -- @function [parent=#ScrollView] scrollToPercentVertical -- @param self --- @param #float percent --- @param #float time --- @param #bool attenuated +-- @param #float float +-- @param #float float +-- @param #bool bool -------------------------------- --- Scroll inner container to bottom boundary of scrollview. -- @function [parent=#ScrollView] scrollToBottom -- @param self --- @param #float time --- @param #bool attenuated +-- @param #float float +-- @param #bool bool -------------------------------- --- Scroll inner container to bottom and right boundary of scrollview. -- @function [parent=#ScrollView] scrollToBottomRight -- @param self --- @param #float time --- @param #bool attenuated +-- @param #float float +-- @param #bool bool -------------------------------- --- Move inner container to left boundary of scrollview. -- @function [parent=#ScrollView] jumpToLeft -- @param self -------------------------------- --- Scroll inner container to right boundary of scrollview. -- @function [parent=#ScrollView] scrollToRight -- @param self --- @param #float time --- @param #bool attenuated +-- @param #float float +-- @param #bool bool -------------------------------- --- Move inner container to right boundary of scrollview. -- @function [parent=#ScrollView] jumpToRight -- @param self -------------------------------- --- Scroll inner container to top and right boundary of scrollview. -- @function [parent=#ScrollView] scrollToTopRight -- @param self --- @param #float time --- @param #bool attenuated +-- @param #float float +-- @param #bool bool -------------------------------- --- Allocates and initializes. -- @function [parent=#ScrollView] create -- @param self -- @return ScrollView#ScrollView ret (return value: ccui.ScrollView) -------------------------------- --- -- @function [parent=#ScrollView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) @@ -231,66 +187,52 @@ -- @overload self, cc.Node, int, string -- @function [parent=#ScrollView] addChild -- @param self --- @param #cc.Node child --- @param #int zOrder --- @param #string name +-- @param #cc.Node node +-- @param #int int +-- @param #string str -------------------------------- --- -- @function [parent=#ScrollView] getChildByName -- @param self --- @param #string name +-- @param #string str -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#ScrollView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#ScrollView] update -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- Gets LayoutType.
--- see LayoutType
--- return LayoutType -- @function [parent=#ScrollView] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#ScrollView] removeAllChildrenWithCleanup -- @param self --- @param #bool cleanup +-- @param #bool bool -------------------------------- --- -- @function [parent=#ScrollView] removeAllChildren -- @param self -------------------------------- --- When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
--- If the widget is not in a layout, it will return itself
--- param dir the direction to look for the next focused widget in a layout
--- param current the current focused widget
--- return the next focused widget in a layout -- @function [parent=#ScrollView] findNextFocusedWidget -- @param self --- @param #int direction --- @param #ccui.Widget current +-- @param #int focusdirection +-- @param #ccui.Widget widget -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- -- @function [parent=#ScrollView] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleaup +-- @param #cc.Node node +-- @param #bool bool -------------------------------- -- @overload self @@ -300,28 +242,22 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- --- -- @function [parent=#ScrollView] getChildByTag -- @param self --- @param #int tag +-- @param #int int -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#ScrollView] getChildrenCount -- @param self -- @return long#long ret (return value: long) -------------------------------- --- Sets LayoutType.
--- see LayoutType
--- param LayoutType -- @function [parent=#ScrollView] setLayoutType -- @param self -- @param #int type -------------------------------- --- Default constructor -- @function [parent=#ScrollView] ScrollView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Sequence.lua b/cocos/scripting/lua-bindings/auto/api/Sequence.lua index 965c25b93d..feda1c3c1f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sequence.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sequence.lua @@ -5,32 +5,27 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Sequence] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#Sequence] clone -- @param self -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- --- -- @function [parent=#Sequence] stop -- @param self -------------------------------- --- -- @function [parent=#Sequence] reverse -- @param self -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- --- -- @function [parent=#Sequence] update -- @param self --- @param #float t +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua b/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua index f16b0bca3f..2458883412 100644 --- a/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua @@ -5,25 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action with a range, shake Z vertices, a grid and duration -- @function [parent=#Shaky3D] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #int range --- @param #bool shakeZ +-- @param #float float +-- @param #size_table size +-- @param #int int +-- @param #bool bool -- @return Shaky3D#Shaky3D ret (return value: cc.Shaky3D) -------------------------------- --- -- @function [parent=#Shaky3D] clone -- @param self -- @return Shaky3D#Shaky3D ret (return value: cc.Shaky3D) -------------------------------- --- -- @function [parent=#Shaky3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua index f8f94b06e4..dbf2de70f6 100644 --- a/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua @@ -5,25 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action with a range, whether or not to shake Z vertices, a grid size, and duration -- @function [parent=#ShakyTiles3D] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #int range --- @param #bool shakeZ +-- @param #float float +-- @param #size_table size +-- @param #int int +-- @param #bool bool -- @return ShakyTiles3D#ShakyTiles3D ret (return value: cc.ShakyTiles3D) -------------------------------- --- -- @function [parent=#ShakyTiles3D] clone -- @param self -- @return ShakyTiles3D#ShakyTiles3D ret (return value: cc.ShakyTiles3D) -------------------------------- --- -- @function [parent=#ShakyTiles3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua index 68a37cd638..6e59cf6e15 100644 --- a/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua @@ -5,25 +5,22 @@ -- @parent_module cc -------------------------------- --- creates the action with a range, whether of not to shatter Z vertices, a grid size and duration -- @function [parent=#ShatteredTiles3D] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #int range --- @param #bool shatterZ +-- @param #float float +-- @param #size_table size +-- @param #int int +-- @param #bool bool -- @return ShatteredTiles3D#ShatteredTiles3D ret (return value: cc.ShatteredTiles3D) -------------------------------- --- -- @function [parent=#ShatteredTiles3D] clone -- @param self -- @return ShatteredTiles3D#ShatteredTiles3D ret (return value: cc.ShatteredTiles3D) -------------------------------- --- -- @function [parent=#ShatteredTiles3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Show.lua b/cocos/scripting/lua-bindings/auto/api/Show.lua index 7b53551bf0..a09d54705a 100644 --- a/cocos/scripting/lua-bindings/auto/api/Show.lua +++ b/cocos/scripting/lua-bindings/auto/api/Show.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- Allocates and initializes the action -- @function [parent=#Show] create -- @param self -- @return Show#Show ret (return value: cc.Show) -------------------------------- --- -- @function [parent=#Show] clone -- @param self -- @return Show#Show ret (return value: cc.Show) -------------------------------- --- -- @function [parent=#Show] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#Show] reverse -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) diff --git a/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua b/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua index c8e89ce80c..231f1e070b 100644 --- a/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua @@ -5,37 +5,32 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#ShuffleTiles] getDelta -- @param self --- @param #size_table pos +-- @param #size_table size -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- creates the action with a random seed, the grid size and the duration -- @function [parent=#ShuffleTiles] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #unsigned int seed +-- @param #float float +-- @param #size_table size +-- @param #unsigned int int -- @return ShuffleTiles#ShuffleTiles ret (return value: cc.ShuffleTiles) -------------------------------- --- -- @function [parent=#ShuffleTiles] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#ShuffleTiles] clone -- @param self -- @return ShuffleTiles#ShuffleTiles ret (return value: cc.ShuffleTiles) -------------------------------- --- -- @function [parent=#ShuffleTiles] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua b/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua index 2cb9410358..c56c9104b3 100644 --- a/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua +++ b/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua @@ -4,181 +4,114 @@ -- @parent_module cc -------------------------------- --- brief Preload background music
--- param pszFilePath The path of the background music file.
--- js preloadMusic
--- lua preloadMusic -- @function [parent=#SimpleAudioEngine] preloadBackgroundMusic -- @param self --- @param #char pszFilePath +-- @param #char char -------------------------------- --- brief Stop playing background music
--- param bReleaseData If release the background music data or not.As default value is false
--- js stopMusic
--- lua stopMusic -- @function [parent=#SimpleAudioEngine] stopBackgroundMusic -- @param self -------------------------------- --- brief Stop all playing sound effects -- @function [parent=#SimpleAudioEngine] stopAllEffects -- @param self -------------------------------- --- brief The volume of the background music within the range of 0.0 as the minimum and 1.0 as the maximum.
--- js getMusicVolume
--- lua getMusicVolume -- @function [parent=#SimpleAudioEngine] getBackgroundMusicVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- --- brief Resume playing background music
--- js resumeMusic
--- lua resumeMusic -- @function [parent=#SimpleAudioEngine] resumeBackgroundMusic -- @param self -------------------------------- --- brief Set the volume of background music
--- param volume must be within the range of 0.0 as the minimum and 1.0 as the maximum.
--- js setMusicVolume
--- lua setMusicVolume -- @function [parent=#SimpleAudioEngine] setBackgroundMusicVolume -- @param self --- @param #float volume +-- @param #float float -------------------------------- --- brief preload a compressed audio file
--- details the compressed audio will be decoded to wave, then written into an internal buffer in SimpleAudioEngine
--- param pszFilePath The path of the effect file -- @function [parent=#SimpleAudioEngine] preloadEffect -- @param self --- @param #char pszFilePath +-- @param #char char -------------------------------- --- brief Indicates whether the background music is playing
--- return true if the background music is playing, otherwise false
--- js isMusicPlaying
--- lua isMusicPlaying -- @function [parent=#SimpleAudioEngine] isBackgroundMusicPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- brief The volume of the effects within the range of 0.0 as the minimum and 1.0 as the maximum. -- @function [parent=#SimpleAudioEngine] getEffectsVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- --- brief Indicates whether any background music can be played or not.
--- return true if background music can be played, otherwise false.
--- js willPlayMusic
--- lua willPlayMusic -- @function [parent=#SimpleAudioEngine] willPlayBackgroundMusic -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- brief Pause playing sound effect
--- param nSoundId The return value of function playEffect -- @function [parent=#SimpleAudioEngine] pauseEffect -- @param self --- @param #unsigned int nSoundId +-- @param #unsigned int int -------------------------------- --- brief Play sound effect with a file path, pitch, pan and gain
--- param pszFilePath The path of the effect file.
--- param bLoop Determines whether to loop the effect playing or not. The default value is false.
--- param pitch Frequency, normal value is 1.0. Will also change effect play time.
--- param pan Stereo effect, in the range of [-1..1] where -1 enables only left channel.
--- param gain Volume, in the range of [0..1]. The normal value is 1.
--- return the OpenAL source id
--- note Full support is under development, now there are limitations:
--- - no pitch effect on Samsung Galaxy S2 with OpenSL backend enabled;
--- - no pitch/pan/gain on emscrippten, win32, marmalade. -- @function [parent=#SimpleAudioEngine] playEffect -- @param self --- @param #char pszFilePath --- @param #bool bLoop --- @param #float pitch --- @param #float pan --- @param #float gain +-- @param #char char +-- @param #bool bool +-- @param #float float +-- @param #float float +-- @param #float float -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- --- brief Rewind playing background music
--- js rewindMusic
--- lua rewindMusic -- @function [parent=#SimpleAudioEngine] rewindBackgroundMusic -- @param self -------------------------------- --- brief Play background music
--- param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo
--- param bLoop Whether the background music loop or not
--- js playMusic
--- lua playMusic -- @function [parent=#SimpleAudioEngine] playBackgroundMusic -- @param self --- @param #char pszFilePath --- @param #bool bLoop +-- @param #char char +-- @param #bool bool -------------------------------- --- brief Resume all playing sound effect -- @function [parent=#SimpleAudioEngine] resumeAllEffects -- @param self -------------------------------- --- brief Set the volume of sound effects
--- param volume must be within the range of 0.0 as the minimum and 1.0 as the maximum. -- @function [parent=#SimpleAudioEngine] setEffectsVolume -- @param self --- @param #float volume +-- @param #float float -------------------------------- --- brief Stop playing sound effect
--- param nSoundId The return value of function playEffect -- @function [parent=#SimpleAudioEngine] stopEffect -- @param self --- @param #unsigned int nSoundId +-- @param #unsigned int int -------------------------------- --- brief Pause playing background music
--- js pauseMusic
--- lua pauseMusic -- @function [parent=#SimpleAudioEngine] pauseBackgroundMusic -- @param self -------------------------------- --- brief Pause all playing sound effect -- @function [parent=#SimpleAudioEngine] pauseAllEffects -- @param self -------------------------------- --- brief unload the preloaded effect from internal buffer
--- param pszFilePath The path of the effect file -- @function [parent=#SimpleAudioEngine] unloadEffect -- @param self --- @param #char pszFilePath +-- @param #char char -------------------------------- --- brief Resume playing sound effect
--- param nSoundId The return value of function playEffect -- @function [parent=#SimpleAudioEngine] resumeEffect -- @param self --- @param #unsigned int nSoundId +-- @param #unsigned int int -------------------------------- --- brief Release the shared Engine object
--- warning It must be called before the application exit, or a memory leak will be casued. -- @function [parent=#SimpleAudioEngine] end -- @param self -------------------------------- --- brief Get the shared Engine object,it will new one when first time be called -- @function [parent=#SimpleAudioEngine] getInstance -- @param self -- @return SimpleAudioEngine#SimpleAudioEngine ret (return value: cc.SimpleAudioEngine) diff --git a/cocos/scripting/lua-bindings/auto/api/Skeleton.lua b/cocos/scripting/lua-bindings/auto/api/Skeleton.lua index 51d4c7a9e6..893bef22d1 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skeleton.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skeleton.lua @@ -5,59 +5,49 @@ -- @parent_module sp -------------------------------- --- -- @function [parent=#Skeleton] setToSetupPose -- @param self -------------------------------- --- -- @function [parent=#Skeleton] setBlendFunc -- @param self --- @param #cc.BlendFunc func +-- @param #cc.BlendFunc blendfunc -------------------------------- --- -- @function [parent=#Skeleton] onDraw -- @param self --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#Skeleton] setSlotsToSetupPose -- @param self -------------------------------- --- -- @function [parent=#Skeleton] getBlendFunc -- @param self -- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) -------------------------------- --- -- @function [parent=#Skeleton] setSkin -- @param self --- @param #char skinName +-- @param #char char -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Skeleton] setBonesToSetupPose -- @param self -------------------------------- --- -- @function [parent=#Skeleton] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- -- @function [parent=#Skeleton] onEnter -- @param self -------------------------------- --- -- @function [parent=#Skeleton] onExit -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua b/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua index b4271af29d..3f5fb38b02 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua @@ -5,46 +5,39 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Skeleton3D] getBoneByName -- @param self --- @param #string id +-- @param #string str -- @return Bone3D#Bone3D ret (return value: cc.Bone3D) -------------------------------- --- -- @function [parent=#Skeleton3D] getRootBone -- @param self --- @param #int index +-- @param #int int -- @return Bone3D#Bone3D ret (return value: cc.Bone3D) -------------------------------- --- refresh bone world matrix -- @function [parent=#Skeleton3D] updateBoneMatrix -- @param self -------------------------------- --- get bone -- @function [parent=#Skeleton3D] getBoneByIndex -- @param self --- @param #unsigned int index +-- @param #unsigned int int -- @return Bone3D#Bone3D ret (return value: cc.Bone3D) -------------------------------- --- get & set root bone -- @function [parent=#Skeleton3D] getRootCount -- @param self -- @return long#long ret (return value: long) -------------------------------- --- get bone index -- @function [parent=#Skeleton3D] getBoneIndex -- @param self --- @param #cc.Bone3D bone +-- @param #cc.Bone3D bone3d -- @return int#int ret (return value: int) -------------------------------- --- get total bone count -- @function [parent=#Skeleton3D] getBoneCount -- @param self -- @return long#long ret (return value: long) diff --git a/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua b/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua index c57eb13010..a3cd0aad24 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua @@ -5,20 +5,17 @@ -- @parent_module sp -------------------------------- --- -- @function [parent=#SkeletonAnimation] setMix -- @param self --- @param #char fromAnimation --- @param #char toAnimation --- @param #float duration +-- @param #char char +-- @param #char char +-- @param #float float -------------------------------- --- -- @function [parent=#SkeletonAnimation] clearTracks -- @param self -------------------------------- --- -- @function [parent=#SkeletonAnimation] clearTrack -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/SkewBy.lua b/cocos/scripting/lua-bindings/auto/api/SkewBy.lua index 637696e2cc..4aeb6a83ac 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkewBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkewBy.lua @@ -5,28 +5,24 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#SkewBy] create -- @param self --- @param #float t --- @param #float deltaSkewX --- @param #float deltaSkewY +-- @param #float float +-- @param #float float +-- @param #float float -- @return SkewBy#SkewBy ret (return value: cc.SkewBy) -------------------------------- --- -- @function [parent=#SkewBy] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#SkewBy] clone -- @param self -- @return SkewBy#SkewBy ret (return value: cc.SkewBy) -------------------------------- --- -- @function [parent=#SkewBy] reverse -- @param self -- @return SkewBy#SkewBy ret (return value: cc.SkewBy) diff --git a/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua b/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua index 53b967470e..3616dd1b88 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua @@ -5,49 +5,41 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#SkewFrame] getSkewY -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#SkewFrame] setSkewX -- @param self --- @param #float skewx +-- @param #float float -------------------------------- --- -- @function [parent=#SkewFrame] setSkewY -- @param self --- @param #float skewy +-- @param #float float -------------------------------- --- -- @function [parent=#SkewFrame] getSkewX -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#SkewFrame] create -- @param self -- @return SkewFrame#SkewFrame ret (return value: ccs.SkewFrame) -------------------------------- --- -- @function [parent=#SkewFrame] apply -- @param self --- @param #float percent +-- @param #float float -------------------------------- --- -- @function [parent=#SkewFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#SkewFrame] SkewFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/SkewTo.lua b/cocos/scripting/lua-bindings/auto/api/SkewTo.lua index be1840199a..65979d1638 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkewTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkewTo.lua @@ -5,36 +5,31 @@ -- @parent_module cc -------------------------------- --- creates the action -- @function [parent=#SkewTo] create -- @param self --- @param #float t --- @param #float sx --- @param #float sy +-- @param #float float +-- @param #float float +-- @param #float float -- @return SkewTo#SkewTo ret (return value: cc.SkewTo) -------------------------------- --- -- @function [parent=#SkewTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#SkewTo] clone -- @param self -- @return SkewTo#SkewTo ret (return value: cc.SkewTo) -------------------------------- --- -- @function [parent=#SkewTo] reverse -- @param self -- @return SkewTo#SkewTo ret (return value: cc.SkewTo) -------------------------------- --- -- @function [parent=#SkewTo] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Skin.lua b/cocos/scripting/lua-bindings/auto/api/Skin.lua index c0f870f33f..10b1e77183 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skin.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skin.lua @@ -5,44 +5,37 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#Skin] getBone -- @param self -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- --- -- @function [parent=#Skin] getNodeToWorldTransformAR -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- -- @function [parent=#Skin] initWithFile -- @param self --- @param #string filename +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Skin] getDisplayName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Skin] updateArmatureTransform -- @param self -------------------------------- --- -- @function [parent=#Skin] initWithSpriteFrameName -- @param self --- @param #string spriteFrameName +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Skin] setBone -- @param self -- @param #ccs.Bone bone @@ -52,37 +45,32 @@ -- @overload self -- @function [parent=#Skin] create -- @param self --- @param #string pszFileName +-- @param #string str -- @return Skin#Skin ret (retunr value: ccs.Skin) -------------------------------- --- -- @function [parent=#Skin] createWithSpriteFrameName -- @param self --- @param #string pszSpriteFrameName +-- @param #string str -- @return Skin#Skin ret (return value: ccs.Skin) -------------------------------- --- -- @function [parent=#Skin] updateTransform -- @param self -------------------------------- --- -- @function [parent=#Skin] getNodeToWorldTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- --- -- @function [parent=#Skin] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- js ctor -- @function [parent=#Skin] Skin -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Slider.lua b/cocos/scripting/lua-bindings/auto/api/Slider.lua index 69dc0e637e..ade0016d08 100644 --- a/cocos/scripting/lua-bindings/auto/api/Slider.lua +++ b/cocos/scripting/lua-bindings/auto/api/Slider.lua @@ -5,174 +5,130 @@ -- @parent_module ccui -------------------------------- --- Changes the progress direction of slider.
--- param percent percent value from 1 to 100. -- @function [parent=#Slider] setPercent -- @param self --- @param #int percent +-- @param #int int -------------------------------- --- Load dark state texture for slider ball.
--- param disabled dark state texture.
--- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTextureDisabled -- @param self --- @param #string disabled --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Load normal state texture for slider ball.
--- param normal normal state texture.
--- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTextureNormal -- @param self --- @param #string normal --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Load texture for slider bar.
--- param fileName file name of texture.
--- param texType @see TextureResType -- @function [parent=#Slider] loadBarTexture -- @param self --- @param #string fileName --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Load dark state texture for slider progress bar.
--- param fileName file path of texture.
--- param texType @see TextureResType -- @function [parent=#Slider] loadProgressBarTexture -- @param self --- @param #string fileName --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Load textures for slider ball.
--- param slider ball normal normal state texture.
--- param slider ball selected selected state texture.
--- param slider ball disabled dark state texture.
--- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTextures -- @param self --- @param #string normal --- @param #string pressed --- @param #string disabled --- @param #int texType +-- @param #string str +-- @param #string str +-- @param #string str +-- @param #int texturerestype -------------------------------- --- Sets capinsets for slider, if slider is using scale9 renderer.
--- param capInsets capinsets for slider -- @function [parent=#Slider] setCapInsetProgressBarRebderer -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -------------------------------- --- Sets capinsets for slider, if slider is using scale9 renderer.
--- param capInsets capinsets for slider -- @function [parent=#Slider] setCapInsetsBarRenderer -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -------------------------------- --- -- @function [parent=#Slider] getCapInsetsProgressBarRebderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- Sets if slider is using scale9 renderer.
--- param true that using scale9 renderer, false otherwise. -- @function [parent=#Slider] setScale9Enabled -- @param self --- @param #bool able +-- @param #bool bool -------------------------------- --- Sets capinsets for slider, if slider is using scale9 renderer.
--- param capInsets capinsets for slider -- @function [parent=#Slider] setCapInsets -- @param self --- @param #rect_table capInsets +-- @param #rect_table rect -------------------------------- --- -- @function [parent=#Slider] addEventListener -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- Load selected state texture for slider ball.
--- param selected selected state texture.
--- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTexturePressed -- @param self --- @param #string pressed --- @param #int texType +-- @param #string str +-- @param #int texturerestype -------------------------------- --- -- @function [parent=#Slider] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Slider] getCapInsetsBarRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- Gets the progress direction of slider.
--- return percent percent value from 1 to 100. -- @function [parent=#Slider] getPercent -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Allocates and initializes. -- @function [parent=#Slider] create -- @param self -- @return Slider#Slider ret (return value: ccui.Slider) -------------------------------- --- -- @function [parent=#Slider] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#Slider] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#Slider] ignoreContentAdaptWithSize -- @param self --- @param #bool ignore +-- @param #bool bool -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#Slider] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Slider] hitTest -- @param self --- @param #vec2_table pt +-- @param #vec2_table vec2 -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Slider] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Default constructor -- @function [parent=#Slider] Slider -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Spawn.lua b/cocos/scripting/lua-bindings/auto/api/Spawn.lua index 1bdc516a1d..8188b52d7c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Spawn.lua +++ b/cocos/scripting/lua-bindings/auto/api/Spawn.lua @@ -5,32 +5,27 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Spawn] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#Spawn] clone -- @param self -- @return Spawn#Spawn ret (return value: cc.Spawn) -------------------------------- --- -- @function [parent=#Spawn] stop -- @param self -------------------------------- --- -- @function [parent=#Spawn] reverse -- @param self -- @return Spawn#Spawn ret (return value: cc.Spawn) -------------------------------- --- -- @function [parent=#Spawn] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Speed.lua b/cocos/scripting/lua-bindings/auto/api/Speed.lua index 20fdf2985b..f45b157ffa 100644 --- a/cocos/scripting/lua-bindings/auto/api/Speed.lua +++ b/cocos/scripting/lua-bindings/auto/api/Speed.lua @@ -5,68 +5,57 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Speed] setInnerAction -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -------------------------------- --- alter the speed of the inner function in runtime -- @function [parent=#Speed] setSpeed -- @param self --- @param #float speed +-- @param #float float -------------------------------- --- -- @function [parent=#Speed] getInnerAction -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#Speed] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- --- create the action -- @function [parent=#Speed] create -- @param self --- @param #cc.ActionInterval action --- @param #float speed +-- @param #cc.ActionInterval actioninterval +-- @param #float float -- @return Speed#Speed ret (return value: cc.Speed) -------------------------------- --- -- @function [parent=#Speed] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#Speed] reverse -- @param self -- @return Speed#Speed ret (return value: cc.Speed) -------------------------------- --- -- @function [parent=#Speed] clone -- @param self -- @return Speed#Speed ret (return value: cc.Speed) -------------------------------- --- -- @function [parent=#Speed] stop -- @param self -------------------------------- --- -- @function [parent=#Speed] step -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#Speed] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/SplitCols.lua b/cocos/scripting/lua-bindings/auto/api/SplitCols.lua index 852bd2a2fc..96730e20c7 100644 --- a/cocos/scripting/lua-bindings/auto/api/SplitCols.lua +++ b/cocos/scripting/lua-bindings/auto/api/SplitCols.lua @@ -5,29 +5,25 @@ -- @parent_module cc -------------------------------- --- creates the action with the number of columns to split and the duration -- @function [parent=#SplitCols] create -- @param self --- @param #float duration --- @param #unsigned int cols +-- @param #float float +-- @param #unsigned int int -- @return SplitCols#SplitCols ret (return value: cc.SplitCols) -------------------------------- --- -- @function [parent=#SplitCols] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#SplitCols] clone -- @param self -- @return SplitCols#SplitCols ret (return value: cc.SplitCols) -------------------------------- --- -- @function [parent=#SplitCols] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SplitRows.lua b/cocos/scripting/lua-bindings/auto/api/SplitRows.lua index 2dc41380a3..1e362c2676 100644 --- a/cocos/scripting/lua-bindings/auto/api/SplitRows.lua +++ b/cocos/scripting/lua-bindings/auto/api/SplitRows.lua @@ -5,29 +5,25 @@ -- @parent_module cc -------------------------------- --- creates the action with the number of rows to split and the duration -- @function [parent=#SplitRows] create -- @param self --- @param #float duration --- @param #unsigned int rows +-- @param #float float +-- @param #unsigned int int -- @return SplitRows#SplitRows ret (return value: cc.SplitRows) -------------------------------- --- -- @function [parent=#SplitRows] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#SplitRows] clone -- @param self -- @return SplitRows#SplitRows ret (return value: cc.SplitRows) -------------------------------- --- -- @function [parent=#SplitRows] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Sprite.lua index 1450fafc8d..7be402618d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite.lua @@ -9,57 +9,46 @@ -- @overload self, string -- @function [parent=#Sprite] setSpriteFrame -- @param self --- @param #string spriteFrameName +-- @param #string str -------------------------------- -- @overload self, cc.Texture2D -- @overload self, string -- @function [parent=#Sprite] setTexture -- @param self --- @param #string filename +-- @param #string str -------------------------------- --- returns the Texture2D object used by the sprite -- @function [parent=#Sprite] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- --- Sets whether the sprite should be flipped vertically or not.
--- param flippedY true if the sprite should be flipped vertically, false otherwise. -- @function [parent=#Sprite] setFlippedY -- @param self --- @param #bool flippedY +-- @param #bool bool -------------------------------- --- Sets whether the sprite should be flipped horizontally or not.
--- param flippedX true if the sprite should be flipped horizontally, false otherwise. -- @function [parent=#Sprite] setFlippedX -- @param self --- @param #bool flippedX +-- @param #bool bool -------------------------------- --- Returns the batch node object if this sprite is rendered by SpriteBatchNode
--- return The SpriteBatchNode object if this sprite is rendered by SpriteBatchNode,
--- nullptr if the sprite isn't used batch node. -- @function [parent=#Sprite] getBatchNode -- @param self -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- --- Gets the offset position of the sprite. Calculated automatically by editors like Zwoptex. -- @function [parent=#Sprite] getOffsetPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#Sprite] removeAllChildrenWithCleanup -- @param self --- @param #bool cleanup +-- @param #bool bool -------------------------------- --- Updates the quad according the rotation, position, scale values. -- @function [parent=#Sprite] updateTransform -- @param self @@ -69,121 +58,82 @@ -- @function [parent=#Sprite] setTextureRect -- @param self -- @param #rect_table rect --- @param #bool rotated --- @param #size_table untrimmedSize +-- @param #bool bool +-- @param #size_table size -------------------------------- --- Returns whether or not a SpriteFrame is being displayed -- @function [parent=#Sprite] isFrameDisplayed -- @param self --- @param #cc.SpriteFrame pFrame +-- @param #cc.SpriteFrame spriteframe -- @return bool#bool ret (return value: bool) -------------------------------- --- Returns the index used on the TextureAtlas. -- @function [parent=#Sprite] getAtlasIndex -- @param self -- @return long#long ret (return value: long) -------------------------------- --- Sets the batch node to sprite
--- warning This method is not recommended for game developers. Sample code for using batch node
--- code
--- SpriteBatchNode *batch = SpriteBatchNode::create("Images/grossini_dance_atlas.png", 15);
--- Sprite *sprite = Sprite::createWithTexture(batch->getTexture(), Rect(0, 0, 57, 57));
--- batch->addChild(sprite);
--- layer->addChild(batch);
--- endcode -- @function [parent=#Sprite] setBatchNode -- @param self --- @param #cc.SpriteBatchNode spriteBatchNode +-- @param #cc.SpriteBatchNode spritebatchnode -------------------------------- --- / @{/ @name Animation methods
--- Changes the display frame with animation name and index.
--- The animation name will be get from the AnimationCache -- @function [parent=#Sprite] setDisplayFrameWithAnimationName -- @param self --- @param #string animationName --- @param #long frameIndex +-- @param #string str +-- @param #long long -------------------------------- --- Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode -- @function [parent=#Sprite] setTextureAtlas -- @param self --- @param #cc.TextureAtlas pobTextureAtlas +-- @param #cc.TextureAtlas textureatlas -------------------------------- --- Returns the current displayed frame. -- @function [parent=#Sprite] getSpriteFrame -- @param self -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- --- Whether or not the Sprite needs to be updated in the Atlas.
--- return true if the sprite needs to be updated in the Atlas, false otherwise. -- @function [parent=#Sprite] isDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Sets the index used on the TextureAtlas.
--- warning Don't modify this value unless you know what you are doing -- @function [parent=#Sprite] setAtlasIndex -- @param self --- @param #long atlasIndex +-- @param #long long -------------------------------- --- Makes the Sprite to be updated in the Atlas. -- @function [parent=#Sprite] setDirty -- @param self --- @param #bool dirty +-- @param #bool bool -------------------------------- --- Returns whether or not the texture rectangle is rotated. -- @function [parent=#Sprite] isTextureRectRotated -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Returns the rect of the Sprite in points -- @function [parent=#Sprite] getTextureRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode -- @function [parent=#Sprite] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- --- Returns the flag which indicates whether the sprite is flipped horizontally or not.
--- It only flips the texture of the sprite, and not the texture of the sprite's children.
--- Also, flipping the texture doesn't alter the anchorPoint.
--- If you want to flip the anchorPoint too, and/or to flip the children too use:
--- sprite->setScaleX(sprite->getScaleX() * -1);
--- return true if the sprite is flipped horizontally, false otherwise. -- @function [parent=#Sprite] isFlippedX -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Return the flag which indicates whether the sprite is flipped vertically or not.
--- It only flips the texture of the sprite, and not the texture of the sprite's children.
--- Also, flipping the texture doesn't alter the anchorPoint.
--- If you want to flip the anchorPoint too, and/or to flip the children too use:
--- sprite->setScaleY(sprite->getScaleY() * -1);
--- return true if the sprite is flipped vertically, false otherwise. -- @function [parent=#Sprite] isFlippedY -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Sets the vertex rect.
--- It will be called internally by setTextureRect.
--- Useful if you want to create 2x images from SD images in Retina Display.
--- Do not call it manually. Use setTextureRect instead. -- @function [parent=#Sprite] setVertexRect -- @param self -- @param #rect_table rect @@ -194,7 +144,7 @@ -- @overload self, string, rect_table -- @function [parent=#Sprite] create -- @param self --- @param #string filename +-- @param #string str -- @param #rect_table rect -- @return Sprite#Sprite ret (retunr value: cc.Sprite) @@ -203,157 +153,131 @@ -- @overload self, cc.Texture2D -- @function [parent=#Sprite] createWithTexture -- @param self --- @param #cc.Texture2D texture +-- @param #cc.Texture2D texture2d -- @param #rect_table rect --- @param #bool rotated +-- @param #bool bool -- @return Sprite#Sprite ret (retunr value: cc.Sprite) -------------------------------- --- Creates a sprite with an sprite frame name.
--- A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param.
--- If the SpriteFrame doesn't exist it will raise an exception.
--- param spriteFrameName A null terminated string which indicates the sprite frame name.
--- return An autoreleased sprite object -- @function [parent=#Sprite] createWithSpriteFrameName -- @param self --- @param #string spriteFrameName +-- @param #string str -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- Creates a sprite with an sprite frame.
--- param spriteFrame A sprite frame which involves a texture and a rect
--- return An autoreleased sprite object -- @function [parent=#Sprite] createWithSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteFrame +-- @param #cc.SpriteFrame spriteframe -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- -- @function [parent=#Sprite] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- -- @overload self, cc.Node, int, string -- @overload self, cc.Node, int, int -- @function [parent=#Sprite] addChild -- @param self --- @param #cc.Node child --- @param #int zOrder --- @param #int tag +-- @param #cc.Node node +-- @param #int int +-- @param #int int -------------------------------- --- -- @function [parent=#Sprite] setScaleY -- @param self --- @param #float scaleY +-- @param #float float -------------------------------- --- / @{/ @name Functions inherited from Node -- @function [parent=#Sprite] setScaleX -- @param self --- @param #float scaleX +-- @param #float float -------------------------------- --- -- @function [parent=#Sprite] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Sprite] setPositionZ -- @param self --- @param #float positionZ +-- @param #float float -------------------------------- --- -- @function [parent=#Sprite] setAnchorPoint -- @param self --- @param #vec2_table anchor +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#Sprite] setRotationSkewX -- @param self --- @param #float rotationX +-- @param #float float -------------------------------- --- / @} -- @function [parent=#Sprite] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Sprite] setRotationSkewY -- @param self --- @param #float rotationY +-- @param #float float -------------------------------- -- @overload self, float -- @overload self, float, float -- @function [parent=#Sprite] setScale -- @param self --- @param #float scaleX --- @param #float scaleY +-- @param #float float +-- @param #float float -------------------------------- --- -- @function [parent=#Sprite] reorderChild -- @param self --- @param #cc.Node child --- @param #int zOrder +-- @param #cc.Node node +-- @param #int int -------------------------------- --- -- @function [parent=#Sprite] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleanup +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- -- @function [parent=#Sprite] sortAllChildren -- @param self -------------------------------- --- -- @function [parent=#Sprite] setOpacityModifyRGB -- @param self --- @param #bool modify +-- @param #bool bool -------------------------------- --- -- @function [parent=#Sprite] setRotation -- @param self --- @param #float rotation +-- @param #float float -------------------------------- --- -- @function [parent=#Sprite] setSkewY -- @param self --- @param #float sy +-- @param #float float -------------------------------- --- -- @function [parent=#Sprite] setVisible -- @param self --- @param #bool bVisible +-- @param #bool bool -------------------------------- --- -- @function [parent=#Sprite] setSkewX -- @param self --- @param #float sx +-- @param #float float -------------------------------- --- -- @function [parent=#Sprite] ignoreAnchorPointForPosition -- @param self --- @param #bool value +-- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua index 002556c277..281ad2ac27 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua @@ -5,78 +5,67 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Sprite3D] setCullFaceEnabled -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- -- @overload self, cc.Texture2D -- @overload self, string -- @function [parent=#Sprite3D] setTexture -- @param self --- @param #string texFile +-- @param #string str -------------------------------- --- remove all attach nodes -- @function [parent=#Sprite3D] removeAllAttachNode -- @param self -------------------------------- --- -- @function [parent=#Sprite3D] setBlendFunc -- @param self --- @param #cc.BlendFunc blendFunc +-- @param #cc.BlendFunc blendfunc -------------------------------- --- get mesh -- @function [parent=#Sprite3D] getMesh -- @param self -- @return Mesh#Mesh ret (return value: cc.Mesh) -------------------------------- --- -- @function [parent=#Sprite3D] getBlendFunc -- @param self -- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) -------------------------------- --- -- @function [parent=#Sprite3D] setCullFace -- @param self --- @param #unsigned int cullFace +-- @param #unsigned int int -------------------------------- --- remove attach node -- @function [parent=#Sprite3D] removeAttachNode -- @param self --- @param #string boneName +-- @param #string str -------------------------------- --- get SubMeshState by index -- @function [parent=#Sprite3D] getMeshByIndex -- @param self --- @param #int index +-- @param #int int -- @return Mesh#Mesh ret (return value: cc.Mesh) -------------------------------- --- get SubMeshState by Name -- @function [parent=#Sprite3D] getMeshByName -- @param self --- @param #string name +-- @param #string str -- @return Mesh#Mesh ret (return value: cc.Mesh) -------------------------------- --- -- @function [parent=#Sprite3D] getSkeleton -- @param self -- @return Skeleton3D#Skeleton3D ret (return value: cc.Skeleton3D) -------------------------------- --- get AttachNode by bone name, return nullptr if not exist -- @function [parent=#Sprite3D] getAttachNode -- @param self --- @param #string boneName +-- @param #string str -- @return AttachNode#AttachNode ret (return value: cc.AttachNode) -------------------------------- @@ -84,25 +73,21 @@ -- @overload self, string -- @function [parent=#Sprite3D] create -- @param self --- @param #string modelPath --- @param #string texturePath +-- @param #string str +-- @param #string str -- @return Sprite3D#Sprite3D ret (retunr value: cc.Sprite3D) -------------------------------- --- Returns 2d bounding-box
--- Note: the bouding-box is just get from the AABB which as Z=0, so that is not very accurate. -- @function [parent=#Sprite3D] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- set GLProgramState, you should bind attributes by yourself -- @function [parent=#Sprite3D] setGLProgramState -- @param self --- @param #cc.GLProgramState glProgramState +-- @param #cc.GLProgramState glprogramstate -------------------------------- --- just rember bind attributes -- @function [parent=#Sprite3D] setGLProgram -- @param self -- @param #cc.GLProgram glprogram diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua b/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua index 51e356b39d..66321568dd 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua @@ -5,131 +5,107 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#SpriteBatchNode] appendChild -- @param self -- @param #cc.Sprite sprite -------------------------------- --- -- @function [parent=#SpriteBatchNode] addSpriteWithoutQuad -- @param self --- @param #cc.Sprite child --- @param #int z --- @param #int aTag +-- @param #cc.Sprite sprite +-- @param #int int +-- @param #int int -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- --- -- @function [parent=#SpriteBatchNode] reorderBatch -- @param self --- @param #bool reorder +-- @param #bool bool -------------------------------- --- -- @function [parent=#SpriteBatchNode] removeAllChildrenWithCleanup -- @param self --- @param #bool cleanup +-- @param #bool bool -------------------------------- --- -- @function [parent=#SpriteBatchNode] lowestAtlasIndexInChild -- @param self -- @param #cc.Sprite sprite -- @return long#long ret (return value: long) -------------------------------- --- -- @function [parent=#SpriteBatchNode] atlasIndexForChild -- @param self -- @param #cc.Sprite sprite --- @param #int z +-- @param #int int -- @return long#long ret (return value: long) -------------------------------- --- sets the TextureAtlas object -- @function [parent=#SpriteBatchNode] setTextureAtlas -- @param self --- @param #cc.TextureAtlas textureAtlas +-- @param #cc.TextureAtlas textureatlas -------------------------------- --- -- @function [parent=#SpriteBatchNode] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- --- -- @function [parent=#SpriteBatchNode] increaseAtlasCapacity -- @param self -------------------------------- --- returns the TextureAtlas object -- @function [parent=#SpriteBatchNode] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- --- Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.
--- This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.
--- For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont) -- @function [parent=#SpriteBatchNode] insertQuadFromSprite -- @param self -- @param #cc.Sprite sprite --- @param #long index +-- @param #long long -------------------------------- --- -- @function [parent=#SpriteBatchNode] setTexture -- @param self --- @param #cc.Texture2D texture +-- @param #cc.Texture2D texture2d -------------------------------- --- -- @function [parent=#SpriteBatchNode] rebuildIndexInOrder -- @param self --- @param #cc.Sprite parent --- @param #long index +-- @param #cc.Sprite sprite +-- @param #long long -- @return long#long ret (return value: long) -------------------------------- --- -- @function [parent=#SpriteBatchNode] highestAtlasIndexInChild -- @param self -- @param #cc.Sprite sprite -- @return long#long ret (return value: long) -------------------------------- --- removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter.
--- warning Removing a child from a SpriteBatchNode is very slow -- @function [parent=#SpriteBatchNode] removeChildAtIndex -- @param self --- @param #long index --- @param #bool doCleanup +-- @param #long long +-- @param #bool bool -------------------------------- --- -- @function [parent=#SpriteBatchNode] removeSpriteFromAtlas -- @param self -- @param #cc.Sprite sprite -------------------------------- --- creates a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.
--- The capacity will be increased in 33% in runtime if it run out of space.
--- The file will be loaded using the TextureMgr. -- @function [parent=#SpriteBatchNode] create -- @param self --- @param #string fileImage --- @param #long capacity +-- @param #string str +-- @param #long long -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- --- creates a SpriteBatchNode with a texture2d and capacity of children.
--- The capacity will be increased in 33% in runtime if it run out of space. -- @function [parent=#SpriteBatchNode] createWithTexture -- @param self --- @param #cc.Texture2D tex --- @param #long capacity +-- @param #cc.Texture2D texture2d +-- @param #long long -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- @@ -137,49 +113,43 @@ -- @overload self, cc.Node, int, int -- @function [parent=#SpriteBatchNode] addChild -- @param self --- @param #cc.Node child --- @param #int zOrder --- @param #int tag +-- @param #cc.Node node +-- @param #int int +-- @param #int int -------------------------------- --- -- @function [parent=#SpriteBatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#SpriteBatchNode] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#SpriteBatchNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table parentTransform --- @param #unsigned int parentFlags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#SpriteBatchNode] sortAllChildren -- @param self -------------------------------- --- -- @function [parent=#SpriteBatchNode] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleanup +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- -- @function [parent=#SpriteBatchNode] reorderChild -- @param self --- @param #cc.Node child --- @param #int zOrder +-- @param #cc.Node node +-- @param #int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua b/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua index 4b0c6c07bc..1f7cc32b52 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua @@ -5,19 +5,16 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#SpriteDisplayData] copy -- @param self --- @param #ccs.DisplayData displayData +-- @param #ccs.DisplayData displaydata -------------------------------- --- -- @function [parent=#SpriteDisplayData] create -- @param self -- @return SpriteDisplayData#SpriteDisplayData ret (return value: ccs.SpriteDisplayData) -------------------------------- --- js ctor -- @function [parent=#SpriteDisplayData] SpriteDisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua b/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua index b71c6eeaad..cca90af1d0 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua @@ -5,103 +5,86 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#SpriteFrame] clone -- @param self -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- --- -- @function [parent=#SpriteFrame] setRotated -- @param self --- @param #bool rotated +-- @param #bool bool -------------------------------- --- set texture of the frame, the texture is retained -- @function [parent=#SpriteFrame] setTexture -- @param self --- @param #cc.Texture2D pobTexture +-- @param #cc.Texture2D texture2d -------------------------------- --- -- @function [parent=#SpriteFrame] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#SpriteFrame] setRectInPixels -- @param self --- @param #rect_table rectInPixels +-- @param #rect_table rect -------------------------------- --- get texture of the frame -- @function [parent=#SpriteFrame] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- --- get rect of the frame -- @function [parent=#SpriteFrame] getRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- set offset of the frame -- @function [parent=#SpriteFrame] setOffsetInPixels -- @param self --- @param #vec2_table offsetInPixels +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#SpriteFrame] getRectInPixels -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- set original size of the trimmed image -- @function [parent=#SpriteFrame] setOriginalSize -- @param self --- @param #size_table sizeInPixels +-- @param #size_table size -------------------------------- --- get original size of the trimmed image -- @function [parent=#SpriteFrame] getOriginalSizeInPixels -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- set original size of the trimmed image -- @function [parent=#SpriteFrame] setOriginalSizeInPixels -- @param self --- @param #size_table sizeInPixels +-- @param #size_table size -------------------------------- --- -- @function [parent=#SpriteFrame] setOffset -- @param self --- @param #vec2_table offsets +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#SpriteFrame] isRotated -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- set rect of the frame -- @function [parent=#SpriteFrame] setRect -- @param self -- @param #rect_table rect -------------------------------- --- get offset of the frame -- @function [parent=#SpriteFrame] getOffsetInPixels -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- get original size of the trimmed image -- @function [parent=#SpriteFrame] getOriginalSize -- @param self -- @return size_table#size_table ret (return value: size_table) @@ -111,11 +94,11 @@ -- @overload self, string, rect_table -- @function [parent=#SpriteFrame] create -- @param self --- @param #string filename +-- @param #string str -- @param #rect_table rect --- @param #bool rotated --- @param #vec2_table offset --- @param #size_table originalSize +-- @param #bool bool +-- @param #vec2_table vec2 +-- @param #size_table size -- @return SpriteFrame#SpriteFrame ret (retunr value: cc.SpriteFrame) -------------------------------- @@ -123,11 +106,11 @@ -- @overload self, cc.Texture2D, rect_table -- @function [parent=#SpriteFrame] createWithTexture -- @param self --- @param #cc.Texture2D pobTexture +-- @param #cc.Texture2D texture2d -- @param #rect_table rect --- @param #bool rotated --- @param #vec2_table offset --- @param #size_table originalSize +-- @param #bool bool +-- @param #vec2_table vec2 +-- @param #size_table size -- @return SpriteFrame#SpriteFrame ret (retunr value: cc.SpriteFrame) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua b/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua index 8b6ceba0a9..33e686b786 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua @@ -5,13 +5,10 @@ -- @parent_module cc -------------------------------- --- Adds multiple Sprite Frames from a plist file content. The texture will be associated with the created sprite frames.
--- js addSpriteFrames
--- lua addSpriteFrames -- @function [parent=#SpriteFrameCache] addSpriteFramesWithFileContent -- @param self --- @param #string plist_content --- @param #cc.Texture2D texture +-- @param #string str +-- @param #cc.Texture2D texture2d -------------------------------- -- @overload self, string, string @@ -19,88 +16,59 @@ -- @overload self, string, cc.Texture2D -- @function [parent=#SpriteFrameCache] addSpriteFramesWithFile -- @param self --- @param #string plist --- @param #cc.Texture2D texture +-- @param #string str +-- @param #cc.Texture2D texture2d -------------------------------- --- Adds an sprite frame with a given name.
--- If the name already exists, then the contents of the old name will be replaced with the new one. -- @function [parent=#SpriteFrameCache] addSpriteFrame -- @param self --- @param #cc.SpriteFrame frame --- @param #string frameName +-- @param #cc.SpriteFrame spriteframe +-- @param #string str -------------------------------- --- Removes unused sprite frames.
--- Sprite Frames that have a retain count of 1 will be deleted.
--- It is convenient to call this method after when starting a new Scene. -- @function [parent=#SpriteFrameCache] removeUnusedSpriteFrames -- @param self -------------------------------- --- Returns an Sprite Frame that was previously added.
--- If the name is not found it will return nil.
--- You should retain the returned copy if you are going to use it.
--- js getSpriteFrame
--- lua getSpriteFrame -- @function [parent=#SpriteFrameCache] getSpriteFrameByName -- @param self --- @param #string name +-- @param #string str -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- --- Removes multiple Sprite Frames from a plist file.
--- Sprite Frames stored in this file will be removed.
--- It is convenient to call this method when a specific texture needs to be removed.
--- since v0.99.5 -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromFile -- @param self --- @param #string plist +-- @param #string str -------------------------------- --- -- @function [parent=#SpriteFrameCache] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Purges the dictionary of loaded sprite frames.
--- Call this method if you receive the "Memory Warning".
--- In the short term: it will free some resources preventing your app from being killed.
--- In the medium term: it will allocate more resources.
--- In the long term: it will be the same. -- @function [parent=#SpriteFrameCache] removeSpriteFrames -- @param self -------------------------------- --- Removes all Sprite Frames associated with the specified textures.
--- It is convenient to call this method when a specific texture needs to be removed.
--- since v0.995. -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromTexture -- @param self --- @param #cc.Texture2D texture +-- @param #cc.Texture2D texture2d -------------------------------- --- Removes multiple Sprite Frames from a plist file content.
--- Sprite Frames stored in this file will be removed.
--- It is convenient to call this method when a specific texture needs to be removed. -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromFileContent -- @param self --- @param #string plist_content +-- @param #string str -------------------------------- --- Deletes an sprite frame from the sprite frame cache. -- @function [parent=#SpriteFrameCache] removeSpriteFrameByName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- Destroys the cache. It releases all the Sprite Frames and the retained instance. -- @function [parent=#SpriteFrameCache] destroyInstance -- @param self -------------------------------- --- Returns the shared instance of the Sprite Frame cache -- @function [parent=#SpriteFrameCache] getInstance -- @param self -- @return SpriteFrameCache#SpriteFrameCache ret (return value: cc.SpriteFrameCache) diff --git a/cocos/scripting/lua-bindings/auto/api/StopGrid.lua b/cocos/scripting/lua-bindings/auto/api/StopGrid.lua index 7859d30d7f..7dd7245795 100644 --- a/cocos/scripting/lua-bindings/auto/api/StopGrid.lua +++ b/cocos/scripting/lua-bindings/auto/api/StopGrid.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- Allocates and initializes the action -- @function [parent=#StopGrid] create -- @param self -- @return StopGrid#StopGrid ret (return value: cc.StopGrid) -------------------------------- --- -- @function [parent=#StopGrid] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#StopGrid] clone -- @param self -- @return StopGrid#StopGrid ret (return value: cc.StopGrid) -------------------------------- --- -- @function [parent=#StopGrid] reverse -- @param self -- @return StopGrid#StopGrid ret (return value: cc.StopGrid) diff --git a/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua b/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua index 92d5b7e46b..315b1a4f20 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua @@ -5,53 +5,45 @@ -- @parent_module ccexp -------------------------------- --- returns the position in points of a given tile coordinate -- @function [parent=#TMXLayer] getPositionAt -- @param self --- @param #vec2_table tileCoordinate +-- @param #vec2_table vec2 -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#TMXLayer] setLayerOrientation -- @param self --- @param #int orientation +-- @param #int int -------------------------------- --- size of the layer in tiles -- @function [parent=#TMXLayer] getLayerSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#TMXLayer] setMapTileSize -- @param self -- @param #size_table size -------------------------------- --- Layer orientation, which is the same as the map orientation -- @function [parent=#TMXLayer] getLayerOrientation -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#TMXLayer] setProperties -- @param self --- @param #map_table properties +-- @param #map_table map -------------------------------- --- -- @function [parent=#TMXLayer] setLayerName -- @param self --- @param #string layerName +-- @param #string str -------------------------------- --- removes a tile at given tile coordinate -- @function [parent=#TMXLayer] removeTileAt -- @param self --- @param #vec2_table tileCoordinate +-- @param #vec2_table vec2 -------------------------------- -- @overload self @@ -61,107 +53,89 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- --- Creates the tiles -- @function [parent=#TMXLayer] setupTiles -- @param self -------------------------------- --- -- @function [parent=#TMXLayer] setupTileSprite -- @param self -- @param #cc.Sprite sprite --- @param #vec2_table pos --- @param #int gid +-- @param #vec2_table vec2 +-- @param #int int -------------------------------- -- @overload self, int, vec2_table, int -- @overload self, int, vec2_table -- @function [parent=#TMXLayer] setTileGID -- @param self --- @param #int gid --- @param #vec2_table tileCoordinate --- @param #int flags +-- @param #int int +-- @param #vec2_table vec2 +-- @param #int tmxtileflags_ -------------------------------- --- size of the map's tile (could be different from the tile's size) -- @function [parent=#TMXLayer] getMapTileSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- return the value for the specific property name -- @function [parent=#TMXLayer] getProperty -- @param self --- @param #string propertyName +-- @param #string str -- @return Value#Value ret (return value: cc.Value) -------------------------------- --- -- @function [parent=#TMXLayer] setLayerSize -- @param self -- @param #size_table size -------------------------------- --- -- @function [parent=#TMXLayer] getLayerName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TMXLayer] setTileSet -- @param self --- @param #cc.TMXTilesetInfo info +-- @param #cc.TMXTilesetInfo tmxtilesetinfo -------------------------------- --- Tileset information for the layer -- @function [parent=#TMXLayer] getTileSet -- @param self -- @return TMXTilesetInfo#TMXTilesetInfo ret (return value: cc.TMXTilesetInfo) -------------------------------- --- returns the tile (Sprite) at a given a tile coordinate.
--- The returned Sprite will be already added to the TMXLayer. Don't add it again.
--- The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.
--- You can remove either by calling:
--- - layer->removeChild(sprite, cleanup); -- @function [parent=#TMXLayer] getTileAt -- @param self --- @param #vec2_table tileCoordinate +-- @param #vec2_table vec2 -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- --- creates a FastTMXLayer with an tileset info, a layer info and a map info -- @function [parent=#TMXLayer] create -- @param self --- @param #cc.TMXTilesetInfo tilesetInfo --- @param #cc.TMXLayerInfo layerInfo --- @param #cc.TMXMapInfo mapInfo +-- @param #cc.TMXTilesetInfo tmxtilesetinfo +-- @param #cc.TMXLayerInfo tmxlayerinfo +-- @param #cc.TMXMapInfo map -- @return experimental::TMXLayer#experimental::TMXLayer ret (return value: cc.experimental::TMXLayer) -------------------------------- --- -- @function [parent=#TMXLayer] removeChild -- @param self --- @param #cc.Node child --- @param #bool cleanup +-- @param #cc.Node node +-- @param #bool bool -------------------------------- --- -- @function [parent=#TMXLayer] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#TMXLayer] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- js ctor -- @function [parent=#TMXLayer] TMXLayer -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua b/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua index acb406eb7a..fad88388e2 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua @@ -5,19 +5,16 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TMXLayerInfo] setProperties -- @param self --- @param #map_table properties +-- @param #map_table map -------------------------------- --- -- @function [parent=#TMXLayerInfo] getProperties -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- --- js ctor -- @function [parent=#TMXLayerInfo] TMXLayerInfo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua b/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua index 3a77a877b5..ef098ce6f2 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua @@ -4,66 +4,56 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TMXMapInfo] setObjectGroups -- @param self --- @param #array_table groups +-- @param #array_table array -------------------------------- --- -- @function [parent=#TMXMapInfo] setTileSize -- @param self --- @param #size_table tileSize +-- @param #size_table size -------------------------------- --- initializes a TMX format with a tmx file -- @function [parent=#TMXMapInfo] initWithTMXFile -- @param self --- @param #string tmxFile +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- / map orientation -- @function [parent=#TMXMapInfo] getOrientation -- @param self -- @return int#int ret (return value: int) -------------------------------- --- / is storing characters? -- @function [parent=#TMXMapInfo] isStoringCharacters -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TMXMapInfo] setLayers -- @param self --- @param #array_table layers +-- @param #array_table array -------------------------------- --- initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file -- @function [parent=#TMXMapInfo] parseXMLFile -- @param self --- @param #string xmlFilename +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- / parent element -- @function [parent=#TMXMapInfo] getParentElement -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#TMXMapInfo] setTMXFileName -- @param self --- @param #string fileName +-- @param #string str -------------------------------- --- -- @function [parent=#TMXMapInfo] parseXMLString -- @param self --- @param #string xmlString +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- @@ -81,45 +71,38 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- --- / parent GID -- @function [parent=#TMXMapInfo] getParentGID -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#TMXMapInfo] setParentElement -- @param self --- @param #int element +-- @param #int int -------------------------------- --- initializes a TMX format with an XML string and a TMX resource path -- @function [parent=#TMXMapInfo] initWithXML -- @param self --- @param #string tmxString --- @param #string resourcePath +-- @param #string str +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TMXMapInfo] setParentGID -- @param self --- @param #int gid +-- @param #int int -------------------------------- --- / layer attribs -- @function [parent=#TMXMapInfo] getLayerAttribs -- @param self -- @return int#int ret (return value: int) -------------------------------- --- / tiles width & height -- @function [parent=#TMXMapInfo] getTileSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#TMXMapInfo] getTileProperties -- @param self -- @return map_table#map_table ret (return value: map_table) @@ -132,58 +115,49 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- --- -- @function [parent=#TMXMapInfo] getTMXFileName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TMXMapInfo] setCurrentString -- @param self --- @param #string currentString +-- @param #string str -------------------------------- --- -- @function [parent=#TMXMapInfo] setProperties -- @param self --- @param #map_table properties +-- @param #map_table map -------------------------------- --- -- @function [parent=#TMXMapInfo] setOrientation -- @param self --- @param #int orientation +-- @param #int int -------------------------------- --- -- @function [parent=#TMXMapInfo] setTileProperties -- @param self --- @param #map_table tileProperties +-- @param #map_table map -------------------------------- --- -- @function [parent=#TMXMapInfo] setMapSize -- @param self --- @param #size_table mapSize +-- @param #size_table size -------------------------------- --- -- @function [parent=#TMXMapInfo] setStoringCharacters -- @param self --- @param #bool storingCharacters +-- @param #bool bool -------------------------------- --- / map width & height -- @function [parent=#TMXMapInfo] getMapSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#TMXMapInfo] setTilesets -- @param self --- @param #array_table tilesets +-- @param #array_table array -------------------------------- -- @overload self @@ -193,34 +167,29 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- --- -- @function [parent=#TMXMapInfo] getCurrentString -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TMXMapInfo] setLayerAttribs -- @param self --- @param #int layerAttribs +-- @param #int int -------------------------------- --- creates a TMX Format with a tmx file -- @function [parent=#TMXMapInfo] create -- @param self --- @param #string tmxFile +-- @param #string str -- @return TMXMapInfo#TMXMapInfo ret (return value: cc.TMXMapInfo) -------------------------------- --- creates a TMX Format with an XML string and a TMX resource path -- @function [parent=#TMXMapInfo] createWithXML -- @param self --- @param #string tmxString --- @param #string resourcePath +-- @param #string str +-- @param #string str -- @return TMXMapInfo#TMXMapInfo ret (return value: cc.TMXMapInfo) -------------------------------- --- js ctor -- @function [parent=#TMXMapInfo] TMXMapInfo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua b/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua index 3d6c1ebed2..2a2330d036 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua @@ -5,30 +5,25 @@ -- @parent_module cc -------------------------------- --- Sets the offset position of child objects -- @function [parent=#TMXObjectGroup] setPositionOffset -- @param self --- @param #vec2_table offset +-- @param #vec2_table vec2 -------------------------------- --- return the value for the specific property name -- @function [parent=#TMXObjectGroup] getProperty -- @param self --- @param #string propertyName +-- @param #string str -- @return Value#Value ret (return value: cc.Value) -------------------------------- --- Gets the offset position of child objects -- @function [parent=#TMXObjectGroup] getPositionOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- return the dictionary for the specific object name.
--- It will return the 1st object found on the array for the given name. -- @function [parent=#TMXObjectGroup] getObject -- @param self --- @param #string objectName +-- @param #string str -- @return map_table#map_table ret (return value: map_table) -------------------------------- @@ -39,10 +34,9 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- --- -- @function [parent=#TMXObjectGroup] setGroupName -- @param self --- @param #string groupName +-- @param #string str -------------------------------- -- @overload self @@ -52,25 +46,21 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- --- -- @function [parent=#TMXObjectGroup] getGroupName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Sets the list of properties -- @function [parent=#TMXObjectGroup] setProperties -- @param self --- @param #map_table properties +-- @param #map_table map -------------------------------- --- Sets the array of the objects -- @function [parent=#TMXObjectGroup] setObjects -- @param self --- @param #array_table objects +-- @param #array_table array -------------------------------- --- js ctor -- @function [parent=#TMXObjectGroup] TMXObjectGroup -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua b/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua index 1e36be8fd4..86175d51f4 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua @@ -5,29 +5,25 @@ -- @parent_module ccexp -------------------------------- --- -- @function [parent=#TMXTiledMap] setObjectGroups -- @param self --- @param #array_table groups +-- @param #array_table array -------------------------------- --- return the value for the specific property name -- @function [parent=#TMXTiledMap] getProperty -- @param self --- @param #string propertyName +-- @param #string str -- @return Value#Value ret (return value: cc.Value) -------------------------------- --- -- @function [parent=#TMXTiledMap] setMapSize -- @param self --- @param #size_table mapSize +-- @param #size_table size -------------------------------- --- return the TMXObjectGroup for the specific group -- @function [parent=#TMXTiledMap] getObjectGroup -- @param self --- @param #string groupName +-- @param #string str -- @return TMXObjectGroup#TMXObjectGroup ret (return value: cc.TMXObjectGroup) -------------------------------- @@ -38,78 +34,66 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- --- the tiles's size property measured in pixels -- @function [parent=#TMXTiledMap] getTileSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- the map's size property measured in tiles -- @function [parent=#TMXTiledMap] getMapSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- properties -- @function [parent=#TMXTiledMap] getProperties -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- --- return properties dictionary for tile GID -- @function [parent=#TMXTiledMap] getPropertiesForGID -- @param self --- @param #int GID +-- @param #int int -- @return Value#Value ret (return value: cc.Value) -------------------------------- --- -- @function [parent=#TMXTiledMap] setTileSize -- @param self --- @param #size_table tileSize +-- @param #size_table size -------------------------------- --- -- @function [parent=#TMXTiledMap] setProperties -- @param self --- @param #map_table properties +-- @param #map_table map -------------------------------- --- return the FastTMXLayer for the specific layer -- @function [parent=#TMXTiledMap] getLayer -- @param self --- @param #string layerName +-- @param #string str -- @return experimental::TMXLayer#experimental::TMXLayer ret (return value: cc.experimental::TMXLayer) -------------------------------- --- map orientation -- @function [parent=#TMXTiledMap] getMapOrientation -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#TMXTiledMap] setMapOrientation -- @param self --- @param #int mapOrientation +-- @param #int int -------------------------------- --- creates a TMX Tiled Map with a TMX file. -- @function [parent=#TMXTiledMap] create -- @param self --- @param #string tmxFile +-- @param #string str -- @return experimental::TMXTiledMap#experimental::TMXTiledMap ret (return value: cc.experimental::TMXTiledMap) -------------------------------- --- initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources -- @function [parent=#TMXTiledMap] createWithXML -- @param self --- @param #string tmxString --- @param #string resourcePath +-- @param #string str +-- @param #string str -- @return experimental::TMXTiledMap#experimental::TMXTiledMap ret (return value: cc.experimental::TMXTiledMap) -------------------------------- --- -- @function [parent=#TMXTiledMap] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua b/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua index b782adde5f..3d07264e37 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua @@ -5,14 +5,12 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TMXTilesetInfo] getRectForGID -- @param self --- @param #unsigned int gid +-- @param #unsigned int int -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- --- js ctor -- @function [parent=#TMXTilesetInfo] TMXTilesetInfo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TableView.lua b/cocos/scripting/lua-bindings/auto/api/TableView.lua index 21e38bd249..2efa32f127 100644 --- a/cocos/scripting/lua-bindings/auto/api/TableView.lua +++ b/cocos/scripting/lua-bindings/auto/api/TableView.lua @@ -5,115 +5,92 @@ -- @parent_module cc -------------------------------- --- Updates the content of the cell at a given index.
--- param idx index to find a cell -- @function [parent=#TableView] updateCellAtIndex -- @param self --- @param #long idx +-- @param #long long -------------------------------- --- determines how cell is ordered and filled in the view. -- @function [parent=#TableView] setVerticalFillOrder -- @param self --- @param #int order +-- @param #int verticalfillorder -------------------------------- --- -- @function [parent=#TableView] scrollViewDidZoom -- @param self --- @param #cc.ScrollView view +-- @param #cc.ScrollView scrollview -------------------------------- --- -- @function [parent=#TableView] _updateContentSize -- @param self -------------------------------- --- -- @function [parent=#TableView] getVerticalFillOrder -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Removes a cell at a given index
--- param idx index to find a cell -- @function [parent=#TableView] removeCellAtIndex -- @param self --- @param #long idx +-- @param #long long -------------------------------- --- -- @function [parent=#TableView] initWithViewSize -- @param self -- @param #size_table size --- @param #cc.Node container +-- @param #cc.Node node -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TableView] scrollViewDidScroll -- @param self --- @param #cc.ScrollView view +-- @param #cc.ScrollView scrollview -------------------------------- --- reloads data from data source. the view will be refreshed. -- @function [parent=#TableView] reloadData -- @param self -------------------------------- --- Inserts a new cell at a given index
--- param idx location to insert -- @function [parent=#TableView] insertCellAtIndex -- @param self --- @param #long idx +-- @param #long long -------------------------------- --- Returns an existing cell at a given index. Returns nil if a cell is nonexistent at the moment of query.
--- param idx index
--- return a cell at a given index -- @function [parent=#TableView] cellAtIndex -- @param self --- @param #long idx +-- @param #long long -- @return TableViewCell#TableViewCell ret (return value: cc.TableViewCell) -------------------------------- --- Dequeues a free cell if available. nil if not.
--- return free cell -- @function [parent=#TableView] dequeueCell -- @param self -- @return TableViewCell#TableViewCell ret (return value: cc.TableViewCell) -------------------------------- --- -- @function [parent=#TableView] onTouchMoved -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#TableView] onTouchEnded -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#TableView] onTouchCancelled -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -------------------------------- --- -- @function [parent=#TableView] onTouchBegan -- @param self --- @param #cc.Touch pTouch --- @param #cc.Event pEvent +-- @param #cc.Touch touch +-- @param #cc.Event event -- @return bool#bool ret (return value: bool) -------------------------------- --- js ctor -- @function [parent=#TableView] TableView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua b/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua index 8b243b0548..dc649d0806 100644 --- a/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua +++ b/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua @@ -5,30 +5,25 @@ -- @parent_module cc -------------------------------- --- Cleans up any resources linked to this cell and resets idx property. -- @function [parent=#TableViewCell] reset -- @param self -------------------------------- --- The index used internally by SWTableView and its subclasses -- @function [parent=#TableViewCell] getIdx -- @param self -- @return long#long ret (return value: long) -------------------------------- --- -- @function [parent=#TableViewCell] setIdx -- @param self --- @param #long uIdx +-- @param #long long -------------------------------- --- -- @function [parent=#TableViewCell] create -- @param self -- @return TableViewCell#TableViewCell ret (return value: cc.TableViewCell) -------------------------------- --- -- @function [parent=#TableViewCell] TableViewCell -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua b/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua index 432a7b9a50..82d934aab5 100644 --- a/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua @@ -12,46 +12,39 @@ -- @return Node#Node ret (retunr value: cc.Node) -------------------------------- --- Sets the target that the action will be forced to run with -- @function [parent=#TargetedAction] setForcedTarget -- @param self --- @param #cc.Node forcedTarget +-- @param #cc.Node node -------------------------------- --- Create an action with the specified action and forced target -- @function [parent=#TargetedAction] create -- @param self --- @param #cc.Node target --- @param #cc.FiniteTimeAction action +-- @param #cc.Node node +-- @param #cc.FiniteTimeAction finitetimeaction -- @return TargetedAction#TargetedAction ret (return value: cc.TargetedAction) -------------------------------- --- -- @function [parent=#TargetedAction] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#TargetedAction] clone -- @param self -- @return TargetedAction#TargetedAction ret (return value: cc.TargetedAction) -------------------------------- --- -- @function [parent=#TargetedAction] stop -- @param self -------------------------------- --- -- @function [parent=#TargetedAction] reverse -- @param self -- @return TargetedAction#TargetedAction ret (return value: cc.TargetedAction) -------------------------------- --- -- @function [parent=#TargetedAction] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Text.lua b/cocos/scripting/lua-bindings/auto/api/Text.lua index 7b1945dc30..b6b97605b6 100644 --- a/cocos/scripting/lua-bindings/auto/api/Text.lua +++ b/cocos/scripting/lua-bindings/auto/api/Text.lua @@ -5,186 +5,145 @@ -- @parent_module ccui -------------------------------- --- Enable shadow for the label
--- todo support blur for shadow effect -- @function [parent=#Text] enableShadow -- @param self -------------------------------- --- -- @function [parent=#Text] getFontSize -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Text] getString -- @param self -- @return string#string ret (return value: string) -------------------------------- --- disable shadow/outline/glow rendering -- @function [parent=#Text] disableEffect -- @param self -------------------------------- --- -- @function [parent=#Text] getTextColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- --- -- @function [parent=#Text] setTextVerticalAlignment -- @param self --- @param #int alignment +-- @param #int textvalignment -------------------------------- --- Sets the font name of label.
--- If you are trying to use a system font, you could just pass a font name
--- If you are trying to use a TTF, you should pass a file path to the TTF file
--- Usage: Text *text = Text::create("Hello", "Arial", 20);create a system font UIText
--- text->setFontName("Marfelt"); it will change the font to system font no matter the previous font type is TTF or system font
--- text->setFontName("xxxx/xxx.ttf");it will change the font to TTF font no matter the previous font type is TTF or system font
--- param name font name. -- @function [parent=#Text] setFontName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- Sets the touch scale enabled of label.
--- param enabled touch scale enabled of label. -- @function [parent=#Text] setTouchScaleChangeEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#Text] setString -- @param self --- @param #string text +-- @param #string str -------------------------------- --- Gets the touch scale enabled of label.
--- return touch scale enabled of label. -- @function [parent=#Text] isTouchScaleChangeEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Text] getFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Text] setTextAreaSize -- @param self -- @param #size_table size -------------------------------- --- Gets the string length of the label.
--- Note: This length will be larger than the raw string length,
--- if you want to get the raw string length, you should call this->getString().size() instead
--- return string length. -- @function [parent=#Text] getStringLength -- @param self -- @return long#long ret (return value: long) -------------------------------- --- Enable outline for the label
--- It only works on IOS and Android when you use System fonts -- @function [parent=#Text] enableOutline -- @param self --- @param #color4b_table outlineColor --- @param #int outlineSize +-- @param #color4b_table color4b +-- @param #int int -------------------------------- --- -- @function [parent=#Text] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Text] getTextHorizontalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Sets the font size of label.
--- param size font size. -- @function [parent=#Text] setFontSize -- @param self --- @param #int size +-- @param #int int -------------------------------- --- -- @function [parent=#Text] setTextColor -- @param self --- @param #color4b_table color +-- @param #color4b_table color4b -------------------------------- --- only support for TTF -- @function [parent=#Text] enableGlow -- @param self --- @param #color4b_table glowColor +-- @param #color4b_table color4b -------------------------------- --- -- @function [parent=#Text] getTextVerticalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Text] getTextAreaSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#Text] setTextHorizontalAlignment -- @param self --- @param #int alignment +-- @param #int texthalignment -------------------------------- -- @overload self, string, string, int -- @overload self -- @function [parent=#Text] create -- @param self --- @param #string textContent --- @param #string fontName --- @param #int fontSize +-- @param #string str +-- @param #string str +-- @param #int int -- @return Text#Text ret (retunr value: ccui.Text) -------------------------------- --- -- @function [parent=#Text] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#Text] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#Text] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#Text] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Default constructor -- @function [parent=#Text] Text -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua b/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua index 7a23761192..2ee69b8e6e 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua @@ -5,38 +5,30 @@ -- @parent_module ccui -------------------------------- --- Gets the string length of the label.
--- Note: This length will be larger than the raw string length,
--- if you want to get the raw string length, you should call this->getString().size() instead
--- return string length. -- @function [parent=#TextAtlas] getStringLength -- @param self -- @return long#long ret (return value: long) -------------------------------- --- -- @function [parent=#TextAtlas] getString -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TextAtlas] setString -- @param self --- @param #string value +-- @param #string str -------------------------------- --- initializes the LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas -- @function [parent=#TextAtlas] setProperty -- @param self --- @param #string stringValue --- @param #string charMapFile --- @param #int itemWidth --- @param #int itemHeight --- @param #string startCharMap +-- @param #string str +-- @param #string str +-- @param #int int +-- @param #int int +-- @param #string str -------------------------------- --- -- @function [parent=#TextAtlas] adaptRenderers -- @param self @@ -45,39 +37,34 @@ -- @overload self -- @function [parent=#TextAtlas] create -- @param self --- @param #string stringValue --- @param #string charMapFile --- @param #int itemWidth --- @param #int itemHeight --- @param #string startCharMap +-- @param #string str +-- @param #string str +-- @param #int int +-- @param #int int +-- @param #string str -- @return TextAtlas#TextAtlas ret (retunr value: ccui.TextAtlas) -------------------------------- --- -- @function [parent=#TextAtlas] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#TextAtlas] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#TextAtlas] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TextAtlas] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Default constructor -- @function [parent=#TextAtlas] TextAtlas -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua b/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua index 7903e704e1..424c43eda3 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua @@ -5,28 +5,21 @@ -- @parent_module ccui -------------------------------- --- init a bitmap font atlas with an initial string and the FNT file -- @function [parent=#TextBMFont] setFntFile -- @param self --- @param #string fileName +-- @param #string str -------------------------------- --- Gets the string length of the label.
--- Note: This length will be larger than the raw string length,
--- if you want to get the raw string length, you should call this->getString().size() instead
--- return string length. -- @function [parent=#TextBMFont] getStringLength -- @param self -- @return long#long ret (return value: long) -------------------------------- --- -- @function [parent=#TextBMFont] setString -- @param self --- @param #string value +-- @param #string str -------------------------------- --- -- @function [parent=#TextBMFont] getString -- @param self -- @return string#string ret (return value: string) @@ -36,36 +29,31 @@ -- @overload self -- @function [parent=#TextBMFont] create -- @param self --- @param #string text --- @param #string filename +-- @param #string str +-- @param #string str -- @return TextBMFont#TextBMFont ret (retunr value: ccui.TextBMFont) -------------------------------- --- -- @function [parent=#TextBMFont] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#TextBMFont] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#TextBMFont] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TextBMFont] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Default constructor -- @function [parent=#TextBMFont] TextBMFont -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextField.lua b/cocos/scripting/lua-bindings/auto/api/TextField.lua index eb5014b7c7..c4e22b25bc 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextField.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextField.lua @@ -5,229 +5,192 @@ -- @parent_module ccui -------------------------------- --- -- @function [parent=#TextField] setAttachWithIME -- @param self --- @param #bool attach +-- @param #bool bool -------------------------------- --- -- @function [parent=#TextField] getFontSize -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#TextField] getStringValue -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TextField] setPasswordStyleText -- @param self --- @param #char styleText +-- @param #char char -------------------------------- --- -- @function [parent=#TextField] getDeleteBackward -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TextField] getPlaceHolder -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TextField] getAttachWithIME -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TextField] setFontName -- @param self --- @param #string name +-- @param #string str -------------------------------- --- -- @function [parent=#TextField] getInsertText -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TextField] setInsertText -- @param self --- @param #bool insertText +-- @param #bool bool -------------------------------- --- -- @function [parent=#TextField] getDetachWithIME -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TextField] setTextVerticalAlignment -- @param self --- @param #int alignment +-- @param #int textvalignment -------------------------------- --- -- @function [parent=#TextField] addEventListener -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- -- @function [parent=#TextField] didNotSelectSelf -- @param self -------------------------------- --- -- @function [parent=#TextField] getFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TextField] setTextAreaSize -- @param self -- @param #size_table size -------------------------------- --- -- @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 --- @param #bool enable +-- @param #bool bool -------------------------------- --- -- @function [parent=#TextField] getPlaceHolderColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- --- -- @function [parent=#TextField] getPasswordStyleText -- @param self -- @return char#char ret (return value: char) -------------------------------- --- -- @function [parent=#TextField] setMaxLengthEnabled -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- --- -- @function [parent=#TextField] isPasswordEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TextField] setDeleteBackward -- @param self --- @param #bool deleteBackward +-- @param #bool bool -------------------------------- --- -- @function [parent=#TextField] setFontSize -- @param self --- @param #int size +-- @param #int int -------------------------------- --- -- @function [parent=#TextField] setPlaceHolder -- @param self --- @param #string value +-- @param #string str -------------------------------- -- @overload self, color4b_table -- @overload self, color3b_table -- @function [parent=#TextField] setPlaceHolderColor -- @param self --- @param #color3b_table color +-- @param #color3b_table color3b -------------------------------- --- -- @function [parent=#TextField] setTextHorizontalAlignment -- @param self --- @param #int alignment +-- @param #int texthalignment -------------------------------- --- -- @function [parent=#TextField] setTextColor -- @param self --- @param #color4b_table textColor +-- @param #color4b_table color4b -------------------------------- --- -- @function [parent=#TextField] getMaxLength -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#TextField] isMaxLengthEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TextField] setDetachWithIME -- @param self --- @param #bool detach +-- @param #bool bool -------------------------------- --- -- @function [parent=#TextField] setText -- @param self --- @param #string text +-- @param #string str -------------------------------- --- -- @function [parent=#TextField] setTouchAreaEnabled -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- --- -- @function [parent=#TextField] hitTest -- @param self --- @param #vec2_table pt +-- @param #vec2_table vec2 -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TextField] setMaxLength -- @param self --- @param #int length +-- @param #int int -------------------------------- --- -- @function [parent=#TextField] setTouchSize -- @param self -- @param #size_table size -------------------------------- --- -- @function [parent=#TextField] getTouchSize -- @param self -- @return size_table#size_table ret (return value: size_table) @@ -237,43 +200,37 @@ -- @overload self -- @function [parent=#TextField] create -- @param self --- @param #string placeholder --- @param #string fontName --- @param #int fontSize +-- @param #string str +-- @param #string str +-- @param #int int -- @return TextField#TextField ret (retunr value: ccui.TextField) -------------------------------- --- -- @function [parent=#TextField] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- --- -- @function [parent=#TextField] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#TextField] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TextField] update -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#TextField] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#TextField] TextField -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua index 77a95a5282..c7c1456291 100644 --- a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua @@ -5,14 +5,11 @@ -- @parent_module cc -------------------------------- --- Gets max T -- @function [parent=#Texture2D] getMaxT -- @param self -- @return float#float ret (return value: float) -------------------------------- --- returns the pixel format.
--- since v2.0 -- @function [parent=#Texture2D] getStringForFormat -- @param self -- @return char#char ret (return value: char) @@ -23,30 +20,24 @@ -- @function [parent=#Texture2D] initWithImage -- @param self -- @param #cc.Image image --- @param #int format +-- @param #int pixelformat -- @return bool#bool ret (retunr value: bool) -------------------------------- --- Gets max S -- @function [parent=#Texture2D] getMaxS -- @param self -- @return float#float ret (return value: float) -------------------------------- --- release only the gl texture.
--- js NA
--- lua NA -- @function [parent=#Texture2D] releaseGLTexture -- @param self -------------------------------- --- -- @function [parent=#Texture2D] hasPremultipliedAlpha -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Gets the height of the texture in pixels -- @function [parent=#Texture2D] getPixelsHigh -- @param self -- @return int#int ret (return value: int) @@ -56,11 +47,10 @@ -- @overload self -- @function [parent=#Texture2D] getBitsPerPixelForFormat -- @param self --- @param #int format +-- @param #int pixelformat -- @return unsigned int#unsigned int ret (retunr value: unsigned int) -------------------------------- --- Gets the texture name -- @function [parent=#Texture2D] getName -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) @@ -70,141 +60,97 @@ -- @overload self, char, string, float, size_table, int, int -- @function [parent=#Texture2D] initWithString -- @param self --- @param #char text --- @param #string fontName --- @param #float fontSize --- @param #size_table dimensions --- @param #int hAlignment --- @param #int vAlignment +-- @param #char char +-- @param #string str +-- @param #float float +-- @param #size_table size +-- @param #int texthalignment +-- @param #int textvalignment -- @return bool#bool ret (retunr value: bool) -------------------------------- --- Sets max T -- @function [parent=#Texture2D] setMaxT -- @param self --- @param #float maxT +-- @param #float float -------------------------------- --- draws a texture inside a rect -- @function [parent=#Texture2D] drawInRect -- @param self -- @param #rect_table rect -------------------------------- --- -- @function [parent=#Texture2D] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- sets alias texture parameters:
--- - GL_TEXTURE_MIN_FILTER = GL_NEAREST
--- - GL_TEXTURE_MAG_FILTER = GL_NEAREST
--- warning Calling this method could allocate additional texture memory.
--- since v0.8 -- @function [parent=#Texture2D] setAliasTexParameters -- @param self -------------------------------- --- sets antialias texture parameters:
--- - GL_TEXTURE_MIN_FILTER = GL_LINEAR
--- - GL_TEXTURE_MAG_FILTER = GL_LINEAR
--- warning Calling this method could allocate additional texture memory.
--- since v0.8 -- @function [parent=#Texture2D] setAntiAliasTexParameters -- @param self -------------------------------- --- Generates mipmap images for the texture.
--- It only works if the texture size is POT (power of 2).
--- since v0.99.0 -- @function [parent=#Texture2D] generateMipmap -- @param self -------------------------------- --- js NA
--- lua NA -- @function [parent=#Texture2D] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Gets the pixel format of the texture -- @function [parent=#Texture2D] getPixelFormat -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Texture2D] setGLProgram -- @param self --- @param #cc.GLProgram program +-- @param #cc.GLProgram glprogram -------------------------------- --- content size -- @function [parent=#Texture2D] getContentSizeInPixels -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Gets the width of the texture in pixels -- @function [parent=#Texture2D] getPixelsWide -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Drawing extensions to make it easy to draw basic quads using a Texture2D object.
--- These functions require GL_TEXTURE_2D and both GL_VERTEX_ARRAY and GL_TEXTURE_COORD_ARRAY client states to be enabled.
--- draws a texture at a given point -- @function [parent=#Texture2D] drawAtPoint -- @param self --- @param #vec2_table point +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#Texture2D] getGLProgram -- @param self -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- --- -- @function [parent=#Texture2D] hasMipmaps -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Sets max S -- @function [parent=#Texture2D] setMaxS -- @param self --- @param #float maxS +-- @param #float float -------------------------------- --- sets the default pixel format for UIImagescontains alpha channel.
--- If the UIImage contains alpha channel, then the options are:
--- - generate 32-bit textures: Texture2D::PixelFormat::RGBA8888 (default one)
--- - generate 24-bit textures: Texture2D::PixelFormat::RGB888
--- - generate 16-bit textures: Texture2D::PixelFormat::RGBA4444
--- - generate 16-bit textures: Texture2D::PixelFormat::RGB5A1
--- - generate 16-bit textures: Texture2D::PixelFormat::RGB565
--- - generate 8-bit textures: Texture2D::PixelFormat::A8 (only use it if you use just 1 color)
--- How does it work ?
--- - If the image is an RGBA (with Alpha) then the default pixel format will be used (it can be a 8-bit, 16-bit or 32-bit texture)
--- - If the image is an RGB (without Alpha) then: If the default pixel format is RGBA8888 then a RGBA8888 (32-bit) will be used. Otherwise a RGB565 (16-bit texture) will be used.
--- This parameter is not valid for PVR / PVR.CCZ images.
--- since v0.8 -- @function [parent=#Texture2D] setDefaultAlphaPixelFormat -- @param self --- @param #int format +-- @param #int pixelformat -------------------------------- --- returns the alpha pixel format
--- since v0.8 -- @function [parent=#Texture2D] getDefaultAlphaPixelFormat -- @param self -- @return int#int ret (return value: int) -------------------------------- --- js ctor -- @function [parent=#Texture2D] Texture2D -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextureCache.lua b/cocos/scripting/lua-bindings/auto/api/TextureCache.lua index bcbc70498f..fbcaadd1ac 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextureCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextureCache.lua @@ -5,48 +5,30 @@ -- @parent_module cc -------------------------------- --- Reload texture from the image file
--- If the file image hasn't loaded before, load it.
--- Otherwise the texture will be reloaded from the file image.
--- The "filenName" parameter is the related/absolute path of the file image.
--- Return true if the reloading is succeed, otherwise return false. -- @function [parent=#TextureCache] reloadTexture -- @param self --- @param #string fileName +-- @param #string str -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TextureCache] unbindAllImageAsync -- @param self -------------------------------- --- Deletes a texture from the cache given a its key name
--- since v0.99.4 -- @function [parent=#TextureCache] removeTextureForKey -- @param self --- @param #string key +-- @param #string str -------------------------------- --- Purges the dictionary of loaded textures.
--- Call this method if you receive the "Memory Warning"
--- In the short term: it will free some resources preventing your app from being killed
--- In the medium term: it will allocate more resources
--- In the long term: it will be the same -- @function [parent=#TextureCache] removeAllTextures -- @param self -------------------------------- --- js NA
--- lua NA -- @function [parent=#TextureCache] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Output to CCLOG the current contents of this TextureCache
--- This will attempt to calculate the size of each texture, and the total texture memory in use
--- since v1.0 -- @function [parent=#TextureCache] getCachedTextureInfo -- @param self -- @return string#string ret (return value: string) @@ -57,44 +39,34 @@ -- @function [parent=#TextureCache] addImage -- @param self -- @param #cc.Image image --- @param #string key +-- @param #string str -- @return Texture2D#Texture2D ret (retunr value: cc.Texture2D) -------------------------------- --- -- @function [parent=#TextureCache] unbindImageAsync -- @param self --- @param #string filename +-- @param #string str -------------------------------- --- Returns an already created texture. Returns nil if the texture doesn't exist.
--- since v0.99.5 -- @function [parent=#TextureCache] getTextureForKey -- @param self --- @param #string key +-- @param #string str -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- --- Removes unused textures
--- Textures that have a retain count of 1 will be deleted
--- It is convenient to call this method after when starting a new Scene
--- since v0.8 -- @function [parent=#TextureCache] removeUnusedTextures -- @param self -------------------------------- --- Deletes a texture from the cache given a texture -- @function [parent=#TextureCache] removeTexture -- @param self --- @param #cc.Texture2D texture +-- @param #cc.Texture2D texture2d -------------------------------- --- -- @function [parent=#TextureCache] waitForQuit -- @param self -------------------------------- --- js ctor -- @function [parent=#TextureCache] TextureCache -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextureData.lua b/cocos/scripting/lua-bindings/auto/api/TextureData.lua index 75e2950598..5f1ea092e6 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextureData.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextureData.lua @@ -5,32 +5,27 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#TextureData] getContourData -- @param self --- @param #int index +-- @param #int int -- @return ContourData#ContourData ret (return value: ccs.ContourData) -------------------------------- --- -- @function [parent=#TextureData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#TextureData] addContourData -- @param self --- @param #ccs.ContourData contourData +-- @param #ccs.ContourData contourdata -------------------------------- --- -- @function [parent=#TextureData] create -- @param self -- @return TextureData#TextureData ret (return value: ccs.TextureData) -------------------------------- --- js ctor -- @function [parent=#TextureData] TextureData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua b/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua index 77b400ece7..32222d5bae 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua @@ -5,37 +5,31 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#TextureFrame] getTextureName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#TextureFrame] setNode -- @param self -- @param #cc.Node node -------------------------------- --- -- @function [parent=#TextureFrame] setTextureName -- @param self --- @param #string textureName +-- @param #string str -------------------------------- --- -- @function [parent=#TextureFrame] create -- @param self -- @return TextureFrame#TextureFrame ret (return value: ccs.TextureFrame) -------------------------------- --- -- @function [parent=#TextureFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#TextureFrame] TextureFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua b/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua index 02831ff73f..4ea1ba0663 100644 --- a/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua +++ b/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua @@ -5,50 +5,40 @@ -- @parent_module cc -------------------------------- --- initializes a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points.
--- The file will be loaded using the TextureMgr. -- @function [parent=#TileMapAtlas] initWithTileFile -- @param self --- @param #string tile --- @param #string mapFile --- @param #int tileWidth --- @param #int tileHeight +-- @param #string str +-- @param #string str +-- @param #int int +-- @param #int int -- @return bool#bool ret (return value: bool) -------------------------------- --- dealloc the map from memory -- @function [parent=#TileMapAtlas] releaseMap -- @param self -------------------------------- --- returns a tile from position x,y.
--- For the moment only channel R is used -- @function [parent=#TileMapAtlas] getTileAt -- @param self --- @param #vec2_table position +-- @param #vec2_table vec2 -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- --- sets a tile at position x,y.
--- For the moment only channel R is used -- @function [parent=#TileMapAtlas] setTile -- @param self --- @param #color3b_table tile --- @param #vec2_table position +-- @param #color3b_table color3b +-- @param #vec2_table vec2 -------------------------------- --- creates a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points.
--- The tile file will be loaded using the TextureMgr. -- @function [parent=#TileMapAtlas] create -- @param self --- @param #string tile --- @param #string mapFile --- @param #int tileWidth --- @param #int tileHeight +-- @param #string str +-- @param #string str +-- @param #int int +-- @param #int int -- @return TileMapAtlas#TileMapAtlas ret (return value: cc.TileMapAtlas) -------------------------------- --- js ctor -- @function [parent=#TileMapAtlas] TileMapAtlas -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua b/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua index 2d459cac13..53ad06354a 100644 --- a/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua @@ -9,28 +9,24 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#TiledGrid3D] create -- @param self --- @param #size_table gridSize --- @param #cc.Texture2D texture --- @param #bool flipped +-- @param #size_table size +-- @param #cc.Texture2D texture2d +-- @param #bool bool -- @return TiledGrid3D#TiledGrid3D ret (retunr value: cc.TiledGrid3D) -------------------------------- --- -- @function [parent=#TiledGrid3D] calculateVertexPoints -- @param self -------------------------------- --- -- @function [parent=#TiledGrid3D] blit -- @param self -------------------------------- --- -- @function [parent=#TiledGrid3D] reuse -- @param self -------------------------------- --- js ctor -- @function [parent=#TiledGrid3D] TiledGrid3D -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua b/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua index 41ef90697f..638777d75d 100644 --- a/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua @@ -5,13 +5,11 @@ -- @parent_module cc -------------------------------- --- returns the grid -- @function [parent=#TiledGrid3DAction] getGrid -- @param self -- @return GridBase#GridBase ret (return value: cc.GridBase) -------------------------------- --- -- @function [parent=#TiledGrid3DAction] clone -- @param self -- @return TiledGrid3DAction#TiledGrid3DAction ret (return value: cc.TiledGrid3DAction) diff --git a/cocos/scripting/lua-bindings/auto/api/Timeline.lua b/cocos/scripting/lua-bindings/auto/api/Timeline.lua index a22a39f028..e469f6528e 100644 --- a/cocos/scripting/lua-bindings/auto/api/Timeline.lua +++ b/cocos/scripting/lua-bindings/auto/api/Timeline.lua @@ -5,92 +5,77 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#Timeline] clone -- @param self -- @return Timeline#Timeline ret (return value: ccs.Timeline) -------------------------------- --- -- @function [parent=#Timeline] gotoFrame -- @param self --- @param #int frameIndex +-- @param #int int -------------------------------- --- -- @function [parent=#Timeline] setNode -- @param self -- @param #cc.Node node -------------------------------- --- -- @function [parent=#Timeline] getActionTimeline -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- --- -- @function [parent=#Timeline] insertFrame -- @param self -- @param #ccs.Frame frame --- @param #int index +-- @param #int int -------------------------------- --- -- @function [parent=#Timeline] setActionTag -- @param self --- @param #int tag +-- @param #int int -------------------------------- --- -- @function [parent=#Timeline] addFrame -- @param self -- @param #ccs.Frame frame -------------------------------- --- -- @function [parent=#Timeline] getFrames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- --- -- @function [parent=#Timeline] getActionTag -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Timeline] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- -- @function [parent=#Timeline] removeFrame -- @param self -- @param #ccs.Frame frame -------------------------------- --- -- @function [parent=#Timeline] setActionTimeline -- @param self --- @param #ccs.ActionTimeline action +-- @param #ccs.ActionTimeline actiontimeline -------------------------------- --- -- @function [parent=#Timeline] stepToFrame -- @param self --- @param #int frameIndex +-- @param #int int -------------------------------- --- -- @function [parent=#Timeline] create -- @param self -- @return Timeline#Timeline ret (return value: ccs.Timeline) -------------------------------- --- -- @function [parent=#Timeline] Timeline -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Timer.lua b/cocos/scripting/lua-bindings/auto/api/Timer.lua index eed23459cd..2e44e70281 100644 --- a/cocos/scripting/lua-bindings/auto/api/Timer.lua +++ b/cocos/scripting/lua-bindings/auto/api/Timer.lua @@ -5,38 +5,32 @@ -- @parent_module cc -------------------------------- --- get interval in seconds -- @function [parent=#Timer] getInterval -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Timer] setupTimerWithInterval -- @param self --- @param #float seconds --- @param #unsigned int repeat --- @param #float delay +-- @param #float float +-- @param #unsigned int int +-- @param #float float -------------------------------- --- set interval in seconds -- @function [parent=#Timer] setInterval -- @param self --- @param #float interval +-- @param #float float -------------------------------- --- triggers the timer -- @function [parent=#Timer] update -- @param self --- @param #float dt +-- @param #float float -------------------------------- --- -- @function [parent=#Timer] trigger -- @param self -------------------------------- --- -- @function [parent=#Timer] cancel -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TintBy.lua b/cocos/scripting/lua-bindings/auto/api/TintBy.lua index f86cbde3c1..4eba544dc5 100644 --- a/cocos/scripting/lua-bindings/auto/api/TintBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/TintBy.lua @@ -5,37 +5,32 @@ -- @parent_module cc -------------------------------- --- creates an action with duration and color -- @function [parent=#TintBy] create -- @param self --- @param #float duration --- @param #short deltaRed --- @param #short deltaGreen --- @param #short deltaBlue +-- @param #float float +-- @param #short short +-- @param #short short +-- @param #short short -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- --- -- @function [parent=#TintBy] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#TintBy] clone -- @param self -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- --- -- @function [parent=#TintBy] reverse -- @param self -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- --- -- @function [parent=#TintBy] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TintTo.lua b/cocos/scripting/lua-bindings/auto/api/TintTo.lua index ec78c9aaa2..25a5fe6a09 100644 --- a/cocos/scripting/lua-bindings/auto/api/TintTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TintTo.lua @@ -5,37 +5,32 @@ -- @parent_module cc -------------------------------- --- creates an action with duration and color -- @function [parent=#TintTo] create -- @param self --- @param #float duration --- @param #unsigned char red --- @param #unsigned char green --- @param #unsigned char blue +-- @param #float float +-- @param #unsigned char char +-- @param #unsigned char char +-- @param #unsigned char char -- @return TintTo#TintTo ret (return value: cc.TintTo) -------------------------------- --- -- @function [parent=#TintTo] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#TintTo] clone -- @param self -- @return TintTo#TintTo ret (return value: cc.TintTo) -------------------------------- --- -- @function [parent=#TintTo] reverse -- @param self -- @return TintTo#TintTo ret (return value: cc.TintTo) -------------------------------- --- -- @function [parent=#TintTo] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua b/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua index 8898cdff27..21307c0a00 100644 --- a/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua +++ b/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua @@ -5,25 +5,21 @@ -- @parent_module cc -------------------------------- --- Allocates and initializes the action -- @function [parent=#ToggleVisibility] create -- @param self -- @return ToggleVisibility#ToggleVisibility ret (return value: cc.ToggleVisibility) -------------------------------- --- -- @function [parent=#ToggleVisibility] clone -- @param self -- @return ToggleVisibility#ToggleVisibility ret (return value: cc.ToggleVisibility) -------------------------------- --- -- @function [parent=#ToggleVisibility] update -- @param self --- @param #float time +-- @param #float float -------------------------------- --- -- @function [parent=#ToggleVisibility] reverse -- @param self -- @return ToggleVisibility#ToggleVisibility ret (return value: cc.ToggleVisibility) diff --git a/cocos/scripting/lua-bindings/auto/api/Touch.lua b/cocos/scripting/lua-bindings/auto/api/Touch.lua index 0f2b51afcd..d56df32267 100644 --- a/cocos/scripting/lua-bindings/auto/api/Touch.lua +++ b/cocos/scripting/lua-bindings/auto/api/Touch.lua @@ -5,64 +5,53 @@ -- @parent_module cc -------------------------------- --- returns the previous touch location in screen coordinates -- @function [parent=#Touch] getPreviousLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- returns the current touch location in OpenGL coordinates -- @function [parent=#Touch] getLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- returns the delta of 2 current touches locations in screen coordinates -- @function [parent=#Touch] getDelta -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- returns the start touch location in screen coordinates -- @function [parent=#Touch] getStartLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- returns the start touch location in OpenGL coordinates -- @function [parent=#Touch] getStartLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- js getId
--- lua getId -- @function [parent=#Touch] getID -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Touch] setTouchInfo -- @param self --- @param #int id --- @param #float x --- @param #float y +-- @param #int int +-- @param #float float +-- @param #float float -------------------------------- --- returns the current touch location in screen coordinates -- @function [parent=#Touch] getLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- returns the previous touch location in OpenGL coordinates -- @function [parent=#Touch] getPreviousLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- -- @function [parent=#Touch] Touch -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua b/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua index 5d03d65da6..e39e8adec7 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua @@ -5,20 +5,17 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionCrossFade] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionCrossFade#TransitionCrossFade ret (return value: cc.TransitionCrossFade) -------------------------------- --- js NA
--- lua NA -- @function [parent=#TransitionCrossFade] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua b/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua index 2fe8fe717c..4afd77786d 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua @@ -4,11 +4,9 @@ -- @parent_module cc -------------------------------- --- returns the Ease action that will be performed on a linear action.
--- since v0.8.2 -- @function [parent=#TransitionEaseScene] easeActionWithAction -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua index 7e98445787..73bd19113b 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, color3b_table -- @function [parent=#TransitionFade] create -- @param self --- @param #float duration +-- @param #float float -- @param #cc.Scene scene --- @param #color3b_table color +-- @param #color3b_table color3b -- @return TransitionFade#TransitionFade ret (retunr value: cc.TransitionFade) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua index 6412b19e34..de2a9b5079 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua @@ -5,15 +5,13 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionFadeBL] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionFadeBL#TransitionFadeBL ret (return value: cc.TransitionFadeBL) -------------------------------- --- -- @function [parent=#TransitionFadeBL] actionWithSize -- @param self -- @param #size_table size diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua index 435efe63a8..dbcb62a2e9 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua @@ -5,15 +5,13 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionFadeDown] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionFadeDown#TransitionFadeDown ret (return value: cc.TransitionFadeDown) -------------------------------- --- -- @function [parent=#TransitionFadeDown] actionWithSize -- @param self -- @param #size_table size diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua index cb1e539ea4..3e7160fd6b 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua @@ -5,33 +5,29 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionFadeTR] easeActionWithAction -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionFadeTR] actionWithSize -- @param self -- @param #size_table size -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionFadeTR] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionFadeTR#TransitionFadeTR ret (return value: cc.TransitionFadeTR) -------------------------------- --- -- @function [parent=#TransitionFadeTR] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua index 19c7b91167..9e3bc4ac28 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua @@ -5,15 +5,13 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionFadeUp] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionFadeUp#TransitionFadeUp ret (return value: cc.TransitionFadeUp) -------------------------------- --- -- @function [parent=#TransitionFadeUp] actionWithSize -- @param self -- @param #size_table size diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua index 9765783694..e8be2f3f92 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionFlipAngular] create -- @param self --- @param #float t --- @param #cc.Scene s --- @param #int o +-- @param #float float +-- @param #cc.Scene scene +-- @param #int orientation -- @return TransitionFlipAngular#TransitionFlipAngular ret (retunr value: cc.TransitionFlipAngular) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua index b27aa235b0..bd3d3d3660 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionFlipX] create -- @param self --- @param #float t --- @param #cc.Scene s --- @param #int o +-- @param #float float +-- @param #cc.Scene scene +-- @param #int orientation -- @return TransitionFlipX#TransitionFlipX ret (retunr value: cc.TransitionFlipX) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua index 5973c5b1f1..eebe6b56bc 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionFlipY] create -- @param self --- @param #float t --- @param #cc.Scene s --- @param #int o +-- @param #float float +-- @param #cc.Scene scene +-- @param #int orientation -- @return TransitionFlipY#TransitionFlipY ret (retunr value: cc.TransitionFlipY) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua b/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua index 3bb200c538..915c89cfa0 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionJumpZoom] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionJumpZoom#TransitionJumpZoom ret (return value: cc.TransitionJumpZoom) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua index 7da02d0375..799212f087 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionMoveInB] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionMoveInB#TransitionMoveInB ret (return value: cc.TransitionMoveInB) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua index 834ccdf1f2..dced884285 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua @@ -5,23 +5,20 @@ -- @parent_module cc -------------------------------- --- returns the action that will be performed -- @function [parent=#TransitionMoveInL] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionMoveInL] easeActionWithAction -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionMoveInL] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionMoveInL#TransitionMoveInL ret (return value: cc.TransitionMoveInL) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua index adc3bd97a4..2b67b9a3e4 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionMoveInR] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionMoveInR#TransitionMoveInR ret (return value: cc.TransitionMoveInR) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua index b71c1de3bb..40030fdda8 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionMoveInT] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionMoveInT#TransitionMoveInT ret (return value: cc.TransitionMoveInT) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua b/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua index 65982e0145..1c655d6fab 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua @@ -5,40 +5,32 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionPageTurn] actionWithSize -- @param self --- @param #size_table vector +-- @param #size_table size -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- Creates a base transition with duration and incoming scene.
--- If back is true then the effect is reversed to appear as if the incoming
--- scene is being turned from left over the outgoing scene. -- @function [parent=#TransitionPageTurn] initWithDuration -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene --- @param #bool backwards +-- @param #bool bool -- @return bool#bool ret (return value: bool) -------------------------------- --- Creates a base transition with duration and incoming scene.
--- If back is true then the effect is reversed to appear as if the incoming
--- scene is being turned from left over the outgoing scene. -- @function [parent=#TransitionPageTurn] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene --- @param #bool backwards +-- @param #bool bool -- @return TransitionPageTurn#TransitionPageTurn ret (return value: cc.TransitionPageTurn) -------------------------------- --- -- @function [parent=#TransitionPageTurn] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua index 6b4ee9c9b3..d05379f82b 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionProgress] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionProgress#TransitionProgress ret (return value: cc.TransitionProgress) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua index 2de10c764d..917c7be032 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionProgressHorizontal] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionProgressHorizontal#TransitionProgressHorizontal ret (return value: cc.TransitionProgressHorizontal) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua index 24a1e3ee1c..d60be89302 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionProgressInOut] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionProgressInOut#TransitionProgressInOut ret (return value: cc.TransitionProgressInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua index 5df3e5b9f1..c5f4e9fe18 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionProgressOutIn] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionProgressOutIn#TransitionProgressOutIn ret (return value: cc.TransitionProgressOutIn) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua index 9886d6ebfe..cf95079265 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionProgressRadialCCW] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionProgressRadialCCW#TransitionProgressRadialCCW ret (return value: cc.TransitionProgressRadialCCW) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua index 795e2047ab..83c2370933 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionProgressRadialCW] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionProgressRadialCW#TransitionProgressRadialCW ret (return value: cc.TransitionProgressRadialCW) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua index b2d75100bf..7874cd3a6f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionProgressVertical] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionProgressVertical#TransitionProgressVertical ret (return value: cc.TransitionProgressVertical) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua b/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua index 388ff0b06f..b6d5f70e6f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionRotoZoom] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionRotoZoom#TransitionRotoZoom ret (return value: cc.TransitionRotoZoom) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua b/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua index 4b5f3be37a..1a03e181d9 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua @@ -5,33 +5,28 @@ -- @parent_module cc -------------------------------- --- called after the transition finishes -- @function [parent=#TransitionScene] finish -- @param self -------------------------------- --- used by some transitions to hide the outer scene -- @function [parent=#TransitionScene] hideOutShowIn -- @param self -------------------------------- --- creates a base transition with duration and incoming scene -- @function [parent=#TransitionScene] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionScene#TransitionScene ret (return value: cc.TransitionScene) -------------------------------- --- -- @function [parent=#TransitionScene] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#TransitionScene] cleanup -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua index d34be6be7e..965126e682 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua @@ -5,10 +5,9 @@ -- @parent_module cc -------------------------------- --- creates a base transition with duration and incoming scene -- @function [parent=#TransitionSceneOriented] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @param #int orientation -- @return TransitionSceneOriented#TransitionSceneOriented ret (return value: cc.TransitionSceneOriented) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua b/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua index 2a9835a35e..28493ed5f2 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua @@ -5,17 +5,15 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionShrinkGrow] easeActionWithAction -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionShrinkGrow] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionShrinkGrow#TransitionShrinkGrow ret (return value: cc.TransitionShrinkGrow) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua index 0cc097f834..511ac8c25b 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInB] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionSlideInB] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionSlideInB#TransitionSlideInB ret (return value: cc.TransitionSlideInB) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua index ab682254c8..dce81f4ece 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua @@ -5,23 +5,20 @@ -- @parent_module cc -------------------------------- --- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInL] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionSlideInL] easeActionWithAction -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionSlideInL] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionSlideInL#TransitionSlideInL ret (return value: cc.TransitionSlideInL) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua index 3de6ed9172..10c78150b1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInR] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionSlideInR] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionSlideInR#TransitionSlideInR ret (return value: cc.TransitionSlideInR) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua index c04116778f..57dfa51ce4 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua @@ -5,16 +5,14 @@ -- @parent_module cc -------------------------------- --- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInT] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionSlideInT] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionSlideInT#TransitionSlideInT ret (return value: cc.TransitionSlideInT) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua index 6242195882..a421599f70 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua @@ -5,32 +5,28 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionSplitCols] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionSplitCols] easeActionWithAction -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionSplitCols] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionSplitCols#TransitionSplitCols ret (return value: cc.TransitionSplitCols) -------------------------------- --- -- @function [parent=#TransitionSplitCols] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua index 0c9ccd61b1..fdcbaf1feb 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua @@ -5,15 +5,13 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionSplitRows] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionSplitRows#TransitionSplitRows ret (return value: cc.TransitionSplitRows) -------------------------------- --- -- @function [parent=#TransitionSplitRows] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua b/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua index a3523d3c10..e9a4d6fc81 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua @@ -5,26 +5,23 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TransitionTurnOffTiles] easeActionWithAction -- @param self --- @param #cc.ActionInterval action +-- @param #cc.ActionInterval actioninterval -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- --- -- @function [parent=#TransitionTurnOffTiles] create -- @param self --- @param #float t +-- @param #float float -- @param #cc.Scene scene -- @return TransitionTurnOffTiles#TransitionTurnOffTiles ret (return value: cc.TransitionTurnOffTiles) -------------------------------- --- -- @function [parent=#TransitionTurnOffTiles] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua index d726097c07..10360d5cf8 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionZoomFlipAngular] create -- @param self --- @param #float t --- @param #cc.Scene s --- @param #int o +-- @param #float float +-- @param #cc.Scene scene +-- @param #int orientation -- @return TransitionZoomFlipAngular#TransitionZoomFlipAngular ret (retunr value: cc.TransitionZoomFlipAngular) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua index 0da39fdee8..fa6ed5fd29 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionZoomFlipX] create -- @param self --- @param #float t --- @param #cc.Scene s --- @param #int o +-- @param #float float +-- @param #cc.Scene scene +-- @param #int orientation -- @return TransitionZoomFlipX#TransitionZoomFlipX ret (retunr value: cc.TransitionZoomFlipX) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua index 397e989ffd..d137a545e9 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionZoomFlipY] create -- @param self --- @param #float t --- @param #cc.Scene s --- @param #int o +-- @param #float float +-- @param #cc.Scene scene +-- @param #int orientation -- @return TransitionZoomFlipY#TransitionZoomFlipY ret (retunr value: cc.TransitionZoomFlipY) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua b/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua index 7798a1f952..c7ffd3d8f4 100644 --- a/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua @@ -5,43 +5,38 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#TurnOffTiles] turnOnTile -- @param self --- @param #vec2_table pos +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#TurnOffTiles] turnOffTile -- @param self --- @param #vec2_table pos +-- @param #vec2_table vec2 -------------------------------- -- @overload self, float, size_table, unsigned int -- @overload self, float, size_table -- @function [parent=#TurnOffTiles] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #unsigned int seed +-- @param #float float +-- @param #size_table size +-- @param #unsigned int int -- @return TurnOffTiles#TurnOffTiles ret (retunr value: cc.TurnOffTiles) -------------------------------- --- -- @function [parent=#TurnOffTiles] startWithTarget -- @param self --- @param #cc.Node target +-- @param #cc.Node node -------------------------------- --- -- @function [parent=#TurnOffTiles] clone -- @param self -- @return TurnOffTiles#TurnOffTiles ret (return value: cc.TurnOffTiles) -------------------------------- --- -- @function [parent=#TurnOffTiles] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Tween.lua b/cocos/scripting/lua-bindings/auto/api/Tween.lua index 923aef489d..e4791051a9 100644 --- a/cocos/scripting/lua-bindings/auto/api/Tween.lua +++ b/cocos/scripting/lua-bindings/auto/api/Tween.lua @@ -5,70 +5,47 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#Tween] getAnimation -- @param self -- @return ArmatureAnimation#ArmatureAnimation ret (return value: ccs.ArmatureAnimation) -------------------------------- --- -- @function [parent=#Tween] gotoAndPause -- @param self --- @param #int frameIndex +-- @param #int int -------------------------------- --- Start the Process
--- param movementBoneData the MovementBoneData include all FrameData
--- param durationTo the number of frames changing to this animation needs.
--- param durationTween the number of frames this animation actual last.
--- param loop whether the animation is loop
--- loop < 0 : use the value from MovementData get from Action Editor
--- loop = 0 : this animation is not loop
--- loop > 0 : this animation is loop
--- param tweenEasing tween easing is used for calculate easing effect
--- TWEEN_EASING_MAX : use the value from MovementData get from Action Editor
--- -1 : fade out
--- 0 : line
--- 1 : fade in
--- 2 : fade in and out -- @function [parent=#Tween] play -- @param self --- @param #ccs.MovementBoneData movementBoneData --- @param #int durationTo --- @param #int durationTween --- @param #int loop --- @param #int tweenEasing +-- @param #ccs.MovementBoneData movementbonedata +-- @param #int int +-- @param #int int +-- @param #int int +-- @param #int int -------------------------------- --- -- @function [parent=#Tween] gotoAndPlay -- @param self --- @param #int frameIndex +-- @param #int int -------------------------------- --- Init with a Bone
--- param bone the Bone Tween will bind to -- @function [parent=#Tween] init -- @param self -- @param #ccs.Bone bone -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Tween] setAnimation -- @param self --- @param #ccs.ArmatureAnimation animation +-- @param #ccs.ArmatureAnimation armatureanimation -------------------------------- --- Create with a Bone
--- param bone the Bone Tween will bind to -- @function [parent=#Tween] create -- @param self -- @param #ccs.Bone bone -- @return Tween#Tween ret (return value: ccs.Tween) -------------------------------- --- -- @function [parent=#Tween] Tween -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Twirl.lua b/cocos/scripting/lua-bindings/auto/api/Twirl.lua index 8b3574ae80..cfb9105cde 100644 --- a/cocos/scripting/lua-bindings/auto/api/Twirl.lua +++ b/cocos/scripting/lua-bindings/auto/api/Twirl.lua @@ -5,62 +5,53 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Twirl] setAmplitudeRate -- @param self --- @param #float amplitudeRate +-- @param #float float -------------------------------- --- -- @function [parent=#Twirl] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Twirl] setAmplitude -- @param self --- @param #float amplitude +-- @param #float float -------------------------------- --- -- @function [parent=#Twirl] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- --- set twirl center -- @function [parent=#Twirl] setPosition -- @param self --- @param #vec2_table position +-- @param #vec2_table vec2 -------------------------------- --- get twirl center -- @function [parent=#Twirl] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- creates the action with center position, number of twirls, amplitude, a grid size and duration -- @function [parent=#Twirl] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #vec2_table position --- @param #unsigned int twirls --- @param #float amplitude +-- @param #float float +-- @param #size_table size +-- @param #vec2_table vec2 +-- @param #unsigned int int +-- @param #float float -- @return Twirl#Twirl ret (return value: cc.Twirl) -------------------------------- --- -- @function [parent=#Twirl] clone -- @param self -- @return Twirl#Twirl ret (return value: cc.Twirl) -------------------------------- --- -- @function [parent=#Twirl] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua index 3b80444050..173263c472 100644 --- a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua +++ b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua @@ -4,20 +4,18 @@ -- @parent_module cc -------------------------------- --- brief Set integer value by key.
--- js NA -- @function [parent=#UserDefault] setIntegerForKey -- @param self --- @param #char pKey --- @param #int value +-- @param #char char +-- @param #int int -------------------------------- -- @overload self, char, float -- @overload self, char -- @function [parent=#UserDefault] getFloatForKey -- @param self --- @param #char pKey --- @param #float defaultValue +-- @param #char char +-- @param #float float -- @return float#float ret (retunr value: float) -------------------------------- @@ -25,46 +23,38 @@ -- @overload self, char -- @function [parent=#UserDefault] getBoolForKey -- @param self --- @param #char pKey --- @param #bool defaultValue +-- @param #char char +-- @param #bool bool -- @return bool#bool ret (retunr value: bool) -------------------------------- --- brief Set double value by key.
--- js NA -- @function [parent=#UserDefault] setDoubleForKey -- @param self --- @param #char pKey --- @param #double value +-- @param #char char +-- @param #double double -------------------------------- --- brief Set float value by key.
--- js NA -- @function [parent=#UserDefault] setFloatForKey -- @param self --- @param #char pKey --- @param #float value +-- @param #char char +-- @param #float float -------------------------------- -- @overload self, char, string -- @overload self, char -- @function [parent=#UserDefault] getStringForKey -- @param self --- @param #char pKey --- @param #string defaultValue +-- @param #char char +-- @param #string str -- @return string#string ret (retunr value: string) -------------------------------- --- brief Set string value by key.
--- js NA -- @function [parent=#UserDefault] setStringForKey -- @param self --- @param #char pKey --- @param #string value +-- @param #char char +-- @param #string str -------------------------------- --- brief Save content to xml file
--- js NA -- @function [parent=#UserDefault] flush -- @param self @@ -73,8 +63,8 @@ -- @overload self, char -- @function [parent=#UserDefault] getIntegerForKey -- @param self --- @param #char pKey --- @param #int defaultValue +-- @param #char char +-- @param #int int -- @return int#int ret (retunr value: int) -------------------------------- @@ -82,31 +72,26 @@ -- @overload self, char -- @function [parent=#UserDefault] getDoubleForKey -- @param self --- @param #char pKey --- @param #double defaultValue +-- @param #char char +-- @param #double double -- @return double#double ret (retunr value: double) -------------------------------- --- brief Set bool value by key.
--- js NA -- @function [parent=#UserDefault] setBoolForKey -- @param self --- @param #char pKey --- @param #bool value +-- @param #char char +-- @param #bool bool -------------------------------- --- js NA -- @function [parent=#UserDefault] destroyInstance -- @param self -------------------------------- --- js NA -- @function [parent=#UserDefault] getXMLFilePath -- @param self -- @return string#string ret (return value: string) -------------------------------- --- js NA -- @function [parent=#UserDefault] isXMLFileExist -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/VBox.lua b/cocos/scripting/lua-bindings/auto/api/VBox.lua index 4f94fe822e..0955ae7c9e 100644 --- a/cocos/scripting/lua-bindings/auto/api/VBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/VBox.lua @@ -13,7 +13,6 @@ -- @return VBox#VBox ret (retunr value: ccui.VBox) -------------------------------- --- Default constructor -- @function [parent=#VBox] VBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua b/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua index 4812de8cee..36954f071d 100644 --- a/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua +++ b/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua @@ -5,109 +5,91 @@ -- @parent_module ccexp -------------------------------- --- -- @function [parent=#VideoPlayer] getFileName -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#VideoPlayer] getURL -- @param self -- @return string#string ret (return value: string) -------------------------------- --- -- @function [parent=#VideoPlayer] play -- @param self -------------------------------- --- -- @function [parent=#VideoPlayer] pause -- @param self -------------------------------- --- -- @function [parent=#VideoPlayer] setKeepAspectRatioEnabled -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- --- -- @function [parent=#VideoPlayer] resume -- @param self -------------------------------- --- -- @function [parent=#VideoPlayer] stop -- @param self -------------------------------- --- -- @function [parent=#VideoPlayer] setFullScreenEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#VideoPlayer] setFileName -- @param self --- @param #string videoPath +-- @param #string str -------------------------------- --- -- @function [parent=#VideoPlayer] setURL -- @param self --- @param #string _videoURL +-- @param #string str -------------------------------- --- -- @function [parent=#VideoPlayer] isKeepAspectRatioEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#VideoPlayer] onPlayEvent -- @param self --- @param #int event +-- @param #int int -------------------------------- --- -- @function [parent=#VideoPlayer] isFullScreenEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#VideoPlayer] isPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#VideoPlayer] seekTo -- @param self --- @param #float sec +-- @param #float float -------------------------------- --- -- @function [parent=#VideoPlayer] create -- @param self -- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer ret (return value: cc.experimental::ui::VideoPlayer) -------------------------------- --- -- @function [parent=#VideoPlayer] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table transform --- @param #unsigned int flags +-- @param #mat4_table mat4 +-- @param #unsigned int int -------------------------------- --- -- @function [parent=#VideoPlayer] setVisible -- @param self --- @param #bool visible +-- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua b/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua index 3d7b5e1115..2ca2917585 100644 --- a/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua @@ -5,31 +5,26 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#VisibleFrame] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#VisibleFrame] setVisible -- @param self --- @param #bool visible +-- @param #bool bool -------------------------------- --- -- @function [parent=#VisibleFrame] create -- @param self -- @return VisibleFrame#VisibleFrame ret (return value: ccs.VisibleFrame) -------------------------------- --- -- @function [parent=#VisibleFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#VisibleFrame] VisibleFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Waves.lua b/cocos/scripting/lua-bindings/auto/api/Waves.lua index 53569100b4..e8de3e0b5c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Waves.lua +++ b/cocos/scripting/lua-bindings/auto/api/Waves.lua @@ -5,51 +5,44 @@ -- @parent_module cc -------------------------------- --- -- @function [parent=#Waves] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#Waves] setAmplitude -- @param self --- @param #float amplitude +-- @param #float float -------------------------------- --- -- @function [parent=#Waves] setAmplitudeRate -- @param self --- @param #float amplitudeRate +-- @param #float float -------------------------------- --- -- @function [parent=#Waves] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- --- initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration -- @function [parent=#Waves] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #unsigned int waves --- @param #float amplitude --- @param #bool horizontal --- @param #bool vertical +-- @param #float float +-- @param #size_table size +-- @param #unsigned int int +-- @param #float float +-- @param #bool bool +-- @param #bool bool -- @return Waves#Waves ret (return value: cc.Waves) -------------------------------- --- -- @function [parent=#Waves] clone -- @param self -- @return Waves#Waves ret (return value: cc.Waves) -------------------------------- --- -- @function [parent=#Waves] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Waves3D.lua b/cocos/scripting/lua-bindings/auto/api/Waves3D.lua index 7ffc9ed324..6eb07c8021 100644 --- a/cocos/scripting/lua-bindings/auto/api/Waves3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Waves3D.lua @@ -5,49 +5,42 @@ -- @parent_module cc -------------------------------- --- returns the amplitude rate -- @function [parent=#Waves3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- sets the amplitude to the effect -- @function [parent=#Waves3D] setAmplitude -- @param self --- @param #float amplitude +-- @param #float float -------------------------------- --- sets the ampliture rate -- @function [parent=#Waves3D] setAmplitudeRate -- @param self --- @param #float amplitudeRate +-- @param #float float -------------------------------- --- returns the amplitude of the effect -- @function [parent=#Waves3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- --- creates an action with duration, grid size, waves and amplitude -- @function [parent=#Waves3D] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #unsigned int waves --- @param #float amplitude +-- @param #float float +-- @param #size_table size +-- @param #unsigned int int +-- @param #float float -- @return Waves3D#Waves3D ret (return value: cc.Waves3D) -------------------------------- --- -- @function [parent=#Waves3D] clone -- @param self -- @return Waves3D#Waves3D ret (return value: cc.Waves3D) -------------------------------- --- -- @function [parent=#Waves3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua index 14e5255895..35c8de579e 100644 --- a/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua @@ -5,49 +5,42 @@ -- @parent_module cc -------------------------------- --- waves amplitude rate -- @function [parent=#WavesTiles3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- --- -- @function [parent=#WavesTiles3D] setAmplitude -- @param self --- @param #float amplitude +-- @param #float float -------------------------------- --- -- @function [parent=#WavesTiles3D] setAmplitudeRate -- @param self --- @param #float amplitudeRate +-- @param #float float -------------------------------- --- waves amplitude -- @function [parent=#WavesTiles3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- --- creates the action with a number of waves, the waves amplitude, the grid size and the duration -- @function [parent=#WavesTiles3D] create -- @param self --- @param #float duration --- @param #size_table gridSize --- @param #unsigned int waves --- @param #float amplitude +-- @param #float float +-- @param #size_table size +-- @param #unsigned int int +-- @param #float float -- @return WavesTiles3D#WavesTiles3D ret (return value: cc.WavesTiles3D) -------------------------------- --- -- @function [parent=#WavesTiles3D] clone -- @param self -- @return WavesTiles3D#WavesTiles3D ret (return value: cc.WavesTiles3D) -------------------------------- --- -- @function [parent=#WavesTiles3D] update -- @param self --- @param #float time +-- @param #float float return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Widget.lua b/cocos/scripting/lua-bindings/auto/api/Widget.lua index e840a16900..b473cb3332 100644 --- a/cocos/scripting/lua-bindings/auto/api/Widget.lua +++ b/cocos/scripting/lua-bindings/auto/api/Widget.lua @@ -5,304 +5,219 @@ -- @parent_module ccui -------------------------------- --- Changes the percent that is widget's percent size
--- param percent that is widget's percent size -- @function [parent=#Widget] setSizePercent -- @param self --- @param #vec2_table percent +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#Widget] getCustomSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- -- @function [parent=#Widget] getLeftBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Sets whether the widget should be flipped horizontally or not.
--- param bFlippedX true if the widget should be flipped horizaontally, false otherwise. -- @function [parent=#Widget] setFlippedX -- @param self --- @param #bool flippedX +-- @param #bool bool -------------------------------- --- Gets the Virtual Renderer of widget.
--- For example, a button's Virtual Renderer is it's texture renderer.
--- return Node pointer. -- @function [parent=#Widget] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- --- brief Allow widget touch events to propagate to its parents. Set false will disable propagation -- @function [parent=#Widget] setPropagateTouchEvents -- @param self --- @param #bool isPropagate +-- @param #bool bool -------------------------------- --- Returns size percent of widget
--- return size percent -- @function [parent=#Widget] getSizePercent -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Set the percent(x,y) of the widget in OpenGL coordinates
--- param percent The percent (x,y) of the widget in OpenGL coordinates -- @function [parent=#Widget] setPositionPercent -- @param self --- @param #vec2_table percent +-- @param #vec2_table vec2 -------------------------------- --- brief Specify widget to swallow touches or not -- @function [parent=#Widget] setSwallowTouches -- @param self --- @param #bool swallow +-- @param #bool bool -------------------------------- --- -- @function [parent=#Widget] getLayoutSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Sets whether the widget is hilighted
--- The default value is false, a widget is default to not hilighted
--- param hilight true if the widget is hilighted, false if the widget is not hilighted. -- @function [parent=#Widget] setHighlighted -- @param self --- @param #bool hilight +-- @param #bool bool -------------------------------- --- Changes the position type of the widget
--- see PositionType
--- param type the position type of widget -- @function [parent=#Widget] setPositionType -- @param self --- @param #int type +-- @param #int positiontype -------------------------------- --- Query whether the widget ignores user deinfed content size or not
--- return bool -- @function [parent=#Widget] isIgnoreContentAdaptWithSize -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Widget] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- Determines if the widget is highlighted
--- return true if the widget is highlighted, false if the widget is not hignlighted . -- @function [parent=#Widget] isHighlighted -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Gets LayoutParameter of widget.
--- see LayoutParameter
--- param type Relative or Linear
--- return LayoutParameter -- @function [parent=#Widget] getLayoutParameter -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- --- Checks a point if is in widget's space
--- param point
--- return true if the point is in widget's space, flase otherwise. -- @function [parent=#Widget] hitTest -- @param self --- @param #vec2_table pt +-- @param #vec2_table vec2 -- @return bool#bool ret (return value: bool) -------------------------------- --- Gets the position type of the widget
--- see PositionType
--- return type the position type of widget -- @function [parent=#Widget] getPositionType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Widget] getTopBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Note: when you set _ignoreSize to true, no matther you call setContentSize or not,
--- the widget size is always equal to the return value of the member function getVirtualRendererSize.
--- param ignore, set member variabl _ignoreSize to ignore -- @function [parent=#Widget] ignoreContentAdaptWithSize -- @param self --- @param #bool ignore +-- @param #bool bool -------------------------------- --- When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
--- If the widget is not in a layout, it will return itself
--- param dir the direction to look for the next focused widget in a layout
--- param current the current focused widget
--- return the next focused widget in a layout -- @function [parent=#Widget] findNextFocusedWidget -- @param self --- @param #int direction --- @param #ccui.Widget current +-- @param #int focusdirection +-- @param #ccui.Widget widget -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- Determines if the widget is enabled
--- return true if the widget is enabled, false if the widget is disabled. -- @function [parent=#Widget] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- return whether the widget is focused or not -- @function [parent=#Widget] isFocused -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Widget] getTouchBeganPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Determines if the widget is touch enabled
--- return true if the widget is touch enabled, false if the widget is touch disabled. -- @function [parent=#Widget] isTouchEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Widget] getActionTag -- @param self -- @return int#int ret (return value: int) -------------------------------- --- Gets world position of widget.
--- return world position of widget. -- @function [parent=#Widget] getWorldPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- return true represent the widget could accept focus, false represent the widget couldn't accept focus -- @function [parent=#Widget] isFocusEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- param focus pass true to let the widget get focus or pass false to let the widget lose focus
--- return void -- @function [parent=#Widget] setFocused -- @param self --- @param #bool focus +-- @param #bool bool -------------------------------- --- -- @function [parent=#Widget] setActionTag -- @param self --- @param #int tag +-- @param #int int -------------------------------- --- Sets whether the widget is touch enabled
--- The default value is false, a widget is default to touch disabled
--- param visible true if the widget is touch enabled, false if the widget is touch disabled. -- @function [parent=#Widget] setTouchEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- Sets whether the widget should be flipped vertically or not.
--- param bFlippedY true if the widget should be flipped vertically, flase otherwise. -- @function [parent=#Widget] setFlippedY -- @param self --- @param #bool flippedY +-- @param #bool bool -------------------------------- --- Sets whether the widget is enabled
--- true if the widget is enabled, widget may be touched , false if the widget is disabled, widget cannot be touched.
--- The default value is true, a widget is default to enabled
--- param enabled -- @function [parent=#Widget] setEnabled -- @param self --- @param #bool enabled +-- @param #bool bool -------------------------------- --- -- @function [parent=#Widget] getRightBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- --- To set the bright style of widget.
--- see BrightStyle
--- param style BrightStyle::NORMAL means the widget is in normal state, BrightStyle::HIGHLIGHT means the widget is in highlight state. -- @function [parent=#Widget] setBrightStyle -- @param self --- @param #int style +-- @param #int brightstyle -------------------------------- --- Sets a LayoutParameter to widget.
--- see LayoutParameter
--- param LayoutParameter pointer
--- param type Relative or Linear -- @function [parent=#Widget] setLayoutParameter -- @param self --- @param #ccui.LayoutParameter parameter +-- @param #ccui.LayoutParameter layoutparameter -------------------------------- --- -- @function [parent=#Widget] clone -- @param self -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- param enable pass true/false to enable/disable the focus ability of a widget
--- return void -- @function [parent=#Widget] setFocusEnabled -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- --- -- @function [parent=#Widget] getBottomBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- --- Determines if the widget is bright
--- return true if the widget is bright, false if the widget is dark. -- @function [parent=#Widget] isBright -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Widget] isPropagateTouchEvents -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Widget] getCurrentFocusedWidget -- @param self -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- when a widget calls this method, it will get focus immediately. -- @function [parent=#Widget] requestFocus -- @param self @@ -311,134 +226,95 @@ -- @overload self -- @function [parent=#Widget] updateSizeAndPosition -- @param self --- @param #size_table parentSize +-- @param #size_table size -------------------------------- --- -- @function [parent=#Widget] getTouchMovePosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Gets the size type of widget.
--- see SizeType
--- param type that is widget's size type -- @function [parent=#Widget] getSizeType -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#Widget] addTouchEventListener -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- -- @function [parent=#Widget] getTouchEndPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Gets the percent (x,y) of the widget in OpenGL coordinates
--- see setPosition(const Vec2&)
--- return The percent (x,y) of the widget in OpenGL coordinates -- @function [parent=#Widget] getPositionPercent -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- Set a click event handler to the widget -- @function [parent=#Widget] addClickEventListener -- @param self --- @param #function callback +-- @param #function func -------------------------------- --- Returns the flag which indicates whether the widget is flipped horizontally or not.
--- It only flips the texture of the widget, and not the texture of the widget's children.
--- Also, flipping the texture doesn't alter the anchorPoint.
--- If you want to flip the anchorPoint too, and/or to flip the children too use:
--- widget->setScaleX(sprite->getScaleX() * -1);
--- return true if the widget is flipped horizaontally, false otherwise. -- @function [parent=#Widget] isFlippedX -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- Return the flag which indicates whether the widget is flipped vertically or not.
--- It only flips the texture of the widget, and not the texture of the widget's children.
--- Also, flipping the texture doesn't alter the anchorPoint.
--- If you want to flip the anchorPoint too, and/or to flip the children too use:
--- widget->setScaleY(widget->getScaleY() * -1);
--- return true if the widget is flipped vertically, flase otherwise. -- @function [parent=#Widget] isFlippedY -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Widget] isClippingParentContainsPoint -- @param self --- @param #vec2_table pt +-- @param #vec2_table vec2 -- @return bool#bool ret (return value: bool) -------------------------------- --- Changes the size type of widget.
--- see SizeType
--- param type that is widget's size type -- @function [parent=#Widget] setSizeType -- @param self --- @param #int type +-- @param #int sizetype -------------------------------- --- Sets whether the widget is bright
--- The default value is true, a widget is default to bright
--- param visible true if the widget is bright, false if the widget is dark. -- @function [parent=#Widget] setBright -- @param self --- @param #bool bright +-- @param #bool bool -------------------------------- --- -- @function [parent=#Widget] isSwallowTouches -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- --- -- @function [parent=#Widget] enableDpadNavigation -- @param self --- @param #bool enable +-- @param #bool bool -------------------------------- --- Allocates and initializes a widget. -- @function [parent=#Widget] create -- @param self -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- --- Returns the "class name" of widget. -- @function [parent=#Widget] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- --- Changes the position (x,y) of the widget in OpenGL coordinates
--- Usually we use p(x,y) to compose Vec2 object.
--- The original point (0,0) is at the left-bottom corner of screen.
--- param position The position (x,y) of the widget in OpenGL coordinates -- @function [parent=#Widget] setPosition -- @param self --- @param #vec2_table pos +-- @param #vec2_table vec2 -------------------------------- --- -- @function [parent=#Widget] setContentSize -- @param self --- @param #size_table contentSize +-- @param #size_table size -------------------------------- --- Default constructor -- @function [parent=#Widget] Widget -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua b/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua index 6a89744ead..aa0999498e 100644 --- a/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua @@ -5,31 +5,26 @@ -- @parent_module ccs -------------------------------- --- -- @function [parent=#ZOrderFrame] getZOrder -- @param self -- @return int#int ret (return value: int) -------------------------------- --- -- @function [parent=#ZOrderFrame] setZOrder -- @param self --- @param #int zorder +-- @param #int int -------------------------------- --- -- @function [parent=#ZOrderFrame] create -- @param self -- @return ZOrderFrame#ZOrderFrame ret (return value: ccs.ZOrderFrame) -------------------------------- --- -- @function [parent=#ZOrderFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- --- -- @function [parent=#ZOrderFrame] ZOrderFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua index 5f7bcabe55..99551a8c83 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua @@ -2,8 +2,8 @@ -- @module cc -------------------------------------------------------- --- the cc Mesh --- @field [parent=#cc] Mesh#Mesh Mesh preloaded module +-- the cc Skeleton3D +-- @field [parent=#cc] Skeleton3D#Skeleton3D Skeleton3D preloaded module -------------------------------------------------------- @@ -12,8 +12,8 @@ -------------------------------------------------------- --- the cc Skeleton3D --- @field [parent=#cc] Skeleton3D#Skeleton3D Skeleton3D preloaded module +-- the cc Mesh +-- @field [parent=#cc] Mesh#Mesh Mesh preloaded module -------------------------------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua index 92622ff8ba..c4905a9598 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua @@ -41,21 +41,6 @@ -- @field [parent=#cc] Node#Node Node preloaded module --------------------------------------------------------- --- the cc GLProgramState --- @field [parent=#cc] GLProgramState#GLProgramState GLProgramState preloaded module - - --------------------------------------------------------- --- the cc AtlasNode --- @field [parent=#cc] AtlasNode#AtlasNode AtlasNode preloaded module - - --------------------------------------------------------- --- the cc LabelAtlas --- @field [parent=#cc] LabelAtlas#LabelAtlas LabelAtlas preloaded module - - -------------------------------------------------------- -- the cc Scene -- @field [parent=#cc] Scene#Scene Scene preloaded module @@ -746,14 +731,24 @@ -- @field [parent=#cc] CatmullRomBy#CatmullRomBy CatmullRomBy preloaded module +-------------------------------------------------------- +-- the cc GLProgramState +-- @field [parent=#cc] GLProgramState#GLProgramState GLProgramState preloaded module + + +-------------------------------------------------------- +-- the cc AtlasNode +-- @field [parent=#cc] AtlasNode#AtlasNode AtlasNode preloaded module + + -------------------------------------------------------- -- the cc DrawNode -- @field [parent=#cc] DrawNode#DrawNode DrawNode preloaded module -------------------------------------------------------- --- the cc GLProgram --- @field [parent=#cc] GLProgram#GLProgram GLProgram preloaded module +-- the cc LabelAtlas +-- @field [parent=#cc] LabelAtlas#LabelAtlas LabelAtlas preloaded module -------------------------------------------------------- @@ -1022,13 +1017,13 @@ -------------------------------------------------------- --- the cc Sprite --- @field [parent=#cc] Sprite#Sprite Sprite preloaded module +-- the cc ProgressTimer +-- @field [parent=#cc] ProgressTimer#ProgressTimer ProgressTimer preloaded module -------------------------------------------------------- --- the cc ProgressTimer --- @field [parent=#cc] ProgressTimer#ProgressTimer ProgressTimer preloaded module +-- the cc Sprite +-- @field [parent=#cc] Sprite#Sprite Sprite preloaded module -------------------------------------------------------- @@ -1131,6 +1126,11 @@ -- @field [parent=#cc] TiledGrid3D#TiledGrid3D TiledGrid3D preloaded module +-------------------------------------------------------- +-- the cc GLProgram +-- @field [parent=#cc] GLProgram#GLProgram GLProgram preloaded module + + -------------------------------------------------------- -- the cc GLProgramCache -- @field [parent=#cc] GLProgramCache#GLProgramCache GLProgramCache preloaded module diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 26d3bc8434..77190063f7 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -5,6 +5,987 @@ +int lua_cocos2dx_3d_Skeleton3D_getBoneByName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByName"); + if(!ok) + return 0; + cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getRootBone(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Skeleton3D:getRootBone"); + if(!ok) + return 0; + cocos2d::Bone3D* ret = cobj->getRootBone(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootBone",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateBoneMatrix(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:updateBoneMatrix",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getBoneByIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned int arg0; + + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByIndex"); + if(!ok) + return 0; + cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); + object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getRootCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getRootCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getBoneIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Bone3D* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); + if(!ok) + return 0; + int ret = cobj->getBoneIndex(arg0); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Skeleton3D_getBoneCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getBoneCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'.",&tolua_err); +#endif + + return 0; +} +static int lua_cocos2dx_3d_Skeleton3D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Skeleton3D)"); + return 0; +} + +int lua_register_cocos2dx_3d_Skeleton3D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Skeleton3D"); + tolua_cclass(tolua_S,"Skeleton3D","cc.Skeleton3D","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"Skeleton3D"); + tolua_function(tolua_S,"getBoneByName",lua_cocos2dx_3d_Skeleton3D_getBoneByName); + tolua_function(tolua_S,"getRootBone",lua_cocos2dx_3d_Skeleton3D_getRootBone); + tolua_function(tolua_S,"updateBoneMatrix",lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix); + tolua_function(tolua_S,"getBoneByIndex",lua_cocos2dx_3d_Skeleton3D_getBoneByIndex); + tolua_function(tolua_S,"getRootCount",lua_cocos2dx_3d_Skeleton3D_getRootCount); + tolua_function(tolua_S,"getBoneIndex",lua_cocos2dx_3d_Skeleton3D_getBoneIndex); + tolua_function(tolua_S,"getBoneCount",lua_cocos2dx_3d_Skeleton3D_getBoneCount); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Skeleton3D).name(); + g_luaType[typeName] = "cc.Skeleton3D"; + g_typeCast["Skeleton3D"] = "cc.Skeleton3D"; + return 1; +} + +int lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFaceEnabled"); + if(!ok) + return 0; + cobj->setCullFaceEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFaceEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setTexture'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Texture2D* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + + if (!ok) { break; } + cobj->setTexture(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:setTexture"); + + if (!ok) { break; } + cobj->setTexture(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setTexture",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_removeAllAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->removeAllAttachNode(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAllAttachNode",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::BlendFunc arg0; + + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; + if(!ok) + return 0; + cobj->setBlendFunc(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setBlendFunc",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMesh(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMesh'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Mesh* ret = cobj->getMesh(); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMesh",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMesh'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getBlendFunc(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); + blendfunc_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getBlendFunc",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_setCullFace(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + unsigned int arg0; + + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFace"); + if(!ok) + return 0; + cobj->setCullFace(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFace",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_removeAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:removeAttachNode"); + if(!ok) + return 0; + cobj->removeAttachNode(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAttachNode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMeshByIndex(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Sprite3D:getMeshByIndex"); + if(!ok) + return 0; + cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByIndex",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getMeshByName(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getMeshByName"); + if(!ok) + return 0; + cocos2d::Mesh* ret = cobj->getMeshByName(arg0); + object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByName",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getSkeleton(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Skeleton3D* ret = cobj->getSkeleton(); + object_to_luaval(tolua_S, "cc.Skeleton3D",(cocos2d::Skeleton3D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getSkeleton",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_getAttachNode(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getAttachNode"); + if(!ok) + return 0; + cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); + object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getAttachNode",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Sprite3D_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,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Sprite3D:create"); + if (!ok) { break; } + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); + if (!ok) { break; } + cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); + object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); + return 1; + } + } while (0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_3d_Sprite3D_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (Sprite3D)"); + return 0; +} + +int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.Sprite3D"); + tolua_cclass(tolua_S,"Sprite3D","cc.Sprite3D","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"Sprite3D"); + tolua_function(tolua_S,"setCullFaceEnabled",lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled); + tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Sprite3D_setTexture); + tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_Sprite3D_removeAllAttachNode); + tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Sprite3D_setBlendFunc); + tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_Sprite3D_getMesh); + tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Sprite3D_getBlendFunc); + tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_Sprite3D_setCullFace); + tolua_function(tolua_S,"removeAttachNode",lua_cocos2dx_3d_Sprite3D_removeAttachNode); + tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_Sprite3D_getMeshByIndex); + tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_Sprite3D_getMeshByName); + tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_3d_Sprite3D_getSkeleton); + tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_Sprite3D_getAttachNode); + tolua_function(tolua_S,"create", lua_cocos2dx_3d_Sprite3D_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::Sprite3D).name(); + g_luaType[typeName] = "cc.Sprite3D"; + g_typeCast["Sprite3D"] = "cc.Sprite3D"; + return 1; +} + int lua_cocos2dx_3d_Mesh_getMeshVertexAttribCount(lua_State* tolua_S) { int argc = 0; @@ -308,8 +1289,7 @@ int lua_cocos2dx_3d_Mesh_setBlendFunc(lua_State* tolua_S) { cocos2d::BlendFunc arg0; - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc - ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; if(!ok) return 0; cobj->setBlendFunc(arg0); @@ -899,988 +1879,6 @@ int lua_register_cocos2dx_3d_Mesh(lua_State* tolua_S) return 1; } -int lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFaceEnabled"); - if(!ok) - return 0; - cobj->setCullFaceEnabled(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFaceEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - - if (!ok) { break; } - cobj->setTexture(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:setTexture"); - - if (!ok) { break; } - cobj->setTexture(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_removeAllAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->removeAllAttachNode(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAllAttachNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAllAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::BlendFunc arg0; - - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc - ok = false; - if(!ok) - return 0; - cobj->setBlendFunc(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setBlendFunc",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMesh(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMesh'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMesh(); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMesh",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMesh'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_setCullFace(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Sprite3D:setCullFace"); - if(!ok) - return 0; - cobj->setCullFace(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:setCullFace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_setCullFace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_removeAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:removeAttachNode"); - if(!ok) - return 0; - cobj->removeAttachNode(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:removeAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_removeAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMeshByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Sprite3D:getMeshByIndex"); - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getMeshByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getMeshByName"); - if(!ok) - return 0; - cocos2d::Mesh* ret = cobj->getMeshByName(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getMeshByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getMeshByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getSkeleton(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Skeleton3D* ret = cobj->getSkeleton(); - object_to_luaval(tolua_S, "cc.Skeleton3D",(cocos2d::Skeleton3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getSkeleton",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getSkeleton'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_getAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Sprite3D* 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.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Sprite3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:getAttachNode"); - if(!ok) - return 0; - cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); - object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Sprite3D:getAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_getAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Sprite3D_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,"cc.Sprite3D",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Sprite3D:create"); - if (!ok) { break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Sprite3D:create"); - if (!ok) { break; } - cocos2d::Sprite3D* ret = cocos2d::Sprite3D::create(arg0); - object_to_luaval(tolua_S, "cc.Sprite3D",(cocos2d::Sprite3D*)ret); - return 1; - } - } while (0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Sprite3D:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Sprite3D_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_3d_Sprite3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Sprite3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Sprite3D"); - tolua_cclass(tolua_S,"Sprite3D","cc.Sprite3D","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"Sprite3D"); - tolua_function(tolua_S,"setCullFaceEnabled",lua_cocos2dx_3d_Sprite3D_setCullFaceEnabled); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_Sprite3D_setTexture); - tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_Sprite3D_removeAllAttachNode); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_Sprite3D_setBlendFunc); - tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_Sprite3D_getMesh); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_Sprite3D_getBlendFunc); - tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_Sprite3D_setCullFace); - tolua_function(tolua_S,"removeAttachNode",lua_cocos2dx_3d_Sprite3D_removeAttachNode); - tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_Sprite3D_getMeshByIndex); - tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_Sprite3D_getMeshByName); - tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_3d_Sprite3D_getSkeleton); - tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_Sprite3D_getAttachNode); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_Sprite3D_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Sprite3D).name(); - g_luaType[typeName] = "cc.Sprite3D"; - g_typeCast["Sprite3D"] = "cc.Sprite3D"; - return 1; -} - -int lua_cocos2dx_3d_Skeleton3D_getBoneByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByName"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getBoneByName(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getRootBone(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Skeleton3D:getRootBone"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getRootBone(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootBone",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootBone'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateBoneMatrix(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:updateBoneMatrix",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Skeleton3D:getBoneByIndex"); - if(!ok) - return 0; - cocos2d::Bone3D* ret = cobj->getBoneByIndex(arg0); - object_to_luaval(tolua_S, "cc.Bone3D",(cocos2d::Bone3D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getRootCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getRootCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getRootCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getRootCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Bone3D* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Bone3D",&arg0); - if(!ok) - return 0; - int ret = cobj->getBoneIndex(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Skeleton3D_getBoneCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Skeleton3D* 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.Skeleton3D",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Skeleton3D*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getBoneCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Skeleton3D:getBoneCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Skeleton3D_getBoneCount'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_3d_Skeleton3D_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Skeleton3D)"); - return 0; -} - -int lua_register_cocos2dx_3d_Skeleton3D(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Skeleton3D"); - tolua_cclass(tolua_S,"Skeleton3D","cc.Skeleton3D","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"Skeleton3D"); - tolua_function(tolua_S,"getBoneByName",lua_cocos2dx_3d_Skeleton3D_getBoneByName); - tolua_function(tolua_S,"getRootBone",lua_cocos2dx_3d_Skeleton3D_getRootBone); - tolua_function(tolua_S,"updateBoneMatrix",lua_cocos2dx_3d_Skeleton3D_updateBoneMatrix); - tolua_function(tolua_S,"getBoneByIndex",lua_cocos2dx_3d_Skeleton3D_getBoneByIndex); - tolua_function(tolua_S,"getRootCount",lua_cocos2dx_3d_Skeleton3D_getRootCount); - tolua_function(tolua_S,"getBoneIndex",lua_cocos2dx_3d_Skeleton3D_getBoneIndex); - tolua_function(tolua_S,"getBoneCount",lua_cocos2dx_3d_Skeleton3D_getBoneCount); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::Skeleton3D).name(); - g_luaType[typeName] = "cc.Skeleton3D"; - g_typeCast["Skeleton3D"] = "cc.Skeleton3D"; - return 1; -} - int lua_cocos2dx_3d_Animation3D_getDuration(lua_State* tolua_S) { int argc = 0; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 2068e37ba1..3f90a87db1 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -7943,6 +7943,52 @@ int lua_cocos2dx_Node_getContentSize(lua_State* tolua_S) return 0; } +int lua_cocos2dx_Node_stopAllActionsByTag(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_stopAllActionsByTag'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + int arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:stopAllActionsByTag"); + if(!ok) + return 0; + cobj->stopAllActionsByTag(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:stopAllActionsByTag",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_stopAllActionsByTag'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Node_getColor(lua_State* tolua_S) { int argc = 0; @@ -8968,6 +9014,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"cleanup",lua_cocos2dx_Node_cleanup); tolua_function(tolua_S,"getComponent",lua_cocos2dx_Node_getComponent); tolua_function(tolua_S,"getContentSize",lua_cocos2dx_Node_getContentSize); + tolua_function(tolua_S,"stopAllActionsByTag",lua_cocos2dx_Node_stopAllActionsByTag); tolua_function(tolua_S,"getColor",lua_cocos2dx_Node_getColor); tolua_function(tolua_S,"getBoundingBox",lua_cocos2dx_Node_getBoundingBox); tolua_function(tolua_S,"setEventDispatcher",lua_cocos2dx_Node_setEventDispatcher); @@ -8995,1722 +9042,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) return 1; } -int lua_cocos2dx_GLProgramState_setUniformTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - unsigned int arg1; - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - unsigned int arg1; - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); - - if (!ok) { break; } - cobj->setUniformTexture(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformTexture",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformMat4(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformMat4'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cocos2d::Mat4 arg1; - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cobj->setUniformMat4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cocos2d::Mat4 arg1; - ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); - - if (!ok) { break; } - cobj->setUniformMat4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformMat4",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformMat4'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_applyUniforms(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyUniforms'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->applyUniforms(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyUniforms",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyUniforms'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_applyGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Mat4 arg0; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgramState:applyGLProgram"); - if(!ok) - return 0; - cobj->applyGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getUniformCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getUniformCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getUniformCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getUniformCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getUniformCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_applyAttributes(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyAttributes'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->applyAttributes(); - return 0; - } - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLProgramState:applyAttributes"); - if(!ok) - return 0; - cobj->applyAttributes(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyAttributes",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyAttributes'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformFloat(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformFloat'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - cobj->setUniformFloat(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - double arg1; - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); - - if (!ok) { break; } - cobj->setUniformFloat(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformFloat",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformFloat'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec3(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec3'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cocos2d::Vec3 arg1; - ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cobj->setUniformVec3(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cocos2d::Vec3 arg1; - ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); - - if (!ok) { break; } - cobj->setUniformVec3(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec3",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec3'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformInt(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformInt'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - cobj->setUniformInt(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); - - if (!ok) { break; } - cobj->setUniformInt(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformInt",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformInt'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getVertexAttribCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getVertexAttribCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec4(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec4'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cocos2d::Vec4 arg1; - ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cobj->setUniformVec4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cocos2d::Vec4 arg1; - ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); - - if (!ok) { break; } - cobj->setUniformVec4(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec4",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec4'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgram* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cobj->setGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_setUniformVec2(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec2'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - int arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cocos2d::Vec2 arg1; - ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cobj->setUniformVec2(arg0, arg1); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cocos2d::Vec2 arg1; - ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); - - if (!ok) { break; } - cobj->setUniformVec2(arg0, arg1); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec2",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec2'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getVertexAttribsFlags(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - unsigned int ret = cobj->getVertexAttribsFlags(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribsFlags",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_apply(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_apply'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Mat4 arg0; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgramState:apply"); - if(!ok) - return 0; - cobj->apply(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:apply",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_apply'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_getGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::GLProgram* ret = cobj->getGLProgram(); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getGLProgram",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getGLProgram'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgramState_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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::create(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:getOrCreateWithGLProgramName"); - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgramName",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram(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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::GLProgram* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgram(arg0); - object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgram",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_GLProgramState_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (GLProgramState)"); - return 0; -} - -int lua_register_cocos2dx_GLProgramState(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.GLProgramState"); - tolua_cclass(tolua_S,"GLProgramState","cc.GLProgramState","cc.Ref",nullptr); - - tolua_beginmodule(tolua_S,"GLProgramState"); - tolua_function(tolua_S,"setUniformTexture",lua_cocos2dx_GLProgramState_setUniformTexture); - tolua_function(tolua_S,"setUniformMat4",lua_cocos2dx_GLProgramState_setUniformMat4); - tolua_function(tolua_S,"applyUniforms",lua_cocos2dx_GLProgramState_applyUniforms); - tolua_function(tolua_S,"applyGLProgram",lua_cocos2dx_GLProgramState_applyGLProgram); - tolua_function(tolua_S,"getUniformCount",lua_cocos2dx_GLProgramState_getUniformCount); - tolua_function(tolua_S,"applyAttributes",lua_cocos2dx_GLProgramState_applyAttributes); - tolua_function(tolua_S,"setUniformFloat",lua_cocos2dx_GLProgramState_setUniformFloat); - tolua_function(tolua_S,"setUniformVec3",lua_cocos2dx_GLProgramState_setUniformVec3); - tolua_function(tolua_S,"setUniformInt",lua_cocos2dx_GLProgramState_setUniformInt); - tolua_function(tolua_S,"getVertexAttribCount",lua_cocos2dx_GLProgramState_getVertexAttribCount); - tolua_function(tolua_S,"setUniformVec4",lua_cocos2dx_GLProgramState_setUniformVec4); - tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_GLProgramState_setGLProgram); - tolua_function(tolua_S,"setUniformVec2",lua_cocos2dx_GLProgramState_setUniformVec2); - tolua_function(tolua_S,"getVertexAttribsFlags",lua_cocos2dx_GLProgramState_getVertexAttribsFlags); - tolua_function(tolua_S,"apply",lua_cocos2dx_GLProgramState_apply); - tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_GLProgramState_getGLProgram); - tolua_function(tolua_S,"create", lua_cocos2dx_GLProgramState_create); - tolua_function(tolua_S,"getOrCreateWithGLProgramName", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName); - tolua_function(tolua_S,"getOrCreateWithGLProgram", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::GLProgramState).name(); - g_luaType[typeName] = "cc.GLProgramState"; - g_typeCast["GLProgramState"] = "cc.GLProgramState"; - return 1; -} - -int lua_cocos2dx_AtlasNode_updateAtlasValues(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateAtlasValues(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:updateAtlasValues",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_getTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Texture2D* ret = cobj->getTexture(); - object_to_luaval(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTexture",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_setTextureAtlas(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::TextureAtlas* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0); - if(!ok) - return 0; - cobj->setTextureAtlas(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTextureAtlas",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_getTextureAtlas(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); - object_to_luaval(tolua_S, "cc.TextureAtlas",(cocos2d::TextureAtlas*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTextureAtlas",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_getQuadsToDraw(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - ssize_t ret = cobj->getQuadsToDraw(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getQuadsToDraw",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setTexture'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Texture2D* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); - if(!ok) - return 0; - cobj->setTexture(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_setQuadsToDraw(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - ssize_t arg0; - - ok &= luaval_to_ssize(tolua_S, 2, &arg0, "cc.AtlasNode:setQuadsToDraw"); - if(!ok) - return 0; - cobj->setQuadsToDraw(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setQuadsToDraw",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_AtlasNode_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,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 4) - { - std::string arg0; - int arg1; - int arg2; - int arg3; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AtlasNode:create"); - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.AtlasNode:create"); - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.AtlasNode:create"); - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.AtlasNode:create"); - if(!ok) - return 0; - cocos2d::AtlasNode* ret = cocos2d::AtlasNode::create(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.AtlasNode",(cocos2d::AtlasNode*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AtlasNode:create",argc, 4); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_AtlasNode_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (AtlasNode)"); - return 0; -} - -int lua_register_cocos2dx_AtlasNode(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.AtlasNode"); - tolua_cclass(tolua_S,"AtlasNode","cc.AtlasNode","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"AtlasNode"); - tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_AtlasNode_updateAtlasValues); - tolua_function(tolua_S,"getTexture",lua_cocos2dx_AtlasNode_getTexture); - tolua_function(tolua_S,"setTextureAtlas",lua_cocos2dx_AtlasNode_setTextureAtlas); - tolua_function(tolua_S,"getTextureAtlas",lua_cocos2dx_AtlasNode_getTextureAtlas); - tolua_function(tolua_S,"getQuadsToDraw",lua_cocos2dx_AtlasNode_getQuadsToDraw); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_AtlasNode_setTexture); - tolua_function(tolua_S,"setQuadsToDraw",lua_cocos2dx_AtlasNode_setQuadsToDraw); - tolua_function(tolua_S,"create", lua_cocos2dx_AtlasNode_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::AtlasNode).name(); - g_luaType[typeName] = "cc.AtlasNode"; - g_typeCast["AtlasNode"] = "cc.AtlasNode"; - return 1; -} - -int lua_cocos2dx_LabelAtlas_setString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* 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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_setString'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string arg0; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:setString"); - if(!ok) - return 0; - cobj->setString(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:setString",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_setString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_initWithString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* 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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_initWithString'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 5) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 5) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - cocos2d::Texture2D* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); - - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - int arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); - - if (!ok) { break; } - bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:initWithString",argc, 5); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_initWithString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_updateAtlasValues(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* 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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_updateAtlasValues'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateAtlasValues(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:updateAtlasValues",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_updateAtlasValues'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_getString(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::LabelAtlas* 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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_getString'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - const std::string& ret = cobj->getString(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:getString",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_getString'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_LabelAtlas_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,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 5) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); - if (!ok) { break; } - int arg2; - ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:create"); - if (!ok) { break; } - int arg3; - ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:create"); - if (!ok) { break; } - int arg4; - ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:create"); - if (!ok) { break; } - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1, arg2, arg3, arg4); - object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 0) - { - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(); - object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); - if (!ok) { break; } - cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); - return 1; - } - } while (0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.LabelAtlas:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_LabelAtlas_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (LabelAtlas)"); - return 0; -} - -int lua_register_cocos2dx_LabelAtlas(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.LabelAtlas"); - tolua_cclass(tolua_S,"LabelAtlas","cc.LabelAtlas","cc.AtlasNode",nullptr); - - tolua_beginmodule(tolua_S,"LabelAtlas"); - tolua_function(tolua_S,"setString",lua_cocos2dx_LabelAtlas_setString); - tolua_function(tolua_S,"initWithString",lua_cocos2dx_LabelAtlas_initWithString); - tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_LabelAtlas_updateAtlasValues); - tolua_function(tolua_S,"getString",lua_cocos2dx_LabelAtlas_getString); - tolua_function(tolua_S,"_create", lua_cocos2dx_LabelAtlas_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::LabelAtlas).name(); - g_luaType[typeName] = "cc.LabelAtlas"; - g_typeCast["LabelAtlas"] = "cc.LabelAtlas"; - return 1; -} - int lua_cocos2dx_Scene_getPhysicsWorld(lua_State* tolua_S) { int argc = 0; @@ -12208,8 +10539,7 @@ int lua_cocos2dx_GLView_setGLContextAttrs(lua_State* tolua_S) if (argc == 1) { GLContextAttrs arg0; - #pragma warning NO CONVERSION TO NATIVE FOR GLContextAttrs - ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR GLContextAttrs; if(!ok) return 0; cocos2d::GLView::setGLContextAttrs(arg0); @@ -26339,6 +24669,52 @@ int lua_cocos2dx_ActionManager_update(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ActionManager* 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.ActionManager",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ActionManager*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Node* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + if(!ok) + return 0; + cobj->pauseTarget(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:pauseTarget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_pauseTarget'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget(lua_State* tolua_S) { int argc = 0; @@ -26524,7 +24900,7 @@ int lua_cocos2dx_ActionManager_removeAction(lua_State* tolua_S) return 0; } -int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) +int lua_cocos2dx_ActionManager_removeAllActionsByTag(lua_State* tolua_S) { int argc = 0; cocos2d::ActionManager* cobj = nullptr; @@ -26544,28 +24920,31 @@ int lua_cocos2dx_ActionManager_pauseTarget(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_pauseTarget'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; - if (argc == 1) + if (argc == 2) { - cocos2d::Node* arg0; + int arg0; + cocos2d::Node* arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ActionManager:removeAllActionsByTag"); + + ok &= luaval_to_object(tolua_S, 3, "cc.Node",&arg1); if(!ok) return 0; - cobj->pauseTarget(arg0); + cobj->removeAllActionsByTag(arg0, arg1); return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:pauseTarget",argc, 1); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ActionManager:removeAllActionsByTag",argc, 2); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_pauseTarget'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ActionManager_removeAllActionsByTag'.",&tolua_err); #endif return 0; @@ -26667,11 +25046,12 @@ int lua_register_cocos2dx_ActionManager(lua_State* tolua_S) tolua_function(tolua_S,"addAction",lua_cocos2dx_ActionManager_addAction); tolua_function(tolua_S,"resumeTarget",lua_cocos2dx_ActionManager_resumeTarget); tolua_function(tolua_S,"update",lua_cocos2dx_ActionManager_update); + tolua_function(tolua_S,"pauseTarget",lua_cocos2dx_ActionManager_pauseTarget); tolua_function(tolua_S,"getNumberOfRunningActionsInTarget",lua_cocos2dx_ActionManager_getNumberOfRunningActionsInTarget); tolua_function(tolua_S,"removeAllActionsFromTarget",lua_cocos2dx_ActionManager_removeAllActionsFromTarget); tolua_function(tolua_S,"resumeTargets",lua_cocos2dx_ActionManager_resumeTargets); tolua_function(tolua_S,"removeAction",lua_cocos2dx_ActionManager_removeAction); - tolua_function(tolua_S,"pauseTarget",lua_cocos2dx_ActionManager_pauseTarget); + tolua_function(tolua_S,"removeAllActionsByTag",lua_cocos2dx_ActionManager_removeAllActionsByTag); tolua_function(tolua_S,"pauseAllRunningActions",lua_cocos2dx_ActionManager_pauseAllRunningActions); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::ActionManager).name(); @@ -33685,6 +32065,1389 @@ int lua_register_cocos2dx_CatmullRomBy(lua_State* tolua_S) return 1; } +int lua_cocos2dx_GLProgramState_setUniformTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformTexture'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + unsigned int arg1; + ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cocos2d::Texture2D* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cocos2d::Texture2D* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + unsigned int arg1; + ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformTexture"); + + if (!ok) { break; } + cobj->setUniformTexture(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformTexture",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformMat4(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformMat4'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cobj->setUniformMat4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cocos2d::Mat4 arg1; + ok &= luaval_to_mat4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformMat4"); + + if (!ok) { break; } + cobj->setUniformMat4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformMat4",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformMat4'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_applyUniforms(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyUniforms'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->applyUniforms(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyUniforms",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyUniforms'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_applyGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Mat4 arg0; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgramState:applyGLProgram"); + if(!ok) + return 0; + cobj->applyGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getUniformCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getUniformCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getUniformCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getUniformCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getUniformCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_applyAttributes(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_applyAttributes'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->applyAttributes(); + return 0; + } + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.GLProgramState:applyAttributes"); + if(!ok) + return 0; + cobj->applyAttributes(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:applyAttributes",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_applyAttributes'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformFloat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformFloat'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + cobj->setUniformFloat(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + double arg1; + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.GLProgramState:setUniformFloat"); + + if (!ok) { break; } + cobj->setUniformFloat(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformFloat",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformFloat'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec3(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec3'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cobj->setUniformVec3(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cocos2d::Vec3 arg1; + ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec3"); + + if (!ok) { break; } + cobj->setUniformVec3(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec3",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec3'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformInt(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformInt'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + cobj->setUniformInt(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + int arg1; + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgramState:setUniformInt"); + + if (!ok) { break; } + cobj->setUniformInt(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformInt",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformInt'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getVertexAttribCount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getVertexAttribCount(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribCount",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribCount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec4(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec4'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cocos2d::Vec4 arg1; + ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cobj->setUniformVec4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cocos2d::Vec4 arg1; + ok &= luaval_to_vec4(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec4"); + + if (!ok) { break; } + cobj->setUniformVec4(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec4",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec4'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgram* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cobj->setGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_setUniformVec2(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_setUniformVec2'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + int arg0; + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cocos2d::Vec2 arg1; + ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cobj->setUniformVec2(arg0, arg1); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cocos2d::Vec2 arg1; + ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.GLProgramState:setUniformVec2"); + + if (!ok) { break; } + cobj->setUniformVec2(arg0, arg1); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:setUniformVec2",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_setUniformVec2'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getVertexAttribsFlags(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + unsigned int ret = cobj->getVertexAttribsFlags(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getVertexAttribsFlags",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getVertexAttribsFlags'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_apply(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_apply'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Mat4 arg0; + + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgramState:apply"); + if(!ok) + return 0; + cobj->apply(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:apply",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_apply'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_getGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgramState* 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.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgramState*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgramState_getGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::GLProgram* ret = cobj->getGLProgram(); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgramState:getGLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getGLProgram'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgramState_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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::GLProgram* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::create(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_create'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:getOrCreateWithGLProgramName"); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgramName",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram(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,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::GLProgram* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgram(arg0); + object_to_luaval(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgram",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_GLProgramState_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (GLProgramState)"); + return 0; +} + +int lua_register_cocos2dx_GLProgramState(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.GLProgramState"); + tolua_cclass(tolua_S,"GLProgramState","cc.GLProgramState","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"GLProgramState"); + tolua_function(tolua_S,"setUniformTexture",lua_cocos2dx_GLProgramState_setUniformTexture); + tolua_function(tolua_S,"setUniformMat4",lua_cocos2dx_GLProgramState_setUniformMat4); + tolua_function(tolua_S,"applyUniforms",lua_cocos2dx_GLProgramState_applyUniforms); + tolua_function(tolua_S,"applyGLProgram",lua_cocos2dx_GLProgramState_applyGLProgram); + tolua_function(tolua_S,"getUniformCount",lua_cocos2dx_GLProgramState_getUniformCount); + tolua_function(tolua_S,"applyAttributes",lua_cocos2dx_GLProgramState_applyAttributes); + tolua_function(tolua_S,"setUniformFloat",lua_cocos2dx_GLProgramState_setUniformFloat); + tolua_function(tolua_S,"setUniformVec3",lua_cocos2dx_GLProgramState_setUniformVec3); + tolua_function(tolua_S,"setUniformInt",lua_cocos2dx_GLProgramState_setUniformInt); + tolua_function(tolua_S,"getVertexAttribCount",lua_cocos2dx_GLProgramState_getVertexAttribCount); + tolua_function(tolua_S,"setUniformVec4",lua_cocos2dx_GLProgramState_setUniformVec4); + tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_GLProgramState_setGLProgram); + tolua_function(tolua_S,"setUniformVec2",lua_cocos2dx_GLProgramState_setUniformVec2); + tolua_function(tolua_S,"getVertexAttribsFlags",lua_cocos2dx_GLProgramState_getVertexAttribsFlags); + tolua_function(tolua_S,"apply",lua_cocos2dx_GLProgramState_apply); + tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_GLProgramState_getGLProgram); + tolua_function(tolua_S,"create", lua_cocos2dx_GLProgramState_create); + tolua_function(tolua_S,"getOrCreateWithGLProgramName", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName); + tolua_function(tolua_S,"getOrCreateWithGLProgram", lua_cocos2dx_GLProgramState_getOrCreateWithGLProgram); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::GLProgramState).name(); + g_luaType[typeName] = "cc.GLProgramState"; + g_typeCast["GLProgramState"] = "cc.GLProgramState"; + return 1; +} + +int lua_cocos2dx_AtlasNode_updateAtlasValues(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateAtlasValues(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:updateAtlasValues",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_updateAtlasValues'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_getTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTexture'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Texture2D* ret = cobj->getTexture(); + object_to_luaval(tolua_S, "cc.Texture2D",(cocos2d::Texture2D*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTexture",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_setTextureAtlas(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::TextureAtlas* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.TextureAtlas",&arg0); + if(!ok) + return 0; + cobj->setTextureAtlas(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTextureAtlas",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTextureAtlas'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_getTextureAtlas(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::TextureAtlas* ret = cobj->getTextureAtlas(); + object_to_luaval(tolua_S, "cc.TextureAtlas",(cocos2d::TextureAtlas*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getTextureAtlas",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getTextureAtlas'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_getQuadsToDraw(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + ssize_t ret = cobj->getQuadsToDraw(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:getQuadsToDraw",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_getQuadsToDraw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_setTexture(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setTexture'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Texture2D* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0); + if(!ok) + return 0; + cobj->setTexture(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setTexture",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setTexture'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_setQuadsToDraw(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::AtlasNode* 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.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::AtlasNode*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + ssize_t arg0; + + ok &= luaval_to_ssize(tolua_S, 2, &arg0, "cc.AtlasNode:setQuadsToDraw"); + if(!ok) + return 0; + cobj->setQuadsToDraw(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AtlasNode:setQuadsToDraw",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_setQuadsToDraw'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_AtlasNode_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,"cc.AtlasNode",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 4) + { + std::string arg0; + int arg1; + int arg2; + int arg3; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AtlasNode:create"); + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.AtlasNode:create"); + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.AtlasNode:create"); + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.AtlasNode:create"); + if(!ok) + return 0; + cocos2d::AtlasNode* ret = cocos2d::AtlasNode::create(arg0, arg1, arg2, arg3); + object_to_luaval(tolua_S, "cc.AtlasNode",(cocos2d::AtlasNode*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AtlasNode:create",argc, 4); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_AtlasNode_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_AtlasNode_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (AtlasNode)"); + return 0; +} + +int lua_register_cocos2dx_AtlasNode(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.AtlasNode"); + tolua_cclass(tolua_S,"AtlasNode","cc.AtlasNode","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"AtlasNode"); + tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_AtlasNode_updateAtlasValues); + tolua_function(tolua_S,"getTexture",lua_cocos2dx_AtlasNode_getTexture); + tolua_function(tolua_S,"setTextureAtlas",lua_cocos2dx_AtlasNode_setTextureAtlas); + tolua_function(tolua_S,"getTextureAtlas",lua_cocos2dx_AtlasNode_getTextureAtlas); + tolua_function(tolua_S,"getQuadsToDraw",lua_cocos2dx_AtlasNode_getQuadsToDraw); + tolua_function(tolua_S,"setTexture",lua_cocos2dx_AtlasNode_setTexture); + tolua_function(tolua_S,"setQuadsToDraw",lua_cocos2dx_AtlasNode_setQuadsToDraw); + tolua_function(tolua_S,"create", lua_cocos2dx_AtlasNode_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::AtlasNode).name(); + g_luaType[typeName] = "cc.AtlasNode"; + g_typeCast["AtlasNode"] = "cc.AtlasNode"; + return 1; +} + int lua_cocos2dx_DrawNode_drawQuadraticBezier(lua_State* tolua_S) { int argc = 0; @@ -34116,10 +33879,10 @@ int lua_register_cocos2dx_DrawNode(lua_State* tolua_S) return 1; } -int lua_cocos2dx_GLProgram_getFragmentShaderLog(lua_State* tolua_S) +int lua_cocos2dx_LabelAtlas_setString(lua_State* tolua_S) { int argc = 0; - cocos2d::GLProgram* cobj = nullptr; + cocos2d::LabelAtlas* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -34128,479 +33891,15 @@ int lua_cocos2dx_GLProgram_getFragmentShaderLog(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getFragmentShaderLog(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getFragmentShaderLog",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_initWithByteArrays(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithByteArrays'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - const char* arg0; - const char* arg1; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:initWithByteArrays"); arg0 = arg0_tmp.c_str(); - - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:initWithByteArrays"); arg1 = arg1_tmp.c_str(); - if(!ok) - return 0; - bool ret = cobj->initWithByteArrays(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithByteArrays",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithByteArrays'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_initWithFilenames(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithFilenames'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - std::string arg0; - std::string arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:initWithFilenames"); - - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:initWithFilenames"); - if(!ok) - return 0; - bool ret = cobj->initWithFilenames(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithFilenames",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithFilenames'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_use(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_use'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->use(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:use",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_use'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_getVertexShaderLog(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - std::string ret = cobj->getVertexShaderLog(); - tolua_pushcppstring(tolua_S,ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getVertexShaderLog",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_setUniformsForBuiltins(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Mat4 arg0; - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgram:setUniformsForBuiltins"); - - if (!ok) { break; } - cobj->setUniformsForBuiltins(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cobj->setUniformsForBuiltins(); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformsForBuiltins",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_updateUniforms(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_updateUniforms'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->updateUniforms(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:updateUniforms",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_updateUniforms'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_setUniformLocationWith1i(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - int arg0; - int arg1; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWith1i"); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgram:setUniformLocationWith1i"); - if(!ok) - return 0; - cobj->setUniformLocationWith1i(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWith1i",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_reset(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_reset'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->reset(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:reset",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_reset'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_bindAttribLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_bindAttribLocation'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - std::string arg0; - unsigned int arg1; - - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:bindAttribLocation"); - - ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgram:bindAttribLocation"); - if(!ok) - return 0; - cobj->bindAttribLocation(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:bindAttribLocation",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_bindAttribLocation'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_GLProgram_getAttribLocation(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getAttribLocation'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_setString'", nullptr); return 0; } #endif @@ -34610,27 +33909,129 @@ int lua_cocos2dx_GLProgram_getAttribLocation(lua_State* tolua_S) { std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:getAttribLocation"); + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:setString"); if(!ok) return 0; - int ret = cobj->getAttribLocation(arg0); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; + cobj->setString(arg0); + return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getAttribLocation",argc, 1); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:setString",argc, 1); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getAttribLocation'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_setString'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_GLProgram_link(lua_State* tolua_S) +int lua_cocos2dx_LabelAtlas_initWithString(lua_State* tolua_S) { int argc = 0; - cocos2d::GLProgram* cobj = nullptr; + cocos2d::LabelAtlas* 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.LabelAtlas",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_initWithString'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 2) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 5) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg3; + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + do{ + if (argc == 5) { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + cocos2d::Texture2D* arg1; + ok &= luaval_to_object(tolua_S, 3, "cc.Texture2D",&arg1); + + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg3; + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + int arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:initWithString"); + + if (!ok) { break; } + bool ret = cobj->initWithString(arg0, arg1, arg2, arg3, arg4); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:initWithString",argc, 5); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_initWithString'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_LabelAtlas_updateAtlasValues(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::LabelAtlas* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 @@ -34639,15 +34040,15 @@ int lua_cocos2dx_GLProgram_link(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; #endif - cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_link'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_updateAtlasValues'", nullptr); return 0; } #endif @@ -34657,155 +34058,157 @@ int lua_cocos2dx_GLProgram_link(lua_State* tolua_S) { if(!ok) return 0; - bool ret = cobj->link(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; + cobj->updateAtlasValues(); + return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:link",argc, 0); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:updateAtlasValues",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_link'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_updateAtlasValues'.",&tolua_err); #endif return 0; } -int lua_cocos2dx_GLProgram_createWithByteArrays(lua_State* tolua_S) +int lua_cocos2dx_LabelAtlas_getString(lua_State* tolua_S) { int argc = 0; + cocos2d::LabelAtlas* cobj = nullptr; bool ok = true; #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif + #if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; + if (!tolua_isusertype(tolua_S,1,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; #endif - argc = lua_gettop(tolua_S) - 1; + cobj = (cocos2d::LabelAtlas*)tolua_tousertype(tolua_S,1,0); - if (argc == 2) +#if COCOS2D_DEBUG >= 1 + if (!cobj) { - const char* arg0; - const char* arg1; - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:createWithByteArrays"); arg0 = arg0_tmp.c_str(); - std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:createWithByteArrays"); arg1 = arg1_tmp.c_str(); - if(!ok) - return 0; - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithByteArrays(arg0, arg1); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_LabelAtlas_getString'", nullptr); + return 0; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithByteArrays",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithByteArrays'.",&tolua_err); #endif - return 0; -} -int lua_cocos2dx_GLProgram_createWithFilenames(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,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - std::string arg0; - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:createWithFilenames"); - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:createWithFilenames"); - if(!ok) - return 0; - cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithFilenames(arg0, arg1); - object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithFilenames",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithFilenames'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_GLProgram_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::GLProgram* 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::GLProgram(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.GLProgram"); + const std::string& ret = cobj->getString(); + tolua_pushcppstring(tolua_S,ret); return 1; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:GLProgram",argc, 0); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.LabelAtlas:getString",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_constructor'.",&tolua_err); + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_getString'.",&tolua_err); #endif return 0; } - -static int lua_cocos2dx_GLProgram_finalize(lua_State* tolua_S) +int lua_cocos2dx_LabelAtlas_create(lua_State* tolua_S) { - printf("luabindings: finalizing LUA object (GLProgram)"); + 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,"cc.LabelAtlas",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S)-1; + + do + { + if (argc == 5) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); + if (!ok) { break; } + int arg2; + ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2, "cc.LabelAtlas:create"); + if (!ok) { break; } + int arg3; + ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3, "cc.LabelAtlas:create"); + if (!ok) { break; } + int arg4; + ok &= luaval_to_int32(tolua_S, 6,(int *)&arg4, "cc.LabelAtlas:create"); + if (!ok) { break; } + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1, arg2, arg3, arg4); + object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 0) + { + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(); + object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); + return 1; + } + } while (0); + ok = true; + do + { + if (argc == 2) + { + std::string arg0; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.LabelAtlas:create"); + if (!ok) { break; } + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.LabelAtlas:create"); + if (!ok) { break; } + cocos2d::LabelAtlas* ret = cocos2d::LabelAtlas::create(arg0, arg1); + object_to_luaval(tolua_S, "cc.LabelAtlas",(cocos2d::LabelAtlas*)ret); + return 1; + } + } while (0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.LabelAtlas:create",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_LabelAtlas_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_LabelAtlas_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (LabelAtlas)"); return 0; } -int lua_register_cocos2dx_GLProgram(lua_State* tolua_S) +int lua_register_cocos2dx_LabelAtlas(lua_State* tolua_S) { - tolua_usertype(tolua_S,"cc.GLProgram"); - tolua_cclass(tolua_S,"GLProgram","cc.GLProgram","cc.Ref",nullptr); + tolua_usertype(tolua_S,"cc.LabelAtlas"); + tolua_cclass(tolua_S,"LabelAtlas","cc.LabelAtlas","cc.AtlasNode",nullptr); - tolua_beginmodule(tolua_S,"GLProgram"); - tolua_function(tolua_S,"new",lua_cocos2dx_GLProgram_constructor); - tolua_function(tolua_S,"getFragmentShaderLog",lua_cocos2dx_GLProgram_getFragmentShaderLog); - tolua_function(tolua_S,"initWithByteArrays",lua_cocos2dx_GLProgram_initWithByteArrays); - tolua_function(tolua_S,"initWithFilenames",lua_cocos2dx_GLProgram_initWithFilenames); - tolua_function(tolua_S,"use",lua_cocos2dx_GLProgram_use); - tolua_function(tolua_S,"getVertexShaderLog",lua_cocos2dx_GLProgram_getVertexShaderLog); - tolua_function(tolua_S,"setUniformsForBuiltins",lua_cocos2dx_GLProgram_setUniformsForBuiltins); - tolua_function(tolua_S,"updateUniforms",lua_cocos2dx_GLProgram_updateUniforms); - tolua_function(tolua_S,"setUniformLocationI32",lua_cocos2dx_GLProgram_setUniformLocationWith1i); - tolua_function(tolua_S,"reset",lua_cocos2dx_GLProgram_reset); - tolua_function(tolua_S,"bindAttribLocation",lua_cocos2dx_GLProgram_bindAttribLocation); - tolua_function(tolua_S,"getAttribLocation",lua_cocos2dx_GLProgram_getAttribLocation); - tolua_function(tolua_S,"link",lua_cocos2dx_GLProgram_link); - tolua_function(tolua_S,"createWithByteArrays", lua_cocos2dx_GLProgram_createWithByteArrays); - tolua_function(tolua_S,"createWithFilenames", lua_cocos2dx_GLProgram_createWithFilenames); + tolua_beginmodule(tolua_S,"LabelAtlas"); + tolua_function(tolua_S,"setString",lua_cocos2dx_LabelAtlas_setString); + tolua_function(tolua_S,"initWithString",lua_cocos2dx_LabelAtlas_initWithString); + tolua_function(tolua_S,"updateAtlasValues",lua_cocos2dx_LabelAtlas_updateAtlasValues); + tolua_function(tolua_S,"getString",lua_cocos2dx_LabelAtlas_getString); + tolua_function(tolua_S,"_create", lua_cocos2dx_LabelAtlas_create); tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::GLProgram).name(); - g_luaType[typeName] = "cc.GLProgram"; - g_typeCast["GLProgram"] = "cc.GLProgram"; + std::string typeName = typeid(cocos2d::LabelAtlas).name(); + g_luaType[typeName] = "cc.LabelAtlas"; + g_typeCast["LabelAtlas"] = "cc.LabelAtlas"; return 1; } @@ -45044,6 +44447,618 @@ int lua_register_cocos2dx_MotionStreak(lua_State* tolua_S) return 1; } +int lua_cocos2dx_ProgressTimer_isReverseDirection(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isReverseDirection(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:isReverseDirection",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setBarChangeRate(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setBarChangeRate"); + if(!ok) + return 0; + cobj->setBarChangeRate(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setBarChangeRate",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getPercentage(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getPercentage'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + double ret = cobj->getPercentage(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getPercentage",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getPercentage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setSprite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setSprite'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Sprite* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + if(!ok) + return 0; + cobj->setSprite(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setSprite",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setSprite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getType'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + int ret = (int)cobj->getType(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getType",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getSprite(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getSprite'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Sprite* ret = cobj->getSprite(); + object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getSprite",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getSprite'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setMidpoint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setMidpoint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::Vec2 arg0; + + ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setMidpoint"); + if(!ok) + return 0; + cobj->setMidpoint(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setMidpoint",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setMidpoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getBarChangeRate(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getBarChangeRate(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getBarChangeRate",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setReverseDirection(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + bool arg0; + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); + + if (!ok) { break; } + cobj->setReverseDirection(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 1) { + bool arg0; + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); + + if (!ok) { break; } + cobj->setReverseProgress(arg0); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setReverseProgress",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_getMidpoint(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getMidpoint'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cocos2d::Vec2 ret = cobj->getMidpoint(); + vec2_to_luaval(tolua_S, ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getMidpoint",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getMidpoint'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setPercentage(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setPercentage'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + double arg0; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ProgressTimer:setPercentage"); + if(!ok) + return 0; + cobj->setPercentage(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setPercentage",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setPercentage'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_setType(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setType'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::ProgressTimer::Type arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProgressTimer:setType"); + if(!ok) + return 0; + cobj->setType(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setType",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setType'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_ProgressTimer_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,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 1) + { + cocos2d::Sprite* arg0; + ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); + if(!ok) + return 0; + cocos2d::ProgressTimer* ret = cocos2d::ProgressTimer::create(arg0); + object_to_luaval(tolua_S, "cc.ProgressTimer",(cocos2d::ProgressTimer*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ProgressTimer:create",argc, 1); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_create'.",&tolua_err); +#endif + return 0; +} +static int lua_cocos2dx_ProgressTimer_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (ProgressTimer)"); + return 0; +} + +int lua_register_cocos2dx_ProgressTimer(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.ProgressTimer"); + tolua_cclass(tolua_S,"ProgressTimer","cc.ProgressTimer","cc.Node",nullptr); + + tolua_beginmodule(tolua_S,"ProgressTimer"); + tolua_function(tolua_S,"isReverseDirection",lua_cocos2dx_ProgressTimer_isReverseDirection); + tolua_function(tolua_S,"setBarChangeRate",lua_cocos2dx_ProgressTimer_setBarChangeRate); + tolua_function(tolua_S,"getPercentage",lua_cocos2dx_ProgressTimer_getPercentage); + tolua_function(tolua_S,"setSprite",lua_cocos2dx_ProgressTimer_setSprite); + tolua_function(tolua_S,"getType",lua_cocos2dx_ProgressTimer_getType); + tolua_function(tolua_S,"getSprite",lua_cocos2dx_ProgressTimer_getSprite); + tolua_function(tolua_S,"setMidpoint",lua_cocos2dx_ProgressTimer_setMidpoint); + tolua_function(tolua_S,"getBarChangeRate",lua_cocos2dx_ProgressTimer_getBarChangeRate); + tolua_function(tolua_S,"setReverseDirection",lua_cocos2dx_ProgressTimer_setReverseDirection); + tolua_function(tolua_S,"getMidpoint",lua_cocos2dx_ProgressTimer_getMidpoint); + tolua_function(tolua_S,"setPercentage",lua_cocos2dx_ProgressTimer_setPercentage); + tolua_function(tolua_S,"setType",lua_cocos2dx_ProgressTimer_setType); + tolua_function(tolua_S,"create", lua_cocos2dx_ProgressTimer_create); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::ProgressTimer).name(); + g_luaType[typeName] = "cc.ProgressTimer"; + g_typeCast["ProgressTimer"] = "cc.ProgressTimer"; + return 1; +} + int lua_cocos2dx_Sprite_setSpriteFrame(lua_State* tolua_S) { int argc = 0; @@ -46447,618 +46462,6 @@ int lua_register_cocos2dx_Sprite(lua_State* tolua_S) return 1; } -int lua_cocos2dx_ProgressTimer_isReverseDirection(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isReverseDirection(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:isReverseDirection",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_isReverseDirection'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setBarChangeRate(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setBarChangeRate"); - if(!ok) - return 0; - cobj->setBarChangeRate(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setBarChangeRate",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setBarChangeRate'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getPercentage(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getPercentage'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getPercentage(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getPercentage",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getPercentage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setSprite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Sprite* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); - if(!ok) - return 0; - cobj->setSprite(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setSprite",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setSprite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getType(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getType'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - int ret = (int)cobj->getType(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getType",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getType'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getSprite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Sprite* ret = cobj->getSprite(); - object_to_luaval(tolua_S, "cc.Sprite",(cocos2d::Sprite*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getSprite",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getSprite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setMidpoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setMidpoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec2 arg0; - - ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.ProgressTimer:setMidpoint"); - if(!ok) - return 0; - cobj->setMidpoint(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setMidpoint",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setMidpoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getBarChangeRate(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getBarChangeRate(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getBarChangeRate",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getBarChangeRate'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setReverseDirection(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); - - if (!ok) { break; } - cobj->setReverseDirection(arg0); - return 0; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); - - if (!ok) { break; } - cobj->setReverseProgress(arg0); - return 0; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setReverseProgress",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_getMidpoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_getMidpoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec2 ret = cobj->getMidpoint(); - vec2_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:getMidpoint",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_getMidpoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setPercentage(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setPercentage'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.ProgressTimer:setPercentage"); - if(!ok) - return 0; - cobj->setPercentage(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setPercentage",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setPercentage'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_setType(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::ProgressTimer* 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.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setType'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::ProgressTimer::Type arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ProgressTimer:setType"); - if(!ok) - return 0; - cobj->setType(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setType",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_setType'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_ProgressTimer_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,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Sprite",&arg0); - if(!ok) - return 0; - cocos2d::ProgressTimer* ret = cocos2d::ProgressTimer::create(arg0); - object_to_luaval(tolua_S, "cc.ProgressTimer",(cocos2d::ProgressTimer*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.ProgressTimer:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ProgressTimer_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_ProgressTimer_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (ProgressTimer)"); - return 0; -} - -int lua_register_cocos2dx_ProgressTimer(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.ProgressTimer"); - tolua_cclass(tolua_S,"ProgressTimer","cc.ProgressTimer","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"ProgressTimer"); - tolua_function(tolua_S,"isReverseDirection",lua_cocos2dx_ProgressTimer_isReverseDirection); - tolua_function(tolua_S,"setBarChangeRate",lua_cocos2dx_ProgressTimer_setBarChangeRate); - tolua_function(tolua_S,"getPercentage",lua_cocos2dx_ProgressTimer_getPercentage); - tolua_function(tolua_S,"setSprite",lua_cocos2dx_ProgressTimer_setSprite); - tolua_function(tolua_S,"getType",lua_cocos2dx_ProgressTimer_getType); - tolua_function(tolua_S,"getSprite",lua_cocos2dx_ProgressTimer_getSprite); - tolua_function(tolua_S,"setMidpoint",lua_cocos2dx_ProgressTimer_setMidpoint); - tolua_function(tolua_S,"getBarChangeRate",lua_cocos2dx_ProgressTimer_getBarChangeRate); - tolua_function(tolua_S,"setReverseDirection",lua_cocos2dx_ProgressTimer_setReverseDirection); - tolua_function(tolua_S,"getMidpoint",lua_cocos2dx_ProgressTimer_getMidpoint); - tolua_function(tolua_S,"setPercentage",lua_cocos2dx_ProgressTimer_setPercentage); - tolua_function(tolua_S,"setType",lua_cocos2dx_ProgressTimer_setType); - tolua_function(tolua_S,"create", lua_cocos2dx_ProgressTimer_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::ProgressTimer).name(); - g_luaType[typeName] = "cc.ProgressTimer"; - g_typeCast["ProgressTimer"] = "cc.ProgressTimer"; - return 1; -} - int lua_cocos2dx_Image_hasPremultipliedAlpha(lua_State* tolua_S) { int argc = 0; @@ -56665,6 +56068,699 @@ int lua_register_cocos2dx_TiledGrid3D(lua_State* tolua_S) return 1; } +int lua_cocos2dx_GLProgram_getFragmentShaderLog(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getFragmentShaderLog(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getFragmentShaderLog",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getFragmentShaderLog'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_initWithByteArrays(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithByteArrays'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + const char* arg0; + const char* arg1; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:initWithByteArrays"); arg0 = arg0_tmp.c_str(); + + std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:initWithByteArrays"); arg1 = arg1_tmp.c_str(); + if(!ok) + return 0; + bool ret = cobj->initWithByteArrays(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithByteArrays",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithByteArrays'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_initWithFilenames(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_initWithFilenames'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + std::string arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:initWithFilenames"); + + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:initWithFilenames"); + if(!ok) + return 0; + bool ret = cobj->initWithFilenames(arg0, arg1); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:initWithFilenames",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_initWithFilenames'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_use(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_use'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->use(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:use",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_use'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_getVertexShaderLog(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + std::string ret = cobj->getVertexShaderLog(); + tolua_pushcppstring(tolua_S,ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getVertexShaderLog",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getVertexShaderLog'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_setUniformsForBuiltins(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'", nullptr); + return 0; + } +#endif + argc = lua_gettop(tolua_S)-1; + do{ + if (argc == 1) { + cocos2d::Mat4 arg0; + ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.GLProgram:setUniformsForBuiltins"); + + if (!ok) { break; } + cobj->setUniformsForBuiltins(arg0); + return 0; + } + }while(0); + ok = true; + do{ + if (argc == 0) { + cobj->setUniformsForBuiltins(); + return 0; + } + }while(0); + ok = true; + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformsForBuiltins",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformsForBuiltins'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_updateUniforms(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_updateUniforms'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->updateUniforms(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:updateUniforms",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_updateUniforms'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_setUniformLocationWith1i(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + int arg0; + int arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.GLProgram:setUniformLocationWith1i"); + + ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.GLProgram:setUniformLocationWith1i"); + if(!ok) + return 0; + cobj->setUniformLocationWith1i(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:setUniformLocationWith1i",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_setUniformLocationWith1i'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_reset(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_reset'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->reset(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:reset",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_reset'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_bindAttribLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_bindAttribLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + std::string arg0; + unsigned int arg1; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:bindAttribLocation"); + + ok &= luaval_to_uint32(tolua_S, 3,&arg1, "cc.GLProgram:bindAttribLocation"); + if(!ok) + return 0; + cobj->bindAttribLocation(arg0, arg1); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:bindAttribLocation",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_bindAttribLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_getAttribLocation(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_getAttribLocation'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + std::string arg0; + + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:getAttribLocation"); + if(!ok) + return 0; + int ret = cobj->getAttribLocation(arg0); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:getAttribLocation",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_getAttribLocation'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_link(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::GLProgram*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_GLProgram_link'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->link(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:link",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_link'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_GLProgram_createWithByteArrays(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,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + const char* arg0; + const char* arg1; + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.GLProgram:createWithByteArrays"); arg0 = arg0_tmp.c_str(); + std::string arg1_tmp; ok &= luaval_to_std_string(tolua_S, 3, &arg1_tmp, "cc.GLProgram:createWithByteArrays"); arg1 = arg1_tmp.c_str(); + if(!ok) + return 0; + cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithByteArrays(arg0, arg1); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithByteArrays",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithByteArrays'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgram_createWithFilenames(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,"cc.GLProgram",0,&tolua_err)) goto tolua_lerror; +#endif + + argc = lua_gettop(tolua_S) - 1; + + if (argc == 2) + { + std::string arg0; + std::string arg1; + ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgram:createWithFilenames"); + ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.GLProgram:createWithFilenames"); + if(!ok) + return 0; + cocos2d::GLProgram* ret = cocos2d::GLProgram::createWithFilenames(arg0, arg1); + object_to_luaval(tolua_S, "cc.GLProgram",(cocos2d::GLProgram*)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgram:createWithFilenames",argc, 2); + return 0; +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_createWithFilenames'.",&tolua_err); +#endif + return 0; +} +int lua_cocos2dx_GLProgram_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::GLProgram* 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::GLProgram(); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.GLProgram"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.GLProgram:GLProgram",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_GLProgram_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_GLProgram_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (GLProgram)"); + return 0; +} + +int lua_register_cocos2dx_GLProgram(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.GLProgram"); + tolua_cclass(tolua_S,"GLProgram","cc.GLProgram","cc.Ref",nullptr); + + tolua_beginmodule(tolua_S,"GLProgram"); + tolua_function(tolua_S,"new",lua_cocos2dx_GLProgram_constructor); + tolua_function(tolua_S,"getFragmentShaderLog",lua_cocos2dx_GLProgram_getFragmentShaderLog); + tolua_function(tolua_S,"initWithByteArrays",lua_cocos2dx_GLProgram_initWithByteArrays); + tolua_function(tolua_S,"initWithFilenames",lua_cocos2dx_GLProgram_initWithFilenames); + tolua_function(tolua_S,"use",lua_cocos2dx_GLProgram_use); + tolua_function(tolua_S,"getVertexShaderLog",lua_cocos2dx_GLProgram_getVertexShaderLog); + tolua_function(tolua_S,"setUniformsForBuiltins",lua_cocos2dx_GLProgram_setUniformsForBuiltins); + tolua_function(tolua_S,"updateUniforms",lua_cocos2dx_GLProgram_updateUniforms); + tolua_function(tolua_S,"setUniformLocationI32",lua_cocos2dx_GLProgram_setUniformLocationWith1i); + tolua_function(tolua_S,"reset",lua_cocos2dx_GLProgram_reset); + tolua_function(tolua_S,"bindAttribLocation",lua_cocos2dx_GLProgram_bindAttribLocation); + tolua_function(tolua_S,"getAttribLocation",lua_cocos2dx_GLProgram_getAttribLocation); + tolua_function(tolua_S,"link",lua_cocos2dx_GLProgram_link); + tolua_function(tolua_S,"createWithByteArrays", lua_cocos2dx_GLProgram_createWithByteArrays); + tolua_function(tolua_S,"createWithFilenames", lua_cocos2dx_GLProgram_createWithFilenames); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::GLProgram).name(); + g_luaType[typeName] = "cc.GLProgram"; + g_typeCast["GLProgram"] = "cc.GLProgram"; + return 1; +} + int lua_cocos2dx_GLProgramCache_addGLProgram(lua_State* tolua_S) { int argc = 0; @@ -64615,7 +64711,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_Grid3DAction(tolua_S); lua_register_cocos2dx_FadeTo(tolua_S); lua_register_cocos2dx_FadeIn(tolua_S); - lua_register_cocos2dx_ShakyTiles3D(tolua_S); + lua_register_cocos2dx_GLProgramState(tolua_S); lua_register_cocos2dx_EventListenerCustom(tolua_S); lua_register_cocos2dx_FlipX3D(tolua_S); lua_register_cocos2dx_FlipY3D(tolua_S); @@ -64669,7 +64765,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_RepeatForever(tolua_S); lua_register_cocos2dx_Place(tolua_S); lua_register_cocos2dx_EventListenerAcceleration(tolua_S); - lua_register_cocos2dx_GLProgram(tolua_S); + lua_register_cocos2dx_TiledGrid3D(tolua_S); lua_register_cocos2dx_EaseBounceOut(tolua_S); lua_register_cocos2dx_RenderTexture(tolua_S); lua_register_cocos2dx_TintBy(tolua_S); @@ -64690,7 +64786,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_TMXLayerInfo(tolua_S); lua_register_cocos2dx_EaseSineIn(tolua_S); lua_register_cocos2dx_EaseBounceIn(tolua_S); - lua_register_cocos2dx_TiledGrid3D(tolua_S); + lua_register_cocos2dx_GLProgram(tolua_S); lua_register_cocos2dx_ParticleGalaxy(tolua_S); lua_register_cocos2dx_Twirl(tolua_S); lua_register_cocos2dx_MenuItemLabel(tolua_S); @@ -64734,7 +64830,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_ScaleTo(tolua_S); lua_register_cocos2dx_Spawn(tolua_S); lua_register_cocos2dx_EaseQuarticActionInOut(tolua_S); - lua_register_cocos2dx_GLProgramState(tolua_S); + lua_register_cocos2dx_ShakyTiles3D(tolua_S); lua_register_cocos2dx_PageTurn3D(tolua_S); lua_register_cocos2dx_TransitionSlideInL(tolua_S); lua_register_cocos2dx_TransitionSlideInT(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index e4b2d6b037..4d85878dfc 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1558,6 +1558,8 @@ int register_all_cocos2dx(lua_State* tolua_S); + + diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp index 8d94bee826..e9a0cc19d0 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp @@ -78,8 +78,7 @@ int lua_cocos2dx_spine_Skeleton_setBlendFunc(lua_State* tolua_S) { cocos2d::BlendFunc arg0; - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc - ok = false; + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; if(!ok) return 0; cobj->setBlendFunc(arg0); From c149bfca00d7a3d247835adff73da0e83a00db62 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 29 Aug 2014 12:54:24 -0700 Subject: [PATCH 44/74] Adds MARK: TODO: FIXME: in code Replaces XXX with FIXME: Xcode 6 beta 4 supports this new format --- cocos/2d/CCActionCamera.cpp | 3 +- cocos/2d/CCActionInstant.cpp | 2 +- cocos/2d/CCActionInterval.cpp | 6 ++-- cocos/2d/CCActionManager.cpp | 4 +-- cocos/2d/CCClippingNode.cpp | 4 +-- cocos/2d/CCDrawingPrimitives.cpp | 8 ++--- cocos/2d/CCFastTMXLayer.cpp | 2 +- cocos/2d/CCFastTMXTiledMap.cpp | 2 +- cocos/2d/CCFontFNT.cpp | 4 +-- cocos/2d/CCGrabber.cpp | 2 +- cocos/2d/CCGrid.cpp | 8 ++--- cocos/2d/CCLabel.cpp | 2 +- cocos/2d/CCMenuItem.cpp | 36 +++++++++---------- cocos/2d/CCNode.cpp | 12 +++---- cocos/2d/CCParticleBatchNode.cpp | 4 +-- cocos/2d/CCParticleSystem.cpp | 4 +-- cocos/2d/CCRenderTexture.cpp | 6 ++-- cocos/2d/CCRenderTexture.h | 2 +- cocos/2d/CCSprite.cpp | 15 +++++--- cocos/2d/CCSpriteBatchNode.cpp | 6 ++-- cocos/2d/CCSpriteFrameCache.cpp | 4 +-- cocos/2d/CCTMXLayer.cpp | 8 ++--- cocos/2d/CCTMXTiledMap.cpp | 2 +- cocos/2d/CCTileMapAtlas.cpp | 4 +-- cocos/2d/CCTransitionPageTurn.cpp | 2 +- cocos/audio/mac/CocosDenshion.h | 2 +- cocos/base/CCConfiguration.cpp | 4 +-- cocos/base/CCConsole.cpp | 2 +- cocos/base/CCDirector.cpp | 9 ++--- cocos/base/CCDirector.h | 2 +- cocos/base/CCProfiling.cpp | 2 +- cocos/base/CCUserDefault.cpp | 4 +-- cocos/base/CCUserDefault.mm | 4 +-- cocos/base/CCUserDefaultAndroid.cpp | 4 +-- cocos/base/ccMacros.h | 2 +- cocos/base/ccTypes.h | 4 +-- cocos/deprecated/CCNotificationCenter.cpp | 4 +-- .../cocosbuilder/CCBAnimationManager.cpp | 2 +- .../editor-support/cocosbuilder/CCBReader.cpp | 2 +- .../cocosbuilder/CCControlButtonLoader.cpp | 3 +- .../cocosbuilder/CCLayerGradientLoader.cpp | 2 +- .../cocosbuilder/CCLayerLoader.cpp | 4 +-- .../cocosbuilder/CCNodeLoader.cpp | 4 +-- .../cocosbuilder/CCScale9SpriteLoader.cpp | 3 +- .../cocostudio/CCDataReaderHelper.cpp | 2 +- cocos/editor-support/cocostudio/CCSkin.cpp | 2 +- .../ScrollViewReader/ScrollViewReader.cpp | 2 +- cocos/math/TransformUtils.h | 3 +- cocos/platform/CCFileUtils.cpp | 2 +- cocos/platform/mac/CCDevice.mm | 2 +- cocos/renderer/CCGLProgramCache.cpp | 4 +-- cocos/renderer/CCGLProgramState.cpp | 2 +- cocos/renderer/CCRenderer.cpp | 4 +-- cocos/renderer/CCRenderer.h | 2 +- cocos/renderer/CCTextureAtlas.cpp | 4 +-- cocos/renderer/ccShader_Label_df.frag | 2 +- cocos/renderer/ccShader_Label_df_glow.frag | 2 +- .../manual/network/lua_xml_http_request.cpp | 2 +- .../CCControlColourPicker.cpp | 6 ++-- extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm | 5 +-- extensions/GUI/CCEditBox/CCEditBoxImplMac.mm | 3 +- .../physics-nodes/CCPhysicsDebugNode.cpp | 2 +- external/chipmunk/src/cpArbiter.c | 4 +-- tests/cpp-tests/Classes/AppDelegate.cpp | 4 +-- .../NewRendererTest/NewRendererTest.cpp | 2 +- tests/cpp-tests/Classes/NodeTest/NodeTest.cpp | 6 ++-- .../CocoStudioGUITest/CocosGUIScene.cpp | 2 +- 67 files changed, 145 insertions(+), 139 deletions(-) diff --git a/cocos/2d/CCActionCamera.cpp b/cocos/2d/CCActionCamera.cpp index 79e33e82dc..820de644e0 100644 --- a/cocos/2d/CCActionCamera.cpp +++ b/cocos/2d/CCActionCamera.cpp @@ -115,8 +115,7 @@ void ActionCamera::updateTransform() mv = mv * t; } - // XXX FIXME TODO - // Using the AdditionalTransform is a complete hack. + // FIXME: Using the AdditionalTransform is a complete hack. // This should be done by multipliying the lookup-Matrix with the Node's MV matrix // And then setting the result as the new MV matrix // But that operation needs to be done after all the 'updates'. diff --git a/cocos/2d/CCActionInstant.cpp b/cocos/2d/CCActionInstant.cpp index 627946bcaa..c5e0035808 100644 --- a/cocos/2d/CCActionInstant.cpp +++ b/cocos/2d/CCActionInstant.cpp @@ -424,7 +424,7 @@ CallFuncN * CallFuncN::create(const std::function &func) return nullptr; } -// XXX deprecated +// FIXME: deprecated CallFuncN * CallFuncN::create(Ref* selectorTarget, SEL_CallFuncN selector) { CallFuncN *ret = new (std::nothrow) CallFuncN(); diff --git a/cocos/2d/CCActionInterval.cpp b/cocos/2d/CCActionInterval.cpp index bdbefff6ae..e169d00f3a 100644 --- a/cocos/2d/CCActionInterval.cpp +++ b/cocos/2d/CCActionInterval.cpp @@ -335,7 +335,7 @@ void Sequence::update(float t) else if(found==0 && _last==1 ) { // Reverse mode ? - // XXX: Bug. this case doesn't contemplate when _last==-1, found=0 and in "reverse mode" + // FIXME: Bug. this case doesn't contemplate when _last==-1, found=0 and in "reverse mode" // since it will require a hack to know if an action is on reverse mode or not. // "step" should be overriden, and the "reverseMode" value propagated to inner Sequences. _actions[1]->update(0); @@ -981,7 +981,7 @@ void RotateBy::startWithTarget(Node *target) void RotateBy::update(float time) { - // XXX: shall I add % 360 + // FIXME: shall I add % 360 if (_target) { if(_is3D) @@ -2183,7 +2183,7 @@ void ReverseTime::update(float time) ReverseTime* ReverseTime::reverse() const { - // XXX: This looks like a bug + // FIXME: This looks like a bug return (ReverseTime*)_other->clone(); } diff --git a/cocos/2d/CCActionManager.cpp b/cocos/2d/CCActionManager.cpp index 7334463c7c..4739541b24 100644 --- a/cocos/2d/CCActionManager.cpp +++ b/cocos/2d/CCActionManager.cpp @@ -317,7 +317,7 @@ void ActionManager::removeAllActionsByTag(int tag, Node *target) // get -// XXX: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer +// FIXME: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer // and, it is not possible to get the address of a reference Action* ActionManager::getActionByTag(int tag, const Node *target) const { @@ -351,7 +351,7 @@ Action* ActionManager::getActionByTag(int tag, const Node *target) const return nullptr; } -// XXX: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer +// FIXME: Passing "const O *" instead of "const O&" because HASH_FIND_IT requries the address of a pointer // and, it is not possible to get the address of a reference ssize_t ActionManager::getNumberOfRunningActionsInTarget(const Node *target) const { diff --git a/cocos/2d/CCClippingNode.cpp b/cocos/2d/CCClippingNode.cpp index 653a70cacc..727a2eb6ec 100644 --- a/cocos/2d/CCClippingNode.cpp +++ b/cocos/2d/CCClippingNode.cpp @@ -248,7 +248,7 @@ void ClippingNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32 program->use(); program->setUniformLocationWith1f(alphaValueLocation, _alphaThreshold); // we need to recursively apply this shader to all the nodes in the stencil node - // XXX: we should have a way to apply shader to all nodes without having to do this + // FIXME: we should have a way to apply shader to all nodes without having to do this setProgram(_stencil, program); #endif @@ -438,7 +438,7 @@ void ClippingNode::onAfterDrawStencil() glDisable(GL_ALPHA_TEST); } #else -// XXX: we need to find a way to restore the shaders of the stencil node and its childs +// FIXME: we need to find a way to restore the shaders of the stencil node and its childs #endif } diff --git a/cocos/2d/CCDrawingPrimitives.cpp b/cocos/2d/CCDrawingPrimitives.cpp index 2062b8fa5c..456a88a66e 100644 --- a/cocos/2d/CCDrawingPrimitives.cpp +++ b/cocos/2d/CCDrawingPrimitives.cpp @@ -157,7 +157,7 @@ void drawPoints( const Vec2 *points, unsigned int numberOfPoints ) s_shader->setUniformLocationWith4fv(s_colorLocation, (GLfloat*) &s_color.r, 1); s_shader->setUniformLocationWith1f(s_pointSizeLocation, s_pointSize); - // XXX: Mac OpenGL error. arrays can't go out of scope before draw is executed + // FIXME: Mac OpenGL error. arrays can't go out of scope before draw is executed Vec2* newPoints = new (std::nothrow) Vec2[numberOfPoints]; // iPhone and 32-bit machines optimization @@ -268,7 +268,7 @@ void drawPoly(const Vec2 *poli, unsigned int numberOfPoints, bool closePolygon) else { // Mac on 64-bit - // XXX: Mac OpenGL error. arrays can't go out of scope before draw is executed + // FIXME: Mac OpenGL error. arrays can't go out of scope before draw is executed Vec2* newPoli = new (std::nothrow) Vec2[numberOfPoints]; for( unsigned int i=0; i empty tile + // FIXME: gid == 0 --> empty tile if( gid != 0 ) { // Optimization: quick return diff --git a/cocos/2d/CCFontFNT.cpp b/cocos/2d/CCFontFNT.cpp index b35d31a11d..7b4bc5d4cd 100644 --- a/cocos/2d/CCFontFNT.cpp +++ b/cocos/2d/CCFontFNT.cpp @@ -102,7 +102,7 @@ typedef struct _KerningHashElement */ class CC_DLL BMFontConfiguration : public Ref { - // XXX: Creating a public interface so that the bitmapFontArray[] is accessible + // FIXME: Creating a public interface so that the bitmapFontArray[] is accessible public://@public // BMFont definitions tFontDefHashElement *_fontDefDictionary; @@ -313,7 +313,7 @@ std::set* BMFontConfiguration::parseConfigFile(const std::string& if(line.substr(0,strlen("info face")) == "info face") { - // XXX: info parsing is incomplete + // FIXME: info parsing is incomplete // Not needed for the Hiero editors, but needed for the AngelCode editor // [self parseInfoArguments:line]; this->parseInfoArguments(line); diff --git a/cocos/2d/CCGrabber.cpp b/cocos/2d/CCGrabber.cpp index 6a4f68acd9..721e21b363 100644 --- a/cocos/2d/CCGrabber.cpp +++ b/cocos/2d/CCGrabber.cpp @@ -68,7 +68,7 @@ void Grabber::beforeRender(Texture2D *texture) // save clear color glGetFloatv(GL_COLOR_CLEAR_VALUE, _oldClearColor); - // BUG XXX: doesn't work with RGB565. + // FIXME: doesn't work with RGB565. glClearColor(0, 0, 0, 0); diff --git a/cocos/2d/CCGrid.cpp b/cocos/2d/CCGrid.cpp index 90c84545d4..db68c100ce 100644 --- a/cocos/2d/CCGrid.cpp +++ b/cocos/2d/CCGrid.cpp @@ -151,7 +151,7 @@ GridBase::~GridBase(void) { CCLOGINFO("deallocing GridBase: %p", this); -//TODO: ? why 2.0 comments this line setActive(false); + //TODO: ? why 2.0 comments this line: setActive(false); CC_SAFE_RELEASE(_texture); CC_SAFE_RELEASE(_grabber); } @@ -220,7 +220,7 @@ void GridBase::afterDraw(cocos2d::Node *target) // Vec2 offset = target->getAnchorPointInPoints(); // // // -// // XXX: Camera should be applied in the AnchorPoint +// // FIXME: Camera should be applied in the AnchorPoint // // // kmGLTranslatef(offset.x, offset.y, 0); // target->getCamera()->locate(); @@ -230,8 +230,8 @@ void GridBase::afterDraw(cocos2d::Node *target) GL::bindTexture2D(_texture->getName()); // restore projection for default FBO .fixed bug #543 #544 -//TODO: Director::getInstance()->setProjection(Director::getInstance()->getProjection()); -//TODO: Director::getInstance()->applyOrientation(); + //TODO: Director::getInstance()->setProjection(Director::getInstance()->getProjection()); + //TODO: Director::getInstance()->applyOrientation(); blit(); } diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index 7a9d956373..39aaa8860c 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -772,7 +772,7 @@ void Label::enableShadow(const Color4B& shadowColor /* = Color4B::BLACK */,const auto contentScaleFactor = CC_CONTENT_SCALE_FACTOR(); _shadowOffset.width = offset.width * contentScaleFactor; _shadowOffset.height = offset.height * contentScaleFactor; - //todo:support blur for shadow + //TODO: support blur for shadow _shadowBlurRadius = 0; if (_textSprite && _shadowNode) diff --git a/cocos/2d/CCMenuItem.cpp b/cocos/2d/CCMenuItem.cpp index db5ddccfc0..ca02d5b856 100644 --- a/cocos/2d/CCMenuItem.cpp +++ b/cocos/2d/CCMenuItem.cpp @@ -63,7 +63,7 @@ MenuItem* MenuItem::create() return MenuItem::create((const ccMenuCallback&)nullptr); } -// XXX deprecated +// FIXME: deprecated MenuItem* MenuItem::create(Ref *target, SEL_MenuHandler selector) { MenuItem *ret = new (std::nothrow) MenuItem(); @@ -80,7 +80,7 @@ MenuItem* MenuItem::create( const ccMenuCallback& callback) return ret; } -// XXX deprecated +// FIXME: deprecated bool MenuItem::initWithTarget(cocos2d::Ref *target, SEL_MenuHandler selector ) { _target = target; @@ -153,7 +153,7 @@ bool MenuItem::isSelected() const return _selected; } -// XXX deprecated +// FIXME: deprecated void MenuItem::setTarget(Ref *target, SEL_MenuHandler selector) { _target = target; @@ -192,7 +192,7 @@ void MenuItemLabel::setLabel(Node* var) _label = var; } -// XXX: deprecated +// FIXME:: deprecated MenuItemLabel * MenuItemLabel::create(Node*label, Ref* target, SEL_MenuHandler selector) { MenuItemLabel *ret = new (std::nothrow) MenuItemLabel(); @@ -217,7 +217,7 @@ MenuItemLabel* MenuItemLabel::create(Node *label) return ret; } -// XXX: deprecated +// FIXME:: deprecated bool MenuItemLabel::initWithLabel(Node* label, Ref* target, SEL_MenuHandler selector) { _target = target; @@ -322,7 +322,7 @@ MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const st return MenuItemAtlasFont::create(value, charMapFile, itemWidth, itemHeight, startCharMap, (const ccMenuCallback&)nullptr); } -// XXX: deprecated +// FIXME:: deprecated MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector) { MenuItemAtlasFont *ret = new (std::nothrow) MenuItemAtlasFont(); @@ -339,7 +339,7 @@ MenuItemAtlasFont * MenuItemAtlasFont::create(const std::string& value, const st return ret; } -// XXX: deprecated +// FIXME:: deprecated bool MenuItemAtlasFont::initWithString(const std::string& value, const std::string& charMapFile, int itemWidth, int itemHeight, char startCharMap, Ref* target, SEL_MenuHandler selector) { _target = target; @@ -388,7 +388,7 @@ const std::string& MenuItemFont::getFontName() return _globalFontName; } -// XXX: deprecated +// FIXME:: deprecated MenuItemFont * MenuItemFont::create(const std::string& value, Ref* target, SEL_MenuHandler selector) { MenuItemFont *ret = new (std::nothrow) MenuItemFont(); @@ -423,7 +423,7 @@ MenuItemFont::~MenuItemFont() CCLOGINFO("In the destructor of MenuItemFont (%p).", this); } -// XXX: deprecated +// FIXME:: deprecated bool MenuItemFont::initWithString(const std::string& value, Ref* target, SEL_MenuHandler selector) { CCASSERT( !value.empty(), "Value length must be greater than 0"); @@ -546,7 +546,7 @@ MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite return MenuItemSprite::create(normalSprite, selectedSprite, disabledSprite, (const ccMenuCallback&)nullptr); } -// XXX deprecated +// FIXME: deprecated MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite, Ref* target, SEL_MenuHandler selector) { return MenuItemSprite::create(normalSprite, selectedSprite, nullptr, target, selector); @@ -557,7 +557,7 @@ MenuItemSprite * MenuItemSprite::create(Node* normalSprite, Node* selectedSprite return MenuItemSprite::create(normalSprite, selectedSprite, nullptr, callback); } -// XXX deprecated +// FIXME: deprecated MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite, Node *disabledSprite, Ref *target, SEL_MenuHandler selector) { MenuItemSprite *ret = new (std::nothrow) MenuItemSprite(); @@ -574,7 +574,7 @@ MenuItemSprite * MenuItemSprite::create(Node *normalSprite, Node *selectedSprite return ret; } -// XXX deprecated +// FIXME: deprecated bool MenuItemSprite::initWithNormalSprite(Node* normalSprite, Node* selectedSprite, Node* disabledSprite, Ref* target, SEL_MenuHandler selector) { _target = target; @@ -706,7 +706,7 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std: return MenuItemImage::create(normalImage, selectedImage, "", (const ccMenuCallback&)nullptr); } -// XXX deprecated +// FIXME: deprecated MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, Ref* target, SEL_MenuHandler selector) { return MenuItemImage::create(normalImage, selectedImage, "", target, selector); @@ -717,7 +717,7 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std: return MenuItemImage::create(normalImage, selectedImage, "", callback); } -// XXX deprecated +// FIXME: deprecated MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector) { MenuItemImage *ret = new (std::nothrow) MenuItemImage(); @@ -754,7 +754,7 @@ MenuItemImage * MenuItemImage::create(const std::string& normalImage, const std: return nullptr; } -// XXX: deprecated +// FIXME:: deprecated bool MenuItemImage::initWithNormalImage(const std::string& normalImage, const std::string& selectedImage, const std::string& disabledImage, Ref* target, SEL_MenuHandler selector) { _target = target; @@ -806,7 +806,7 @@ void MenuItemImage::setDisabledSpriteFrame(SpriteFrame * frame) // MenuItemToggle // -// XXX: deprecated +// FIXME:: deprecated MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler selector, const Vector& menuItems) { MenuItemToggle *ret = new (std::nothrow) MenuItemToggle(); @@ -827,7 +827,7 @@ MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callba return ret; } -// XXX: deprecated +// FIXME:: deprecated MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler selector, MenuItem* item, ...) { va_list args; @@ -871,7 +871,7 @@ MenuItemToggle * MenuItemToggle::create() return ret; } -// XXX: deprecated +// FIXME:: deprecated bool MenuItemToggle::initWithTarget(Ref* target, SEL_MenuHandler selector, MenuItem* item, va_list args) { _target = target; diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index f220a57cb2..ce93d2935a 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -68,7 +68,7 @@ bool nodeComparisonLess(Node* n1, Node* n2) ); } -// XXX: Yes, nodes might have a sort problem once every 15 days if the game runs at 60 FPS and each frame sprites are reordered. +// FIXME:: Yes, nodes might have a sort problem once every 15 days if the game runs at 60 FPS and each frame sprites are reordered. int Node::s_globalOrderOfArrival = 1; // MARK: Constructor, Destructor, Init @@ -593,7 +593,7 @@ void Node::setPositionZ(float positionZ) _positionZ = positionZ; - // XXX BUG + // FIXME: BUG // Global Z Order should based on the modelViewTransform setGlobalZOrder(positionZ); } @@ -1670,7 +1670,7 @@ const Mat4& Node::getNodeToParentTransform() const _transform.translate(anchorPoint.x, anchorPoint.y, 0); } - // XXX + // FIXME: // FIX ME: Expensive operation. // FIX ME: It should be done together with the rotationZ if(_rotationY) { @@ -1689,7 +1689,7 @@ const Mat4& Node::getNodeToParentTransform() const _transform.translate(-anchorPoint.x, -anchorPoint.y, 0); } - // XXX: Try to inline skew + // FIXME:: Try to inline skew // If skew is needed, apply skew and then anchor point if (needsSkewMatrix) { @@ -1703,8 +1703,8 @@ const Mat4& Node::getNodeToParentTransform() const // adjust anchor point if (!_anchorPointInPoints.equals(Vec2::ZERO)) { - // XXX: Argh, Mat4 needs a "translate" method. - // XXX: Although this is faster than multiplying a vec4 * mat4 + // FIXME:: Argh, Mat4 needs a "translate" method. + // FIXME:: Although this is faster than multiplying a vec4 * mat4 _transform.m[12] += _transform.m[0] * -_anchorPointInPoints.x + _transform.m[4] * -_anchorPointInPoints.y; _transform.m[13] += _transform.m[1] * -_anchorPointInPoints.x + _transform.m[5] * -_anchorPointInPoints.y; } diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index dd27e08acb..24dd8dfc54 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -207,8 +207,8 @@ void ParticleBatchNode::addChildByTagOrName(ParticleSystem* child, int zOrder, i } // don't use lazy sorting, reordering the particle systems quads afterwards would be too complex -// XXX research whether lazy sorting + freeing current quads and calloc a new block with size of capacity would be faster -// XXX or possibly using vertexZ for reordering, that would be fastest +// FIXME: research whether lazy sorting + freeing current quads and calloc a new block with size of capacity would be faster +// FIXME: or possibly using vertexZ for reordering, that would be fastest // this helper is almost equivalent to Node's addChild, but doesn't make use of the lazy sorting int ParticleBatchNode::addChildHelper(ParticleSystem* child, int z, int aTag, const std::string &name, bool setTag) { diff --git a/cocos/2d/CCParticleSystem.cpp b/cocos/2d/CCParticleSystem.cpp index f18fcec6d8..ebfee9d584 100644 --- a/cocos/2d/CCParticleSystem.cpp +++ b/cocos/2d/CCParticleSystem.cpp @@ -174,7 +174,7 @@ bool ParticleSystem::initWithFile(const std::string& plistFile) CCASSERT( !dict.empty(), "Particles: file not found"); - // XXX compute path from a path, should define a function somewhere to do it + // FIXME: compute path from a path, should define a function somewhere to do it string listFilePath = plistFile; if (listFilePath.find('/') != string::npos) { @@ -465,7 +465,7 @@ bool ParticleSystem::initWithTotalParticles(int numberOfParticles) _emitterMode = Mode::GRAVITY; // default: modulate - // XXX: not used + // FIXME:: not used // colorModulate = YES; _isAutoRemoveOnFinish = false; diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index 1d4457bd7b..89ae9366ff 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -356,7 +356,7 @@ void RenderTexture::beginWithClear(float r, float g, float b, float a, float dep Director::getInstance()->getRenderer()->addCommand(&_beginWithClearCommand); } -//TODO find a better way to clear the screen, there is no need to rebind render buffer there. +//TODO: find a better way to clear the screen, there is no need to rebind render buffer there. void RenderTexture::clear(float r, float g, float b, float a) { this->beginWithClear(r, g, b, a); @@ -504,7 +504,7 @@ Image* RenderTexture::newImage(bool fliimage) glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); glBindFramebuffer(GL_FRAMEBUFFER, _FBO); - //TODO move this to configration, so we don't check it every time + // TODO: move this to configration, so we don't check it every time /* Certain Qualcomm Andreno gpu's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers. */ if (Configuration::getInstance()->checkForGLExtension("GL_QCOM")) @@ -604,7 +604,7 @@ void RenderTexture::onBegin() glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_oldFBO); glBindFramebuffer(GL_FRAMEBUFFER, _FBO); - //TODO move this to configration, so we don't check it every time + // TODO: move this to configration, so we don't check it every time /* Certain Qualcomm Andreno gpu's will retain data in memory after a frame buffer switch which corrupts the render to the texture. The solution is to clear the frame buffer before rendering to the texture. However, calling glClear has the unintended result of clearing the current texture. Create a temporary texture to overcome this. At the end of RenderTexture::begin(), switch the attached texture to the second one, call glClear, and then switch back to the original texture. This solution is unnecessary for other devices as they don't have the same issue with switching frame buffers. */ if (Configuration::getInstance()->checkForGLExtension("GL_QCOM")) diff --git a/cocos/2d/CCRenderTexture.h b/cocos/2d/CCRenderTexture.h index 384a466bb6..f6a83c0ef2 100644 --- a/cocos/2d/CCRenderTexture.h +++ b/cocos/2d/CCRenderTexture.h @@ -166,7 +166,7 @@ public: void setVirtualViewport(const Vec2& rtBegin, const Rect& fullRect, const Rect& fullViewport); public: - // XXX should be procted. + // FIXME: should be procted. // but due to a bug in PowerVR + Android, // the constructor is public again RenderTexture(); diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 6bd4ff58e0..18daf0051a 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -61,6 +61,7 @@ NS_CC_BEGIN #define RENDER_IN_SUBPIXEL(__ARGS__) (ceil(__ARGS__)) #endif +// MARK: create, init, dealloc Sprite* Sprite::createWithTexture(Texture2D *texture) { Sprite *sprite = new (std::nothrow) Sprite(); @@ -307,6 +308,7 @@ static unsigned char cc_2x2_white_image[] = { #define CC_2x2_WHITE_IMAGE_KEY "/cc_2x2_white_image" +// MARK: texture void Sprite::setTexture(const std::string &filename) { Texture2D *texture = Director::getInstance()->getTextureCache()->addImage(filename); @@ -497,6 +499,8 @@ void Sprite::setTextureCoords(Rect rect) } } +// MARK: visit, draw, transform + void Sprite::updateTransform(void) { CCASSERT(_batchNode, "updateTransform is only valid when Sprite is being rendered using an SpriteBatchNode"); @@ -622,7 +626,8 @@ void Sprite::drawDebugData() } #endif //CC_SPRITE_DEBUG_DRAW -// Node overrides +// MARK: visit, draw, transform + void Sprite::addChild(Node *child, int zOrder, int tag) { CCASSERT(child != nullptr, "Argument must be non-nullptr"); @@ -755,7 +760,7 @@ void Sprite::setDirtyRecursively(bool bValue) } } -// XXX HACK: optimization +// FIXME: HACK: optimization #define SET_DIRTY_RECURSIVELY() { \ if (! _recursiveDirty) { \ _recursiveDirty = true; \ @@ -885,7 +890,7 @@ bool Sprite::isFlippedY(void) const } // -// RGBA protocol +// MARK: RGBA protocol // void Sprite::updateColor(void) @@ -938,7 +943,7 @@ bool Sprite::isOpacityModifyRGB(void) const return _opacityModifyRGB; } -// Frames +// MARK: Frames void Sprite::setSpriteFrame(const std::string &spriteFrameName) { @@ -1032,7 +1037,7 @@ void Sprite::setBatchNode(SpriteBatchNode *spriteBatchNode) } } -// Texture protocol +// MARK: Texture protocol void Sprite::updateBlendFunc(void) { diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index 318b0ed7a6..2eed425a21 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -638,8 +638,8 @@ void SpriteBatchNode::insertQuadFromSprite(Sprite *sprite, ssize_t index) V3F_C4B_T2F_Quad quad = sprite->getQuad(); _textureAtlas->insertQuad(&quad, index); - // XXX: updateTransform will update the textureAtlas too, using updateQuad. - // XXX: so, it should be AFTER the insertQuad + // FIXME:: updateTransform will update the textureAtlas too, using updateQuad. + // FIXME:: so, it should be AFTER the insertQuad sprite->setDirty(true); sprite->updateTransform(); } @@ -675,7 +675,7 @@ SpriteBatchNode * SpriteBatchNode::addSpriteWithoutQuad(Sprite*child, int z, int // quad index is Z child->setAtlasIndex(z); - // XXX: optimize with a binary search + // FIXME:: optimize with a binary search auto it = _descendants.begin(); for (; it != _descendants.end(); ++it) { diff --git a/cocos/2d/CCSpriteFrameCache.cpp b/cocos/2d/CCSpriteFrameCache.cpp index 85f06a36d3..0bac80bf5a 100644 --- a/cocos/2d/CCSpriteFrameCache.cpp +++ b/cocos/2d/CCSpriteFrameCache.cpp @@ -313,7 +313,7 @@ void SpriteFrameCache::removeUnusedSpriteFrames() _spriteFrames.erase(toRemoveFrames); - // XXX. Since we don't know the .plist file that originated the frame, we must remove all .plist from the cache + // FIXME:. Since we don't know the .plist file that originated the frame, we must remove all .plist from the cache if( removed ) { _loadedFileNames->clear(); @@ -340,7 +340,7 @@ void SpriteFrameCache::removeSpriteFrameByName(const std::string& name) _spriteFrames.erase(name); } - // XXX. Since we don't know the .plist file that originated the frame, we must remove all .plist from the cache + // FIXME:. Since we don't know the .plist file that originated the frame, we must remove all .plist from the cache _loadedFileNames->clear(); } diff --git a/cocos/2d/CCTMXLayer.cpp b/cocos/2d/CCTMXLayer.cpp index a305e9f661..62e7ba774e 100644 --- a/cocos/2d/CCTMXLayer.cpp +++ b/cocos/2d/CCTMXLayer.cpp @@ -55,7 +55,7 @@ TMXLayer * TMXLayer::create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo } bool TMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo) { - // XXX: is 35% a good estimate ? + // FIXME:: is 35% a good estimate ? Size size = layerInfo->_layerSize; float totalNumberOfTiles = size.width * size.height; float capacity = totalNumberOfTiles * 0.35f + 1; // 35 percent is occupied ? @@ -175,7 +175,7 @@ void TMXLayer::setupTiles() // gid = CFSwapInt32( gid ); /* We support little endian.*/ - // XXX: gid == 0 --> empty tile + // FIXME:: gid == 0 --> empty tile if (gid != 0) { this->appendTileForGID(gid, Vec2(x, y)); @@ -292,7 +292,7 @@ Sprite* TMXLayer::reusedTileWithRect(Rect rect) } else { - // XXX HACK: Needed because if "batch node" is nil, + // FIXME: HACK: Needed because if "batch node" is nil, // then the Sprite'squad will be reset _reusedTile->setBatchNode(nullptr); @@ -472,7 +472,7 @@ ssize_t TMXLayer::atlasIndexForExistantZ(int z) ssize_t TMXLayer::atlasIndexForNewZ(int z) { - // XXX: This can be improved with a sort of binary search + // FIXME:: This can be improved with a sort of binary search ssize_t i=0; for (i=0; i< _atlasIndexArray->num ; i++) { diff --git a/cocos/2d/CCTMXTiledMap.cpp b/cocos/2d/CCTMXTiledMap.cpp index 0559a22203..46c4490bb9 100644 --- a/cocos/2d/CCTMXTiledMap.cpp +++ b/cocos/2d/CCTMXTiledMap.cpp @@ -138,7 +138,7 @@ TMXTilesetInfo * TMXTiledMap::tilesetForLayer(TMXLayerInfo *layerInfo, TMXMapInf // gid = CFSwapInt32( gid ); /* We support little endian.*/ - // XXX: gid == 0 --> empty tile + // FIXME:: gid == 0 --> empty tile if( gid != 0 ) { // Optimization: quick return diff --git a/cocos/2d/CCTileMapAtlas.cpp b/cocos/2d/CCTileMapAtlas.cpp index a3d070ed69..a341a51674 100644 --- a/cocos/2d/CCTileMapAtlas.cpp +++ b/cocos/2d/CCTileMapAtlas.cpp @@ -142,8 +142,8 @@ void TileMapAtlas::setTile(const Color3B& tile, const Vec2& position) { ptr[(unsigned int)(position.x + position.y * _TGAInfo->width)] = tile; - // XXX: this method consumes a lot of memory - // XXX: a tree of something like that shall be implemented + // FIXME:: this method consumes a lot of memory + // FIXME:: a tree of something like that shall be implemented std::string key = StringUtils::toString(position.x) + "," + StringUtils::toString(position.y); int num = _posToAtlasIndex[key].asInt(); diff --git a/cocos/2d/CCTransitionPageTurn.cpp b/cocos/2d/CCTransitionPageTurn.cpp index eb2797db64..cbeaa0a019 100644 --- a/cocos/2d/CCTransitionPageTurn.cpp +++ b/cocos/2d/CCTransitionPageTurn.cpp @@ -62,7 +62,7 @@ TransitionPageTurn * TransitionPageTurn::create(float t, Scene *scene, bool back /** initializes a transition with duration and incoming scene */ bool TransitionPageTurn::initWithDuration(float t, Scene *scene, bool backwards) { - // XXX: needed before [super init] + // FIXME:: needed before [super init] _back = backwards; if (TransitionScene::initWithDuration(t, scene)) diff --git a/cocos/audio/mac/CocosDenshion.h b/cocos/audio/mac/CocosDenshion.h index 1516b2372e..2e40c2eaae 100644 --- a/cocos/audio/mac/CocosDenshion.h +++ b/cocos/audio/mac/CocosDenshion.h @@ -338,7 +338,7 @@ typedef struct _sourceInfo { #pragma mark CDAsynchBufferLoader /** CDAsynchBufferLoader - TODO + * TODO: ??? */ @interface CDAsynchBufferLoader : NSOperation { NSArray *_loadRequests; diff --git a/cocos/base/CCConfiguration.cpp b/cocos/base/CCConfiguration.cpp index 5c9d9d0cae..1fba177e07 100644 --- a/cocos/base/CCConfiguration.cpp +++ b/cocos/base/CCConfiguration.cpp @@ -161,13 +161,13 @@ void Configuration::destroyInstance() CC_SAFE_RELEASE_NULL(s_sharedConfiguration); } -// XXX: deprecated +// FIXME: deprecated Configuration* Configuration::sharedConfiguration() { return Configuration::getInstance(); } -// XXX: deprecated +// FIXME: deprecated void Configuration::purgeConfiguration() { Configuration::destroyInstance(); diff --git a/cocos/base/CCConsole.cpp b/cocos/base/CCConsole.cpp index 85775dbaad..262c8e9891 100644 --- a/cocos/base/CCConsole.cpp +++ b/cocos/base/CCConsole.cpp @@ -237,7 +237,7 @@ static void _log(const char *format, va_list args) } -// XXX: Deprecated +// FIXME: Deprecated void CCLog(const char * format, ...) { va_list args; diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index bc69228f55..448701f5b2 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -76,7 +76,7 @@ THE SOFTWARE. using namespace std; NS_CC_BEGIN -// XXX it should be a Director ivar. Move it there once support for multiple directors is added +// FIXME: it should be a Director ivar. Move it there once support for multiple directors is added // singleton stuff static DisplayLinkDirector *s_SharedDirector = nullptr; @@ -241,7 +241,7 @@ void Director::setGLDefaultValues() CCASSERT(_openGLView, "opengl view should not be null"); setAlphaBlending(true); - // XXX: Fix me, should enable/disable depth test according the depth format as cocos2d-iphone did + // FIXME: Fix me, should enable/disable depth test according the depth format as cocos2d-iphone did // [self setDepthTest: view_.depthFormat]; setDepthTest(false); setProjection(_projection); @@ -277,7 +277,8 @@ void Director::drawScene() glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* to avoid flickr, nextScene MUST be here: after tick and before draw. - XXX: Which bug is this one. It seems that it can't be reproduced with v0.9 */ + * FIXME: Which bug is this one. It seems that it can't be reproduced with v0.9 + */ if (_nextScene) { setNextScene(); @@ -1158,7 +1159,7 @@ void Director::calculateMPF() // returns the FPS image data pointer and len void Director::getFPSImageData(unsigned char** datapointer, ssize_t* length) { - // XXX fixed me if it should be used + // FIXME: fixed me if it should be used *datapointer = cc_fps_images_png; *length = cc_fps_images_len(); } diff --git a/cocos/base/CCDirector.h b/cocos/base/CCDirector.h index c5ffd80e0a..c7c6828a7b 100644 --- a/cocos/base/CCDirector.h +++ b/cocos/base/CCDirector.h @@ -246,7 +246,7 @@ public: */ Vec2 convertToUI(const Vec2& point); - /// XXX: missing description + /// FIXME: missing description float getZEye() const; // Scene Management diff --git a/cocos/base/CCProfiling.cpp b/cocos/base/CCProfiling.cpp index a97c0d70c6..44c37bc44a 100644 --- a/cocos/base/CCProfiling.cpp +++ b/cocos/base/CCProfiling.cpp @@ -51,7 +51,7 @@ Profiler* Profiler::getInstance() return g_sSharedProfiler; } -// XXX: deprecated +// FIXME:: deprecated Profiler* Profiler::sharedProfiler(void) { return Profiler::getInstance(); diff --git a/cocos/base/CCUserDefault.cpp b/cocos/base/CCUserDefault.cpp index 3302018233..f22d4216da 100644 --- a/cocos/base/CCUserDefault.cpp +++ b/cocos/base/CCUserDefault.cpp @@ -428,13 +428,13 @@ void UserDefault::destroyInstance() CC_SAFE_DELETE(_userDefault); } -// XXX: deprecated +// FIXME:: deprecated UserDefault* UserDefault::sharedUserDefault() { return UserDefault::getInstance(); } -// XXX: deprecated +// FIXME:: deprecated void UserDefault::purgeSharedUserDefault() { return UserDefault::destroyInstance(); diff --git a/cocos/base/CCUserDefault.mm b/cocos/base/CCUserDefault.mm index 2613965e4b..3d7dd6f14e 100644 --- a/cocos/base/CCUserDefault.mm +++ b/cocos/base/CCUserDefault.mm @@ -490,13 +490,13 @@ void UserDefault::destroyInstance() CC_SAFE_DELETE(_userDefault); } -// XXX: deprecated +// FIXME:: deprecated UserDefault* UserDefault::sharedUserDefault() { return UserDefault::getInstance(); } -// XXX: deprecated +// FIXME:: deprecated void UserDefault::purgeSharedUserDefault() { UserDefault::destroyInstance(); diff --git a/cocos/base/CCUserDefaultAndroid.cpp b/cocos/base/CCUserDefaultAndroid.cpp index 5c66fc6c6a..9240747e5c 100644 --- a/cocos/base/CCUserDefaultAndroid.cpp +++ b/cocos/base/CCUserDefaultAndroid.cpp @@ -146,7 +146,7 @@ UserDefault::UserDefault() { } -// XXX: deprecated +// FIXME:: deprecated void UserDefault::purgeSharedUserDefault() { UserDefault::destroyInstance(); @@ -468,7 +468,7 @@ void UserDefault::setDataForKey(const char* pKey, const Data& value) free(encodedData); } -// XXX: deprecated +// FIXME:: deprecated UserDefault* UserDefault::sharedUserDefault() { return UserDefault::getInstance(); diff --git a/cocos/base/ccMacros.h b/cocos/base/ccMacros.h index e72c32f265..cce54e8f83 100644 --- a/cocos/base/ccMacros.h +++ b/cocos/base/ccMacros.h @@ -55,7 +55,7 @@ THE SOFTWARE. #define GP_ASSERT(cond) CCASSERT(cond, "") -// XXX: Backward compatible +// FIXME:: Backward compatible #define CCAssert CCASSERT #endif // CCASSERT diff --git a/cocos/base/ccTypes.h b/cocos/base/ccTypes.h index 8e75b828a8..7b2902f749 100644 --- a/cocos/base/ccTypes.h +++ b/cocos/base/ccTypes.h @@ -362,7 +362,7 @@ struct CC_DLL BlendFunc // Label::VAlignment // Label::HAlignment -// XXX: If any of these enums are edited and/or reordered, update Texture2D.m +// FIXME:: If any of these enums are edited and/or reordered, update Texture2D.m //! Vertical text alignment type enum class CC_DLL TextVAlignment { @@ -371,7 +371,7 @@ enum class CC_DLL TextVAlignment BOTTOM, }; -// XXX: If any of these enums are edited and/or reordered, update Texture2D.m +// FIXME:: If any of these enums are edited and/or reordered, update Texture2D.m //! Horizontal text alignment type enum class CC_DLL TextHAlignment { diff --git a/cocos/deprecated/CCNotificationCenter.cpp b/cocos/deprecated/CCNotificationCenter.cpp index 467698346d..aea2f6bf14 100644 --- a/cocos/deprecated/CCNotificationCenter.cpp +++ b/cocos/deprecated/CCNotificationCenter.cpp @@ -63,13 +63,13 @@ void __NotificationCenter::destroyInstance() CC_SAFE_RELEASE_NULL(s_sharedNotifCenter); } -// XXX: deprecated +// FIXME:: deprecated __NotificationCenter *__NotificationCenter::sharedNotificationCenter(void) { return __NotificationCenter::getInstance(); } -// XXX: deprecated +// FIXME:: deprecated void __NotificationCenter::purgeNotificationCenter(void) { __NotificationCenter::destroyInstance(); diff --git a/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp b/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp index eff4c54f19..7202f0bfc4 100644 --- a/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp +++ b/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp @@ -481,7 +481,7 @@ void CCBAnimationManager::setAnimatedProperty(const std::string& propName, Node { // [node setValue:value forKey:name]; - // TODO only handle rotation, opacity, displayFrame, color + // TODO: only handle rotation, opacity, displayFrame, color if (propName == "rotation") { float rotate = value.asFloat(); diff --git a/cocos/editor-support/cocosbuilder/CCBReader.cpp b/cocos/editor-support/cocosbuilder/CCBReader.cpp index 824612a0da..c0a408bb20 100644 --- a/cocos/editor-support/cocosbuilder/CCBReader.cpp +++ b/cocos/editor-support/cocosbuilder/CCBReader.cpp @@ -477,7 +477,7 @@ float CCBReader::readFloat() { /* using a memcpy since the compiler isn't * doing the float ptr math correctly on device. - * TODO still applies in C++ ? */ + * TODO: still applies in C++ ? */ unsigned char* pF = (this->_bytes + this->_currentByte); float f = 0; diff --git a/cocos/editor-support/cocosbuilder/CCControlButtonLoader.cpp b/cocos/editor-support/cocosbuilder/CCControlButtonLoader.cpp index 7cd0f56cf4..ba2d530f87 100644 --- a/cocos/editor-support/cocosbuilder/CCControlButtonLoader.cpp +++ b/cocos/editor-support/cocosbuilder/CCControlButtonLoader.cpp @@ -19,7 +19,8 @@ namespace cocosbuilder {; #define PROPERTY_TITLETTFSIZE_HIGHLIGHTED "titleTTFSize|2" #define PROPERTY_TITLETTFSIZE_DISABLED "titleTTFSize|3" #define PROPERTY_LABELANCHORPOINT "labelAnchorPoint" -#define PROPERTY_PREFEREDSIZE "preferedSize" // TODO Should be "preferredSize". This is a typo in cocos2d-iphone, cocos2d-x and CocosBuilder! +// TODO: Should be "preferredSize". This is a typo in cocos2d-iphone, cocos2d-x and CocosBuilder! +#define PROPERTY_PREFEREDSIZE "preferedSize" #define PROPERTY_BACKGROUNDSPRITEFRAME_NORMAL "backgroundSpriteFrame|1" #define PROPERTY_BACKGROUNDSPRITEFRAME_HIGHLIGHTED "backgroundSpriteFrame|2" #define PROPERTY_BACKGROUNDSPRITEFRAME_DISABLED "backgroundSpriteFrame|3" diff --git a/cocos/editor-support/cocosbuilder/CCLayerGradientLoader.cpp b/cocos/editor-support/cocosbuilder/CCLayerGradientLoader.cpp index aaf3eddbce..3886e46fc8 100644 --- a/cocos/editor-support/cocosbuilder/CCLayerGradientLoader.cpp +++ b/cocos/editor-support/cocosbuilder/CCLayerGradientLoader.cpp @@ -44,7 +44,7 @@ void LayerGradientLoader::onHandlePropTypePoint(Node * pNode, Node * pParent, co if(strcmp(pPropertyName, PROPERTY_VECTOR) == 0) { ((LayerGradient *)pNode)->setVector(pPoint); - // TODO Not passed along the ccbi file. + // TODO: Not passed along the ccbi file. // ((LayerGradient *)pNode)->setCompressedInterpolation(true); } else { LayerLoader::onHandlePropTypePoint(pNode, pParent, pPropertyName, pPoint, ccbReader); diff --git a/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp b/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp index 79febcc5d3..9cea820ede 100644 --- a/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp +++ b/cocos/editor-support/cocosbuilder/CCLayerLoader.cpp @@ -25,10 +25,10 @@ void LayerLoader::onHandlePropTypeCheck(Node * pNode, Node * pParent, const char } else if(strcmp(pPropertyName, PROPERTY_ACCELEROMETER_ENABLED) == 0) { ((Layer *)pNode)->setAccelerometerEnabled(pCheck); } else if(strcmp(pPropertyName, PROPERTY_MOUSE_ENABLED) == 0) { - // TODO XXX + // TODO: Not supported CCLOG("The property '%s' is not supported!", PROPERTY_MOUSE_ENABLED); } else if(strcmp(pPropertyName, PROPERTY_KEYBOARD_ENABLED) == 0) { - // TODO XXX + // TODO: Not supported CCLOG("The property '%s' is not supported!", PROPERTY_KEYBOARD_ENABLED); // This comes closest: ((Layer *)pNode)->setKeypadEnabled(pCheck); } else { diff --git a/cocos/editor-support/cocosbuilder/CCNodeLoader.cpp b/cocos/editor-support/cocosbuilder/CCNodeLoader.cpp index 51f205ea30..bd560ca67a 100644 --- a/cocos/editor-support/cocosbuilder/CCNodeLoader.cpp +++ b/cocos/editor-support/cocosbuilder/CCNodeLoader.cpp @@ -619,7 +619,7 @@ Animation * NodeLoader::parsePropTypeAnimation(Node * pNode, Node * pParent, CCB // know what to do with them, since its pulling from bundle. // Eventually this should be handled by a client side asset manager // interface which figured out what resources to load. - // TODO Does this problem exist in C++? + // TODO: Does this problem exist in C++? animation = CCBReader::lastPathComponent(animation.c_str()); animationFile = CCBReader::lastPathComponent(animationFile.c_str()); @@ -742,7 +742,7 @@ std::string NodeLoader::parsePropTypeFontTTF(Node * pNode, Node * pParent, CCBRe // String * ttfEnding = String::create(".ttf"); - // TODO Fix me if it is wrong + // TODO: Fix me if it is wrong /* If the fontTTF comes with the ".ttf" extension, prepend the absolute path. * System fonts come without the ".ttf" extension and do not need the path prepended. */ /* diff --git a/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp b/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp index ac9bfd7ca7..2089898058 100644 --- a/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp +++ b/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp @@ -8,7 +8,8 @@ using namespace cocos2d::extension; #define PROPERTY_COLOR "color" #define PROPERTY_OPACITY "opacity" #define PROPERTY_BLENDFUNC "blendFunc" -#define PROPERTY_PREFEREDSIZE "preferedSize" // TODO Should be "preferredSize". This is a typo in cocos2d-iphone, cocos2d-x and CocosBuilder! +// TODO: Should be "preferredSize". This is a typo in cocos2d-iphone, cocos2d-x and CocosBuilder! +#define PROPERTY_PREFEREDSIZE "preferedSize" #define PROPERTY_INSETLEFT "insetLeft" #define PROPERTY_INSETTOP "insetTop" #define PROPERTY_INSETRIGHT "insetRight" diff --git a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp index 44b4eec1ce..b275634871 100644 --- a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp +++ b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp @@ -420,7 +420,7 @@ void DataReaderHelper::addDataFromFileAsync(const std::string& imagePath, const filereadmode += "b"; } ssize_t size; - // XXX fileContent is being leaked + // FIXME: fileContent is being leaked _dataReaderHelper->_getFileMutex.lock(); unsigned char *pBytes = FileUtils::getInstance()->getFileData(fullPath.c_str() , filereadmode.c_str(), &size); diff --git a/cocos/editor-support/cocostudio/CCSkin.cpp b/cocos/editor-support/cocostudio/CCSkin.cpp index a573a7b21b..c1a9ddda72 100644 --- a/cocos/editor-support/cocostudio/CCSkin.cpp +++ b/cocos/editor-support/cocostudio/CCSkin.cpp @@ -224,7 +224,7 @@ void Skin::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) { Mat4 mv = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); - //TODO implement z order + //TODO: implement z order _quadCommand.init(_globalZOrder, _texture->getName(), getGLProgramState(), _blendFunc, &_quad, 1, mv); renderer->addCommand(&_quadCommand); } diff --git a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp index a0ad66f89c..1fb4bccc36 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp @@ -39,7 +39,7 @@ namespace cocostudio void ScrollViewReader::setPropsFromBinary(cocos2d::ui::Widget *widget, CocoLoader *cocoLoader, stExpCocoNode* cocoNode) { - //TODO::need to refactor... + //TODO: need to refactor... LayoutReader::setPropsFromBinary(widget, cocoLoader, cocoNode); ScrollView* scrollView = static_cast(widget); diff --git a/cocos/math/TransformUtils.h b/cocos/math/TransformUtils.h index 30ec353ba7..eea629af11 100644 --- a/cocos/math/TransformUtils.h +++ b/cocos/math/TransformUtils.h @@ -27,8 +27,7 @@ THE SOFTWARE. #ifndef __SUPPORT_TRANSFORM_UTILS_H__ #define __SUPPORT_TRANSFORM_UTILS_H__ -// todo: -// when in MAC or windows, it includes +// TODO: when in MAC or windows, it includes #include "CCGL.h" #include "base/ccMacros.h" diff --git a/cocos/platform/CCFileUtils.cpp b/cocos/platform/CCFileUtils.cpp index bc839281ca..755d990f80 100644 --- a/cocos/platform/CCFileUtils.cpp +++ b/cocos/platform/CCFileUtils.cpp @@ -753,7 +753,7 @@ std::string FileUtils::fullPathForFilename(const std::string &filename) CCLOG("cocos2d: fullPathForFilename: No file found at %s. Possible missing file.", filename.c_str()); - // XXX: Should it return nullptr ? or an empty string ? + // FIXME: Should it return nullptr ? or an empty string ? // The file wasn't found, return the file name passed in. return filename; } diff --git a/cocos/platform/mac/CCDevice.mm b/cocos/platform/mac/CCDevice.mm index 885a643bc6..87dbaeadb5 100644 --- a/cocos/platform/mac/CCDevice.mm +++ b/cocos/platform/mac/CCDevice.mm @@ -36,7 +36,7 @@ NS_CC_BEGIN int Device::getDPI() { -//TODO: + //TODO: return correct DPI return 160; } diff --git a/cocos/renderer/CCGLProgramCache.cpp b/cocos/renderer/CCGLProgramCache.cpp index c4955a922c..6cc2bc3e91 100644 --- a/cocos/renderer/CCGLProgramCache.cpp +++ b/cocos/renderer/CCGLProgramCache.cpp @@ -74,13 +74,13 @@ void GLProgramCache::destroyInstance() CC_SAFE_RELEASE_NULL(_sharedGLProgramCache); } -// XXX: deprecated +// FIXME: deprecated GLProgramCache* GLProgramCache::sharedShaderCache() { return GLProgramCache::getInstance(); } -// XXX: deprecated +// FIXME: deprecated void GLProgramCache::purgeSharedShaderCache() { GLProgramCache::destroyInstance(); diff --git a/cocos/renderer/CCGLProgramState.cpp b/cocos/renderer/CCGLProgramState.cpp index 1a4ebad0c0..8955adddc3 100644 --- a/cocos/renderer/CCGLProgramState.cpp +++ b/cocos/renderer/CCGLProgramState.cpp @@ -114,7 +114,7 @@ void UniformValue::apply() void UniformValue::setCallback(const std::function &callback) { // delete previously set callback - // XXX TODO: memory will leak if the user does: + // TODO: memory will leak if the user does: // value->setCallback(); // value->setFloat(); if (_useCallback) diff --git a/cocos/renderer/CCRenderer.cpp b/cocos/renderer/CCRenderer.cpp index 3618774fc5..63c4b00d7a 100644 --- a/cocos/renderer/CCRenderer.cpp +++ b/cocos/renderer/CCRenderer.cpp @@ -358,7 +358,7 @@ void Renderer::render() //Uncomment this once everything is rendered by new renderer //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - //TODO setup camera or MVP + //TODO: setup camera or MVP _isRendering = true; if (_glViewAssigned) @@ -424,7 +424,7 @@ void Renderer::convertToWorldCoordinates(V3F_C4B_T2F_Quad* quads, ssize_t quanti void Renderer::drawBatchedQuads() { - //TODO we can improve the draw performance by insert material switching command before hand. + //TODO: we can improve the draw performance by insert material switching command before hand. int quadsToDraw = 0; int startQuad = 0; diff --git a/cocos/renderer/CCRenderer.h b/cocos/renderer/CCRenderer.h index 0c56b989e0..44a9755a5e 100644 --- a/cocos/renderer/CCRenderer.h +++ b/cocos/renderer/CCRenderer.h @@ -81,7 +81,7 @@ public: Renderer(); ~Renderer(); - //TODO manage GLView inside Render itself + //TODO: manage GLView inside Render itself void initGLView(); /** Adds a `RenderComamnd` into the renderer */ diff --git a/cocos/renderer/CCTextureAtlas.cpp b/cocos/renderer/CCTextureAtlas.cpp index b60c47bc92..acc567af14 100644 --- a/cocos/renderer/CCTextureAtlas.cpp +++ b/cocos/renderer/CCTextureAtlas.cpp @@ -614,7 +614,7 @@ void TextureAtlas::drawNumberOfQuads(ssize_t numberOfQuads, ssize_t start) // Using VBO and VAO // - // XXX: update is done in draw... perhaps it should be done in a timer + // FIXME:: update is done in draw... perhaps it should be done in a timer if (_dirty) { glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); @@ -658,7 +658,7 @@ void TextureAtlas::drawNumberOfQuads(ssize_t numberOfQuads, ssize_t start) #define kQuadSize sizeof(_quads[0].bl) glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); - // XXX: update is done in draw... perhaps it should be done in a timer + // FIXME:: update is done in draw... perhaps it should be done in a timer if (_dirty) { glBufferSubData(GL_ARRAY_BUFFER, sizeof(_quads[0])*start, sizeof(_quads[0]) * numberOfQuads , &_quads[start] ); diff --git a/cocos/renderer/ccShader_Label_df.frag b/cocos/renderer/ccShader_Label_df.frag index cb3dac1122..27f8814c8a 100644 --- a/cocos/renderer/ccShader_Label_df.frag +++ b/cocos/renderer/ccShader_Label_df.frag @@ -16,7 +16,7 @@ void main() //float dist = color.b+color.g/256.0; \n // the texture use single channel 8-bit output for distance_map \n float dist = color.a; - //todo:Implementation 'fwidth' for glsl 1.0 \n + //TODO: Implementation 'fwidth' for glsl 1.0 \n //float width = fwidth(dist); \n //assign width for constant will lead to a little bit fuzzy,it's temporary measure.\n float width = 0.04; diff --git a/cocos/renderer/ccShader_Label_df_glow.frag b/cocos/renderer/ccShader_Label_df_glow.frag index b33b3e3d4d..80c8a0fae1 100644 --- a/cocos/renderer/ccShader_Label_df_glow.frag +++ b/cocos/renderer/ccShader_Label_df_glow.frag @@ -13,7 +13,7 @@ uniform vec4 u_textColor; void main() { float dist = texture2D(CC_Texture0, v_texCoord).a; - //todo:Implementation 'fwidth' for glsl 1.0 \n + //TODO: Implementation 'fwidth' for glsl 1.0 \n //float width = fwidth(dist); \n //assign width for constant will lead to a little bit fuzzy,it's temporary measure.\n float width = 0.04; diff --git a/cocos/scripting/lua-bindings/manual/network/lua_xml_http_request.cpp b/cocos/scripting/lua-bindings/manual/network/lua_xml_http_request.cpp index 1056a570ed..35e0626334 100644 --- a/cocos/scripting/lua-bindings/manual/network/lua_xml_http_request.cpp +++ b/cocos/scripting/lua-bindings/manual/network/lua_xml_http_request.cpp @@ -233,7 +233,7 @@ void LuaMinXmlHttpRequest::_sendRequest() free((void*) concatHeader); free((void*) concatenated); - // call back lua function --TODO + // TODO: call back lua function int handler = cocos2d::ScriptHandlerMgr::getInstance()->getObjectHandler((void*)this, cocos2d::ScriptHandlerMgr::HandlerType::XMLHTTPREQUEST_READY_STATE_CHANGE ); if (0 != handler) diff --git a/extensions/GUI/CCControlExtension/CCControlColourPicker.cpp b/extensions/GUI/CCControlExtension/CCControlColourPicker.cpp index bf58314a16..e046e6ae5c 100644 --- a/extensions/GUI/CCControlExtension/CCControlColourPicker.cpp +++ b/extensions/GUI/CCControlExtension/CCControlColourPicker.cpp @@ -119,7 +119,7 @@ ControlColourPicker* ControlColourPicker::create() void ControlColourPicker::setColor(const Color3B& color) { - // XXX fixed me if not correct + // FIXME: fixed me if not correct Control::setColor(color); RGBA rgba; @@ -167,7 +167,7 @@ void ControlColourPicker::hueSliderValueChanged(Ref * sender, Control::EventType // Update the value RGBA rgb = ControlUtils::RGBfromHSV(_hsv); - // XXX fixed me if not correct + // FIXME: fixed me if not correct Control::setColor(Color3B((GLubyte)(rgb.r * 255.0f), (GLubyte)(rgb.g * 255.0f), (GLubyte)(rgb.b * 255.0f))); // Send Control callback @@ -183,7 +183,7 @@ void ControlColourPicker::colourSliderValueChanged(Ref * sender, Control::EventT // Update the value RGBA rgb = ControlUtils::RGBfromHSV(_hsv); - // XXX fixed me if not correct + // FIXME: fixed me if not correct Control::setColor(Color3B((GLubyte)(rgb.r * 255.0f), (GLubyte)(rgb.g * 255.0f), (GLubyte)(rgb.b * 255.0f))); // Send Control callback diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm index f2dfe57687..0c0be51a6d 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm +++ b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm @@ -74,7 +74,8 @@ static const int CC_EDIT_BOX_PADDING = 5; self.textField = [[[CCCustomUITextField alloc] initWithFrame: frameRect] autorelease]; [textField_ setTextColor:[UIColor whiteColor]]; - textField_.font = [UIFont systemFontOfSize:frameRect.size.height*2/3]; //TODO need to delete hard code here. + //TODO: need to delete hard code here. + textField_.font = [UIFont systemFontOfSize:frameRect.size.height*2/3]; textField_.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; textField_.backgroundColor = [UIColor clearColor]; textField_.borderStyle = UITextBorderStyleNone; @@ -404,7 +405,7 @@ void EditBoxImplIOS::setFontColor(const Color3B& color) void EditBoxImplIOS::setPlaceholderFont(const char* pFontName, int fontSize) { - // TODO need to be implemented. + // TODO: need to be implemented. } void EditBoxImplIOS::setPlaceholderFontColor(const Color3B& color) diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm index 47063b2907..3668a7f134 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm +++ b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm @@ -73,7 +73,8 @@ self.textField = [[[NSTextField alloc] initWithFrame:frameRect] autorelease]; self.secureTextField = [[[NSSecureTextField alloc] initWithFrame:frameRect] autorelease]; - NSFont *font = [NSFont systemFontOfSize:frameRect.size.height*2/3]; //TODO need to delete hard code here. + //TODO: need to delete hard code here. + NSFont *font = [NSFont systemFontOfSize:frameRect.size.height*2/3]; textField_.font = font; secureTextField_.font = font; diff --git a/extensions/physics-nodes/CCPhysicsDebugNode.cpp b/extensions/physics-nodes/CCPhysicsDebugNode.cpp index 0d7d502184..eb4bb84836 100644 --- a/extensions/physics-nodes/CCPhysicsDebugNode.cpp +++ b/extensions/physics-nodes/CCPhysicsDebugNode.cpp @@ -171,7 +171,7 @@ static void DrawConstraint(cpConstraint *constraint, DrawNode *renderer) } else if (klass == cpDampedSpringGetClass()) { - // TODO + // TODO: uninplemented } else { diff --git a/external/chipmunk/src/cpArbiter.c b/external/chipmunk/src/cpArbiter.c index ef6f09809c..9d170ad9e1 100644 --- a/external/chipmunk/src/cpArbiter.c +++ b/external/chipmunk/src/cpArbiter.c @@ -38,7 +38,7 @@ cpContactInit(cpContact *con, cpVect p, cpVect n, cpFloat dist, cpHashValue hash return con; } -// TODO make this generic so I can reuse it for constraints also. +// TODO: make this generic so I can reuse it for constraints also. static inline void unthreadHelper(cpArbiter *arb, cpBody *body) { @@ -309,7 +309,7 @@ cpArbiterApplyCachedImpulse(cpArbiter *arb, cpFloat dt_coef) } } -// TODO is it worth splitting velocity/position correction? +// TODO: is it worth splitting velocity/position correction? void cpArbiterApplyImpulse(cpArbiter *arb) diff --git a/tests/cpp-tests/Classes/AppDelegate.cpp b/tests/cpp-tests/Classes/AppDelegate.cpp index a35cccdbc2..707872191c 100644 --- a/tests/cpp-tests/Classes/AppDelegate.cpp +++ b/tests/cpp-tests/Classes/AppDelegate.cpp @@ -57,8 +57,8 @@ void AppDelegate::initGLContextAttrs() bool AppDelegate::applicationDidFinishLaunching() { // As an example, load config file - // XXX: This should be loaded before the Director is initialized, - // XXX: but at this point, the director is already initialized + // FIXME:: This should be loaded before the Director is initialized, + // FIXME:: but at this point, the director is already initialized Configuration::getInstance()->loadConfigFile("configs/config-example.plist"); // initialize director diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp index 3245ba26b7..719007e2ca 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp @@ -357,7 +357,7 @@ NewClippingNodeTest::NewClippingNodeTest() clipper->runAction(RepeatForever::create(RotateBy::create(1, 45))); this->addChild(clipper); - //TODO Fix draw node as clip node + // TODO: Fix draw node as clip node // auto stencil = NewDrawNode::create(); // Vec2 rectangle[4]; // rectangle[0] = Vec2(0, 0); diff --git a/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp b/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp index 7ab2d2182d..dc4bad49dd 100644 --- a/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp +++ b/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp @@ -52,8 +52,7 @@ static int sceneIdx = -1; static std::function createFunctions[] = { CL(CameraTest1), - //Camera has been removed from CCNode - //todo add new feature to support it + // TODO: Camera has been removed from CCNode, add new feature to support it // CL(CameraTest2), CL(CameraCenterTest), CL(Test2), @@ -66,8 +65,7 @@ static std::function createFunctions[] = CL(NodeToWorld3D), CL(SchedulerTest1), CL(CameraOrbitTest), - //Camera has been removed from CCNode - //todo add new feature to support it + // TODO: Camera has been removed from CCNode, add new feature to support it //CL(CameraZoomTest), CL(ConvertToNode), CL(NodeOpaqueTest), diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp index 888c3e24c7..e49f8fb440 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp @@ -37,7 +37,7 @@ g_guisTests[] = UISceneManager* sceneManager = UISceneManager::sharedUISceneManager(); sceneManager->setCurrentUISceneId(KUIFocusTest_HBox); sceneManager->setMinUISceneId(KUIFocusTest_HBox); - //TODO: improve ListView focus + // TODO: improve ListView focus sceneManager->setMaxUISceneId(KUIFocusTest_NestedLayout3); Scene* scene = sceneManager->currentUIScene(); Director::getInstance()->replaceScene(scene); From ff321ba1dc2aec2b360fa98adb25d7ab919e93e2 Mon Sep 17 00:00:00 2001 From: andyque Date: Sat, 30 Aug 2014 16:29:06 +0800 Subject: [PATCH 45/74] fix chipmunk --- .../physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp | 1 + cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h | 3 ++- .../chipmunk/CCPhysicsContactInfo_chipmunk.cpp | 1 + .../physics/chipmunk/CCPhysicsContactInfo_chipmunk.h | 1 - .../physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp | 1 + cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h | 3 ++- .../physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp | 1 + cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h | 5 ++++- .../physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp | 12 ++++++++++++ cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h | 9 ++++++--- 10 files changed, 30 insertions(+), 7 deletions(-) diff --git a/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp b/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp index eb74a8ecc2..a641086bb7 100644 --- a/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp +++ b/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.cpp @@ -24,6 +24,7 @@ #include "CCPhysicsBodyInfo_chipmunk.h" #if CC_USE_PHYSICS +#include "chipmunk.h" NS_CC_BEGIN PhysicsBodyInfo::PhysicsBodyInfo() diff --git a/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h index 01e21dcada..f26e327158 100644 --- a/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h @@ -28,10 +28,11 @@ #include "base/ccConfig.h" #if CC_USE_PHYSICS -#include "chipmunk.h" #include "base/CCPlatformMacros.h" #include "base/CCRef.h" +struct cpBody; + NS_CC_BEGIN class PhysicsBodyInfo diff --git a/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp b/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp index 54041c0a85..238d6d5387 100644 --- a/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp +++ b/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.cpp @@ -24,6 +24,7 @@ #include "CCPhysicsContactInfo_chipmunk.h" #if CC_USE_PHYSICS +#include "chipmunk.h" NS_CC_BEGIN PhysicsContactInfo::PhysicsContactInfo(PhysicsContact* contact) diff --git a/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h index 47900c81ff..13dde02524 100644 --- a/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsContactInfo_chipmunk.h @@ -28,7 +28,6 @@ #include "base/ccConfig.h" #if CC_USE_PHYSICS -#include "chipmunk.h" #include "base/CCPlatformMacros.h" NS_CC_BEGIN diff --git a/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp b/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp index 9443a9f36c..00d174fecf 100644 --- a/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp +++ b/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.cpp @@ -26,6 +26,7 @@ #if CC_USE_PHYSICS #include #include +#include "chipmunk.h" NS_CC_BEGIN diff --git a/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h index 22c62abc5a..fca8f708ad 100644 --- a/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsJointInfo_chipmunk.h @@ -28,10 +28,11 @@ #include "base/ccConfig.h" #if CC_USE_PHYSICS -#include "chipmunk.h" #include "base/CCPlatformMacros.h" #include #include + +struct cpConstraint; NS_CC_BEGIN class PhysicsJoint; diff --git a/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp b/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp index c1b8693259..450745f7d3 100644 --- a/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp +++ b/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.cpp @@ -26,6 +26,7 @@ #if CC_USE_PHYSICS #include #include +#include "chipmunk.h" NS_CC_BEGIN diff --git a/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h index c48acbce60..f760ec15a6 100644 --- a/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsShapeInfo_chipmunk.h @@ -30,9 +30,12 @@ #include #include -#include "chipmunk.h" #include "base/CCPlatformMacros.h" +typedef uintptr_t cpGroup; +struct cpShape; +struct cpBody; + NS_CC_BEGIN class PhysicsShape; diff --git a/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp b/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp index 23890b2198..8290b28490 100644 --- a/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp +++ b/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp @@ -28,6 +28,8 @@ #include "CCPhysicsBodyInfo_chipmunk.h" #include "CCPhysicsShapeInfo_chipmunk.h" #include "CCPhysicsJointInfo_chipmunk.h" +#include "chipmunk.h" + NS_CC_BEGIN PhysicsWorldInfo::PhysicsWorldInfo() @@ -96,5 +98,15 @@ void PhysicsWorldInfo::removeJoint(PhysicsJointInfo& joint) } } +bool PhysicsWorldInfo::isLocked() +{ + return 0 == _space->locked_private ? false : true; +} + +void PhysicsWorldInfo::step(float delta) +{ + cpSpaceStep(_space, delta); +} + NS_CC_END #endif // CC_USE_PHYSICS diff --git a/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h index f5e885b86d..2027dd23ac 100644 --- a/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsWorldInfo_chipmunk.h @@ -29,9 +29,12 @@ #if CC_USE_PHYSICS #include -#include "chipmunk.h" #include "base/CCPlatformMacros.h" #include "math/CCGeometry.h" + +struct cpSpace; + + NS_CC_BEGIN typedef Vec2 Vect; class PhysicsBodyInfo; @@ -49,8 +52,8 @@ public: void addJoint(PhysicsJointInfo& joint); void removeJoint(PhysicsJointInfo& joint); void setGravity(const Vect& gravity); - inline bool isLocked() { return 0 == _space->locked_private ? false : true; } - inline void step(float delta) { cpSpaceStep(_space, delta); } + bool isLocked(); + void step(float delta); private: PhysicsWorldInfo(); From 49e6b098a6a3cc827128acb4cc84bd610d7fb8a3 Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 1 Sep 2014 09:56:05 +0800 Subject: [PATCH 46/74] check running scene when checkVisibility --- cocos/renderer/CCRenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/renderer/CCRenderer.cpp b/cocos/renderer/CCRenderer.cpp index 3618774fc5..3e621be4fb 100644 --- a/cocos/renderer/CCRenderer.cpp +++ b/cocos/renderer/CCRenderer.cpp @@ -553,7 +553,7 @@ bool Renderer::checkVisibility(const Mat4 &transform, const Size &size) { auto scene = Director::getInstance()->getRunningScene(); // only cull the default camera. The culling algorithm is valid for default camera. - if (scene->_defaultCamera != Camera::getVisitingCamera()) + if (scene && scene->_defaultCamera != Camera::getVisitingCamera()) return true; // half size of the screen From b58ccc5961721b25f6b63de24730b50290a9e4d3 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Mon, 1 Sep 2014 14:08:02 +0800 Subject: [PATCH 47/74] Update bindings-generators submodule --- tools/bindings-generator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bindings-generator b/tools/bindings-generator index ee16f69272..c1db553615 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit ee16f692722f6bbb7d485032751f9b826ec9e926 +Subproject commit c1db553615789a1545d495d0d0fd6f620547f99d From 0076953f97f8fec2dee2ca679cffc3b53eb929f5 Mon Sep 17 00:00:00 2001 From: andyque Date: Mon, 1 Sep 2014 15:55:09 +0800 Subject: [PATCH 48/74] fix iOS compile error --- build/cocos2d_libs.xcodeproj/project.pbxproj | 120 ++++++++++-------- .../CocoStudioGUITest/CocosGUIScene.cpp | 12 ++ 2 files changed, 80 insertions(+), 52 deletions(-) diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index c49581a417..6e12365842 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1008,16 +1008,6 @@ 15AE1C0419AAE01E00C27E9E /* CCTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168631807AF4E005B8026 /* CCTableView.h */; }; 15AE1C0519AAE01E00C27E9E /* CCTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168641807AF4E005B8026 /* CCTableViewCell.cpp */; }; 15AE1C0619AAE01E00C27E9E /* CCTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168651807AF4E005B8026 /* CCTableViewCell.h */; }; - 15AE1C0719AAE02500C27E9E /* CCEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684F1807AF4E005B8026 /* CCEditBox.cpp */; }; - 15AE1C0819AAE02500C27E9E /* CCEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168501807AF4E005B8026 /* CCEditBox.h */; }; - 15AE1C0919AAE02500C27E9E /* CCEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684F1807AF4E005B8026 /* CCEditBox.cpp */; }; - 15AE1C0A19AAE02500C27E9E /* CCEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168501807AF4E005B8026 /* CCEditBox.h */; }; - 15AE1C0B19AAE02D00C27E9E /* CCEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168511807AF4E005B8026 /* CCEditBoxImpl.h */; }; - 15AE1C0C19AAE02D00C27E9E /* CCEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168511807AF4E005B8026 /* CCEditBoxImpl.h */; }; - 15AE1C0D19AAE03400C27E9E /* CCEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B282B47C1980E02B00666787 /* CCEditBoxImplMac.mm */; }; - 15AE1C0E19AAE03400C27E9E /* CCEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = B282B47D1980E02B00666787 /* CCEditBoxImplMac.h */; }; - 15AE1C0F19AAE03E00C27E9E /* CCEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */; }; - 15AE1C1019AAE03E00C27E9E /* CCEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */; }; 15AE1C1119AAE2C600C27E9E /* CCPhysicsDebugNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71EEC180E27CF00808F54 /* CCPhysicsDebugNode.cpp */; }; 15AE1C1219AAE2C600C27E9E /* CCPhysicsDebugNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD71EED180E27CF00808F54 /* CCPhysicsDebugNode.h */; }; 15AE1C1319AAE2C600C27E9E /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD71EEE180E27CF00808F54 /* CCPhysicsSprite.cpp */; }; @@ -1350,6 +1340,26 @@ 1ABA68B11888D700007D1BB4 /* CCFontCharMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABA68AD1888D700007D1BB4 /* CCFontCharMap.h */; }; 1AC0269C1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; 1AC0269D1914068200FA920D /* ConvertUTF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC026991914068200FA920D /* ConvertUTF.h */; }; + 292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; }; + 292DB13E19B4574100A80320 /* UIEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB12F19B4574100A80320 /* UIEditBox.cpp */; }; + 292DB13F19B4574100A80320 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13019B4574100A80320 /* UIEditBox.h */; }; + 292DB14019B4574100A80320 /* UIEditBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13019B4574100A80320 /* UIEditBox.h */; }; + 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13119B4574100A80320 /* UIEditBoxImpl.h */; }; + 292DB14219B4574100A80320 /* UIEditBoxImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13119B4574100A80320 /* UIEditBoxImpl.h */; }; + 292DB14319B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13219B4574100A80320 /* UIEditBoxImplAndroid.cpp */; }; + 292DB14419B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13219B4574100A80320 /* UIEditBoxImplAndroid.cpp */; }; + 292DB14519B4574100A80320 /* UIEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13319B4574100A80320 /* UIEditBoxImplAndroid.h */; }; + 292DB14619B4574100A80320 /* UIEditBoxImplAndroid.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13319B4574100A80320 /* UIEditBoxImplAndroid.h */; }; + 292DB14719B4574100A80320 /* UIEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13419B4574100A80320 /* UIEditBoxImplIOS.h */; }; + 292DB14819B4574100A80320 /* UIEditBoxImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13419B4574100A80320 /* UIEditBoxImplIOS.h */; }; + 292DB14919B4574100A80320 /* UIEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13519B4574100A80320 /* UIEditBoxImplIOS.mm */; }; + 292DB14A19B4574100A80320 /* UIEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13519B4574100A80320 /* UIEditBoxImplIOS.mm */; }; + 292DB14B19B4574100A80320 /* UIEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13619B4574100A80320 /* UIEditBoxImplMac.h */; }; + 292DB14C19B4574100A80320 /* UIEditBoxImplMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB13619B4574100A80320 /* UIEditBoxImplMac.h */; }; + 292DB14D19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13719B4574100A80320 /* UIEditBoxImplMac.mm */; }; + 292DB14E19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13719B4574100A80320 /* UIEditBoxImplMac.mm */; }; + 292DB14F19B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */; }; + 292DB15019B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */; }; 29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; 29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; @@ -2304,6 +2314,16 @@ 2905FA1318CF08D100240AA3 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = ""; }; 2905FA1418CF08D100240AA3 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = ""; }; 29080DEB191B82CE0066F8DF /* UIDeprecated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIDeprecated.h; sourceTree = ""; }; + 292DB12F19B4574100A80320 /* UIEditBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBox.cpp; sourceTree = ""; }; + 292DB13019B4574100A80320 /* UIEditBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBox.h; sourceTree = ""; }; + 292DB13119B4574100A80320 /* UIEditBoxImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImpl.h; sourceTree = ""; }; + 292DB13219B4574100A80320 /* UIEditBoxImplAndroid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplAndroid.cpp; sourceTree = ""; }; + 292DB13319B4574100A80320 /* UIEditBoxImplAndroid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplAndroid.h; sourceTree = ""; }; + 292DB13419B4574100A80320 /* UIEditBoxImplIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplIOS.h; sourceTree = ""; }; + 292DB13519B4574100A80320 /* UIEditBoxImplIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIEditBoxImplIOS.mm; sourceTree = ""; }; + 292DB13619B4574100A80320 /* UIEditBoxImplMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplMac.h; sourceTree = ""; }; + 292DB13719B4574100A80320 /* UIEditBoxImplMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIEditBoxImplMac.mm; sourceTree = ""; }; + 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplNone.cpp; sourceTree = ""; }; 29394CEC19B01DBA00D2DE1A /* UIWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebView.h; sourceTree = ""; }; 29394CED19B01DBA00D2DE1A /* UIWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebView.mm; sourceTree = ""; }; 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebViewImpl_iOS.h; sourceTree = ""; }; @@ -2407,16 +2427,6 @@ 46A1684B1807AF4E005B8026 /* CCInvocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCInvocation.h; sourceTree = ""; }; 46A1684C1807AF4E005B8026 /* CCScale9Sprite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCScale9Sprite.cpp; sourceTree = ""; }; 46A1684D1807AF4E005B8026 /* CCScale9Sprite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCScale9Sprite.h; sourceTree = ""; }; - 46A1684F1807AF4E005B8026 /* CCEditBox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBox.cpp; sourceTree = ""; }; - 46A168501807AF4E005B8026 /* CCEditBox.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBox.h; sourceTree = ""; }; - 46A168511807AF4E005B8026 /* CCEditBoxImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImpl.h; sourceTree = ""; }; - 46A168521807AF4E005B8026 /* CCEditBoxImplAndroid.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplAndroid.cpp; sourceTree = ""; }; - 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplAndroid.h; sourceTree = ""; }; - 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplIOS.h; sourceTree = ""; }; - 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CCEditBoxImplIOS.mm; sourceTree = ""; }; - 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplNone.cpp; sourceTree = ""; }; - 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplWin.cpp; sourceTree = ""; }; - 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplWin.h; sourceTree = ""; }; 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCScrollView.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 46A1685F1807AF4E005B8026 /* CCScrollView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCScrollView.h; sourceTree = ""; }; 46A168621807AF4E005B8026 /* CCTableView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableView.cpp; sourceTree = ""; }; @@ -2867,8 +2877,6 @@ B276EF5C1988D1D500CD400F /* CCVertexIndexData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVertexIndexData.cpp; sourceTree = ""; }; B276EF5D1988D1D500CD400F /* CCVertexIndexBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVertexIndexBuffer.h; sourceTree = ""; }; B276EF5E1988D1D500CD400F /* CCVertexIndexBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVertexIndexBuffer.cpp; sourceTree = ""; }; - B282B47C1980E02B00666787 /* CCEditBoxImplMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCEditBoxImplMac.mm; sourceTree = ""; }; - B282B47D1980E02B00666787 /* CCEditBoxImplMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplMac.h; sourceTree = ""; }; B29594AF1926D5D9003EEF37 /* ccShader_3D_Color.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Color.frag; sourceTree = ""; }; B29594B01926D5D9003EEF37 /* ccShader_3D_ColorTex.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_ColorTex.frag; sourceTree = ""; }; B29594B11926D5D9003EEF37 /* ccShader_3D_PositionTex.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_PositionTex.vert; sourceTree = ""; }; @@ -3979,6 +3987,23 @@ path = ../cocos/ui; sourceTree = ""; }; + 292DB12E19B4574100A80320 /* UIEditBox */ = { + isa = PBXGroup; + children = ( + 292DB12F19B4574100A80320 /* UIEditBox.cpp */, + 292DB13019B4574100A80320 /* UIEditBox.h */, + 292DB13119B4574100A80320 /* UIEditBoxImpl.h */, + 292DB13219B4574100A80320 /* UIEditBoxImplAndroid.cpp */, + 292DB13319B4574100A80320 /* UIEditBoxImplAndroid.h */, + 292DB13419B4574100A80320 /* UIEditBoxImplIOS.h */, + 292DB13519B4574100A80320 /* UIEditBoxImplIOS.mm */, + 292DB13619B4574100A80320 /* UIEditBoxImplMac.h */, + 292DB13719B4574100A80320 /* UIEditBoxImplMac.mm */, + 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */, + ); + path = UIEditBox; + sourceTree = ""; + }; 29CB8F501929D63600C841D6 /* layout */ = { isa = PBXGroup; children = ( @@ -4030,6 +4055,7 @@ 29CB8F531929D67D00C841D6 /* widgets */ = { isa = PBXGroup; children = ( + 292DB12E19B4574100A80320 /* UIEditBox */, 2905F9FE18CF08D000240AA3 /* UIListView.cpp */, 2905F9FF18CF08D000240AA3 /* UIListView.h */, 2905FA0018CF08D000240AA3 /* UILoadingBar.cpp */, @@ -4143,7 +4169,6 @@ isa = PBXGroup; children = ( 46A168341807AF4E005B8026 /* CCControlExtension */, - 46A1684E1807AF4E005B8026 /* CCEditBox */, 46A1685D1807AF4E005B8026 /* CCScrollView */, ); path = GUI; @@ -4181,25 +4206,6 @@ path = CCControlExtension; sourceTree = ""; }; - 46A1684E1807AF4E005B8026 /* CCEditBox */ = { - isa = PBXGroup; - children = ( - B282B47C1980E02B00666787 /* CCEditBoxImplMac.mm */, - B282B47D1980E02B00666787 /* CCEditBoxImplMac.h */, - 46A1684F1807AF4E005B8026 /* CCEditBox.cpp */, - 46A168501807AF4E005B8026 /* CCEditBox.h */, - 46A168511807AF4E005B8026 /* CCEditBoxImpl.h */, - 46A168521807AF4E005B8026 /* CCEditBoxImplAndroid.cpp */, - 46A168531807AF4E005B8026 /* CCEditBoxImplAndroid.h */, - 46A168541807AF4E005B8026 /* CCEditBoxImplIOS.h */, - 46A168551807AF4E005B8026 /* CCEditBoxImplIOS.mm */, - 46A168581807AF4E005B8026 /* CCEditBoxImplNone.cpp */, - 46A1685B1807AF4E005B8026 /* CCEditBoxImplWin.cpp */, - 46A1685C1807AF4E005B8026 /* CCEditBoxImplWin.h */, - ); - path = CCEditBox; - sourceTree = ""; - }; 46A1685D1807AF4E005B8026 /* CCScrollView */ = { isa = PBXGroup; children = ( @@ -4943,9 +4949,11 @@ 50ABBE851925AB6F00A911A9 /* ccFPSImages.h in Headers */, 15AE1A5319AAD40300C27E9E /* b2Draw.h in Headers */, 5034CA39191D591100CE6051 /* ccShader_PositionColorLengthTexture.frag in Headers */, + 292DB14B19B4574100A80320 /* UIEditBoxImplMac.h in Headers */, 50ABBE891925AB6F00A911A9 /* CCMap.h in Headers */, 50ABBE8D1925AB6F00A911A9 /* CCNS.h in Headers */, 50ABBEA51925AB6F00A911A9 /* CCScriptSupport.h in Headers */, + 292DB14519B4574100A80320 /* UIEditBoxImplAndroid.h in Headers */, 15AE1B9A19AADFDF00C27E9E /* UIHBox.h in Headers */, 15AE18EB19AAD35000C27E9E /* CCActionNode.h in Headers */, 15AE1A3819AAD3D500C27E9E /* b2Shape.h in Headers */, @@ -5020,7 +5028,6 @@ 15AE199919AAD39600C27E9E /* LoadingBarReader.h in Headers */, 15AE1A8F19AAD40300C27E9E /* b2RopeJoint.h in Headers */, 15AE18ED19AAD35000C27E9E /* CCActionObject.h in Headers */, - 15AE1C0C19AAE02D00C27E9E /* CCEditBoxImpl.h in Headers */, ED9C6A9618599AD8000A5232 /* CCNodeGrid.h in Headers */, 15AE18A719AAD33D00C27E9E /* CCScrollViewLoader.h in Headers */, 15AE184819AAD2F700C27E9E /* cocos3d.h in Headers */, @@ -5175,6 +5182,7 @@ 15AE188519AAD33D00C27E9E /* CCBSequence.h in Headers */, 15AE1AE219AAD42500C27E9E /* cpDampedRotarySpring.h in Headers */, 5034CA49191D591100CE6051 /* ccShader_Label_df.frag in Headers */, + 292DB14119B4574100A80320 /* UIEditBoxImpl.h in Headers */, 1A01C68C18F57BE800EFE3A6 /* CCDeprecated.h in Headers */, 50ABBD561925AB0000A911A9 /* TransformUtils.h in Headers */, 299754F6193EC95400A54AC3 /* ObjectFactory.h in Headers */, @@ -5183,6 +5191,7 @@ 15AE18FB19AAD35000C27E9E /* CCColliderDetector.h in Headers */, 15AE19E119AAD3A700C27E9E /* Skeleton.h in Headers */, 1A570280180BCC900088DEC7 /* CCSprite.h in Headers */, + 292DB14719B4574100A80320 /* UIEditBoxImplIOS.h in Headers */, 15AE1A9119AAD40300C27E9E /* b2WeldJoint.h in Headers */, 15AE1A5419AAD40300C27E9E /* b2GrowableStack.h in Headers */, 15AE1B4E19AADA9900C27E9E /* UIListView.h in Headers */, @@ -5286,7 +5295,6 @@ 15AE1BCA19AAE01E00C27E9E /* CCControl.h in Headers */, 50ABBDBF1925AB4100A911A9 /* CCTextureCache.h in Headers */, 15AE186719AAD31D00C27E9E /* CDXMacOSXSupport.h in Headers */, - 15AE1C0A19AAE02500C27E9E /* CCEditBox.h in Headers */, B37510741823AC9F00B3BA6A /* CCPhysicsContactInfo_chipmunk.h in Headers */, 15AE1ADF19AAD42500C27E9E /* chipmunk_types.h in Headers */, 5034CA35191D591100CE6051 /* ccShader_PositionTexture.frag in Headers */, @@ -5365,6 +5373,7 @@ 15AE1AEC19AAD42500C27E9E /* util.h in Headers */, 15AE19DD19AAD3A700C27E9E /* Json.h in Headers */, 15AE191A19AAD35000C27E9E /* CCSSceneReader.h in Headers */, + 292DB13F19B4574100A80320 /* UIEditBox.h in Headers */, 50ABBE671925AB6F00A911A9 /* CCEventListenerCustom.h in Headers */, 15AE18E219AAD35000C27E9E /* TriggerMng.h in Headers */, 15AE1B2B19AAD43700C27E9E /* prime.h in Headers */, @@ -5417,7 +5426,6 @@ 50ABBE771925AB6F00A911A9 /* CCEventListenerTouch.h in Headers */, 5034CA33191D591100CE6051 /* ccShader_PositionTexture_uColor.frag in Headers */, 50ABC0171926664800A911A9 /* CCImage.h in Headers */, - 15AE1C0E19AAE03400C27E9E /* CCEditBoxImplMac.h in Headers */, 15AE1AED19AAD42500C27E9E /* cpArbiter.h in Headers */, 50ABBDA91925AB4100A911A9 /* CCRenderCommand.h in Headers */, 50ABBD951925AB4100A911A9 /* CCGLProgramState.h in Headers */, @@ -5448,6 +5456,7 @@ 15AE183319AAD2F700C27E9E /* CCOBB.h in Headers */, 15AE18B119AAD33D00C27E9E /* CCBMemberVariableAssigner.h in Headers */, 15AE1AFA19AAD42500C27E9E /* cpConstraint.h in Headers */, + 292DB14019B4574100A80320 /* UIEditBox.h in Headers */, 50ABBD3B1925AB0000A911A9 /* CCAffineTransform.h in Headers */, 15AE1A0A19AAD3A700C27E9E /* CCSkeleton.h in Headers */, 5034CA38191D591100CE6051 /* ccShader_PositionColorLengthTexture.vert in Headers */, @@ -5543,6 +5552,7 @@ 15AE19F819AAD3A700C27E9E /* Animation.h in Headers */, 1A5700A1180BC5D20088DEC7 /* CCNode.h in Headers */, 15AE181919AAD2F700C27E9E /* CCAttachNode.h in Headers */, + 292DB14C19B4574100A80320 /* UIEditBoxImplMac.h in Headers */, 15AE1BF019AAE01E00C27E9E /* CCControlHuePicker.h in Headers */, 15AE18B819AAD33D00C27E9E /* CCBSequenceProperty.h in Headers */, 503DD8E41926736A00CD74DD /* CCDirectorCaller.h in Headers */, @@ -5572,6 +5582,7 @@ 50ABBD5B1925AB0000A911A9 /* Vec2.h in Headers */, 50ABBD411925AB0000A911A9 /* CCMath.h in Headers */, 1A5701A0180BCB590088DEC7 /* CCFont.h in Headers */, + 292DB14819B4574100A80320 /* UIEditBoxImplIOS.h in Headers */, 15AE1A0819AAD3A700C27E9E /* BoneData.h in Headers */, 50ABBD9A1925AB4100A911A9 /* CCGLProgramStateCache.h in Headers */, 15AE181D19AAD2F700C27E9E /* CCBundle3D.h in Headers */, @@ -5603,6 +5614,7 @@ 15AE196B19AAD35100C27E9E /* DictionaryHelper.h in Headers */, 15AE1AA619AAD40300C27E9E /* b2Fixture.h in Headers */, 15AE1BBA19AADFF000C27E9E /* HttpClient.h in Headers */, + 292DB14619B4574100A80320 /* UIEditBoxImplAndroid.h in Headers */, 15AE1AF819AAD42500C27E9E /* chipmunk_types.h in Headers */, 15AE1B9419AADA9A00C27E9E /* GUIDefine.h in Headers */, 15AE183B19AAD2F700C27E9E /* CCRay.h in Headers */, @@ -5745,6 +5757,7 @@ 15AE1B8D19AADA9A00C27E9E /* UIScale9Sprite.h in Headers */, 15AE18AC19AAD33D00C27E9E /* CCBAnimationManager.h in Headers */, 15AE1A1A19AAD3A700C27E9E /* Skin.h in Headers */, + 292DB14219B4574100A80320 /* UIEditBoxImpl.h in Headers */, 1A570303180BCE890088DEC7 /* CCParallaxNode.h in Headers */, 50ABBE2A1925AB6F00A911A9 /* CCAutoreleasePool.h in Headers */, 1A57030F180BCF190088DEC7 /* CCComponent.h in Headers */, @@ -5766,7 +5779,6 @@ 15AE1BFE19AAE01E00C27E9E /* CCInvocation.h in Headers */, 15AE1A9E19AAD40300C27E9E /* b2StackAllocator.h in Headers */, 1A570357180BD0B00088DEC7 /* ioapi.h in Headers */, - 15AE1C0F19AAE03E00C27E9E /* CCEditBoxImplIOS.h in Headers */, 15AE1A1619AAD3A700C27E9E /* SkeletonData.h in Headers */, 50ABBD4B1925AB0000A911A9 /* Mat4.h in Headers */, 15AE1BBE19AADFF000C27E9E /* SocketIO.h in Headers */, @@ -5883,13 +5895,11 @@ B276EF641988D1D500CD400F /* CCVertexIndexBuffer.h in Headers */, 15AE1A0619AAD3A700C27E9E /* Bone.h in Headers */, ED9C6A9718599AD8000A5232 /* CCNodeGrid.h in Headers */, - 15AE1C0819AAE02500C27E9E /* CCEditBox.h in Headers */, 50ABC0201926664800A911A9 /* CCThread.h in Headers */, 15AE1B8519AADA9A00C27E9E /* UITextField.h in Headers */, 1A01C69318F57BE800EFE3A6 /* CCDouble.h in Headers */, 15AE184B19AAD30500C27E9E /* Export.h in Headers */, 15AE196019AAD35100C27E9E /* CCSpriteFrameCacheHelper.h in Headers */, - 15AE1C0B19AAE02D00C27E9E /* CCEditBoxImpl.h in Headers */, 50ABBE221925AB6F00A911A9 /* atitc.h in Headers */, 15AE1AB719AAD40300C27E9E /* b2ContactSolver.h in Headers */, 15AE193319AAD35100C27E9E /* CCActionNode.h in Headers */, @@ -6002,6 +6012,7 @@ 15AE1B1E19AAD43700C27E9E /* cpBody.c in Sources */, 15AE1BDE19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, 3EA3EDBC1991CDFA00645534 /* CCCamera.cpp in Sources */, + 292DB14F19B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */, 15AE199419AAD39600C27E9E /* LayoutReader.cpp in Sources */, 1A01C68A18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */, 1A1645B0191B726C008C7C7F /* ConvertUTF.c in Sources */, @@ -6033,7 +6044,6 @@ 15AE186319AAD31D00C27E9E /* CDAudioManager.m in Sources */, 15AE1B2219AAD43700C27E9E /* cpShape.c in Sources */, ED9C6A9418599AD8000A5232 /* CCNodeGrid.cpp in Sources */, - 15AE1C0D19AAE03400C27E9E /* CCEditBoxImplMac.mm in Sources */, 15AE1A2C19AAD3D500C27E9E /* b2DynamicTree.cpp in Sources */, 15AE184019AAD2F700C27E9E /* CCSprite3D.cpp in Sources */, 46A170E61807CECA005B8026 /* CCPhysicsBody.cpp in Sources */, @@ -6045,7 +6055,6 @@ 50ABBEBB1925AB6F00A911A9 /* ccUtils.cpp in Sources */, 15AE186A19AAD31D00C27E9E /* CocosDenshion.m in Sources */, 15AE198C19AAD36E00C27E9E /* CheckBoxReader.cpp in Sources */, - 15AE1C0919AAE02500C27E9E /* CCEditBox.cpp in Sources */, 15AE1B6319AADA9900C27E9E /* UICheckBox.cpp in Sources */, 15EFA211198A2BB5000C57D3 /* CCProtectedNode.cpp in Sources */, 50ABBEB71925AB6F00A911A9 /* ccUTF8.cpp in Sources */, @@ -6122,6 +6131,7 @@ 50ABBE391925AB6F00A911A9 /* CCData.cpp in Sources */, 1A57010E180BC8EE0088DEC7 /* CCDrawingPrimitives.cpp in Sources */, 50ABBED71925AB6F00A911A9 /* ZipUtils.cpp in Sources */, + 292DB14919B4574100A80320 /* UIEditBoxImplIOS.mm in Sources */, 15AE181019AAD2F700C27E9E /* CCAnimation3D.cpp in Sources */, 1A01C68418F57BE800EFE3A6 /* CCArray.cpp in Sources */, 1A570112180BC8EE0088DEC7 /* CCDrawNode.cpp in Sources */, @@ -6152,6 +6162,7 @@ 15AE1B5319AADA9900C27E9E /* UIRichText.cpp in Sources */, 15AE19DC19AAD3A700C27E9E /* Json.cpp in Sources */, 15AE1B2419AAD43700C27E9E /* cpSpaceComponent.c in Sources */, + 292DB13D19B4574100A80320 /* UIEditBox.cpp in Sources */, 50ABBE551925AB6F00A911A9 /* CCEventFocus.cpp in Sources */, 15AE1A8819AAD40300C27E9E /* b2PrismaticJoint.cpp in Sources */, 50ABBE491925AB6F00A911A9 /* CCEventAcceleration.cpp in Sources */, @@ -6200,6 +6211,7 @@ 1A570202180BCBD40088DEC7 /* CCClippingNode.cpp in Sources */, 1A570208180BCBDF0088DEC7 /* CCMotionStreak.cpp in Sources */, 1A570210180BCBF40088DEC7 /* CCProgressTimer.cpp in Sources */, + 292DB14D19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */, 50ABBDB51925AB4100A911A9 /* CCTexture2D.cpp in Sources */, 1A570214180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, 15AE1BD019AAE01E00C27E9E /* CCControlHuePicker.cpp in Sources */, @@ -6338,6 +6350,7 @@ 50ABC0631926664800A911A9 /* CCDevice.mm in Sources */, 15AE1A2819AAD3D500C27E9E /* b2Collision.cpp in Sources */, 15AE1B6719AADA9900C27E9E /* UIScale9Sprite.cpp in Sources */, + 292DB14319B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */, 15AE1A5219AAD40300C27E9E /* b2Draw.cpp in Sources */, 50ABBE1F1925AB6F00A911A9 /* atitc.cpp in Sources */, 1A01C69818F57BE800EFE3A6 /* CCSet.cpp in Sources */, @@ -6451,6 +6464,7 @@ 46A171031807CECB005B8026 /* CCPhysicsShape.cpp in Sources */, 50ABC0161926664800A911A9 /* CCImage.cpp in Sources */, 1A01C6A518F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */, + 292DB14E19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */, 15AE1BFB19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */, 15AE1B9019AADA9A00C27E9E /* UIWidget.cpp in Sources */, ED9C6A9518599AD8000A5232 /* CCNodeGrid.cpp in Sources */, @@ -6502,6 +6516,7 @@ 15AE198E19AAD36E00C27E9E /* CheckBoxReader.cpp in Sources */, 50ABBE621925AB6F00A911A9 /* CCEventListenerAcceleration.cpp in Sources */, 15AE1AB619AAD40300C27E9E /* b2ContactSolver.cpp in Sources */, + 292DB13E19B4574100A80320 /* UIEditBox.cpp in Sources */, 3E6176681960F89B00DE83F5 /* CCController-iOS.mm in Sources */, 15AE19EF19AAD3A700C27E9E /* SkeletonBounds.cpp in Sources */, 15AE18B219AAD33D00C27E9E /* CCBReader.cpp in Sources */, @@ -6547,6 +6562,7 @@ 15AE1B4319AAD43700C27E9E /* cpSpaceHash.c in Sources */, 15AE1A1D19AAD3A700C27E9E /* SlotData.cpp in Sources */, 50ABBD551925AB0000A911A9 /* TransformUtils.cpp in Sources */, + 292DB14419B4574100A80320 /* UIEditBoxImplAndroid.cpp in Sources */, 15AE193619AAD35100C27E9E /* CCArmature.cpp in Sources */, 1A57007A180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, 15AE1AC419AAD40300C27E9E /* b2FrictionJoint.cpp in Sources */, @@ -6566,7 +6582,6 @@ 1A570086180BC5A10088DEC7 /* CCActionPageTurn3D.cpp in Sources */, 15AE1AB819AAD40300C27E9E /* b2EdgeAndCircleContact.cpp in Sources */, 15AE19FF19AAD3A700C27E9E /* AtlasAttachmentLoader.cpp in Sources */, - 15AE1C0719AAE02500C27E9E /* CCEditBox.cpp in Sources */, 1A57008A180BC5A10088DEC7 /* CCActionProgressTimer.cpp in Sources */, 15AE18AF19AAD33D00C27E9E /* CCBKeyframe.cpp in Sources */, 15AE19FB19AAD3A700C27E9E /* AnimationStateData.cpp in Sources */, @@ -6596,6 +6611,7 @@ 15AE195F19AAD35100C27E9E /* CCSpriteFrameCacheHelper.cpp in Sources */, 15AE193019AAD35100C27E9E /* CCActionManagerEx.cpp in Sources */, 503DD8E21926736A00CD74DD /* CCCommon.mm in Sources */, + 292DB14A19B4574100A80320 /* UIEditBoxImplIOS.mm in Sources */, 15AE1A9419AAD40300C27E9E /* b2BlockAllocator.cpp in Sources */, 15AE1B4419AAD43700C27E9E /* cpSpaceQuery.c in Sources */, 15AE1A4D19AAD3D500C27E9E /* b2PolygonShape.cpp in Sources */, @@ -6672,6 +6688,7 @@ 15AE194019AAD35100C27E9E /* CCBone.cpp in Sources */, 1A570215180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, 1A570222180BCC1A0088DEC7 /* CCParticleBatchNode.cpp in Sources */, + 292DB15019B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */, 15AE19F119AAD3A700C27E9E /* Event.cpp in Sources */, 15AE185F19AAD31200C27E9E /* SimpleAudioEngine.mm in Sources */, 15AE1BE819AAE01E00C27E9E /* CCControl.cpp in Sources */, @@ -6715,7 +6732,6 @@ 15AE19AE19AAD39700C27E9E /* PageViewReader.cpp in Sources */, 3EA3EDBD1991CDFA00645534 /* CCCamera.cpp in Sources */, 1A570297180BCCAB0088DEC7 /* CCAnimationCache.cpp in Sources */, - 15AE1C1019AAE03E00C27E9E /* CCEditBoxImplIOS.mm in Sources */, 50ABBE321925AB6F00A911A9 /* CCConfiguration.cpp in Sources */, 15AE1A9F19AAD40300C27E9E /* b2Timer.cpp in Sources */, 15AE1AD419AAD40300C27E9E /* b2WeldJoint.cpp in Sources */, diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp index 6905ba7701..de96938730 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp @@ -44,6 +44,18 @@ g_guisTests[] = } }, #endif + { + "EditBox Test", + [](Ref* sender) + { + UISceneManager* sceneManager = UISceneManager::sharedUISceneManager(); + sceneManager->setCurrentUISceneId(kUIEditBoxTest); + sceneManager->setMinUISceneId(kUIEditBoxTest); + sceneManager->setMaxUISceneId(kUIEditBoxTest); + Scene* scene = sceneManager->currentUIScene(); + Director::getInstance()->replaceScene(scene); + } + }, { "focus test", [](Ref* sender) From 85ce801fdd37dfe72f22ab6b06bc28e8f87ad4ac Mon Sep 17 00:00:00 2001 From: andyque Date: Mon, 1 Sep 2014 17:06:22 +0800 Subject: [PATCH 49/74] remove ccscale9sprite , cceditBox --- build/cocos2d_libs.xcodeproj/project.pbxproj | 26 +- build/cocos2d_tests.xcodeproj/project.pbxproj | 32 - .../cocosbuilder/CCScale9SpriteLoader.cpp | 16 +- .../cocosbuilder/CCScale9SpriteLoader.h | 6 +- cocos/ui/Android.mk | 3 + cocos/ui/UIScale9Sprite.cpp | 19 +- cocos/ui/UIScale9Sprite.h | 6 + extensions/ExtensionDeprecated.cpp | 25 + extensions/ExtensionDeprecated.h | 39 + .../CCControlExtension/CCControlButton.cpp | 1 - .../GUI/CCControlExtension/CCControlButton.h | 3 +- .../CCControlExtension/CCControlExtensions.h | 1 - .../GUI/CCControlExtension/CCScale9Sprite.cpp | 816 ------------------ .../GUI/CCControlExtension/CCScale9Sprite.h | 323 ------- extensions/cocos-ext.h | 2 +- .../EditBoxTest/EditBoxTest.cpp | 135 --- .../ExtensionsTest/EditBoxTest/EditBoxTest.h | 35 - .../Classes/ExtensionsTest/ExtensionsTest.cpp | 19 +- .../Scale9SpriteTest/Scale9SpriteTest.cpp | 784 ----------------- .../Scale9SpriteTest/Scale9SpriteTest.h | 255 ------ 20 files changed, 118 insertions(+), 2428 deletions(-) create mode 100644 extensions/ExtensionDeprecated.cpp create mode 100644 extensions/ExtensionDeprecated.h delete mode 100644 extensions/GUI/CCControlExtension/CCScale9Sprite.cpp delete mode 100644 extensions/GUI/CCControlExtension/CCScale9Sprite.h delete mode 100644 tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp delete mode 100644 tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.h delete mode 100644 tests/cpp-tests/Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.cpp delete mode 100644 tests/cpp-tests/Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.h diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 6e12365842..9482485163 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -948,7 +948,7 @@ 15AE1BC819AAE00000C27E9E /* AssetsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5352180E3060000584C8 /* AssetsManager.h */; }; 15AE1BC919AAE01E00C27E9E /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168351807AF4E005B8026 /* CCControl.cpp */; }; 15AE1BCA19AAE01E00C27E9E /* CCControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168361807AF4E005B8026 /* CCControl.h */; }; - 15AE1BCB19AAE01E00C27E9E /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168371807AF4E005B8026 /* CCControlButton.cpp */; }; + 15AE1BCB19AAE01E00C27E9E /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168371807AF4E005B8026 /* CCControlButton.cpp */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-checker"; }; }; 15AE1BCC19AAE01E00C27E9E /* CCControlButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168381807AF4E005B8026 /* CCControlButton.h */; }; 15AE1BCD19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168391807AF4E005B8026 /* CCControlColourPicker.cpp */; }; 15AE1BCE19AAE01E00C27E9E /* CCControlColourPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683A1807AF4E005B8026 /* CCControlColourPicker.h */; }; @@ -969,8 +969,6 @@ 15AE1BDD19AAE01E00C27E9E /* CCControlUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168491807AF4E005B8026 /* CCControlUtils.h */; }; 15AE1BDE19AAE01E00C27E9E /* CCInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684A1807AF4E005B8026 /* CCInvocation.cpp */; }; 15AE1BDF19AAE01E00C27E9E /* CCInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1684B1807AF4E005B8026 /* CCInvocation.h */; }; - 15AE1BE019AAE01E00C27E9E /* CCScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684C1807AF4E005B8026 /* CCScale9Sprite.cpp */; }; - 15AE1BE119AAE01E00C27E9E /* CCScale9Sprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1684D1807AF4E005B8026 /* CCScale9Sprite.h */; }; 15AE1BE219AAE01E00C27E9E /* CCScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */; }; 15AE1BE319AAE01E00C27E9E /* CCScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685F1807AF4E005B8026 /* CCScrollView.h */; }; 15AE1BE419AAE01E00C27E9E /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168621807AF4E005B8026 /* CCTableView.cpp */; }; @@ -1000,8 +998,6 @@ 15AE1BFC19AAE01E00C27E9E /* CCControlUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168491807AF4E005B8026 /* CCControlUtils.h */; }; 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684A1807AF4E005B8026 /* CCInvocation.cpp */; }; 15AE1BFE19AAE01E00C27E9E /* CCInvocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1684B1807AF4E005B8026 /* CCInvocation.h */; }; - 15AE1BFF19AAE01E00C27E9E /* CCScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1684C1807AF4E005B8026 /* CCScale9Sprite.cpp */; }; - 15AE1C0019AAE01E00C27E9E /* CCScale9Sprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1684D1807AF4E005B8026 /* CCScale9Sprite.h */; }; 15AE1C0119AAE01E00C27E9E /* CCScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */; }; 15AE1C0219AAE01E00C27E9E /* CCScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1685F1807AF4E005B8026 /* CCScrollView.h */; }; 15AE1C0319AAE01E00C27E9E /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168621807AF4E005B8026 /* CCTableView.cpp */; }; @@ -1360,6 +1356,10 @@ 292DB14E19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13719B4574100A80320 /* UIEditBoxImplMac.mm */; }; 292DB14F19B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */; }; 292DB15019B4574100A80320 /* UIEditBoxImplNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */; }; + 292DB15F19B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */; }; + 292DB16019B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */; }; + 292DB16119B461CA00A80320 /* ExtensionDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */; }; + 292DB16219B461CA00A80320 /* ExtensionDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */; }; 29394CF019B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; 29394CF119B01DBA00D2DE1A /* UIWebView.h in Headers */ = {isa = PBXBuildFile; fileRef = 29394CEC19B01DBA00D2DE1A /* UIWebView.h */; }; 29394CF219B01DBA00D2DE1A /* UIWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29394CED19B01DBA00D2DE1A /* UIWebView.mm */; }; @@ -2324,6 +2324,8 @@ 292DB13619B4574100A80320 /* UIEditBoxImplMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIEditBoxImplMac.h; sourceTree = ""; }; 292DB13719B4574100A80320 /* UIEditBoxImplMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIEditBoxImplMac.mm; sourceTree = ""; }; 292DB13819B4574100A80320 /* UIEditBoxImplNone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIEditBoxImplNone.cpp; sourceTree = ""; }; + 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtensionDeprecated.cpp; sourceTree = ""; }; + 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionDeprecated.h; sourceTree = ""; }; 29394CEC19B01DBA00D2DE1A /* UIWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebView.h; sourceTree = ""; }; 29394CED19B01DBA00D2DE1A /* UIWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIWebView.mm; sourceTree = ""; }; 29394CEE19B01DBA00D2DE1A /* UIWebViewImpl_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebViewImpl_iOS.h; sourceTree = ""; }; @@ -2425,8 +2427,6 @@ 46A168491807AF4E005B8026 /* CCControlUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCControlUtils.h; sourceTree = ""; }; 46A1684A1807AF4E005B8026 /* CCInvocation.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCInvocation.cpp; sourceTree = ""; }; 46A1684B1807AF4E005B8026 /* CCInvocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCInvocation.h; sourceTree = ""; }; - 46A1684C1807AF4E005B8026 /* CCScale9Sprite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCScale9Sprite.cpp; sourceTree = ""; }; - 46A1684D1807AF4E005B8026 /* CCScale9Sprite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCScale9Sprite.h; sourceTree = ""; }; 46A1685E1807AF4E005B8026 /* CCScrollView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CCScrollView.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; 46A1685F1807AF4E005B8026 /* CCScrollView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCScrollView.h; sourceTree = ""; }; 46A168621807AF4E005B8026 /* CCTableView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableView.cpp; sourceTree = ""; }; @@ -4155,6 +4155,8 @@ 46A167981807AF4D005B8026 /* extensions */ = { isa = PBXGroup; children = ( + 292DB15D19B461CA00A80320 /* ExtensionDeprecated.cpp */, + 292DB15E19B461CA00A80320 /* ExtensionDeprecated.h */, 46A167D21807AF4D005B8026 /* cocos-ext.h */, 46A168321807AF4E005B8026 /* ExtensionMacros.h */, 1AAF5350180E305F000584C8 /* assets-manager */, @@ -4200,8 +4202,6 @@ 46A168491807AF4E005B8026 /* CCControlUtils.h */, 46A1684A1807AF4E005B8026 /* CCInvocation.cpp */, 46A1684B1807AF4E005B8026 /* CCInvocation.h */, - 46A1684C1807AF4E005B8026 /* CCScale9Sprite.cpp */, - 46A1684D1807AF4E005B8026 /* CCScale9Sprite.h */, ); path = CCControlExtension; sourceTree = ""; @@ -5037,7 +5037,6 @@ 50ABBEA11925AB6F00A911A9 /* CCScheduler.h in Headers */, 15AE1B6219AADA9900C27E9E /* UIButton.h in Headers */, 50ABBDB71925AB4100A911A9 /* CCTexture2D.h in Headers */, - 15AE1BE119AAE01E00C27E9E /* CCScale9Sprite.h in Headers */, 50ABBE811925AB6F00A911A9 /* CCEventType.h in Headers */, 1A57008F180BC5A10088DEC7 /* CCActionTiledGrid.h in Headers */, 15AE19A319AAD39600C27E9E /* TextBMFontReader.h in Headers */, @@ -5344,6 +5343,7 @@ 15AE18A919AAD33D00C27E9E /* CCSpriteLoader.h in Headers */, 15AE198419AAD36400C27E9E /* WidgetReaderProtocol.h in Headers */, 50ABBEC91925AB6F00A911A9 /* firePngData.h in Headers */, + 292DB16119B461CA00A80320 /* ExtensionDeprecated.h in Headers */, 503DD8F51926B0DB00CD74DD /* CCIMEDelegate.h in Headers */, 50ABBD5A1925AB0000A911A9 /* Vec2.h in Headers */, 15AE1BDB19AAE01E00C27E9E /* CCControlSwitch.h in Headers */, @@ -5465,6 +5465,7 @@ 46A171011807CECB005B8026 /* CCPhysicsJoint.h in Headers */, 46A170FD1807CECB005B8026 /* CCPhysicsBody.h in Headers */, 50ABBE9C1925AB6F00A911A9 /* CCRef.h in Headers */, + 292DB16219B461CA00A80320 /* ExtensionDeprecated.h in Headers */, 50ABBD961925AB4100A911A9 /* CCGLProgramState.h in Headers */, 46A171061807CECB005B8026 /* CCPhysicsWorld.h in Headers */, 50ABBDB41925AB4100A911A9 /* ccShaders.h in Headers */, @@ -5839,7 +5840,6 @@ 15AE198019AAD35700C27E9E /* CCTimeLine.h in Headers */, 50ABBD4F1925AB0000A911A9 /* MathUtil.h in Headers */, 1A01C69718F57BE800EFE3A6 /* CCInteger.h in Headers */, - 15AE1C0019AAE01E00C27E9E /* CCScale9Sprite.h in Headers */, 15AE1C0619AAE01E00C27E9E /* CCTableViewCell.h in Headers */, 15AE19AB19AAD39700C27E9E /* ListViewReader.h in Headers */, 50ABBEBE1925AB6F00A911A9 /* ccUtils.h in Headers */, @@ -6211,6 +6211,7 @@ 1A570202180BCBD40088DEC7 /* CCClippingNode.cpp in Sources */, 1A570208180BCBDF0088DEC7 /* CCMotionStreak.cpp in Sources */, 1A570210180BCBF40088DEC7 /* CCProgressTimer.cpp in Sources */, + 292DB15F19B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */, 292DB14D19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */, 50ABBDB51925AB4100A911A9 /* CCTexture2D.cpp in Sources */, 1A570214180BCBF40088DEC7 /* CCRenderTexture.cpp in Sources */, @@ -6230,7 +6231,6 @@ 1A570286180BCC900088DEC7 /* CCSpriteFrame.cpp in Sources */, B24AA989195A675C007B4522 /* CCFastTMXTiledMap.cpp in Sources */, 15AE199619AAD39600C27E9E /* ListViewReader.cpp in Sources */, - 15AE1BE019AAE01E00C27E9E /* CCScale9Sprite.cpp in Sources */, 50ABC0191926664800A911A9 /* CCSAXParser.cpp in Sources */, 15AE1B1419AAD43700C27E9E /* cpPinJoint.c in Sources */, 15AE189219AAD33D00C27E9E /* CCLayerGradientLoader.cpp in Sources */, @@ -6628,6 +6628,7 @@ 15AE1AB019AAD40300C27E9E /* b2ChainAndPolygonContact.cpp in Sources */, 1A5701B2180BCB590088DEC7 /* CCFontFNT.cpp in Sources */, 1A5701B6180BCB590088DEC7 /* CCFontFreeType.cpp in Sources */, + 292DB16019B461CA00A80320 /* ExtensionDeprecated.cpp in Sources */, 50ABBEAC1925AB6F00A911A9 /* ccTypes.cpp in Sources */, 15AE196A19AAD35100C27E9E /* DictionaryHelper.cpp in Sources */, 15AE1A3F19AAD3D500C27E9E /* b2Collision.cpp in Sources */, @@ -6698,7 +6699,6 @@ 15AE182919AAD2F700C27E9E /* CCMeshSkin.cpp in Sources */, 15AE1BBD19AADFF000C27E9E /* SocketIO.cpp in Sources */, 15AE1A4319AAD3D500C27E9E /* b2DynamicTree.cpp in Sources */, - 15AE1BFF19AAE01E00C27E9E /* CCScale9Sprite.cpp in Sources */, 15AE1A3A19AAD3D500C27E9E /* b2BroadPhase.cpp in Sources */, 15AE19B619AAD39700C27E9E /* TextBMFontReader.cpp in Sources */, 15AE1BFD19AAE01E00C27E9E /* CCInvocation.cpp in Sources */, diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index cd6916594b..dec67dde2c 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -472,8 +472,6 @@ 1AC35BEE18CECF0C00F37B72 /* CCControlStepperTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A7318CECF0B00F37B72 /* CCControlStepperTest.cpp */; }; 1AC35BEF18CECF0C00F37B72 /* CCControlSwitchTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A7618CECF0B00F37B72 /* CCControlSwitchTest.cpp */; }; 1AC35BF018CECF0C00F37B72 /* CCControlSwitchTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A7618CECF0B00F37B72 /* CCControlSwitchTest.cpp */; }; - 1AC35BF118CECF0C00F37B72 /* EditBoxTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A7918CECF0B00F37B72 /* EditBoxTest.cpp */; }; - 1AC35BF218CECF0C00F37B72 /* EditBoxTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A7918CECF0B00F37B72 /* EditBoxTest.cpp */; }; 1AC35BF318CECF0C00F37B72 /* ExtensionsTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A7B18CECF0B00F37B72 /* ExtensionsTest.cpp */; }; 1AC35BF418CECF0C00F37B72 /* ExtensionsTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A7B18CECF0B00F37B72 /* ExtensionsTest.cpp */; }; 1AC35BF518CECF0C00F37B72 /* HttpClientTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A7E18CECF0B00F37B72 /* HttpClientTest.cpp */; }; @@ -484,8 +482,6 @@ 1AC35BFA18CECF0C00F37B72 /* WebSocketTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A8218CECF0B00F37B72 /* WebSocketTest.cpp */; }; 1AC35BFB18CECF0C00F37B72 /* NotificationCenterTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A8518CECF0B00F37B72 /* NotificationCenterTest.cpp */; }; 1AC35BFC18CECF0C00F37B72 /* NotificationCenterTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A8518CECF0B00F37B72 /* NotificationCenterTest.cpp */; }; - 1AC35BFD18CECF0C00F37B72 /* Scale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A8818CECF0B00F37B72 /* Scale9SpriteTest.cpp */; }; - 1AC35BFE18CECF0C00F37B72 /* Scale9SpriteTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A8818CECF0B00F37B72 /* Scale9SpriteTest.cpp */; }; 1AC35BFF18CECF0C00F37B72 /* CustomTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A8B18CECF0B00F37B72 /* CustomTableViewCell.cpp */; }; 1AC35C0018CECF0C00F37B72 /* CustomTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A8B18CECF0B00F37B72 /* CustomTableViewCell.cpp */; }; 1AC35C0118CECF0C00F37B72 /* TableViewTestScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A8D18CECF0B00F37B72 /* TableViewTestScene.cpp */; }; @@ -2557,8 +2553,6 @@ 1AC35A7418CECF0B00F37B72 /* CCControlStepperTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlStepperTest.h; sourceTree = ""; }; 1AC35A7618CECF0B00F37B72 /* CCControlSwitchTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSwitchTest.cpp; sourceTree = ""; }; 1AC35A7718CECF0B00F37B72 /* CCControlSwitchTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlSwitchTest.h; sourceTree = ""; }; - 1AC35A7918CECF0B00F37B72 /* EditBoxTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EditBoxTest.cpp; sourceTree = ""; }; - 1AC35A7A18CECF0B00F37B72 /* EditBoxTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditBoxTest.h; sourceTree = ""; }; 1AC35A7B18CECF0B00F37B72 /* ExtensionsTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtensionsTest.cpp; sourceTree = ""; }; 1AC35A7C18CECF0B00F37B72 /* ExtensionsTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionsTest.h; sourceTree = ""; }; 1AC35A7E18CECF0B00F37B72 /* HttpClientTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HttpClientTest.cpp; sourceTree = ""; }; @@ -2569,8 +2563,6 @@ 1AC35A8318CECF0B00F37B72 /* WebSocketTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSocketTest.h; sourceTree = ""; }; 1AC35A8518CECF0B00F37B72 /* NotificationCenterTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NotificationCenterTest.cpp; sourceTree = ""; }; 1AC35A8618CECF0B00F37B72 /* NotificationCenterTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotificationCenterTest.h; sourceTree = ""; }; - 1AC35A8818CECF0B00F37B72 /* Scale9SpriteTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Scale9SpriteTest.cpp; sourceTree = ""; }; - 1AC35A8918CECF0B00F37B72 /* Scale9SpriteTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scale9SpriteTest.h; sourceTree = ""; }; 1AC35A8B18CECF0B00F37B72 /* CustomTableViewCell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomTableViewCell.cpp; sourceTree = ""; }; 1AC35A8C18CECF0B00F37B72 /* CustomTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomTableViewCell.h; sourceTree = ""; }; 1AC35A8D18CECF0B00F37B72 /* TableViewTestScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TableViewTestScene.cpp; sourceTree = ""; }; @@ -5777,12 +5769,10 @@ 1AC359DF18CECF0B00F37B72 /* CocoStudioComponentsTest */, 1AC35A5818CECF0B00F37B72 /* CocoStudioSceneTest */, 1AC35A6118CECF0B00F37B72 /* ControlExtensionTest */, - 1AC35A7818CECF0B00F37B72 /* EditBoxTest */, 1AC35A7B18CECF0B00F37B72 /* ExtensionsTest.cpp */, 1AC35A7C18CECF0B00F37B72 /* ExtensionsTest.h */, 1AC35A7D18CECF0B00F37B72 /* NetworkTest */, 1AC35A8418CECF0B00F37B72 /* NotificationCenterTest */, - 1AC35A8718CECF0B00F37B72 /* Scale9SpriteTest */, 1AC35A8A18CECF0B00F37B72 /* TableViewTest */, ); path = ExtensionsTest; @@ -6024,15 +6014,6 @@ path = CCControlSwitchTest; sourceTree = ""; }; - 1AC35A7818CECF0B00F37B72 /* EditBoxTest */ = { - isa = PBXGroup; - children = ( - 1AC35A7918CECF0B00F37B72 /* EditBoxTest.cpp */, - 1AC35A7A18CECF0B00F37B72 /* EditBoxTest.h */, - ); - path = EditBoxTest; - sourceTree = ""; - }; 1AC35A7D18CECF0B00F37B72 /* NetworkTest */ = { isa = PBXGroup; children = ( @@ -6055,15 +6036,6 @@ path = NotificationCenterTest; sourceTree = ""; }; - 1AC35A8718CECF0B00F37B72 /* Scale9SpriteTest */ = { - isa = PBXGroup; - children = ( - 1AC35A8818CECF0B00F37B72 /* Scale9SpriteTest.cpp */, - 1AC35A8918CECF0B00F37B72 /* Scale9SpriteTest.h */, - ); - path = Scale9SpriteTest; - sourceTree = ""; - }; 1AC35A8A18CECF0B00F37B72 /* TableViewTest */ = { isa = PBXGroup; children = ( @@ -7976,7 +7948,6 @@ 1AC35B6718CECF0C00F37B72 /* AnimationsTestLayer.cpp in Sources */, 29080DB7191B595E0066F8DF /* UIListViewTest_Editor.cpp in Sources */, 1AC35BF918CECF0C00F37B72 /* WebSocketTest.cpp in Sources */, - 1AC35BF118CECF0C00F37B72 /* EditBoxTest.cpp in Sources */, 1AC35B3918CECF0C00F37B72 /* Bug-1174.cpp in Sources */, 1AC35BE318CECF0C00F37B72 /* CCControlColourPickerTest.cpp in Sources */, 29080DB1191B595E0066F8DF /* UILayoutTest.cpp in Sources */, @@ -8027,7 +7998,6 @@ 29080DD1191B595E0066F8DF /* UISliderTest_Editor.cpp in Sources */, 1AC35B2718CECF0C00F37B72 /* ActionsTest.cpp in Sources */, 1AC35C4918CECF0C00F37B72 /* ShaderTest.cpp in Sources */, - 1AC35BFD18CECF0C00F37B72 /* Scale9SpriteTest.cpp in Sources */, 1AC35B4318CECF0C00F37B72 /* Bug-624.cpp in Sources */, 1AC35BF718CECF0C00F37B72 /* SocketIOTest.cpp in Sources */, 1AC35C4F18CECF0C00F37B72 /* SpriteTest.cpp in Sources */, @@ -8173,7 +8143,6 @@ 1AC35B6818CECF0C00F37B72 /* AnimationsTestLayer.cpp in Sources */, 29080D8E191B595E0066F8DF /* CocosGUIScene.cpp in Sources */, 1AC35BFA18CECF0C00F37B72 /* WebSocketTest.cpp in Sources */, - 1AC35BF218CECF0C00F37B72 /* EditBoxTest.cpp in Sources */, 38FA2E74194AEBE100FF2BE4 /* ActionTimelineTestScene.cpp in Sources */, 2958245A1987415900F9746D /* UIScale9SpriteTest.cpp in Sources */, 1AC35B3A18CECF0C00F37B72 /* Bug-1174.cpp in Sources */, @@ -8231,7 +8200,6 @@ 292CF01519A1965E00E8E6A0 /* UIEditBoxTest.cpp in Sources */, 1AC35B2818CECF0C00F37B72 /* ActionsTest.cpp in Sources */, 1AC35C4A18CECF0C00F37B72 /* ShaderTest.cpp in Sources */, - 1AC35BFE18CECF0C00F37B72 /* Scale9SpriteTest.cpp in Sources */, C04F935B1941B05400E9FEAB /* TileMapTest2.cpp in Sources */, 1AC35B4418CECF0C00F37B72 /* Bug-624.cpp in Sources */, 1AC35BF818CECF0C00F37B72 /* SocketIOTest.cpp in Sources */, diff --git a/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp b/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp index 2089898058..186708fc34 100644 --- a/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp +++ b/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.cpp @@ -19,7 +19,7 @@ namespace cocosbuilder { void Scale9SpriteLoader::onHandlePropTypeSpriteFrame(Node * pNode, Node * pParent, const char * pPropertyName, SpriteFrame * pSpriteFrame, CCBReader * ccbReader) { if(strcmp(pPropertyName, PROPERTY_SPRITEFRAME) == 0) { - ((Scale9Sprite *)pNode)->setSpriteFrame(pSpriteFrame); + ((cocos2d::ui::Scale9Sprite *)pNode)->setSpriteFrame(pSpriteFrame); } else { NodeLoader::onHandlePropTypeSpriteFrame(pNode, pParent, pPropertyName, pSpriteFrame, ccbReader); } @@ -27,7 +27,7 @@ void Scale9SpriteLoader::onHandlePropTypeSpriteFrame(Node * pNode, Node * pParen void Scale9SpriteLoader::onHandlePropTypeColor3(Node * pNode, Node * pParent, const char * pPropertyName, Color3B pColor3B, CCBReader * ccbReader) { if(strcmp(pPropertyName, PROPERTY_COLOR) == 0) { - ((Scale9Sprite *)pNode)->setColor(pColor3B); + ((cocos2d::ui::Scale9Sprite *)pNode)->setColor(pColor3B); } else { NodeLoader::onHandlePropTypeColor3(pNode, pParent, pPropertyName, pColor3B, ccbReader); } @@ -35,7 +35,7 @@ void Scale9SpriteLoader::onHandlePropTypeColor3(Node * pNode, Node * pParent, co void Scale9SpriteLoader::onHandlePropTypeByte(Node * pNode, Node * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * ccbReader) { if(strcmp(pPropertyName, PROPERTY_OPACITY) == 0) { - ((Scale9Sprite *)pNode)->setOpacity(pByte); + ((cocos2d::ui::Scale9Sprite *)pNode)->setOpacity(pByte); } else { NodeLoader::onHandlePropTypeByte(pNode, pParent, pPropertyName, pByte, ccbReader); } @@ -54,7 +54,7 @@ void Scale9SpriteLoader::onHandlePropTypeSize(Node * pNode, Node * pParent, cons if(strcmp(pPropertyName, PROPERTY_CONTENTSIZE) == 0) { //((Scale9Sprite *)pNode)->setContentSize(pSize); } else if(strcmp(pPropertyName, PROPERTY_PREFEREDSIZE) == 0) { - ((Scale9Sprite *)pNode)->setPreferredSize(pSize); + ((cocos2d::ui::Scale9Sprite *)pNode)->setPreferredSize(pSize); } else { NodeLoader::onHandlePropTypeSize(pNode, pParent, pPropertyName, pSize, ccbReader); } @@ -62,13 +62,13 @@ void Scale9SpriteLoader::onHandlePropTypeSize(Node * pNode, Node * pParent, cons void Scale9SpriteLoader::onHandlePropTypeFloat(Node * pNode, Node * pParent, const char * pPropertyName, float pFloat, CCBReader * ccbReader) { if(strcmp(pPropertyName, PROPERTY_INSETLEFT) == 0) { - ((Scale9Sprite *)pNode)->setInsetLeft(pFloat); + ((cocos2d::ui::Scale9Sprite *)pNode)->setInsetLeft(pFloat); } else if(strcmp(pPropertyName, PROPERTY_INSETTOP) == 0) { - ((Scale9Sprite *)pNode)->setInsetTop(pFloat); + ((cocos2d::ui::Scale9Sprite *)pNode)->setInsetTop(pFloat); } else if(strcmp(pPropertyName, PROPERTY_INSETRIGHT) == 0) { - ((Scale9Sprite *)pNode)->setInsetRight(pFloat); + ((cocos2d::ui::Scale9Sprite *)pNode)->setInsetRight(pFloat); } else if(strcmp(pPropertyName, PROPERTY_INSETBOTTOM) == 0) { - ((Scale9Sprite *)pNode)->setInsetBottom(pFloat); + ((cocos2d::ui::Scale9Sprite *)pNode)->setInsetBottom(pFloat); } else { NodeLoader::onHandlePropTypeFloat(pNode, pParent, pPropertyName, pFloat, ccbReader); } diff --git a/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.h b/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.h index 70f7e1816b..35bf229776 100644 --- a/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.h +++ b/cocos/editor-support/cocosbuilder/CCScale9SpriteLoader.h @@ -3,7 +3,7 @@ #include "CCNodeLoader.h" #include "CCScale9SpriteLoader.h" -#include "extensions/GUI/CCControlExtension/CCScale9Sprite.h" +#include "ui/UIScale9Sprite.h" namespace cocosbuilder { @@ -28,8 +28,8 @@ protected: * @js NA * @lua NA */ - virtual cocos2d::extension::Scale9Sprite * createNode(cocos2d::Node * pParent, cocosbuilder::CCBReader * ccbReader) { - cocos2d::extension::Scale9Sprite* pNode = cocos2d::extension::Scale9Sprite::create(); + virtual cocos2d::ui::Scale9Sprite * createNode(cocos2d::Node * pParent, cocosbuilder::CCBReader * ccbReader) { + cocos2d::ui::Scale9Sprite* pNode = cocos2d::ui::Scale9Sprite::create(); pNode->setAnchorPoint(cocos2d::Vec2::ZERO); diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index 221315e578..a76af6d91a 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -33,6 +33,9 @@ UIDeprecated.cpp \ UIScale9Sprite.cpp \ UIWebView.cpp \ UIWebViewImpl_android.cpp \ +UIEditBox/UIEditBox.cpp \ +UIEditBox/UIEditBoxImplAndroid.cpp \ + LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/../editor-support diff --git a/cocos/ui/UIScale9Sprite.cpp b/cocos/ui/UIScale9Sprite.cpp index a7071c3729..13f6f2f92d 100644 --- a/cocos/ui/UIScale9Sprite.cpp +++ b/cocos/ui/UIScale9Sprite.cpp @@ -140,11 +140,28 @@ namespace ui { return true; } + bool Scale9Sprite::initWithBatchNode(cocos2d::SpriteBatchNode *batchnode, const cocos2d::Rect &rect, bool rotated, const cocos2d::Rect &capInsets) + { + Sprite *sprite = Sprite::createWithTexture(batchnode->getTexture()); + return init(sprite, rect, rotated, capInsets); + } + + bool Scale9Sprite::initWithBatchNode(cocos2d::SpriteBatchNode *batchnode, const cocos2d::Rect &rect, const cocos2d::Rect &capInsets) + { + return initWithBatchNode(batchnode, rect, false, capInsets); + } + #define TRANSLATE_X(x, y, xtranslate) \ x+=xtranslate; \ #define TRANSLATE_Y(x, y, ytranslate) \ -y+=ytranslate; \ +y+=ytranslate; \ + + bool Scale9Sprite::updateWithBatchNode(cocos2d::SpriteBatchNode *batchnode, const cocos2d::Rect &originalRect, bool rotated, const cocos2d::Rect &capInsets) + { + Sprite *sprite = Sprite::createWithTexture(batchnode->getTexture()); + return this->updateWithSprite(sprite, originalRect, rotated, capInsets); + } bool Scale9Sprite::updateWithSprite(Sprite* sprite, const Rect& originalRect, bool rotated, const Rect& capInsets) { diff --git a/cocos/ui/UIScale9Sprite.h b/cocos/ui/UIScale9Sprite.h index da54df5de0..6a0d8b7e4f 100644 --- a/cocos/ui/UIScale9Sprite.h +++ b/cocos/ui/UIScale9Sprite.h @@ -69,6 +69,7 @@ namespace ui { */ static Scale9Sprite* create(const std::string& file, const Rect& rect, const Rect& capInsets); + /** * Creates a 9-slice sprite with a texture file. The whole texture will be * broken down into a 3×3 grid of equal blocks. @@ -233,6 +234,9 @@ namespace ui { virtual bool init(); virtual bool init(Sprite* sprite, const Rect& rect, bool rotated, const Rect& capInsets); virtual bool init(Sprite* sprite, const Rect& rect, const Rect& capInsets); + CC_DEPRECATED_ATTRIBUTE virtual bool initWithBatchNode(SpriteBatchNode* batchnode, const Rect& rect, bool rotated, const Rect& capInsets); + CC_DEPRECATED_ATTRIBUTE virtual bool initWithBatchNode(SpriteBatchNode* batchnode, const Rect& rect, const Rect& capInsets); + /** * Creates and returns a new sprite object with the specified cap insets. * You use this method to add cap insets to a sprite or to change the existing @@ -244,6 +248,8 @@ namespace ui { Scale9Sprite* resizableSpriteWithCapInsets(const Rect& capInsets); virtual bool updateWithSprite(Sprite* sprite, const Rect& rect, bool rotated, const Rect& capInsets); + CC_DEPRECATED_ATTRIBUTE bool updateWithBatchNode(SpriteBatchNode* batchnode, const Rect& originalRect, bool rotated, const Rect& capInsets); + virtual void setSpriteFrame(SpriteFrame * spriteFrame); // overrides diff --git a/extensions/ExtensionDeprecated.cpp b/extensions/ExtensionDeprecated.cpp new file mode 100644 index 0000000000..d3e3e65e5d --- /dev/null +++ b/extensions/ExtensionDeprecated.cpp @@ -0,0 +1,25 @@ +/**************************************************************************** + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "ExtensionDeprecated.h" diff --git a/extensions/ExtensionDeprecated.h b/extensions/ExtensionDeprecated.h new file mode 100644 index 0000000000..8abdf919b6 --- /dev/null +++ b/extensions/ExtensionDeprecated.h @@ -0,0 +1,39 @@ +/**************************************************************************** + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __cocos2d_libs__ExtensionDeprecated__ +#define __cocos2d_libs__ExtensionDeprecated__ + +#include "ui/UIEditBox/UIEditBox.h" +#include "ExtensionMacros.h" + +NS_CC_EXT_BEGIN + +CC_DEPRECATED_ATTRIBUTE typedef ui::EditBox EditBox; +CC_DEPRECATED_ATTRIBUTE typedef ui::EditBoxDelegate EditBoxDelegate; +CC_DEPRECATED_ATTRIBUTE typedef ui::Scale9Sprite Scale9Sprite; + +NS_CC_EXT_END + +#endif /* defined(__cocos2d_libs__ExtensionDeprecated__) */ diff --git a/extensions/GUI/CCControlExtension/CCControlButton.cpp b/extensions/GUI/CCControlExtension/CCControlButton.cpp index f7cc5b71b6..91599ae386 100644 --- a/extensions/GUI/CCControlExtension/CCControlButton.cpp +++ b/extensions/GUI/CCControlExtension/CCControlButton.cpp @@ -26,7 +26,6 @@ */ #include "CCControlButton.h" -#include "CCScale9Sprite.h" #include "2d/CCLabel.h" #include "2d/CCAction.h" #include "2d/CCActionInterval.h" diff --git a/extensions/GUI/CCControlExtension/CCControlButton.h b/extensions/GUI/CCControlExtension/CCControlButton.h index f7484e2172..2c58a59311 100644 --- a/extensions/GUI/CCControlExtension/CCControlButton.h +++ b/extensions/GUI/CCControlExtension/CCControlButton.h @@ -32,9 +32,8 @@ #include "CCControl.h" #include "CCInvocation.h" -#include "CCScale9Sprite.h" +#include "ExtensionDeprecated.h" #include "base/CCMap.h" -#include "extensions/ExtensionExport.h" NS_CC_EXT_BEGIN diff --git a/extensions/GUI/CCControlExtension/CCControlExtensions.h b/extensions/GUI/CCControlExtension/CCControlExtensions.h index c4548bf535..2cbae97035 100644 --- a/extensions/GUI/CCControlExtension/CCControlExtensions.h +++ b/extensions/GUI/CCControlExtension/CCControlExtensions.h @@ -25,7 +25,6 @@ THE SOFTWARE. #ifndef __CCCONTROL_EXTENSIONS_H__ #define __CCCONTROL_EXTENSIONS_H__ -#include "CCScale9Sprite.h" #include "CCControl.h" #include "CCControlButton.h" #include "CCControlColourPicker.h" diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp deleted file mode 100644 index 021de0489e..0000000000 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp +++ /dev/null @@ -1,816 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012 cocos2d-x.org - -http://www.cocos2d-x.org - -Created by Jung Sang-Taik on 12. 3. 16.. -Copyright (c) 2012 Neofect. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "CCScale9Sprite.h" -#include "base/CCPlatformMacros.h" -#include "2d/CCSprite.h" -#include "2d/CCSpriteFrameCache.h" - -NS_CC_EXT_BEGIN - -Scale9Sprite::Scale9Sprite() -: _spritesGenerated(false) -, _spriteFrameRotated(false) -, _positionsAreDirty(false) -, _scale9Image(nullptr) -, _topLeft(nullptr) -, _top(nullptr) -, _topRight(nullptr) -, _left(nullptr) -, _centre(nullptr) -, _right(nullptr) -, _bottomLeft(nullptr) -, _bottom(nullptr) -, _bottomRight(nullptr) -, _opacityModifyRGB(false) -, _insetLeft(0) -, _insetTop(0) -, _insetRight(0) -, _insetBottom(0) -{ - -} - -Scale9Sprite::~Scale9Sprite() -{ - CC_SAFE_RELEASE(_topLeft); - CC_SAFE_RELEASE(_top); - CC_SAFE_RELEASE(_topRight); - CC_SAFE_RELEASE(_left); - CC_SAFE_RELEASE(_centre); - CC_SAFE_RELEASE(_right); - CC_SAFE_RELEASE(_bottomLeft); - CC_SAFE_RELEASE(_bottom); - CC_SAFE_RELEASE(_bottomRight); - CC_SAFE_RELEASE(_scale9Image); -} - -bool Scale9Sprite::init() -{ - return this->initWithBatchNode(nullptr, Rect::ZERO, Rect::ZERO); -} - -bool Scale9Sprite::initWithBatchNode(SpriteBatchNode* batchnode, const Rect& rect, const Rect& capInsets) -{ - return this->initWithBatchNode(batchnode, rect, false, capInsets); -} - -bool Scale9Sprite::initWithBatchNode(SpriteBatchNode* batchnode, const Rect& rect, bool rotated, const Rect& capInsets) -{ - if(batchnode) - { - this->updateWithBatchNode(batchnode, rect, rotated, capInsets); - } - this->setCascadeColorEnabled(true); - this->setCascadeOpacityEnabled(true); - this->setAnchorPoint(Vec2(0.5f, 0.5f)); - this->_positionsAreDirty = true; - - return true; -} - -#define TRANSLATE_X(x, y, xtranslate) \ - x+=xtranslate; \ - -#define TRANSLATE_Y(x, y, ytranslate) \ - y+=ytranslate; \ - -bool Scale9Sprite::updateWithBatchNode(SpriteBatchNode* batchnode, const Rect& originalRect, bool rotated, const Rect& capInsets) -{ - GLubyte opacity = getOpacity(); - Color3B color = getColor(); - Rect rect(originalRect); - - // Release old sprites - this->removeAllChildrenWithCleanup(true); - - CC_SAFE_RELEASE(this->_centre); - CC_SAFE_RELEASE(this->_top); - CC_SAFE_RELEASE(this->_topLeft); - CC_SAFE_RELEASE(this->_topRight); - CC_SAFE_RELEASE(this->_left); - CC_SAFE_RELEASE(this->_right); - CC_SAFE_RELEASE(this->_bottomLeft); - CC_SAFE_RELEASE(this->_bottom); - CC_SAFE_RELEASE(this->_bottomRight); - - - if(this->_scale9Image != batchnode) - { - CC_SAFE_RELEASE(this->_scale9Image); - _scale9Image = batchnode; - CC_SAFE_RETAIN(_scale9Image); - } - - if (!_scale9Image) - { - return false; - } - - _capInsets = capInsets; - _spriteFrameRotated = rotated; - - // If there is no given rect - if ( rect.equals(Rect::ZERO) ) - { - // Get the texture size as original - Size textureSize = _scale9Image->getTextureAtlas()->getTexture()->getContentSize(); - - rect = Rect(0, 0, textureSize.width, textureSize.height); - } - - // Set the given rect's size as original size - _spriteRect = rect; - _originalSize = rect.size; - _preferredSize = _originalSize; - _capInsetsInternal = capInsets; - - float w = rect.size.width; - float h = rect.size.height; - - // If there is no specified center region - if ( _capInsetsInternal.equals(Rect::ZERO) ) - { - // log("... cap insets not specified : using default cap insets ..."); - _capInsetsInternal = Rect(w/3, h/3, w/3, h/3); - } - - float left_w = _capInsetsInternal.origin.x; - float center_w = _capInsetsInternal.size.width; - float right_w = rect.size.width - (left_w + center_w); - - float top_h = _capInsetsInternal.origin.y; - float center_h = _capInsetsInternal.size.height; - float bottom_h = rect.size.height - (top_h + center_h); - - // calculate rects - - // ... top row - float x = 0.0; - float y = 0.0; - - // top left - Rect lefttopbounds = Rect(x, y, left_w, top_h); - - // top center - TRANSLATE_X(x, y, left_w); - Rect centertopbounds = Rect(x, y, center_w, top_h); - - // top right - TRANSLATE_X(x, y, center_w); - Rect righttopbounds = Rect(x, y, right_w, top_h); - - // ... center row - x = 0.0; - y = 0.0; - TRANSLATE_Y(x, y, top_h); - - // center left - Rect leftcenterbounds = Rect(x, y, left_w, center_h); - - // center center - TRANSLATE_X(x, y, left_w); - Rect centerbounds = Rect(x, y, center_w, center_h); - - // center right - TRANSLATE_X(x, y, center_w); - Rect rightcenterbounds = Rect(x, y, right_w, center_h); - - // ... bottom row - x = 0.0; - y = 0.0; - TRANSLATE_Y(x, y, top_h); - TRANSLATE_Y(x, y, center_h); - - // bottom left - Rect leftbottombounds = Rect(x, y, left_w, bottom_h); - - // bottom center - TRANSLATE_X(x, y, left_w); - Rect centerbottombounds = Rect(x, y, center_w, bottom_h); - - // bottom right - TRANSLATE_X(x, y, center_w); - Rect rightbottombounds = Rect(x, y, right_w, bottom_h); - - if (!rotated) { - // log("!rotated"); - - AffineTransform t = AffineTransform::IDENTITY; - t = AffineTransformTranslate(t, rect.origin.x, rect.origin.y); - - centerbounds = RectApplyAffineTransform(centerbounds, t); - rightbottombounds = RectApplyAffineTransform(rightbottombounds, t); - leftbottombounds = RectApplyAffineTransform(leftbottombounds, t); - righttopbounds = RectApplyAffineTransform(righttopbounds, t); - lefttopbounds = RectApplyAffineTransform(lefttopbounds, t); - rightcenterbounds = RectApplyAffineTransform(rightcenterbounds, t); - leftcenterbounds = RectApplyAffineTransform(leftcenterbounds, t); - centerbottombounds = RectApplyAffineTransform(centerbottombounds, t); - centertopbounds = RectApplyAffineTransform(centertopbounds, t); - - // Centre - _centre = Sprite::createWithTexture(_scale9Image->getTexture(), centerbounds); - _centre->retain(); - this->addChild(_centre); - - - // Top - _top = Sprite::createWithTexture(_scale9Image->getTexture(), centertopbounds); - _top->retain(); - this->addChild(_top); - - // Bottom - _bottom = Sprite::createWithTexture(_scale9Image->getTexture(), centerbottombounds); - _bottom->retain(); - this->addChild(_bottom); - - // Left - _left = Sprite::createWithTexture(_scale9Image->getTexture(), leftcenterbounds); - _left->retain(); - this->addChild(_left); - - // Right - _right = Sprite::createWithTexture(_scale9Image->getTexture(), rightcenterbounds); - _right->retain(); - this->addChild(_right); - - // Top left - _topLeft = Sprite::createWithTexture(_scale9Image->getTexture(), lefttopbounds); - _topLeft->retain(); - this->addChild(_topLeft); - - // Top right - _topRight = Sprite::createWithTexture(_scale9Image->getTexture(), righttopbounds); - _topRight->retain(); - this->addChild(_topRight); - - // Bottom left - _bottomLeft = Sprite::createWithTexture(_scale9Image->getTexture(), leftbottombounds); - _bottomLeft->retain(); - this->addChild(_bottomLeft); - - // Bottom right - _bottomRight = Sprite::createWithTexture(_scale9Image->getTexture(), rightbottombounds); - _bottomRight->retain(); - this->addChild(_bottomRight); - } else { - // set up transformation of coordinates - // to handle the case where the sprite is stored rotated - // in the spritesheet - // log("rotated"); - - AffineTransform t = AffineTransform::IDENTITY; - - Rect rotatedcenterbounds = centerbounds; - Rect rotatedrightbottombounds = rightbottombounds; - Rect rotatedleftbottombounds = leftbottombounds; - Rect rotatedrighttopbounds = righttopbounds; - Rect rotatedlefttopbounds = lefttopbounds; - Rect rotatedrightcenterbounds = rightcenterbounds; - Rect rotatedleftcenterbounds = leftcenterbounds; - Rect rotatedcenterbottombounds = centerbottombounds; - Rect rotatedcentertopbounds = centertopbounds; - - t = AffineTransformTranslate(t, rect.size.height+rect.origin.x, rect.origin.y); - t = AffineTransformRotate(t, 1.57079633f); - - centerbounds = RectApplyAffineTransform(centerbounds, t); - rightbottombounds = RectApplyAffineTransform(rightbottombounds, t); - leftbottombounds = RectApplyAffineTransform(leftbottombounds, t); - righttopbounds = RectApplyAffineTransform(righttopbounds, t); - lefttopbounds = RectApplyAffineTransform(lefttopbounds, t); - rightcenterbounds = RectApplyAffineTransform(rightcenterbounds, t); - leftcenterbounds = RectApplyAffineTransform(leftcenterbounds, t); - centerbottombounds = RectApplyAffineTransform(centerbottombounds, t); - centertopbounds = RectApplyAffineTransform(centertopbounds, t); - - rotatedcenterbounds.origin = centerbounds.origin; - rotatedrightbottombounds.origin = rightbottombounds.origin; - rotatedleftbottombounds.origin = leftbottombounds.origin; - rotatedrighttopbounds.origin = righttopbounds.origin; - rotatedlefttopbounds.origin = lefttopbounds.origin; - rotatedrightcenterbounds.origin = rightcenterbounds.origin; - rotatedleftcenterbounds.origin = leftcenterbounds.origin; - rotatedcenterbottombounds.origin = centerbottombounds.origin; - rotatedcentertopbounds.origin = centertopbounds.origin; - - // Centre - _centre = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedcenterbounds, true); - _centre->retain(); - this->addChild(_centre, 0); - - // Top - _top = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedcentertopbounds, true); - _top->retain(); - this->addChild(_top); - - // Bottom - _bottom = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedcenterbottombounds, true); - _bottom->retain(); - this->addChild(_bottom); - - // Left - _left = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedleftcenterbounds, true); - _left->retain(); - this->addChild(_left); - - // Right - _right = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedrightcenterbounds, true); - _right->retain(); - this->addChild(_right); - - // Top left - _topLeft = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedlefttopbounds, true); - _topLeft->retain(); - this->addChild(_topLeft); - - // Top right - _topRight = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedrighttopbounds, true); - _topRight->retain(); - this->addChild(_topRight); - - // Bottom left - _bottomLeft = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedleftbottombounds, true); - _bottomLeft->retain(); - this->addChild(_bottomLeft); - - // Bottom right - _bottomRight = Sprite::createWithTexture(_scale9Image->getTexture(), rotatedrightbottombounds, true); - _bottomRight->retain(); - this->addChild(_bottomRight); - } - - this->setContentSize(rect.size); -// this->addChild(_scale9Image); - - if (_spritesGenerated) - { - // Restore color and opacity - this->setOpacity(opacity); - this->setColor(color); - } - _spritesGenerated = true; - - return true; -} - -void Scale9Sprite::setContentSize(const Size &size) -{ - Node::setContentSize(size); - this->_positionsAreDirty = true; -} - -void Scale9Sprite::updatePositions() -{ - // Check that instances are non-nullptr - if(!((_topLeft) && - (_topRight) && - (_bottomRight) && - (_bottomLeft) && - (_centre))) { - // if any of the above sprites are nullptr, return - return; - } - - Size size = this->_contentSize; - - float sizableWidth = size.width - _topLeft->getContentSize().width - _topRight->getContentSize().width; - float sizableHeight = size.height - _topLeft->getContentSize().height - _bottomRight->getContentSize().height; - - float horizontalScale = sizableWidth/_centre->getContentSize().width; - float verticalScale = sizableHeight/_centre->getContentSize().height; - - _centre->setScaleX(horizontalScale); - _centre->setScaleY(verticalScale); - - float rescaledWidth = _centre->getContentSize().width * horizontalScale; - float rescaledHeight = _centre->getContentSize().height * verticalScale; - - float leftWidth = _bottomLeft->getContentSize().width; - float bottomHeight = _bottomLeft->getContentSize().height; - - _bottomLeft->setAnchorPoint(Vec2(0,0)); - _bottomRight->setAnchorPoint(Vec2(0,0)); - _topLeft->setAnchorPoint(Vec2(0,0)); - _topRight->setAnchorPoint(Vec2(0,0)); - _left->setAnchorPoint(Vec2(0,0)); - _right->setAnchorPoint(Vec2(0,0)); - _top->setAnchorPoint(Vec2(0,0)); - _bottom->setAnchorPoint(Vec2(0,0)); - _centre->setAnchorPoint(Vec2(0,0)); - - // Position corners - _bottomLeft->setPosition(0,0); - _bottomRight->setPosition(leftWidth+rescaledWidth,0); - _topLeft->setPosition(0, bottomHeight+rescaledHeight); - _topRight->setPosition(leftWidth+rescaledWidth, bottomHeight+rescaledHeight); - - // Scale and position borders - _left->setPosition(0, bottomHeight); - _left->setScaleY(verticalScale); - _right->setPosition(leftWidth+rescaledWidth,bottomHeight); - _right->setScaleY(verticalScale); - _bottom->setPosition(leftWidth,0); - _bottom->setScaleX(horizontalScale); - _top->setPosition(leftWidth,bottomHeight+rescaledHeight); - _top->setScaleX(horizontalScale); - - // Position centre - _centre->setPosition(leftWidth, bottomHeight); -} - -bool Scale9Sprite::initWithFile(const std::string& file, const Rect& rect, const Rect& capInsets) -{ - SpriteBatchNode *batchnode = SpriteBatchNode::create(file, 9); - bool pReturn = this->initWithBatchNode(batchnode, rect, capInsets); - return pReturn; -} - -Scale9Sprite* Scale9Sprite::create(const std::string& file, const Rect& rect, const Rect& capInsets) -{ - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithFile(file, rect, capInsets) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return nullptr; -} - -bool Scale9Sprite::initWithFile(const std::string& file, const Rect& rect) -{ - bool pReturn = this->initWithFile(file, rect, Rect::ZERO); - return pReturn; -} - -Scale9Sprite* Scale9Sprite::create(const std::string& file, const Rect& rect) -{ - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithFile(file, rect) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return nullptr; -} - - -bool Scale9Sprite::initWithFile(const Rect& capInsets, const std::string& file) -{ - bool pReturn = this->initWithFile(file, Rect::ZERO, capInsets); - return pReturn; -} - -Scale9Sprite* Scale9Sprite::create(const Rect& capInsets, const std::string& file) -{ - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithFile(capInsets, file) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return nullptr; -} - -bool Scale9Sprite::initWithFile(const std::string& file) -{ - bool pReturn = this->initWithFile(file, Rect::ZERO); - return pReturn; - -} - -Scale9Sprite* Scale9Sprite::create(const std::string& file) -{ - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithFile(file) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return nullptr; -} - -bool Scale9Sprite::initWithSpriteFrame(SpriteFrame* spriteFrame, const Rect& capInsets) -{ - Texture2D* texture = spriteFrame->getTexture(); - CCASSERT(texture != nullptr, "CCTexture must be not nil"); - - SpriteBatchNode *batchnode = SpriteBatchNode::createWithTexture(texture, 9); - CCASSERT(batchnode != nullptr, "CCSpriteBatchNode must be not nil"); - - bool pReturn = this->initWithBatchNode(batchnode, spriteFrame->getRect(), spriteFrame->isRotated(), capInsets); - return pReturn; -} - -Scale9Sprite* Scale9Sprite::createWithSpriteFrame(SpriteFrame* spriteFrame, const Rect& capInsets) -{ - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithSpriteFrame(spriteFrame, capInsets) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return nullptr; -} -bool Scale9Sprite::initWithSpriteFrame(SpriteFrame* spriteFrame) -{ - CCASSERT(spriteFrame != nullptr, "Invalid spriteFrame for sprite"); - bool pReturn = this->initWithSpriteFrame(spriteFrame, Rect::ZERO); - return pReturn; -} - -Scale9Sprite* Scale9Sprite::createWithSpriteFrame(SpriteFrame* spriteFrame) -{ - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithSpriteFrame(spriteFrame) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return nullptr; -} - -bool Scale9Sprite::initWithSpriteFrameName(const std::string& spriteFrameName, const Rect& capInsets) -{ - CCASSERT((SpriteFrameCache::getInstance()) != nullptr, "SpriteFrameCache::getInstance() must be non-nullptr"); - - SpriteFrame *frame = SpriteFrameCache::getInstance()->getSpriteFrameByName(spriteFrameName); - CCASSERT(frame != nullptr, "CCSpriteFrame must be non-nullptr"); - - if (nullptr == frame) return false; - - bool pReturn = this->initWithSpriteFrame(frame, capInsets); - return pReturn; -} - -Scale9Sprite* Scale9Sprite::createWithSpriteFrameName(const std::string& spriteFrameName, const Rect& capInsets) -{ - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithSpriteFrameName(spriteFrameName, capInsets) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return nullptr; -} - -bool Scale9Sprite::initWithSpriteFrameName(const std::string& spriteFrameName) -{ - bool pReturn = this->initWithSpriteFrameName(spriteFrameName, Rect::ZERO); - return pReturn; -} - -Scale9Sprite* Scale9Sprite::createWithSpriteFrameName(const std::string& spriteFrameName) -{ - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithSpriteFrameName(spriteFrameName) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - - log("Could not allocate Scale9Sprite()"); - return nullptr; - -} - -Scale9Sprite* Scale9Sprite::resizableSpriteWithCapInsets(const Rect& capInsets) -{ - Scale9Sprite* pReturn = new (std::nothrow) Scale9Sprite(); - if ( pReturn && pReturn->initWithBatchNode(_scale9Image, _spriteRect, capInsets) ) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return nullptr; -} - -Scale9Sprite* Scale9Sprite::create() -{ - Scale9Sprite *pReturn = new (std::nothrow) Scale9Sprite(); - if (pReturn && pReturn->init()) - { - pReturn->autorelease(); - return pReturn; - } - CC_SAFE_DELETE(pReturn); - return nullptr; -} - -/** sets the opacity. - @warning If the the texture has premultiplied alpha then, the R, G and B channels will be modifed. - Values goes from 0 to 255, where 255 means fully opaque. - */ - -void Scale9Sprite::setPreferredSize(Size preferedSize) -{ - this->setContentSize(preferedSize); - this->_preferredSize = preferedSize; -} - -Size Scale9Sprite::getPreferredSize() -{ - return this->_preferredSize; -} - -void Scale9Sprite::setCapInsets(Rect capInsets) -{ - Size contentSize = this->_contentSize; - this->updateWithBatchNode(this->_scale9Image, this->_spriteRect, _spriteFrameRotated, capInsets); - this->setContentSize(contentSize); -} - -Rect Scale9Sprite::getCapInsets() -{ - return _capInsets; -} - -void Scale9Sprite::updateCapInset() -{ - Rect insets; - if (this->_insetLeft == 0 && this->_insetTop == 0 && this->_insetRight == 0 && this->_insetBottom == 0) - { - insets = Rect::ZERO; - } - else - { - insets = Rect(_insetLeft, - _insetTop, - _spriteRect.size.width-_insetLeft-_insetRight, - _spriteRect.size.height-_insetTop-_insetBottom); - } - this->setCapInsets(insets); -} - -void Scale9Sprite::setOpacityModifyRGB(bool var) -{ - if (!_scale9Image) - { - return; - } - _opacityModifyRGB = var; - - for(auto child : _scale9Image->getChildren()){ - child->setOpacityModifyRGB(_opacityModifyRGB); - } -} - -bool Scale9Sprite::isOpacityModifyRGB() const -{ - return _opacityModifyRGB; -} - -void Scale9Sprite::setSpriteFrame(SpriteFrame * spriteFrame) -{ - SpriteBatchNode * batchnode = SpriteBatchNode::createWithTexture(spriteFrame->getTexture(), 9); - this->updateWithBatchNode(batchnode, spriteFrame->getRect(), spriteFrame->isRotated(), Rect::ZERO); - - // Reset insets - this->_insetLeft = 0; - this->_insetTop = 0; - this->_insetRight = 0; - this->_insetBottom = 0; -} - -float Scale9Sprite::getInsetLeft() -{ - return this->_insetLeft; -} - -float Scale9Sprite::getInsetTop() -{ - return this->_insetTop; -} - -float Scale9Sprite::getInsetRight() -{ - return this->_insetRight; -} - -float Scale9Sprite::getInsetBottom() -{ - return this->_insetBottom; -} - -void Scale9Sprite::setInsetLeft(float insetLeft) -{ - this->_insetLeft = insetLeft; - this->updateCapInset(); -} - -void Scale9Sprite::setInsetTop(float insetTop) -{ - this->_insetTop = insetTop; - this->updateCapInset(); -} - -void Scale9Sprite::setInsetRight(float insetRight) -{ - this->_insetRight = insetRight; - this->updateCapInset(); -} - -void Scale9Sprite::setInsetBottom(float insetBottom) -{ - this->_insetBottom = insetBottom; - this->updateCapInset(); -} - -void Scale9Sprite::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) -{ - if(this->_positionsAreDirty) - { - this->updatePositions(); - this->_positionsAreDirty = false; - } - Node::visit(renderer, parentTransform, parentFlags); -} - -void Scale9Sprite::setColor(const Color3B& color) -{ - if (!_scale9Image) - { - return; - } - - Node::setColor(color); - - for(auto child : _scale9Image->getChildren()){ - child->setColor(color); - } -} - -void Scale9Sprite::setOpacity(GLubyte opacity) -{ - if (!_scale9Image) - { - return; - } - Node::setOpacity(opacity); - - for(auto child : _scale9Image->getChildren()){ - child->setOpacity(opacity); - } -} - -void Scale9Sprite::updateDisplayedColor(const cocos2d::Color3B &parentColor) -{ - if (!_scale9Image) - { - return; - } - Node::updateDisplayedColor(parentColor); - - for(auto child : _scale9Image->getChildren()){ - child->updateDisplayedColor(parentColor); - } -} - -void Scale9Sprite::updateDisplayedOpacity(GLubyte parentOpacity) -{ - if (!_scale9Image) - { - return; - } - Node::updateDisplayedOpacity(parentOpacity); - - for(auto child : _scale9Image->getChildren()){ - child->updateDisplayedOpacity(parentOpacity); - } -} - -NS_CC_EXT_END diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.h b/extensions/GUI/CCControlExtension/CCScale9Sprite.h deleted file mode 100644 index fc1dea95ba..0000000000 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.h +++ /dev/null @@ -1,323 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012 cocos2d-x.org - -http://www.cocos2d-x.org - -Created by Jung Sang-Taik on 12. 3. 16.. -Copyright (c) 2012 Neofect. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCScale9Sprite_H__ -#define __CCScale9Sprite_H__ - -#include "2d/CCNode.h" -#include "2d/CCSpriteFrame.h" -#include "2d/CCSpriteBatchNode.h" -#include "extensions/ExtensionExport.h" -#include "../../ExtensionMacros.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -/** - * A 9-slice sprite for cocos2d. - * - * 9-slice scaling allows you to specify how scaling is applied - * to specific areas of a sprite. With 9-slice scaling (3x3 grid), - * you can ensure that the sprite does not become distorted when - * scaled. - * - * @see http://yannickloriot.com/library/ios/cccontrolextension/Classes/CCScale9Sprite.html - */ -class CC_EX_DLL Scale9Sprite : public Node -{ -public: - /** - * @js ctor - */ - Scale9Sprite(); - /** - * @js NA - * @lua NA - */ - virtual ~Scale9Sprite(); - -public: - static Scale9Sprite* create(); - - /** - * Creates a 9-slice sprite with a texture file, a delimitation zone and - * with the specified cap insets. - * - * @see initWithFile(const char *file, const Rect& rect, const Rect& capInsets) - */ - static Scale9Sprite* create(const std::string& file, const Rect& rect, const Rect& capInsets); - - /** - * Creates a 9-slice sprite with a texture file. The whole texture will be - * broken down into a 3×3 grid of equal blocks. - * - * @see initWithFile(const Rect& capInsets, const char *file) - */ - static Scale9Sprite* create(const Rect& capInsets, const std::string& file); - - /** - * Creates a 9-slice sprite with a texture file and a delimitation zone. The - * texture will be broken down into a 3×3 grid of equal blocks. - * - * @see initWithFile(const char *file, const Rect& rect) - */ - static Scale9Sprite* create(const std::string& file, const Rect& rect); - - /** - * Creates a 9-slice sprite with a texture file. The whole texture will be - * broken down into a 3×3 grid of equal blocks. - * - * @see initWithFile(const char *file) - */ - static Scale9Sprite* create(const std::string& file); - - /** - * Creates a 9-slice sprite with an sprite frame. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @see initWithSpriteFrame(SpriteFrame *spriteFrame) - */ - static Scale9Sprite* createWithSpriteFrame(SpriteFrame* spriteFrame); - - /** - * Creates a 9-slice sprite with an sprite frame and the centre of its zone. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @see initWithSpriteFrame(SpriteFrame *spriteFrame, const Rect& capInsets) - */ - static Scale9Sprite* createWithSpriteFrame(SpriteFrame* spriteFrame, const Rect& capInsets); - - /** - * Creates a 9-slice sprite with an sprite frame name. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @see initWithSpriteFrameName(const char *spriteFrameName) - */ - static Scale9Sprite* createWithSpriteFrameName(const std::string& spriteFrameName); - - /** - * Creates a 9-slice sprite with an sprite frame name and the centre of its - * zone. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @see initWithSpriteFrameName(const char *spriteFrameName, const Rect& capInsets) - */ - static Scale9Sprite* createWithSpriteFrameName(const std::string& spriteFrameName, const Rect& capInsets); - - /** - * Initializes a 9-slice sprite with a texture file, a delimitation zone and - * with the specified cap insets. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param file The name of the texture file. - * @param rect The rectangle that describes the sub-part of the texture that - * is the whole image. If the shape is the whole texture, set this to the - * texture's full rect. - * @param capInsets The values to use for the cap insets. - */ - virtual bool initWithFile(const std::string& file, const Rect& rect, const Rect& capInsets); - - /** - * Initializes a 9-slice sprite with a texture file and a delimitation zone. The - * texture will be broken down into a 3×3 grid of equal blocks. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param file The name of the texture file. - * @param rect The rectangle that describes the sub-part of the texture that - * is the whole image. If the shape is the whole texture, set this to the - * texture's full rect. - */ - virtual bool initWithFile(const std::string& file, const Rect& rect); - - /** - * Initializes a 9-slice sprite with a texture file and with the specified cap - * insets. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param file The name of the texture file. - * @param capInsets The values to use for the cap insets. - */ - virtual bool initWithFile(const Rect& capInsets, const std::string& file); - - /** - * Initializes a 9-slice sprite with a texture file. The whole texture will be - * broken down into a 3×3 grid of equal blocks. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param file The name of the texture file. - */ - virtual bool initWithFile(const std::string& file); - - /** - * Initializes a 9-slice sprite with an sprite frame and with the specified - * cap insets. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param spriteFrame The sprite frame object. - * @param capInsets The values to use for the cap insets. - */ - virtual bool initWithSpriteFrame(SpriteFrame* spriteFrame, const Rect& capInsets); - - /** - * Initializes a 9-slice sprite with an sprite frame. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param spriteFrame The sprite frame object. - */ - virtual bool initWithSpriteFrame(SpriteFrame* spriteFrame); - - /** - * Initializes a 9-slice sprite with an sprite frame name and with the specified - * cap insets. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param spriteFrameName The sprite frame name. - * @param capInsets The values to use for the cap insets. - */ - virtual bool initWithSpriteFrameName(const std::string& spriteFrameName, const Rect& capInsets); - - /** - * Initializes a 9-slice sprite with an sprite frame name. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param spriteFrameName The sprite frame name. - */ - virtual bool initWithSpriteFrameName(const std::string& spriteFrameName); - - virtual bool init(); - virtual bool initWithBatchNode(SpriteBatchNode* batchnode, const Rect& rect, bool rotated, const Rect& capInsets); - virtual bool initWithBatchNode(SpriteBatchNode* batchnode, const Rect& rect, const Rect& capInsets); - - /** - * Creates and returns a new sprite object with the specified cap insets. - * You use this method to add cap insets to a sprite or to change the existing - * cap insets of a sprite. In both cases, you get back a new image and the - * original sprite remains untouched. - * - * @param capInsets The values to use for the cap insets. - */ - Scale9Sprite* resizableSpriteWithCapInsets(const Rect& capInsets); - - virtual bool updateWithBatchNode(SpriteBatchNode* batchnode, const Rect& rect, bool rotated, const Rect& capInsets); - virtual void setSpriteFrame(SpriteFrame * spriteFrame); - - // overrides - virtual void setContentSize(const Size & size) override; - /** - * @js NA - * @lua NA - */ - virtual void visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) override; - virtual void setOpacityModifyRGB(bool bValue) override; - virtual bool isOpacityModifyRGB(void) const override; - virtual void setOpacity(GLubyte opacity) override; - virtual void setColor(const Color3B& color) override; - virtual void updateDisplayedOpacity(GLubyte parentOpacity) override; - virtual void updateDisplayedColor(const Color3B& parentColor) override; - -protected: - void updateCapInset(); - void updatePositions(); - - bool _spritesGenerated; - Rect _spriteRect; - bool _spriteFrameRotated; - Rect _capInsetsInternal; - bool _positionsAreDirty; - - SpriteBatchNode* _scale9Image; - Sprite* _topLeft; - Sprite* _top; - Sprite* _topRight; - Sprite* _left; - Sprite* _centre; - Sprite* _right; - Sprite* _bottomLeft; - Sprite* _bottom; - Sprite* _bottomRight; - - bool _opacityModifyRGB; - - /** Original sprite's size. */ - CC_SYNTHESIZE_READONLY(Size, _originalSize, OriginalSize); - /** Prefered sprite's size. By default the prefered size is the original size. */ - - //if the preferredSize component is given as -1, it is ignored - CC_PROPERTY(Size, _preferredSize, PreferredSize); - /** - * The end-cap insets. - * On a non-resizeable sprite, this property is set to CGRect::ZERO; the sprite - * does not use end caps and the entire sprite is subject to stretching. - */ - CC_PROPERTY(Rect, _capInsets, CapInsets); - /** Sets the left side inset */ - CC_PROPERTY(float, _insetLeft, InsetLeft); - /** Sets the top side inset */ - CC_PROPERTY(float, _insetTop, InsetTop); - /** Sets the right side inset */ - CC_PROPERTY(float, _insetRight, InsetRight); - /** Sets the bottom side inset */ - CC_PROPERTY(float, _insetBottom, InsetBottom); -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif // __CCScale9Sprite_H__ diff --git a/extensions/cocos-ext.h b/extensions/cocos-ext.h index 695077d628..6f742b7046 100644 --- a/extensions/cocos-ext.h +++ b/extensions/cocos-ext.h @@ -7,12 +7,12 @@ #include "GUI/CCControlExtension/CCControlExtensions.h" #include "GUI/CCScrollView/CCScrollView.h" #include "GUI/CCScrollView/CCTableView.h" -#include "ui/UIEditBox/UIEditBox.h" // Physics integration #include "physics-nodes/CCPhysicsDebugNode.h" #include "physics-nodes/CCPhysicsSprite.h" #include "assets-manager/AssetsManager.h" +#include "ExtensionDeprecated.h" #endif /* __COCOS2D_EXT_H__ */ diff --git a/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp deleted file mode 100644 index dfa40086aa..0000000000 --- a/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp +++ /dev/null @@ -1,135 +0,0 @@ -// -// EditBoxTest.cpp -// TestCpp -// -// Created by James on 8/14/12. -// -// - -#include "EditBoxTest.h" -#include "../ExtensionsTest.h" - -USING_NS_CC; -USING_NS_CC_EXT; -using namespace ui; - - -EditBoxTest::EditBoxTest() -{ - auto glview = Director::getInstance()->getOpenGLView(); - auto visibleOrigin = glview->getVisibleOrigin(); - auto visibleSize = glview->getVisibleSize(); - - auto pBg = Sprite::create("Images/HelloWorld.png"); - pBg->setPosition(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/2); - addChild(pBg); - - _TTFShowEditReturn = Label::createWithSystemFont("No edit control return!", "", 30); - _TTFShowEditReturn->setPosition(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y + visibleSize.height - 50); - addChild(_TTFShowEditReturn); - - // Back Menu - auto itemBack = MenuItemFont::create("Back", CC_CALLBACK_1(EditBoxTest::toExtensionsMainLayer, this)); - itemBack->setPosition(visibleOrigin.x+visibleSize.width - 50, visibleOrigin.y+25); - auto menuBack = Menu::create(itemBack, nullptr); - menuBack->setPosition(Vec2::ZERO); - addChild(menuBack); - - auto editBoxSize = Size(visibleSize.width - 100, 60); - - // top - _editName = EditBox::create(editBoxSize, ui::Scale9Sprite::create("extensions/green_edit.png")); - _editName->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height*3/4)); - _editName->setFontName("Paint Boy"); - _editName->setFontSize(25); - _editName->setFontColor(Color3B::RED); - _editName->setPlaceHolder("Name:"); - _editName->setPlaceholderFontColor(Color3B::WHITE); - _editName->setMaxLength(8); - _editName->setReturnType(EditBox::KeyboardReturnType::DONE); - _editName->setDelegate(this); - addChild(_editName); - - // middle - _editPassword = EditBox::create(editBoxSize, ui::Scale9Sprite::create("extensions/orange_edit.png")); - _editPassword->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/2)); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - _editPassword->setFont("American Typewriter", 30); -#else - _editPassword->setFont("American Typewriter", 80); - _editPassword->setPlaceholderFont("American Typewriter", 80); -#endif - _editPassword->setFontColor(Color3B::GREEN); - _editPassword->setPlaceHolder("Password:"); - _editPassword->setMaxLength(6); - _editPassword->setInputFlag(EditBox::InputFlag::PASSWORD); - _editPassword->setInputMode(EditBox::InputMode::SINGLE_LINE); - _editPassword->setDelegate(this); - addChild(_editPassword); - - // bottom - _editEmail = EditBox::create(Size(editBoxSize.width, editBoxSize.height), ui::Scale9Sprite::create("extensions/yellow_edit.png")); - _editEmail->setPosition(Vec2(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/4)); - _editEmail->setAnchorPoint(Vec2(0.5, 1.0f)); - _editEmail->setPlaceHolder("Email:"); - _editEmail->setInputMode(EditBox::InputMode::EMAIL_ADDRESS); - _editEmail->setDelegate(this); - addChild(_editEmail); - - this->setPosition(10, 20); -} - -EditBoxTest::~EditBoxTest() -{ - -} - -void EditBoxTest::toExtensionsMainLayer(cocos2d::Ref *sender) -{ - auto scene = new (std::nothrow) ExtensionsTestScene(); - scene->runThisTest(); - scene->release(); -} - -void EditBoxTest::editBoxEditingDidBegin(cocos2d::ui::EditBox* editBox) -{ - log("editBox %p DidBegin !", editBox); -} - -void EditBoxTest::editBoxEditingDidEnd(cocos2d::ui::EditBox* editBox) -{ - log("editBox %p DidEnd !", editBox); -} - -void EditBoxTest::editBoxTextChanged(cocos2d::ui::EditBox* editBox, const std::string& text) -{ - log("editBox %p TextChanged, text: %s ", editBox, text.c_str()); -} - -void EditBoxTest::editBoxReturn(EditBox* editBox) -{ - log("editBox %p was returned !",editBox); - - if (_editName == editBox) - { - _TTFShowEditReturn->setString("Name EditBox return !"); - } - else if (_editPassword == editBox) - { - _TTFShowEditReturn->setString("Password EditBox return !"); - } - else if (_editEmail == editBox) - { - _TTFShowEditReturn->setString("Email EditBox return !"); - } -} - -void runEditBoxTest() -{ - auto scene = Scene::create(); - EditBoxTest *layer = new (std::nothrow) EditBoxTest(); - scene->addChild(layer); - - Director::getInstance()->replaceScene(scene); - layer->release(); -} diff --git a/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.h b/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.h deleted file mode 100644 index 2de0e0642f..0000000000 --- a/tests/cpp-tests/Classes/ExtensionsTest/EditBoxTest/EditBoxTest.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// EditBoxTest.h -// TestCpp -// -// Created by James on 8/14/12. -// -// - -#ifndef __TestCpp__CCEditBoxTest__ -#define __TestCpp__CCEditBoxTest__ - -#include "cocos2d.h" -#include "extensions/cocos-ext.h" - -class EditBoxTest : public cocos2d::Layer, public cocos2d::ui::EditBoxDelegate -{ -public: - EditBoxTest(); - virtual ~EditBoxTest(); - void toExtensionsMainLayer(cocos2d::Ref *sender); - - virtual void editBoxEditingDidBegin(cocos2d::ui::EditBox* editBox); - virtual void editBoxEditingDidEnd(cocos2d::ui::EditBox* editBox); - virtual void editBoxTextChanged(cocos2d::ui::EditBox* editBox, const std::string& text); - virtual void editBoxReturn(cocos2d::ui::EditBox* editBox); -private: - cocos2d::Label* _TTFShowEditReturn; - cocos2d::ui::EditBox* _editName; - cocos2d::ui::EditBox* _editPassword; - cocos2d::ui::EditBox* _editEmail; -}; - -void runEditBoxTest(); - -#endif /* defined(__TestCpp__CCEditBoxTest__) */ diff --git a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp index 3a09e2da85..10d31a2900 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp @@ -18,11 +18,6 @@ #include "NetworkTest/SocketIOTest.h" #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) -#include "EditBoxTest/EditBoxTest.h" -#endif - -#include "Scale9SpriteTest/Scale9SpriteTest.h" enum { @@ -36,15 +31,6 @@ static struct { } g_extensionsTests[] = { { "NotificationCenterTest", [](Ref* sender) { runNotificationCenterTest(); } }, - { "Scale9SpriteTest", [](Ref* sender) { - auto scene = new (std::nothrow) S9SpriteTestScene(); - if (scene) - { - scene->runThisTest(); - scene->release(); - } - } - }, { "CCControlButtonTest", [](Ref *sender){ ControlSceneManager* pManager = ControlSceneManager::sharedControlSceneManager(); auto scene = pManager->currentControlScene(); @@ -68,10 +54,7 @@ static struct { { "SocketIOTest", [](Ref *sender){ runSocketIOTest();} }, #endif -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - { "EditBoxTest", [](Ref *sender){ runEditBoxTest();} - }, -#endif + { "TableViewTest", [](Ref *sender){ runTableViewTest();} }, { "CocoStudioArmatureTest", [](Ref *sender) { ArmatureTestScene *scene = new (std::nothrow) ArmatureTestScene(); diff --git a/tests/cpp-tests/Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.cpp deleted file mode 100644 index c8cc71acbf..0000000000 --- a/tests/cpp-tests/Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.cpp +++ /dev/null @@ -1,784 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2008-2010 Ricardo Quesada - Copyright (c) 2011 Zynga Inc. - Copyright (c) 2013 Surith Thekkiam - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "Scale9SpriteTest.h" -#include "testResource.h" -#include "cocos2d.h" -#include "extensions/cocos-ext.h" - -USING_NS_CC_EXT; - -static std::function createFunctions[] = { - CL(S9BatchNodeBasic), - CL(S9FrameNameSpriteSheet), - CL(S9FrameNameSpriteSheetRotated), - CL(S9BatchNodeScaledNoInsets), - CL(S9FrameNameSpriteSheetScaledNoInsets), - CL(S9FrameNameSpriteSheetRotatedScaledNoInsets), - CL(S9BatchNodeScaleWithCapInsets), - CL(S9FrameNameSpriteSheetInsets), - CL(S9FrameNameSpriteSheetInsetsScaled), - CL(S9FrameNameSpriteSheetRotatedInsets), - CL(S9_TexturePacker), - CL(S9FrameNameSpriteSheetRotatedInsetsScaled), - CL(S9FrameNameSpriteSheetRotatedSetCapInsetLater), - CL(S9CascadeOpacityAndColor), - CL(S9ZOrder), - CL(S9Flip) -}; - -static int sceneIdx=-1; -#define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0])) - -static Layer* nextAction() -{ - sceneIdx++; - sceneIdx = sceneIdx % MAX_LAYER; - - auto layer = (createFunctions[sceneIdx])(); - return layer; -} - -static Layer* backAction() -{ - sceneIdx--; - int total = MAX_LAYER; - if( sceneIdx < 0 ) - sceneIdx += total; - - auto layer = (createFunctions[sceneIdx])(); - return layer; -} - -static Layer* restartAction() -{ - auto layer = (createFunctions[sceneIdx])(); - return layer; -} - -void S9SpriteTestScene::runThisTest() -{ - sceneIdx = -1; - addChild(nextAction()); - - Director::getInstance()->replaceScene(this); -} - -//------------------------------------------------------------------ -// -// S9SpriteTestDemo -// -//------------------------------------------------------------------ - -void S9SpriteTestDemo::onEnter() -{ - BaseTest::onEnter(); - SpriteFrameCache::getInstance()->addSpriteFramesWithFile(s_s9s_blocks9_plist); - CCLOG("sprite frames added to sprite frame cache..."); -} - -void S9SpriteTestDemo::restartCallback(Ref* sender) -{ - auto s = new (std::nothrow) S9SpriteTestScene(); - s->addChild( restartAction() ); - Director::getInstance()->replaceScene(s); - s->release(); -} - -void S9SpriteTestDemo::nextCallback(Ref* sender) -{ - auto s = new (std::nothrow) S9SpriteTestScene(); - s->addChild( nextAction() ); - Director::getInstance()->replaceScene(s); - s->release(); -} - -void S9SpriteTestDemo::backCallback(Ref* sender) -{ - auto s = new (std::nothrow) S9SpriteTestScene(); - s->addChild( backAction() ); - Director::getInstance()->replaceScene(s); - s->release(); -} - - -// S9BatchNodeBasic - -void S9BatchNodeBasic::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9BatchNodeBasic ..."); - - auto batchNode = SpriteBatchNode::create("Images/blocks9.png"); - log("batchNode created with : Images/blocks9.png"); - - auto blocks = Scale9Sprite::create(); - log("... created"); - - blocks->updateWithBatchNode(batchNode, Rect(0, 0, 96, 96), false, Rect(0, 0, 96, 96)); - log("... updateWithBatchNode"); - - blocks->setPosition(Vec2(x, y)); - log("... setPosition"); - - this->addChild(blocks); - log("this->addChild"); - - log("... S9BatchNodeBasic done."); -} - -std::string S9BatchNodeBasic::title() const -{ - return "Scale9Sprite created empty and updated from SpriteBatchNode"; -} - -std::string S9BatchNodeBasic::subtitle() const -{ - return "updateWithBatchNode(); capInsets=full size"; -} - - -// S9FrameNameSpriteSheet - -void S9FrameNameSpriteSheet::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9FrameNameSpriteSheet ..."); - - auto blocks = Scale9Sprite::createWithSpriteFrameName("blocks9.png"); - log("... created"); - - blocks->setPosition(Vec2(x, y)); - log("... setPosition"); - - this->addChild(blocks); - log("this->addChild"); - - log("... S9FrameNameSpriteSheet done."); -} - -std::string S9FrameNameSpriteSheet::title() const -{ - return "Scale9Sprite from sprite sheet"; -} - -std::string S9FrameNameSpriteSheet::subtitle() const -{ - return "createWithSpriteFrameName(); default cap insets"; -} - -// -//// S9FrameNameSpriteSheetRotated -// -void S9FrameNameSpriteSheetRotated::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9FrameNameSpriteSheetRotated ..."); - - auto blocks = Scale9Sprite::createWithSpriteFrameName("blocks9r.png"); - log("... created"); - - blocks->setPosition(Vec2(x, y)); - log("... setPosition"); - - this->addChild(blocks); - log("this->addChild"); - - log("... S9FrameNameSpriteSheetRotated done."); -} - -std::string S9FrameNameSpriteSheetRotated::title() const -{ - return "Scale9Sprite from sprite sheet (stored rotated)"; -} - -std::string S9FrameNameSpriteSheetRotated::subtitle() const -{ - return "createWithSpriteFrameName(); default cap insets"; -} - -// -//// S9BatchNodeScaledNoInsets -// - -void S9BatchNodeScaledNoInsets::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9BatchNodeScaledNoInsets ..."); - - // scaled without insets - auto batchNode_scaled = SpriteBatchNode::create("Images/blocks9.png"); - log("batchNode_scaled created with : Images/blocks9.png"); - - auto blocks_scaled = Scale9Sprite::create(); - log("... created"); - blocks_scaled->updateWithBatchNode(batchNode_scaled, Rect(0, 0, 96, 96), false, Rect(0, 0, 96, 96)); - log("... updateWithBatchNode"); - - blocks_scaled->setPosition(Vec2(x, y)); - log("... setPosition"); - - blocks_scaled->setContentSize(Size(96 * 4, 96*2)); - log("... setContentSize"); - - this->addChild(blocks_scaled); - log("this->addChild"); - - log("... S9BtchNodeScaledNoInsets done."); -} - -std::string S9BatchNodeScaledNoInsets::title() const -{ - return "Scale9Sprite created empty and updated from SpriteBatchNode"; -} - -std::string S9BatchNodeScaledNoInsets::subtitle() const -{ - return "updateWithBatchNode(); capInsets=full size; rendered 4 X width, 2 X height"; -} - -// -//// S9FrameNameSpriteSheetScaledNoInsets -// - -void S9FrameNameSpriteSheetScaledNoInsets::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9FrameNameSpriteSheetScaledNoInsets ..."); - - auto blocks_scaled = Scale9Sprite::createWithSpriteFrameName("blocks9.png"); - log("... created"); - - blocks_scaled->setPosition(Vec2(x, y)); - log("... setPosition"); - - blocks_scaled->setContentSize(Size(96 * 4, 96*2)); - log("... setContentSize"); - - this->addChild(blocks_scaled); - log("this->addChild"); - - log("... S9FrameNameSpriteSheetScaledNoInsets done."); -} - -std::string S9FrameNameSpriteSheetScaledNoInsets::title() const -{ - return "Scale9Sprite from sprite sheet"; -} - -std::string S9FrameNameSpriteSheetScaledNoInsets::subtitle() const -{ - return "createWithSpriteFrameName(); default cap insets; rendered 4 X width, 2 X height"; -} - - -// -//// S9FrameNameSpriteSheetRotatedScaledNoInsets -// - -void S9FrameNameSpriteSheetRotatedScaledNoInsets::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9FrameNameSpriteSheetRotatedScaledNoInsets ..."); - - auto blocks_scaled = Scale9Sprite::createWithSpriteFrameName("blocks9r.png"); - log("... created"); - - blocks_scaled->setPosition(Vec2(x, y)); - log("... setPosition"); - - blocks_scaled->setContentSize(Size(96 * 4, 96*2)); - log("... setContentSize"); - - this->addChild(blocks_scaled); - log("this->addChild"); - - log("... S9FrameNameSpriteSheetRotatedScaledNoInsets done."); -} - -std::string S9FrameNameSpriteSheetRotatedScaledNoInsets::title() const -{ - return "Scale9Sprite from sprite sheet (stored rotated)"; -} - -std::string S9FrameNameSpriteSheetRotatedScaledNoInsets::subtitle() const -{ - return "createWithSpriteFrameName(); default cap insets; rendered 4 X width, 2 X height"; -} - -// -// -//// S9BatchNodeScaleWithCapInsets -// - -void S9BatchNodeScaleWithCapInsets::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9BatchNodeScaleWithCapInsets ..."); - - auto batchNode_scaled_with_insets = SpriteBatchNode::create("Images/blocks9.png"); - log("batchNode_scaled_with_insets created with : Images/blocks9.png"); - - auto blocks_scaled_with_insets = Scale9Sprite::create(); - log("... created"); - - blocks_scaled_with_insets->updateWithBatchNode(batchNode_scaled_with_insets, Rect(0, 0, 96, 96), false, Rect(32, 32, 32, 32)); - log("... updateWithBatchNode"); - - blocks_scaled_with_insets->setContentSize(Size(96 * 4.5, 96 * 2.5)); - log("... setContentSize"); - - blocks_scaled_with_insets->setPosition(Vec2(x, y)); - log("... setPosition"); - - this->addChild(blocks_scaled_with_insets); - log("this->addChild"); - - log("... S9BatchNodeScaleWithCapInsets done."); -} - -std::string S9BatchNodeScaleWithCapInsets::title() const -{ - return "Scale9Sprite created empty and updated from SpriteBatchNode"; -} - -std::string S9BatchNodeScaleWithCapInsets::subtitle() const -{ - return "updateWithBatchNode(); capInsets=(32, 32, 32, 32)"; -} - -// -//// S9FrameNameSpriteSheetInsets -// - -void S9FrameNameSpriteSheetInsets::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9FrameNameSpriteSheetInsets ..."); - - auto blocks_with_insets = Scale9Sprite::createWithSpriteFrameName("blocks9.png", Rect(32, 32, 32, 32)); - log("... created"); - - blocks_with_insets->setPosition(Vec2(x, y)); - log("... setPosition"); - - this->addChild(blocks_with_insets); - log("this->addChild"); - - log("... S9FrameNameSpriteSheetInsets done."); -} - -std::string S9FrameNameSpriteSheetInsets::title() const -{ - return "Scale9Sprite scaled with insets sprite sheet"; -} - -std::string S9FrameNameSpriteSheetInsets::subtitle() const -{ - return "createWithSpriteFrameName(); cap insets=(32, 32, 32, 32)"; -} - -// -//// S9FrameNameSpriteSheetInsetsScaled -// -void S9FrameNameSpriteSheetInsetsScaled::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9FrameNameSpriteSheetInsetsScaled ..."); - - auto blocks_scaled_with_insets = Scale9Sprite::createWithSpriteFrameName("blocks9.png", Rect(32, 32, 32, 32)); - log("... created"); - - blocks_scaled_with_insets->setContentSize(Size(96 * 4.5, 96 * 2.5)); - log("... setContentSize"); - - blocks_scaled_with_insets->setPosition(Vec2(x, y)); - log("... setPosition"); - - this->addChild(blocks_scaled_with_insets); - log("this->addChild"); - - log("... S9FrameNameSpriteSheetInsetsScaled done."); -} - -std::string S9FrameNameSpriteSheetInsetsScaled::title() const -{ - return "Scale9Sprite scaled with insets sprite sheet"; -} - -std::string S9FrameNameSpriteSheetInsetsScaled::subtitle() const -{ - return "createWithSpriteFrameName(); default cap insets; rendered scaled 4.5 X width, 2.5 X height"; -} - -//// S9FrameNameSpriteSheetRotatedInsets -// - -void S9FrameNameSpriteSheetRotatedInsets::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9FrameNameSpriteSheetRotatedInsets ..."); - - auto blocks_with_insets = Scale9Sprite::createWithSpriteFrameName("blocks9r.png", Rect(32, 32, 32, 32)); - log("... created"); - - blocks_with_insets->setPosition(Vec2(x, y)); - log("... setPosition"); - - this->addChild(blocks_with_insets); - log("this->addChild"); - - log("... S9FrameNameSpriteSheetRotatedInsets done."); -} - -std::string S9FrameNameSpriteSheetRotatedInsets::title() const -{ - return "Scale9Sprite scaled with insets sprite sheet (stored rotated)"; -} - -std::string S9FrameNameSpriteSheetRotatedInsets::subtitle() const -{ - return "createWithSpriteFrameName(); cap insets=(32, 32, 32, 32)"; -} - -// -//// S9_TexturePacker -// - -void S9_TexturePacker::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - SpriteFrameCache::getInstance()->addSpriteFramesWithFile(s_s9s_ui_plist); - - float x = winSize.width / 4; - float y = 0 + (winSize.height / 2); - - log("S9_TexturePacker ..."); - - auto s = Scale9Sprite::createWithSpriteFrameName("button_normal.png"); - log("... created"); - - s->setPosition(Vec2(x, y)); - log("... setPosition"); - - s->setContentSize(Size(14 * 16, 10 * 16)); - log("... setContentSize"); - - this->addChild(s); - log("this->addChild"); - - x = winSize.width * 3/4; - - auto s2 = Scale9Sprite::createWithSpriteFrameName("button_actived.png"); - log("... created"); - - s2->setPosition(Vec2(x, y)); - log("... setPosition"); - - s2->setContentSize(Size(14 * 16, 10 * 16)); - log("... setContentSize"); - - this->addChild(s2); - log("this->addChild"); - - log("... S9_TexturePacker done."); -} - -std::string S9_TexturePacker::title() const -{ - return "Scale9Sprite from a spritesheet created with TexturePacker"; -} - -std::string S9_TexturePacker::subtitle() const -{ - return "createWithSpriteFrameName('button_normal.png');createWithSpriteFrameName('button_actived.png');"; -} - -// -//// S9FrameNameSpriteSheetRotatedInsetsScaled -// - -void S9FrameNameSpriteSheetRotatedInsetsScaled::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("S9FrameNameSpriteSheetRotatedInsetsScaled ..."); - - auto blocks_scaled_with_insets = Scale9Sprite::createWithSpriteFrameName("blocks9.png", Rect(32, 32, 32, 32)); - log("... created"); - - blocks_scaled_with_insets->setContentSize(Size(96 * 4.5, 96 * 2.5)); - log("... setContentSize"); - - blocks_scaled_with_insets->setPosition(Vec2(x, y)); - log("... setPosition"); - - this->addChild(blocks_scaled_with_insets); - log("this->addChild"); - - log("... S9FrameNameSpriteSheetRotatedInsetsScaled done."); -} - -std::string S9FrameNameSpriteSheetRotatedInsetsScaled::title() const -{ - return "Scale9Sprite scaled with insets sprite sheet (stored rotated)"; -} - -std::string S9FrameNameSpriteSheetRotatedInsetsScaled::subtitle() const -{ - return "createWithSpriteFrameName(); default cap insets; rendered scaled 4.5 X width, 2.5 X height"; -} - -// -//// Scale9FrameNameSpriteSheetRotatedSetCapInsetLater -// - -void S9FrameNameSpriteSheetRotatedSetCapInsetLater::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - log("Scale9FrameNameSpriteSheetRotatedSetCapInsetLater ..."); - - auto blocks_scaled_with_insets = Scale9Sprite::createWithSpriteFrameName("blocks9r.png"); - log("... created"); - - blocks_scaled_with_insets->setInsetLeft(32); - blocks_scaled_with_insets->setInsetRight(32); - - blocks_scaled_with_insets->setPreferredSize(Size(32*5.5f, 32*4)); - blocks_scaled_with_insets->setPosition(Vec2(x, y)); - log("... setPosition"); - - this->addChild(blocks_scaled_with_insets); - log("this->addChild"); - - log("... Scale9FrameNameSpriteSheetRotatedSetCapInsetLater done."); -} - -std::string S9FrameNameSpriteSheetRotatedSetCapInsetLater::title() const -{ - return "Scale9Sprite from sprite sheet (stored rotated), with setting CapInset later"; -} - -std::string S9FrameNameSpriteSheetRotatedSetCapInsetLater::subtitle() const -{ - return "createWithSpriteFrameName(); setInsetLeft(32); setInsetRight(32);"; -} - -// -//// S9CascadeOpacityAndColor -// - -void S9CascadeOpacityAndColor::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - auto rgba = Layer::create(); - rgba->setCascadeColorEnabled(true); - rgba->setCascadeOpacityEnabled(true); - this->addChild(rgba); - - log("S9CascadeOpacityAndColor ..."); - - auto blocks_scaled_with_insets = Scale9Sprite::createWithSpriteFrameName("blocks9r.png"); - log("... created"); - - blocks_scaled_with_insets->setPosition(Vec2(x, y)); - log("... setPosition"); - - rgba->addChild(blocks_scaled_with_insets); - auto actions = Sequence::create(FadeIn::create(1), - TintTo::create(1, 0, 255, 0), - TintTo::create(1, 255, 255, 255), - FadeOut::create(1), - nullptr); - auto repeat = RepeatForever::create(actions); - rgba->runAction(repeat); - log("this->addChild"); - - log("... S9CascadeOpacityAndColor done."); -} - -std::string S9CascadeOpacityAndColor::title() const -{ - return "Scale9Sprite and a Layer parent with setCascadeOpacityEnable(true) and setCascadeColorEnable(true)"; -} - -std::string S9CascadeOpacityAndColor::subtitle() const -{ - return "when parent change color/opacity, Scale9Sprite should also change"; -} - -// -//// S9ZOrder -// - -void S9ZOrder::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - auto blocks_scaled_with_insets = Scale9Sprite::createWithSpriteFrameName("blocks9r.png"); - - blocks_scaled_with_insets->setPosition(Vec2(x, y)); - this->addChild(blocks_scaled_with_insets); - - Sprite *normalSprite = Sprite::createWithSpriteFrameName("blocks9r.png"); - normalSprite->setColor(Color3B::RED); - blocks_scaled_with_insets->addChild(normalSprite); - - auto topLabel = Label::createWithSystemFont("I Must be On the Top", "Arial", 15); - topLabel->setPosition(Vec2(20,20)); - blocks_scaled_with_insets->addChild(topLabel); - - auto bottomLabel = Label::createWithSystemFont("I Must be On the Bottom", "Arial", 15); - bottomLabel->setPosition(Vec2(80,80)); - bottomLabel->setColor(Color3B::BLUE); - blocks_scaled_with_insets->addChild(bottomLabel,-1); - -} - -std::string S9ZOrder::title() const -{ - return "Scale9Sprite ZOrder issue"; -} - -std::string S9ZOrder::subtitle() const -{ - return "When adding nodes to Scale9Sprite, it should be added on top itself"; -} - -// -//// S9Flip -// - -void S9Flip::onEnter() -{ - S9SpriteTestDemo::onEnter(); - auto winSize = Director::getInstance()->getWinSize(); - float x = winSize.width / 2; - float y = 0 + (winSize.height / 2); - - - auto normalSprite = Scale9Sprite::createWithSpriteFrameName("blocks9r.png"); - - normalSprite->setPosition(Vec2(x, y )); - this->addChild(normalSprite); - - - auto normalLabel = Label::createWithSystemFont("Normal Sprite","Airal",10); - normalLabel->setPosition(normalSprite->getPosition() + Vec2(0, normalSprite->getContentSize().height/2 + 10)); - this->addChild(normalLabel); - - - - auto flipXSprite = Scale9Sprite::createWithSpriteFrameName("blocks9r.png"); - - flipXSprite->setPosition(Vec2(x - 120, y )); - this->addChild(flipXSprite); - - flipXSprite->setScaleX(-1); - - auto flipXLabel = Label::createWithSystemFont("Sprite FlipX","Airal",10); - flipXLabel->setPosition(flipXSprite->getPosition() + Vec2(0, flipXSprite->getContentSize().height/2 + 10)); - this->addChild(flipXLabel); - - - auto flipYSprite = Scale9Sprite::createWithSpriteFrameName("blocks9r.png"); - - flipYSprite->setPosition(Vec2(x + 120, y)); - this->addChild(flipYSprite); - - flipYSprite->setScaleY(-1); - - auto flipYLabel = Label::createWithSystemFont("Sprite FlipY","Airal",10); - flipYLabel->setPosition(flipYSprite->getPosition() + Vec2(0, flipYSprite->getContentSize().height/2 + 10)); - this->addChild(flipYLabel); - - -} - -std::string S9Flip::title() const -{ - return "Scale9Sprite Flip issue"; -} - -std::string S9Flip::subtitle() const -{ - return "When Flipped, the scale9Sprite should behavior like a normal node"; -} diff --git a/tests/cpp-tests/Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.h b/tests/cpp-tests/Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.h deleted file mode 100644 index a5448fb86e..0000000000 --- a/tests/cpp-tests/Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.h +++ /dev/null @@ -1,255 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2008-2010 Ricardo Quesada - Copyright (c) 2011 Zynga Inc. - Copyright (c) 2013 Surith Thekkiam - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "testBasic.h" -#include "BaseTest.h" - - -class S9SpriteTestScene : public TestScene -{ -public: - virtual void runThisTest(); -}; - -class S9SpriteTestDemo : public BaseTest -{ -public: - virtual void onEnter() override; - - virtual void restartCallback(Ref* sender); - virtual void nextCallback(Ref* sender); - virtual void backCallback(Ref* sender); -}; - -// S9BatchNodeBasic - -class S9BatchNodeBasic : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9BatchNodeBasic); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9FrameNameSpriteSheet - -class S9FrameNameSpriteSheet : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9FrameNameSpriteSheet); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9FrameNameSpriteSheetRotated - -class S9FrameNameSpriteSheetRotated : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9FrameNameSpriteSheetRotated); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9BatchNodeScaledNoInsets - -class S9BatchNodeScaledNoInsets : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9BatchNodeScaledNoInsets); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9FrameNameSpriteSheetScaledNoInsets - -class S9FrameNameSpriteSheetScaledNoInsets : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9FrameNameSpriteSheetScaledNoInsets); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9FrameNameSpriteSheetRotatedScaledNoInsets - -class S9FrameNameSpriteSheetRotatedScaledNoInsets : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9FrameNameSpriteSheetRotatedScaledNoInsets); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - - -// S9BatchNodeScaleWithCapInsets - -class S9BatchNodeScaleWithCapInsets : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9BatchNodeScaleWithCapInsets); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9FrameNameSpriteSheetInsets - -class S9FrameNameSpriteSheetInsets : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9FrameNameSpriteSheetInsets); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9FrameNameSpriteSheetInsetsScaled - -class S9FrameNameSpriteSheetInsetsScaled : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9FrameNameSpriteSheetInsetsScaled); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9FrameNameSpriteSheetRotatedInsets - -class S9FrameNameSpriteSheetRotatedInsets : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9FrameNameSpriteSheetRotatedInsets); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9_TexturePacker - -class S9_TexturePacker : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9_TexturePacker); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9FrameNameSpriteSheetRotatedInsetsScaled - -class S9FrameNameSpriteSheetRotatedInsetsScaled : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9FrameNameSpriteSheetRotatedInsetsScaled); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9FrameNameSpriteSheetRotatedInsetsScaled - -class S9FrameNameSpriteSheetRotatedSetCapInsetLater : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9FrameNameSpriteSheetRotatedSetCapInsetLater); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// S9CascadeOpacityAndColor - -class S9CascadeOpacityAndColor : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9CascadeOpacityAndColor); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// Scale9Sprite ZOrder - -class S9ZOrder : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9ZOrder); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; - -// Scale9Sprite Flip - -class S9Flip : public S9SpriteTestDemo -{ -public: - CREATE_FUNC(S9Flip); - - virtual void onEnter() override; - - virtual std::string title() const override; - virtual std::string subtitle() const override; -}; From ffee7b27d43e93798607bd7a07c879b68ec4a91c Mon Sep 17 00:00:00 2001 From: andyque Date: Mon, 1 Sep 2014 17:43:40 +0800 Subject: [PATCH 50/74] fix linux and android compile error --- cocos/CMakeLists.txt | 3 -- cocos/ui/CMakeLists.txt | 50 ------------------- extensions/Android.mk | 9 ++-- .../GUI/CCControlExtension/CCControlButton.h | 2 +- tests/cpp-tests/Android.mk | 2 - 5 files changed, 5 insertions(+), 61 deletions(-) delete mode 100644 cocos/ui/CMakeLists.txt diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index c454b4f63a..ac588ab6a9 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -90,9 +90,6 @@ list(REMOVE_ITEM cocos2d_source_files "${CMAKE_CURRENT_SOURCE_DIR}/storage/local-storage/LocalStorageAndroid.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventController.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/base/CCEventListenerController.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../extensions/GUI/CCEditBox/CCEditBoxImplAndroid.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../extensions/GUI/CCEditBox/CCEditBoxImplWin.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/../extensions/GUI/CCEditBox/CCEditBoxImplWp8.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/editor-support/cocostudio/proj.wp8/pch.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/../extensions/proj.wp8/pch.cpp") diff --git a/cocos/ui/CMakeLists.txt b/cocos/ui/CMakeLists.txt deleted file mode 100644 index 132f7c4635..0000000000 --- a/cocos/ui/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -set(COCOS_UI_SRC - CocosGUI.cpp - UIButton.cpp - UICheckBox.cpp - UIHBox.cpp - UIHelper.cpp - UIImageView.cpp - UILayout.cpp - UILayoutParameter.cpp - UILayoutManager.cpp - UIListView.cpp - UILoadingBar.cpp - UIPageView.cpp - UIRelativeBox.cpp - UIRichText.cpp - UIScrollView.cpp - UISlider.cpp - UITextAtlas.cpp - UITextBMFont.cpp - UIText.cpp - UITextField.cpp - UIVBox.cpp - UIWidget.cpp - UIDeprecated.cpp - UIScale9Sprite.cpp - UIEditBox/UIEditBox.cpp - UIEditBox/UIEditBoxImplAndroid.cpp - UIEditBox/UIEditBoxImplNone.cpp - UIEditBox/UIEditBoxImplWin.cpp -) - -include_directories( - ui - ../../base -) - - -add_library(ui STATIC - ${COCOS_UI_SRC} -) - -target_link_libraries(ui - cocos2d -) - -set_target_properties(ui - PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" -) diff --git a/extensions/Android.mk b/extensions/Android.mk index 89877aa54d..2603f2f3d2 100644 --- a/extensions/Android.mk +++ b/extensions/Android.mk @@ -18,11 +18,6 @@ GUI/CCControlExtension/CCControlStepper.cpp \ GUI/CCControlExtension/CCControlSwitch.cpp \ GUI/CCControlExtension/CCControlUtils.cpp \ GUI/CCControlExtension/CCInvocation.cpp \ -GUI/CCControlExtension/CCScale9Sprite.cpp \ -GUI/CCEditBox/CCEditBox.cpp \ -GUI/CCEditBox/CCEditBoxImplAndroid.cpp \ -GUI/CCEditBox/CCEditBoxImplNone.cpp \ -GUI/CCEditBox/CCEditBoxImplWin.cpp \ GUI/CCScrollView/CCScrollView.cpp \ GUI/CCScrollView/CCTableView.cpp \ GUI/CCScrollView/CCTableViewCell.cpp \ @@ -33,6 +28,10 @@ LOCAL_STATIC_LIBRARIES := cocos2dx_internal_static LOCAL_STATIC_LIBRARIES += cocos_curl_static LOCAL_STATIC_LIBRARIES += box2d_static +GU/CCEditBox/CCEditBox.cpp \ +GUI/CCEditBox/CCEditBoxImplAndroid.cpp \ +GUI/CCEditBox/CCEditBoxImplNone.cpp \ +GUI/CCEditBox/CCEditBoxImplWin.cpp \ LOCAL_CXXFLAGS += -fexceptions LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ diff --git a/extensions/GUI/CCControlExtension/CCControlButton.h b/extensions/GUI/CCControlExtension/CCControlButton.h index 2c58a59311..758c61d363 100644 --- a/extensions/GUI/CCControlExtension/CCControlButton.h +++ b/extensions/GUI/CCControlExtension/CCControlButton.h @@ -32,7 +32,7 @@ #include "CCControl.h" #include "CCInvocation.h" -#include "ExtensionDeprecated.h" +#include "extensions/ExtensionDeprecated.h" #include "base/CCMap.h" NS_CC_EXT_BEGIN diff --git a/tests/cpp-tests/Android.mk b/tests/cpp-tests/Android.mk index d09e7895e0..dba250329b 100644 --- a/tests/cpp-tests/Android.mk +++ b/tests/cpp-tests/Android.mk @@ -124,12 +124,10 @@ Classes/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControl Classes/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.cpp \ Classes/ExtensionsTest/ControlExtensionTest/CCControlStepperTest/CCControlStepperTest.cpp \ Classes/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.cpp \ -Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp \ Classes/ExtensionsTest/NetworkTest/HttpClientTest.cpp \ Classes/ExtensionsTest/NetworkTest/SocketIOTest.cpp \ Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp \ Classes/ExtensionsTest/NotificationCenterTest/NotificationCenterTest.cpp \ -Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.cpp \ Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp \ Classes/ExtensionsTest/TableViewTest/TableViewTestScene.cpp \ Classes/FileUtilsTest/FileUtilsTest.cpp \ From e24192aeb2502656387b441c6635539f62b621a6 Mon Sep 17 00:00:00 2001 From: andyque Date: Mon, 1 Sep 2014 18:06:21 +0800 Subject: [PATCH 51/74] fix linux compile --- tests/cpp-tests/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/cpp-tests/CMakeLists.txt b/tests/cpp-tests/CMakeLists.txt index ec798974c6..d1ca2a1ee1 100644 --- a/tests/cpp-tests/CMakeLists.txt +++ b/tests/cpp-tests/CMakeLists.txt @@ -2,7 +2,6 @@ set(APP_NAME cpp-tests) if(WIN32) set(PLATFORM_SRC - Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp Classes/ExtensionsTest/NetworkTest/SocketIOTest.cpp proj.win32/main.cpp @@ -125,7 +124,6 @@ set(SAMPLE_SRC Classes/UITest/CocoStudioGUITest/CustomWidget/CustomReader.cpp Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp Classes/UITest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.cpp - Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.cpp Classes/NewRendererTest/NewRendererTest.cpp Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp Classes/FontTest/FontTest.cpp From fa33ab76fcd0f1409a5248cc67f5f60a8b6e760c Mon Sep 17 00:00:00 2001 From: andyque Date: Mon, 1 Sep 2014 18:23:45 +0800 Subject: [PATCH 52/74] remove UIEditBox test --- tests/cpp-tests/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/cpp-tests/CMakeLists.txt b/tests/cpp-tests/CMakeLists.txt index d1ca2a1ee1..815cfb7e43 100644 --- a/tests/cpp-tests/CMakeLists.txt +++ b/tests/cpp-tests/CMakeLists.txt @@ -81,7 +81,6 @@ set(SAMPLE_SRC Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp Classes/UITest/CocoStudioGUITest/UIScene.cpp Classes/UITest/CocoStudioGUITest/UIScale9SpriteTest.cpp - Classes/UITest/CocoStudioGUITest/UIEditBoxTest.cpp Classes/UITest/CocoStudioGUITest/UISceneManager.cpp Classes/UITest/CocoStudioGUITest/CocostudioParserTest/CocostudioParserJsonTest.cpp Classes/UITest/CocoStudioGUITest/CocostudioParserTest.cpp From 3e1053aa2aae76410a7aa66010e986f6080bb04b Mon Sep 17 00:00:00 2001 From: zhangbin Date: Tue, 2 Sep 2014 09:31:23 +0800 Subject: [PATCH 53/74] Update the reference of submodule cocos2d-console. --- tools/cocos2d-console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cocos2d-console b/tools/cocos2d-console index fb44ec8cf7..305f090f26 160000 --- a/tools/cocos2d-console +++ b/tools/cocos2d-console @@ -1 +1 @@ -Subproject commit fb44ec8cf77f6f51503987c3a1a0964580b5d88f +Subproject commit 305f090f260a0b8766c3fd09a3d4d2072910bfd9 From 6dc45f86e41b1eb254c1b814a09d929fac1bc665 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 2 Sep 2014 10:05:22 +0800 Subject: [PATCH 54/74] fix windows compile error --- cocos/2d/libcocos2d.vcxproj | 16 +- cocos/2d/libcocos2d.vcxproj.filters | 198 +++++++++--------- tests/cpp-tests/proj.win32/cpp-tests.vcxproj | 4 - .../proj.win32/cpp-tests.vcxproj.filters | 18 -- 4 files changed, 103 insertions(+), 133 deletions(-) diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index 9fdc34eb21..69e5434274 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -192,15 +192,11 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-l - - - - @@ -409,9 +405,12 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-l + + + @@ -516,16 +515,11 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-l - - - - - @@ -786,9 +780,13 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-l + + + + diff --git a/cocos/2d/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d.vcxproj.filters index 1a5d9f9b25..d918da6cc1 100644 --- a/cocos/2d/libcocos2d.vcxproj.filters +++ b/cocos/2d/libcocos2d.vcxproj.filters @@ -76,15 +76,9 @@ {b27aba95-51a2-413c-8570-0aff9adf2b6b} - - {220cf2ee-61b0-40cf-a88a-8627e4e609f1} - {a1f539bc-d5be-4224-a4d2-01c0b6f17d6e} - - {dc45cd54-4576-4401-87b7-a276f91a45bd} - {1de7fce7-0dee-4571-8fcd-43eb617aaf8b} @@ -211,6 +205,12 @@ {8579ed15-b266-4f80-818d-a3a9251c4248} + + {89eb6312-dc7f-4fda-b9b2-ab67c31ddd55} + + + {118d80ca-ccf2-480c-b87d-25220af23440} +
@@ -787,42 +787,6 @@ extension\AssetsManager - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - extension\GUI\CCScrollView @@ -832,15 +796,6 @@ extension\GUI\CCScrollView - - extension\GUI\CCEditBox - - - extension\GUI\CCEditBox - - - extension\GUI\CCEditBox - extension\physics_nodes @@ -1165,6 +1120,48 @@ cocosbuilder\Source Files + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + ui\UIWidgets\EditBox + @@ -1825,45 +1822,6 @@ extension\AssetsManager - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - - - extension\GUI\CCControlExtension - extension\GUI\CCScrollView @@ -1873,18 +1831,6 @@ extension\GUI\CCScrollView - - extension\GUI\CCEditBox - - - extension\GUI\CCEditBox - - - extension\GUI\CCEditBox - - - extension\GUI\CCEditBox - extension\physics_nodes @@ -2290,6 +2236,54 @@ cocosbuilder\Header Files + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + ui\UIWidgets\EditBox + diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index ed6a45c59c..8667753fd4 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -161,11 +161,9 @@ - - @@ -350,11 +348,9 @@ - - diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters index 7d7fc6199c..f0e771d566 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters @@ -202,9 +202,6 @@ {a4c2111f-cf9f-492c-884d-3de24715adce} - - {18a69e7e-8ca7-475a-bfbb-7296baab16ce} - {0ef55f53-411a-4661-b5d5-13930da52e68} @@ -220,9 +217,6 @@ {81ec2355-7efd-49e0-b6cb-b1bba23fbbc8} - - {3d73aa04-d66e-43d3-921f-b867a753c113} - {a6e7d28e-46a3-46c4-9735-b39e96f776f0} @@ -594,9 +588,6 @@ Classes\FileUtilsTest - - Classes\ExtensionsTest\EditBoxTest - Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest @@ -618,9 +609,6 @@ Classes - - Classes\ExtensionsTest\Scale9SpriteTest - Classes\ExtensionsTest\NetworkTest @@ -1310,9 +1298,6 @@ Classes\FileUtilsTest - - Classes\ExtensionsTest\EditBoxTest - Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest @@ -1337,9 +1322,6 @@ Classes - - Classes\ExtensionsTest\Scale9SpriteTest - Classes\ExtensionsTest\NetworkTest From 8f11dd7f8ba7e45c5d6a6020f1b50b9d4a005c00 Mon Sep 17 00:00:00 2001 From: kaishiqi Date: Tue, 2 Sep 2014 11:13:30 +0800 Subject: [PATCH 55/74] Update CCGLViewImpl.cpp fix GLViewImpl::onGLFWMouseScrollCallback forger transform cursor position. --- cocos/platform/desktop/CCGLViewImpl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cocos/platform/desktop/CCGLViewImpl.cpp b/cocos/platform/desktop/CCGLViewImpl.cpp index 517f99ee2f..90d1767062 100644 --- a/cocos/platform/desktop/CCGLViewImpl.cpp +++ b/cocos/platform/desktop/CCGLViewImpl.cpp @@ -650,8 +650,10 @@ void GLViewImpl::onGLFWMouseScrollCallback(GLFWwindow* window, double x, double { EventMouse event(EventMouse::MouseEventType::MOUSE_SCROLL); //Because OpenGL and cocos2d-x uses different Y axis, we need to convert the coordinate here + float cursorX = (_mouseX - _viewPortRect.origin.x) / _scaleX; + float cursorY = (_viewPortRect.origin.y + _viewPortRect.size.height - _mouseY) / _scaleY; event.setScrollData((float)x, -(float)y); - event.setCursorPosition(_mouseX, this->getViewPortRect().size.height - _mouseY); + event.setCursorPosition(cursorX, cursorY); Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); } From dffdef1118f2e59296ac2eb877e9f6d3e121317e Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 2 Sep 2014 11:21:11 +0800 Subject: [PATCH 56/74] fix transition scene stencil buffer --- cocos/2d/CCTransition.cpp | 4 ++-- cocos/2d/CCTransitionProgress.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/2d/CCTransition.cpp b/cocos/2d/CCTransition.cpp index ce8fccc533..97f734d6ae 100644 --- a/cocos/2d/CCTransition.cpp +++ b/cocos/2d/CCTransition.cpp @@ -1278,7 +1278,7 @@ void TransitionCrossFade::onEnter() LayerColor* layer = LayerColor::create(color); // create the first render texture for inScene - RenderTexture* inTexture = RenderTexture::create((int)size.width, (int)size.height); + RenderTexture* inTexture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888,GL_DEPTH24_STENCIL8); if (nullptr == inTexture) { @@ -1295,7 +1295,7 @@ void TransitionCrossFade::onEnter() inTexture->end(); // create the second render texture for outScene - RenderTexture* outTexture = RenderTexture::create((int)size.width, (int)size.height); + RenderTexture* outTexture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888,GL_DEPTH24_STENCIL8); outTexture->getSprite()->setAnchorPoint( Vec2(0.5f,0.5f) ); outTexture->setPosition(size.width/2, size.height/2); outTexture->setAnchorPoint( Vec2(0.5f,0.5f) ); diff --git a/cocos/2d/CCTransitionProgress.cpp b/cocos/2d/CCTransitionProgress.cpp index de0e7f8ce3..ddd0710af6 100644 --- a/cocos/2d/CCTransitionProgress.cpp +++ b/cocos/2d/CCTransitionProgress.cpp @@ -71,7 +71,7 @@ void TransitionProgress::onEnter() Size size = Director::getInstance()->getWinSize(); // create the second render texture for outScene - RenderTexture *texture = RenderTexture::create((int)size.width, (int)size.height); + RenderTexture *texture = RenderTexture::create((int)size.width, (int)size.height,Texture2D::PixelFormat::RGBA8888,GL_DEPTH24_STENCIL8); texture->getSprite()->setAnchorPoint(Vec2(0.5f,0.5f)); texture->setPosition(size.width/2, size.height/2); texture->setAnchorPoint(Vec2(0.5f,0.5f)); From a6ec956bc725a3f4e60e22123bfae428d317c30c Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 2 Sep 2014 13:43:14 +0800 Subject: [PATCH 57/74] [ci skip] --- AUTHORS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AUTHORS b/AUTHORS index 41ba3dac1a..ba8e4686d9 100644 --- a/AUTHORS +++ b/AUTHORS @@ -989,6 +989,9 @@ Developers: xiangxw Fixed the bug that Console::sendPrompt() will send extra `\0` + + kaishiqi + Fixed a but that cursor postion is wrong on desktop. Retired Core Developers: WenSheng Yang From dc15287ac3f24e59fcb688dde0a69031c0363f32 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Tue, 2 Sep 2014 05:45:07 +0000 Subject: [PATCH 58/74] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/Action.lua | 33 +- .../lua-bindings/auto/api/ActionCamera.lua | 21 +- .../lua-bindings/auto/api/ActionEase.lua | 10 +- .../lua-bindings/auto/api/ActionFadeFrame.lua | 12 +- .../lua-bindings/auto/api/ActionFrame.lua | 33 +- .../lua-bindings/auto/api/ActionInstant.lua | 9 +- .../lua-bindings/auto/api/ActionInterval.lua | 14 +- .../lua-bindings/auto/api/ActionManager.lua | 50 +- .../lua-bindings/auto/api/ActionManagerEx.lua | 21 +- .../lua-bindings/auto/api/ActionMoveFrame.lua | 12 +- .../lua-bindings/auto/api/ActionObject.lua | 47 +- .../auto/api/ActionRotationFrame.lua | 11 +- .../auto/api/ActionScaleFrame.lua | 18 +- .../lua-bindings/auto/api/ActionTimeline.lua | 51 +- .../auto/api/ActionTimelineCache.lua | 17 +- .../auto/api/ActionTimelineData.lua | 7 +- .../lua-bindings/auto/api/ActionTintFrame.lua | 12 +- .../lua-bindings/auto/api/ActionTween.lua | 17 +- .../auto/api/AnchorPointFrame.lua | 7 +- .../lua-bindings/auto/api/Animate.lua | 11 +- .../lua-bindings/auto/api/Animate3D.lua | 25 +- .../lua-bindings/auto/api/Animation.lua | 46 +- .../lua-bindings/auto/api/Animation3D.lua | 6 +- .../lua-bindings/auto/api/AnimationCache.lua | 30 +- .../lua-bindings/auto/api/AnimationData.lua | 9 +- .../lua-bindings/auto/api/AnimationFrame.lua | 20 +- .../lua-bindings/auto/api/Application.lua | 11 +- .../lua-bindings/auto/api/Armature.lua | 72 ++- .../auto/api/ArmatureAnimation.lua | 71 ++- .../lua-bindings/auto/api/ArmatureData.lua | 9 +- .../auto/api/ArmatureDataManager.lua | 77 ++- .../auto/api/ArmatureDisplayData.lua | 2 + .../lua-bindings/auto/api/AssetsManager.lua | 34 +- .../lua-bindings/auto/api/AtlasNode.lua | 39 +- .../lua-bindings/auto/api/AttachNode.lua | 10 +- .../lua-bindings/auto/api/BaseData.lua | 6 +- .../lua-bindings/auto/api/BatchNode.lua | 18 +- .../lua-bindings/auto/api/BezierBy.lua | 8 +- .../lua-bindings/auto/api/BezierTo.lua | 5 +- .../scripting/lua-bindings/auto/api/Blink.lua | 14 +- .../scripting/lua-bindings/auto/api/Bone.lua | 85 +++- .../lua-bindings/auto/api/BoneData.lua | 9 +- .../lua-bindings/auto/api/Button.lua | 99 +++- .../auto/api/CCBAnimationManager.lua | 87 +++- .../lua-bindings/auto/api/CCBReader.lua | 45 +- .../lua-bindings/auto/api/CallFunc.lua | 10 +- .../lua-bindings/auto/api/Camera.lua | 59 ++- .../auto/api/CardinalSplineBy.lua | 9 +- .../auto/api/CardinalSplineTo.lua | 21 +- .../lua-bindings/auto/api/CatmullRomBy.lua | 7 +- .../lua-bindings/auto/api/CatmullRomTo.lua | 7 +- .../lua-bindings/auto/api/CheckBox.lua | 77 ++- .../lua-bindings/auto/api/ClippingNode.lua | 26 +- .../lua-bindings/auto/api/ColorFrame.lua | 14 +- .../lua-bindings/auto/api/ComAttribute.lua | 49 +- .../lua-bindings/auto/api/ComAudio.lua | 63 ++- .../lua-bindings/auto/api/ComController.lua | 11 +- .../lua-bindings/auto/api/ComRender.lua | 8 +- .../lua-bindings/auto/api/Component.lua | 17 +- .../lua-bindings/auto/api/Console.lua | 10 +- .../lua-bindings/auto/api/ContourData.lua | 6 +- .../lua-bindings/auto/api/Control.lua | 36 +- .../lua-bindings/auto/api/ControlButton.lua | 133 ++++- .../auto/api/ControlColourPicker.lua | 31 +- .../auto/api/ControlHuePicker.lua | 39 +- .../auto/api/ControlPotentiometer.lua | 83 ++-- .../api/ControlSaturationBrightnessPicker.lua | 21 +- .../lua-bindings/auto/api/ControlSlider.lua | 59 ++- .../lua-bindings/auto/api/ControlStepper.lua | 72 ++- .../lua-bindings/auto/api/ControlSwitch.lua | 55 +- .../lua-bindings/auto/api/Controller.lua | 26 +- .../lua-bindings/auto/api/DelayTime.lua | 8 +- .../lua-bindings/auto/api/Director.lua | 151 +++++- .../lua-bindings/auto/api/DisplayData.lua | 8 +- .../lua-bindings/auto/api/DisplayManager.lua | 48 +- .../lua-bindings/auto/api/DrawNode.lua | 61 ++- .../lua-bindings/auto/api/EaseBackIn.lua | 8 +- .../lua-bindings/auto/api/EaseBackInOut.lua | 8 +- .../lua-bindings/auto/api/EaseBackOut.lua | 8 +- .../auto/api/EaseBezierAction.lua | 17 +- .../lua-bindings/auto/api/EaseBounce.lua | 2 + .../lua-bindings/auto/api/EaseBounceIn.lua | 8 +- .../lua-bindings/auto/api/EaseBounceInOut.lua | 8 +- .../lua-bindings/auto/api/EaseBounceOut.lua | 8 +- .../auto/api/EaseCircleActionIn.lua | 8 +- .../auto/api/EaseCircleActionInOut.lua | 8 +- .../auto/api/EaseCircleActionOut.lua | 8 +- .../auto/api/EaseCubicActionIn.lua | 8 +- .../auto/api/EaseCubicActionInOut.lua | 8 +- .../auto/api/EaseCubicActionOut.lua | 8 +- .../lua-bindings/auto/api/EaseElastic.lua | 6 +- .../lua-bindings/auto/api/EaseElasticIn.lua | 9 +- .../auto/api/EaseElasticInOut.lua | 9 +- .../lua-bindings/auto/api/EaseElasticOut.lua | 9 +- .../auto/api/EaseExponentialIn.lua | 8 +- .../auto/api/EaseExponentialInOut.lua | 8 +- .../auto/api/EaseExponentialOut.lua | 8 +- .../lua-bindings/auto/api/EaseIn.lua | 10 +- .../lua-bindings/auto/api/EaseInOut.lua | 10 +- .../lua-bindings/auto/api/EaseOut.lua | 10 +- .../auto/api/EaseQuadraticActionIn.lua | 8 +- .../auto/api/EaseQuadraticActionInOut.lua | 8 +- .../auto/api/EaseQuadraticActionOut.lua | 8 +- .../auto/api/EaseQuarticActionIn.lua | 8 +- .../auto/api/EaseQuarticActionInOut.lua | 8 +- .../auto/api/EaseQuarticActionOut.lua | 8 +- .../auto/api/EaseQuinticActionIn.lua | 8 +- .../auto/api/EaseQuinticActionInOut.lua | 8 +- .../auto/api/EaseQuinticActionOut.lua | 8 +- .../lua-bindings/auto/api/EaseRateAction.lua | 6 +- .../lua-bindings/auto/api/EaseSineIn.lua | 8 +- .../lua-bindings/auto/api/EaseSineInOut.lua | 8 +- .../lua-bindings/auto/api/EaseSineOut.lua | 8 +- .../lua-bindings/auto/api/EditBox.lua | 94 +++- .../scripting/lua-bindings/auto/api/Event.lua | 7 + .../lua-bindings/auto/api/EventController.lua | 14 +- .../lua-bindings/auto/api/EventCustom.lua | 4 +- .../lua-bindings/auto/api/EventDispatcher.lua | 62 ++- .../lua-bindings/auto/api/EventFocus.lua | 5 +- .../lua-bindings/auto/api/EventFrame.lua | 7 +- .../lua-bindings/auto/api/EventKeyboard.lua | 5 +- .../lua-bindings/auto/api/EventListener.lua | 10 +- .../auto/api/EventListenerAcceleration.lua | 2 + .../auto/api/EventListenerController.lua | 3 + .../auto/api/EventListenerCustom.lua | 2 + .../auto/api/EventListenerFocus.lua | 2 + .../auto/api/EventListenerKeyboard.lua | 2 + .../auto/api/EventListenerMouse.lua | 2 + .../auto/api/EventListenerPhysicsContact.lua | 3 + .../EventListenerPhysicsContactWithBodies.lua | 11 +- .../EventListenerPhysicsContactWithGroup.lua | 9 +- .../EventListenerPhysicsContactWithShapes.lua | 11 +- .../auto/api/EventListenerTouchAllAtOnce.lua | 2 + .../auto/api/EventListenerTouchOneByOne.lua | 6 +- .../lua-bindings/auto/api/EventMouse.lua | 28 +- .../lua-bindings/auto/api/EventTouch.lua | 5 +- .../lua-bindings/auto/api/FadeIn.lua | 11 +- .../lua-bindings/auto/api/FadeOut.lua | 11 +- .../lua-bindings/auto/api/FadeOutBLTiles.lua | 11 +- .../auto/api/FadeOutDownTiles.lua | 11 +- .../lua-bindings/auto/api/FadeOutTRTiles.lua | 25 +- .../lua-bindings/auto/api/FadeOutUpTiles.lua | 16 +- .../lua-bindings/auto/api/FadeTo.lua | 13 +- .../lua-bindings/auto/api/FileUtils.lua | 212 ++++++-- .../auto/api/FiniteTimeAction.lua | 6 +- .../scripting/lua-bindings/auto/api/FlipX.lua | 8 +- .../lua-bindings/auto/api/FlipX3D.lua | 7 +- .../scripting/lua-bindings/auto/api/FlipY.lua | 8 +- .../lua-bindings/auto/api/FlipY3D.lua | 7 +- .../lua-bindings/auto/api/Follow.lua | 17 +- .../scripting/lua-bindings/auto/api/Frame.lua | 16 +- .../lua-bindings/auto/api/FrameData.lua | 5 +- .../lua-bindings/auto/api/GLProgram.lua | 53 +- .../lua-bindings/auto/api/GLProgramCache.lua | 13 +- .../lua-bindings/auto/api/GLProgramState.lua | 47 +- .../lua-bindings/auto/api/GLView.lua | 76 ++- .../lua-bindings/auto/api/GLViewImpl.lua | 15 +- .../lua-bindings/auto/api/GUIReader.lua | 15 +- .../lua-bindings/auto/api/Grid3D.lua | 10 +- .../lua-bindings/auto/api/Grid3DAction.lua | 2 + .../lua-bindings/auto/api/GridAction.lua | 6 +- .../lua-bindings/auto/api/GridBase.lua | 40 +- .../scripting/lua-bindings/auto/api/HBox.lua | 1 + .../lua-bindings/auto/api/Helper.lua | 30 +- .../scripting/lua-bindings/auto/api/Hide.lua | 6 +- .../scripting/lua-bindings/auto/api/Image.lua | 28 +- .../lua-bindings/auto/api/ImageView.lua | 31 +- .../auto/api/InnerActionFrame.lua | 11 +- .../lua-bindings/auto/api/JumpBy.lua | 17 +- .../lua-bindings/auto/api/JumpTiles3D.lua | 21 +- .../lua-bindings/auto/api/JumpTo.lua | 14 +- .../scripting/lua-bindings/auto/api/Label.lua | 195 +++++--- .../lua-bindings/auto/api/LabelAtlas.lua | 26 +- .../scripting/lua-bindings/auto/api/Layer.lua | 2 + .../lua-bindings/auto/api/LayerColor.lua | 27 +- .../lua-bindings/auto/api/LayerGradient.lua | 33 +- .../lua-bindings/auto/api/LayerMultiplex.lua | 10 +- .../lua-bindings/auto/api/Layout.lua | 106 +++- .../lua-bindings/auto/api/LayoutParameter.lua | 11 +- .../lua-bindings/auto/api/Lens3D.lua | 24 +- .../auto/api/LinearLayoutParameter.lua | 15 +- .../lua-bindings/auto/api/Liquid.lua | 21 +- .../lua-bindings/auto/api/ListView.lua | 72 ++- .../lua-bindings/auto/api/LoadingBar.lua | 41 +- .../scripting/lua-bindings/auto/api/Menu.lua | 30 +- .../lua-bindings/auto/api/MenuItem.lua | 10 +- .../lua-bindings/auto/api/MenuItemFont.lua | 24 +- .../lua-bindings/auto/api/MenuItemImage.lua | 9 +- .../lua-bindings/auto/api/MenuItemLabel.lua | 15 +- .../lua-bindings/auto/api/MenuItemSprite.lua | 17 +- .../lua-bindings/auto/api/MenuItemToggle.lua | 17 +- .../scripting/lua-bindings/auto/api/Mesh.lua | 28 +- .../lua-bindings/auto/api/MotionStreak.lua | 50 +- .../lua-bindings/auto/api/MoveBy.lua | 13 +- .../lua-bindings/auto/api/MoveTo.lua | 9 +- .../auto/api/MovementBoneData.lua | 9 +- .../lua-bindings/auto/api/MovementData.lua | 8 +- .../scripting/lua-bindings/auto/api/Node.lua | 470 +++++++++++++++--- .../lua-bindings/auto/api/NodeGrid.lua | 13 +- .../lua-bindings/auto/api/NodeReader.lua | 21 +- .../lua-bindings/auto/api/OrbitCamera.lua | 22 +- .../lua-bindings/auto/api/PageTurn3D.lua | 9 +- .../lua-bindings/auto/api/PageView.lua | 62 ++- .../lua-bindings/auto/api/ParallaxNode.lua | 29 +- .../auto/api/ParticleBatchNode.lua | 60 ++- .../auto/api/ParticleDisplayData.lua | 2 + .../auto/api/ParticleExplosion.lua | 4 +- .../lua-bindings/auto/api/ParticleFire.lua | 4 +- .../auto/api/ParticleFireworks.lua | 4 +- .../lua-bindings/auto/api/ParticleFlower.lua | 4 +- .../lua-bindings/auto/api/ParticleGalaxy.lua | 4 +- .../lua-bindings/auto/api/ParticleMeteor.lua | 4 +- .../lua-bindings/auto/api/ParticleRain.lua | 4 +- .../lua-bindings/auto/api/ParticleSmoke.lua | 4 +- .../lua-bindings/auto/api/ParticleSnow.lua | 4 +- .../lua-bindings/auto/api/ParticleSpiral.lua | 4 +- .../lua-bindings/auto/api/ParticleSun.lua | 4 +- .../lua-bindings/auto/api/ParticleSystem.lua | 205 ++++++-- .../auto/api/ParticleSystemQuad.lua | 22 +- .../lua-bindings/auto/api/PhysicsBody.lua | 190 +++++-- .../lua-bindings/auto/api/PhysicsContact.lua | 5 + .../auto/api/PhysicsContactPostSolve.lua | 3 + .../auto/api/PhysicsContactPreSolve.lua | 13 +- .../lua-bindings/auto/api/PhysicsJoint.lua | 23 +- .../auto/api/PhysicsJointDistance.lua | 13 +- .../auto/api/PhysicsJointFixed.lua | 7 +- .../auto/api/PhysicsJointGear.lua | 17 +- .../auto/api/PhysicsJointGroove.lua | 23 +- .../auto/api/PhysicsJointLimit.lua | 28 +- .../auto/api/PhysicsJointMotor.lua | 11 +- .../lua-bindings/auto/api/PhysicsJointPin.lua | 7 +- .../auto/api/PhysicsJointRatchet.lua | 21 +- .../auto/api/PhysicsJointRotaryLimit.lua | 16 +- .../auto/api/PhysicsJointRotarySpring.lua | 21 +- .../auto/api/PhysicsJointSpring.lua | 33 +- .../lua-bindings/auto/api/PhysicsShape.lua | 61 ++- .../lua-bindings/auto/api/PhysicsShapeBox.lua | 7 +- .../auto/api/PhysicsShapeCircle.lua | 20 +- .../auto/api/PhysicsShapeEdgeBox.lua | 8 +- .../auto/api/PhysicsShapeEdgeChain.lua | 2 + .../auto/api/PhysicsShapeEdgePolygon.lua | 2 + .../auto/api/PhysicsShapeEdgeSegment.lua | 12 +- .../auto/api/PhysicsShapePolygon.lua | 6 +- .../lua-bindings/auto/api/PhysicsWorld.lua | 52 +- .../scripting/lua-bindings/auto/api/Place.lua | 8 +- .../lua-bindings/auto/api/PositionFrame.lua | 18 +- .../lua-bindings/auto/api/ProgressFromTo.lua | 15 +- .../lua-bindings/auto/api/ProgressTimer.lua | 48 +- .../lua-bindings/auto/api/ProgressTo.lua | 13 +- .../lua-bindings/auto/api/ProtectedNode.lua | 58 ++- cocos/scripting/lua-bindings/auto/api/Ref.lua | 13 + .../lua-bindings/auto/api/RelativeBox.lua | 1 + .../auto/api/RelativeLayoutParameter.lua | 27 +- .../lua-bindings/auto/api/RemoveSelf.lua | 6 +- .../lua-bindings/auto/api/RenderTexture.lua | 97 ++-- .../lua-bindings/auto/api/Repeat.lua | 19 +- .../lua-bindings/auto/api/RepeatForever.lua | 16 +- .../lua-bindings/auto/api/ReuseGrid.lua | 8 +- .../lua-bindings/auto/api/RichElement.lua | 8 +- .../auto/api/RichElementCustomNode.lua | 19 +- .../auto/api/RichElementImage.lua | 19 +- .../lua-bindings/auto/api/RichElementText.lua | 27 +- .../lua-bindings/auto/api/RichText.lua | 24 +- .../lua-bindings/auto/api/Ripple3D.lua | 29 +- .../lua-bindings/auto/api/RotateBy.lua | 14 +- .../lua-bindings/auto/api/RotateTo.lua | 14 +- .../lua-bindings/auto/api/RotationFrame.lua | 10 +- .../auto/api/RotationSkewFrame.lua | 6 +- .../lua-bindings/auto/api/Scale9Sprite.lua | 103 ++-- .../lua-bindings/auto/api/ScaleBy.lua | 13 +- .../lua-bindings/auto/api/ScaleFrame.lua | 17 +- .../lua-bindings/auto/api/ScaleTo.lua | 16 +- .../scripting/lua-bindings/auto/api/Scene.lua | 15 +- .../lua-bindings/auto/api/SceneReader.lua | 16 +- .../lua-bindings/auto/api/Scheduler.lua | 10 +- .../lua-bindings/auto/api/ScrollView.lua | 150 ++++-- .../lua-bindings/auto/api/Sequence.lua | 9 +- .../lua-bindings/auto/api/Shaky3D.lua | 13 +- .../lua-bindings/auto/api/ShakyTiles3D.lua | 13 +- .../auto/api/ShatteredTiles3D.lua | 13 +- .../scripting/lua-bindings/auto/api/Show.lua | 6 +- .../lua-bindings/auto/api/ShuffleTiles.lua | 17 +- .../auto/api/SimpleAudioEngine.lua | 97 +++- .../lua-bindings/auto/api/Skeleton.lua | 18 +- .../lua-bindings/auto/api/Skeleton3D.lua | 15 +- .../auto/api/SkeletonAnimation.lua | 9 +- .../lua-bindings/auto/api/SkewBy.lua | 12 +- .../lua-bindings/auto/api/SkewFrame.lua | 14 +- .../lua-bindings/auto/api/SkewTo.lua | 15 +- .../scripting/lua-bindings/auto/api/Skin.lua | 24 +- .../lua-bindings/auto/api/Slider.lua | 88 +++- .../scripting/lua-bindings/auto/api/Spawn.lua | 9 +- .../scripting/lua-bindings/auto/api/Speed.lua | 23 +- .../lua-bindings/auto/api/SplitCols.lua | 12 +- .../lua-bindings/auto/api/SplitRows.lua | 12 +- .../lua-bindings/auto/api/Sprite.lua | 160 ++++-- .../lua-bindings/auto/api/Sprite3D.lua | 37 +- .../lua-bindings/auto/api/SpriteBatchNode.lua | 86 ++-- .../auto/api/SpriteDisplayData.lua | 5 +- .../lua-bindings/auto/api/SpriteFrame.lua | 47 +- .../auto/api/SpriteFrameCache.lua | 54 +- .../lua-bindings/auto/api/StopGrid.lua | 6 +- .../lua-bindings/auto/api/TMXLayer.lua | 66 ++- .../lua-bindings/auto/api/TMXLayerInfo.lua | 5 +- .../lua-bindings/auto/api/TMXMapInfo.lua | 75 ++- .../lua-bindings/auto/api/TMXObjectGroup.lua | 22 +- .../lua-bindings/auto/api/TMXTiledMap.lua | 40 +- .../lua-bindings/auto/api/TMXTilesetInfo.lua | 4 +- .../lua-bindings/auto/api/TableView.lua | 55 +- .../lua-bindings/auto/api/TableViewCell.lua | 7 +- .../lua-bindings/auto/api/TargetedAction.lua | 17 +- .../scripting/lua-bindings/auto/api/Text.lua | 67 ++- .../lua-bindings/auto/api/TextAtlas.lua | 35 +- .../lua-bindings/auto/api/TextBMFont.lua | 20 +- .../lua-bindings/auto/api/TextField.lua | 89 +++- .../lua-bindings/auto/api/Texture2D.lua | 80 ++- .../lua-bindings/auto/api/TextureCache.lua | 40 +- .../lua-bindings/auto/api/TextureData.lua | 9 +- .../lua-bindings/auto/api/TextureFrame.lua | 8 +- .../lua-bindings/auto/api/TileMapAtlas.lua | 32 +- .../lua-bindings/auto/api/TiledGrid3D.lua | 10 +- .../auto/api/TiledGrid3DAction.lua | 2 + .../lua-bindings/auto/api/Timeline.lua | 25 +- .../scripting/lua-bindings/auto/api/Timer.lua | 16 +- .../lua-bindings/auto/api/TintBy.lua | 17 +- .../lua-bindings/auto/api/TintTo.lua | 17 +- .../auto/api/ToggleVisibility.lua | 6 +- .../scripting/lua-bindings/auto/api/Touch.lua | 17 +- .../auto/api/TransitionCrossFade.lua | 9 +- .../auto/api/TransitionEaseScene.lua | 4 +- .../lua-bindings/auto/api/TransitionFade.lua | 4 +- .../auto/api/TransitionFadeBL.lua | 4 +- .../auto/api/TransitionFadeDown.lua | 4 +- .../auto/api/TransitionFadeTR.lua | 12 +- .../auto/api/TransitionFadeUp.lua | 4 +- .../auto/api/TransitionFlipAngular.lua | 6 +- .../lua-bindings/auto/api/TransitionFlipX.lua | 6 +- .../lua-bindings/auto/api/TransitionFlipY.lua | 6 +- .../auto/api/TransitionJumpZoom.lua | 3 +- .../auto/api/TransitionMoveInB.lua | 3 +- .../auto/api/TransitionMoveInL.lua | 7 +- .../auto/api/TransitionMoveInR.lua | 3 +- .../auto/api/TransitionMoveInT.lua | 3 +- .../auto/api/TransitionPageTurn.lua | 22 +- .../auto/api/TransitionProgress.lua | 3 +- .../auto/api/TransitionProgressHorizontal.lua | 3 +- .../auto/api/TransitionProgressInOut.lua | 3 +- .../auto/api/TransitionProgressOutIn.lua | 3 +- .../auto/api/TransitionProgressRadialCCW.lua | 3 +- .../auto/api/TransitionProgressRadialCW.lua | 3 +- .../auto/api/TransitionProgressVertical.lua | 3 +- .../auto/api/TransitionRotoZoom.lua | 3 +- .../lua-bindings/auto/api/TransitionScene.lua | 11 +- .../auto/api/TransitionSceneOriented.lua | 3 +- .../auto/api/TransitionShrinkGrow.lua | 6 +- .../auto/api/TransitionSlideInB.lua | 4 +- .../auto/api/TransitionSlideInL.lua | 7 +- .../auto/api/TransitionSlideInR.lua | 4 +- .../auto/api/TransitionSlideInT.lua | 4 +- .../auto/api/TransitionSplitCols.lua | 12 +- .../auto/api/TransitionSplitRows.lua | 4 +- .../auto/api/TransitionTurnOffTiles.lua | 11 +- .../auto/api/TransitionZoomFlipAngular.lua | 6 +- .../auto/api/TransitionZoomFlipX.lua | 6 +- .../auto/api/TransitionZoomFlipY.lua | 6 +- .../lua-bindings/auto/api/TurnOffTiles.lua | 19 +- .../scripting/lua-bindings/auto/api/Tween.lua | 39 +- .../scripting/lua-bindings/auto/api/Twirl.lua | 27 +- .../lua-bindings/auto/api/UserDefault.lua | 55 +- .../scripting/lua-bindings/auto/api/VBox.lua | 1 + .../lua-bindings/auto/api/VideoPlayer.lua | 36 +- .../lua-bindings/auto/api/VisibleFrame.lua | 7 +- .../scripting/lua-bindings/auto/api/Waves.lua | 25 +- .../lua-bindings/auto/api/Waves3D.lua | 21 +- .../lua-bindings/auto/api/WavesTiles3D.lua | 21 +- .../lua-bindings/auto/api/Widget.lua | 180 +++++-- .../lua-bindings/auto/api/ZOrderFrame.lua | 7 +- .../auto/lua_cocos2dx_3d_auto.cpp | 6 +- .../lua-bindings/auto/lua_cocos2dx_auto.cpp | 3 +- .../auto/lua_cocos2dx_spine_auto.cpp | 3 +- 380 files changed, 6963 insertions(+), 2424 deletions(-) diff --git a/cocos/scripting/lua-bindings/auto/api/Action.lua b/cocos/scripting/lua-bindings/auto/api/Action.lua index 9502801e63..6d28c6c257 100644 --- a/cocos/scripting/lua-bindings/auto/api/Action.lua +++ b/cocos/scripting/lua-bindings/auto/api/Action.lua @@ -5,65 +5,86 @@ -- @parent_module cc -------------------------------- +-- called before the action start. It will also set the target. -- @function [parent=#Action] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- Set the original target, since target can be nil.
+-- Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method.
+-- The target is 'assigned', it is not 'retained'.
+-- since v0.8.2 -- @function [parent=#Action] setOriginalTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node originalTarget -------------------------------- +-- returns a clone of action -- @function [parent=#Action] clone -- @param self -- @return Action#Action ret (return value: cc.Action) -------------------------------- +-- -- @function [parent=#Action] getOriginalTarget -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- called after the action has finished. It will set the 'target' to nil.
+-- IMPORTANT: You should never call "[action stop]" manually. Instead, use: "target->stopAction(action);" -- @function [parent=#Action] stop -- @param self -------------------------------- +-- called once per frame. time a value between 0 and 1
+-- For example:
+-- - 0 means that the action just started
+-- - 0.5 means that the action is in the middle
+-- - 1 means that the action is over -- @function [parent=#Action] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#Action] getTarget -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- called every frame with it's delta time. DON'T override unless you know what you are doing. -- @function [parent=#Action] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Action] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- -- @function [parent=#Action] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- The action will modify the target properties. -- @function [parent=#Action] setTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- return true if the action has finished -- @function [parent=#Action] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- returns a new action that performs the exactly the reverse action -- @function [parent=#Action] reverse -- @param self -- @return Action#Action ret (return value: cc.Action) diff --git a/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua b/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua index 00beabfed2..673fbf6160 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua @@ -9,51 +9,60 @@ -- @overload self, vec3_table -- @function [parent=#ActionCamera] setEye -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y +-- @param #float z -------------------------------- +-- -- @function [parent=#ActionCamera] getEye -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- +-- -- @function [parent=#ActionCamera] setUp -- @param self --- @param #vec3_table vec3 +-- @param #vec3_table up -------------------------------- +-- -- @function [parent=#ActionCamera] getCenter -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- +-- -- @function [parent=#ActionCamera] setCenter -- @param self --- @param #vec3_table vec3 +-- @param #vec3_table center -------------------------------- +-- -- @function [parent=#ActionCamera] getUp -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- +-- -- @function [parent=#ActionCamera] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ActionCamera] clone -- @param self -- @return ActionCamera#ActionCamera ret (return value: cc.ActionCamera) -------------------------------- +-- -- @function [parent=#ActionCamera] reverse -- @param self -- @return ActionCamera#ActionCamera ret (return value: cc.ActionCamera) -------------------------------- +-- js ctor -- @function [parent=#ActionCamera] ActionCamera -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionEase.lua b/cocos/scripting/lua-bindings/auto/api/ActionEase.lua index b5b1ea0bd5..88463b5be3 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionEase.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionEase.lua @@ -5,32 +5,38 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ActionEase] getInnerAction -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#ActionEase] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ActionEase] clone -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) -------------------------------- +-- -- @function [parent=#ActionEase] stop -- @param self -------------------------------- +-- -- @function [parent=#ActionEase] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) -------------------------------- +-- -- @function [parent=#ActionEase] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua index f713688bf5..7727f649b5 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua @@ -5,22 +5,30 @@ -- @parent_module ccs -------------------------------- +-- Gets the fade action opacity.
+-- return the fade action opacity. -- @function [parent=#ActionFadeFrame] getOpacity -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Gets the ActionInterval of ActionFrame.
+-- parame duration the duration time of ActionFrame
+-- return ActionInterval -- @function [parent=#ActionFadeFrame] getAction -- @param self --- @param #float float +-- @param #float duration -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- Changes the fade action opacity.
+-- param opacity the fade action opacity -- @function [parent=#ActionFadeFrame] setOpacity -- @param self --- @param #int int +-- @param #int opacity -------------------------------- +-- Default constructor -- @function [parent=#ActionFadeFrame] ActionFadeFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua index 1be2073a67..0a2637cb6c 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua @@ -9,56 +9,75 @@ -- @overload self, float -- @function [parent=#ActionFrame] getAction -- @param self --- @param #float float --- @param #ccs.ActionFrame actionframe +-- @param #float duration +-- @param #ccs.ActionFrame srcFrame -- @return ActionInterval#ActionInterval ret (retunr value: cc.ActionInterval) -------------------------------- +-- Gets the type of action frame
+-- return the type of action frame -- @function [parent=#ActionFrame] getFrameType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Changes the time of action frame
+-- param fTime the time of action frame -- @function [parent=#ActionFrame] setFrameTime -- @param self --- @param #float float +-- @param #float fTime -------------------------------- +-- Changes the easing type.
+-- param easingType the easing type. -- @function [parent=#ActionFrame] setEasingType -- @param self --- @param #int int +-- @param #int easingType -------------------------------- +-- Gets the time of action frame
+-- return fTime the time of action frame -- @function [parent=#ActionFrame] getFrameTime -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets the index of action frame
+-- return the index of action frame -- @function [parent=#ActionFrame] getFrameIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Changes the type of action frame
+-- param frameType the type of action frame -- @function [parent=#ActionFrame] setFrameType -- @param self --- @param #int int +-- @param #int frameType -------------------------------- +-- Changes the index of action frame
+-- param index the index of action frame -- @function [parent=#ActionFrame] setFrameIndex -- @param self --- @param #int int +-- @param #int index -------------------------------- +-- Set the ActionInterval easing parameter.
+-- parame parameter the parameter for frame ease -- @function [parent=#ActionFrame] setEasingParameter -- @param self --- @param #array_table array +-- @param #array_table parameter -------------------------------- +-- Gets the easing type.
+-- return the easing type. -- @function [parent=#ActionFrame] getEasingType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Default constructor -- @function [parent=#ActionFrame] ActionFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua b/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua index 0d0fb165a6..0a539e808d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionInstant.lua @@ -5,28 +5,33 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ActionInstant] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#ActionInstant] clone -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) -------------------------------- +-- -- @function [parent=#ActionInstant] reverse -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) -------------------------------- +-- -- @function [parent=#ActionInstant] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ActionInstant] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua b/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua index a4cfe55038..e0351a5712 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionInterval.lua @@ -5,41 +5,49 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ActionInterval] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ActionInterval] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amp -------------------------------- +-- how many seconds had elapsed since the actions started to run. -- @function [parent=#ActionInterval] getElapsed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ActionInterval] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ActionInterval] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#ActionInterval] clone -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#ActionInterval] reverse -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#ActionInterval] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/ActionManager.lua b/cocos/scripting/lua-bindings/auto/api/ActionManager.lua index 8597ac46f3..9349a3e536 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionManager.lua @@ -5,77 +5,99 @@ -- @parent_module cc -------------------------------- +-- Gets an action given its tag an a target
+-- return the Action the with the given tag -- @function [parent=#ActionManager] getActionByTag -- @param self --- @param #int int --- @param #cc.Node node +-- @param #int tag +-- @param #cc.Node target -- @return Action#Action ret (return value: cc.Action) -------------------------------- +-- Removes an action given its tag and the target -- @function [parent=#ActionManager] removeActionByTag -- @param self --- @param #int int --- @param #cc.Node node +-- @param #int tag +-- @param #cc.Node target -------------------------------- +-- Removes all actions from all the targets. -- @function [parent=#ActionManager] removeAllActions -- @param self -------------------------------- +-- Adds an action with a target.
+-- If the target is already present, then the action will be added to the existing target.
+-- If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target.
+-- When the target is paused, the queued actions won't be 'ticked'. -- @function [parent=#ActionManager] addAction -- @param self -- @param #cc.Action action --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node target +-- @param #bool paused -------------------------------- +-- Resumes the target. All queued actions will be resumed. -- @function [parent=#ActionManager] resumeTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ActionManager] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- Pauses the target: all running actions and newly added actions will be paused. -- @function [parent=#ActionManager] pauseTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- Returns the numbers of actions that are running in a certain target.
+-- Composable actions are counted as 1 action. Example:
+-- - If you are running 1 Sequence of 7 actions, it will return 1.
+-- - If you are running 7 Sequences of 2 actions, it will return 7. -- @function [parent=#ActionManager] getNumberOfRunningActionsInTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -- @return long#long ret (return value: long) -------------------------------- +-- Removes all actions from a certain target.
+-- All the actions that belongs to the target will be removed. -- @function [parent=#ActionManager] removeAllActionsFromTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- Resume a set of targets (convenience function to reverse a pauseAllRunningActions call) -- @function [parent=#ActionManager] resumeTargets -- @param self --- @param #array_table array +-- @param #array_table targetsToResume -------------------------------- +-- Removes an action given an action reference. -- @function [parent=#ActionManager] removeAction -- @param self -- @param #cc.Action action -------------------------------- +-- Removes all actions given its tag and the target -- @function [parent=#ActionManager] removeAllActionsByTag -- @param self --- @param #int int --- @param #cc.Node node +-- @param #int tag +-- @param #cc.Node target -------------------------------- +-- Pauses all running actions, returning a list of targets whose actions were paused. -- @function [parent=#ActionManager] pauseAllRunningActions -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- js ctor -- @function [parent=#ActionManager] ActionManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua b/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua index 9d6a8e14b4..0be42e90d1 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua @@ -9,27 +9,38 @@ -- @overload self, char, char -- @function [parent=#ActionManagerEx] playActionByName -- @param self --- @param #char char --- @param #char char --- @param #cc.CallFunc callfunc +-- @param #char jsonName +-- @param #char actionName +-- @param #cc.CallFunc func -- @return ActionObject#ActionObject ret (retunr value: ccs.ActionObject) -------------------------------- +-- Gets an ActionObject with a name.
+-- param jsonName UI file name
+-- param actionName action name in the UI file.
+-- return ActionObject which named as the param name -- @function [parent=#ActionManagerEx] getActionByName -- @param self --- @param #char char --- @param #char char +-- @param #char jsonName +-- @param #char actionName -- @return ActionObject#ActionObject ret (return value: ccs.ActionObject) -------------------------------- +-- Release all actions. -- @function [parent=#ActionManagerEx] releaseActions -- @param self -------------------------------- +-- Purges ActionManager point.
+-- js purge
+-- lua destroyActionManager -- @function [parent=#ActionManagerEx] destroyInstance -- @param self -------------------------------- +-- Gets the static instance of ActionManager.
+-- js getInstance
+-- lua getInstance -- @function [parent=#ActionManagerEx] getInstance -- @param self -- @return ActionManagerEx#ActionManagerEx ret (return value: ccs.ActionManagerEx) diff --git a/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua index 3afb25896a..64a695be06 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua @@ -5,22 +5,30 @@ -- @parent_module ccs -------------------------------- +-- Changes the move action position.
+-- param the move action position. -- @function [parent=#ActionMoveFrame] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- Gets the ActionInterval of ActionFrame.
+-- parame duration the duration time of ActionFrame
+-- return ActionInterval -- @function [parent=#ActionMoveFrame] getAction -- @param self --- @param #float float +-- @param #float duration -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- Gets the move action position.
+-- return the move action position. -- @function [parent=#ActionMoveFrame] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Default constructor -- @function [parent=#ActionMoveFrame] ActionMoveFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionObject.lua b/cocos/scripting/lua-bindings/auto/api/ActionObject.lua index 93f6dec2ec..cd3a1a5bcf 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionObject.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionObject.lua @@ -5,35 +5,47 @@ -- @parent_module ccs -------------------------------- +-- Sets the current time of frame.
+-- param fTime the current time of frame -- @function [parent=#ActionObject] setCurrentTime -- @param self --- @param #float float +-- @param #float fTime -------------------------------- +-- Pause the action. -- @function [parent=#ActionObject] pause -- @param self -------------------------------- +-- Sets name for object
+-- param name name of object -- @function [parent=#ActionObject] setName -- @param self --- @param #char char +-- @param #char name -------------------------------- +-- Sets the time interval of frame.
+-- param fTime the time interval of frame -- @function [parent=#ActionObject] setUnitTime -- @param self --- @param #float float +-- @param #float fTime -------------------------------- +-- Gets the total time of frame.
+-- return the total time of frame -- @function [parent=#ActionObject] getTotalTime -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets name of object
+-- return name of object -- @function [parent=#ActionObject] getName -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- Stop the action. -- @function [parent=#ActionObject] stop -- @param self @@ -42,54 +54,71 @@ -- @overload self -- @function [parent=#ActionObject] play -- @param self --- @param #cc.CallFunc callfunc +-- @param #cc.CallFunc func -------------------------------- +-- Gets the current time of frame.
+-- return the current time of frame -- @function [parent=#ActionObject] getCurrentTime -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Removes a ActionNode which play the action.
+-- param node the ActionNode which play the action -- @function [parent=#ActionObject] removeActionNode -- @param self --- @param #ccs.ActionNode actionnode +-- @param #ccs.ActionNode node -------------------------------- +-- Gets if the action will loop play.
+-- return that if the action will loop play -- @function [parent=#ActionObject] getLoop -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Adds a ActionNode to play the action.
+-- param node the ActionNode which will play the action -- @function [parent=#ActionObject] addActionNode -- @param self --- @param #ccs.ActionNode actionnode +-- @param #ccs.ActionNode node -------------------------------- +-- Gets the time interval of frame.
+-- return the time interval of frame -- @function [parent=#ActionObject] getUnitTime -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Return if the action is playing.
+-- return true if the action is playing, false the otherwise -- @function [parent=#ActionObject] isPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ActionObject] updateToFrameByTime -- @param self --- @param #float float +-- @param #float fTime -------------------------------- +-- Sets if the action will loop play.
+-- param bLoop that if the action will loop play -- @function [parent=#ActionObject] setLoop -- @param self --- @param #bool bool +-- @param #bool bLoop -------------------------------- +-- -- @function [parent=#ActionObject] simulationActionUpdate -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- Default constructor -- @function [parent=#ActionObject] ActionObject -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua index 267c36c133..3e1cf8fb83 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua @@ -5,25 +5,30 @@ -- @parent_module ccs -------------------------------- +-- Changes rotate action rotation.
+-- param rotation rotate action rotation. -- @function [parent=#ActionRotationFrame] setRotation -- @param self --- @param #float float +-- @param #float rotation -------------------------------- -- @overload self, float, ccs.ActionFrame -- @overload self, float -- @function [parent=#ActionRotationFrame] getAction -- @param self --- @param #float float --- @param #ccs.ActionFrame actionframe +-- @param #float duration +-- @param #ccs.ActionFrame srcFrame -- @return ActionInterval#ActionInterval ret (retunr value: cc.ActionInterval) -------------------------------- +-- Gets the rotate action rotation.
+-- return the rotate action rotation. -- @function [parent=#ActionRotationFrame] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Default constructor -- @function [parent=#ActionRotationFrame] ActionRotationFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua index 99c0180572..f9f34cb2de 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua @@ -5,32 +5,44 @@ -- @parent_module ccs -------------------------------- +-- Changes the scale action scaleY.
+-- param rotation the scale action scaleY. -- @function [parent=#ActionScaleFrame] setScaleY -- @param self --- @param #float float +-- @param #float scaleY -------------------------------- +-- Changes the scale action scaleX.
+-- param the scale action scaleX. -- @function [parent=#ActionScaleFrame] setScaleX -- @param self --- @param #float float +-- @param #float scaleX -------------------------------- +-- Gets the scale action scaleY.
+-- return the the scale action scaleY. -- @function [parent=#ActionScaleFrame] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets the scale action scaleX.
+-- return the scale action scaleX. -- @function [parent=#ActionScaleFrame] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets the ActionInterval of ActionFrame.
+-- parame duration the duration time of ActionFrame
+-- return ActionInterval -- @function [parent=#ActionScaleFrame] getAction -- @param self --- @param #float float +-- @param #float duration -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- Default constructor -- @function [parent=#ActionScaleFrame] ActionScaleFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua b/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua index 5cc4299820..b04785700d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua @@ -5,79 +5,98 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ActionTimeline] getTimelines -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Get current frame. -- @function [parent=#ActionTimeline] getCurrentFrame -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Start frame index of this action -- @function [parent=#ActionTimeline] getStartFrame -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Pause the animation. -- @function [parent=#ActionTimeline] pause -- @param self -------------------------------- +-- Set ActionTimeline's frame event callback function -- @function [parent=#ActionTimeline] setFrameEventCallFunc -- @param self --- @param #function func +-- @param #function listener -------------------------------- +-- Resume the animation. -- @function [parent=#ActionTimeline] resume -- @param self -------------------------------- +-- -- @function [parent=#ActionTimeline] getDuration -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- add Timeline to ActionTimeline -- @function [parent=#ActionTimeline] addTimeline -- @param self -- @param #ccs.Timeline timeline -------------------------------- +-- End frame of this action.
+-- When action play to this frame, if action is not loop, then it will stop,
+-- or it will play from start frame again. -- @function [parent=#ActionTimeline] getEndFrame -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Set current frame index, this will cause action plays to this frame. -- @function [parent=#ActionTimeline] setCurrentFrame -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- Set the animation speed, this will speed up or slow down the speed. -- @function [parent=#ActionTimeline] setTimeSpeed -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- -- @function [parent=#ActionTimeline] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- duration of the whole action -- @function [parent=#ActionTimeline] setDuration -- @param self --- @param #int int +-- @param #int duration -------------------------------- +-- Get current animation speed. -- @function [parent=#ActionTimeline] getTimeSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Goto the specified frame index, and pause at this index.
+-- param startIndex The animation will pause at this index. -- @function [parent=#ActionTimeline] gotoFrameAndPause -- @param self --- @param #int int +-- @param #int startIndex -------------------------------- +-- Whether or not Action is playing. -- @function [parent=#ActionTimeline] isPlaying -- @param self -- @return bool#bool ret (return value: bool) @@ -89,51 +108,61 @@ -- @overload self, int, int, int, bool -- @function [parent=#ActionTimeline] gotoFrameAndPlay -- @param self --- @param #int int --- @param #int int --- @param #int int --- @param #bool bool +-- @param #int startIndex +-- @param #int endIndex +-- @param #int currentFrameIndex +-- @param #bool loop -------------------------------- +-- -- @function [parent=#ActionTimeline] removeTimeline -- @param self -- @param #ccs.Timeline timeline -------------------------------- +-- -- @function [parent=#ActionTimeline] clearFrameEventCallFunc -- @param self -------------------------------- +-- -- @function [parent=#ActionTimeline] create -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- -- @function [parent=#ActionTimeline] step -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- -- @function [parent=#ActionTimeline] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- Returns a clone of ActionTimeline -- @function [parent=#ActionTimeline] clone -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- Returns a reverse of ActionTimeline.
+-- Not implement yet. -- @function [parent=#ActionTimeline] reverse -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- -- @function [parent=#ActionTimeline] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ActionTimeline] ActionTimeline -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua b/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua index b983d8bdcf..77e46aa629 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua @@ -4,38 +4,45 @@ -- @parent_module ccs -------------------------------- +-- Clone a action with the specified name from the container. -- @function [parent=#ActionTimelineCache] createAction -- @param self --- @param #string str +-- @param #string fileName -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- -- @function [parent=#ActionTimelineCache] purge -- @param self -------------------------------- +-- -- @function [parent=#ActionTimelineCache] init -- @param self -------------------------------- +-- -- @function [parent=#ActionTimelineCache] loadAnimationActionWithContent -- @param self --- @param #string str --- @param #string str +-- @param #string fileName +-- @param #string content -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- -- @function [parent=#ActionTimelineCache] loadAnimationActionWithFile -- @param self --- @param #string str +-- @param #string fileName -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- Remove action with filename, and also remove other resource relate with this file -- @function [parent=#ActionTimelineCache] removeAction -- @param self --- @param #string str +-- @param #string fileName -------------------------------- +-- Destroys the singleton -- @function [parent=#ActionTimelineCache] destroyInstance -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua b/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua index bda764dad6..46806fa02f 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua @@ -5,19 +5,22 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ActionTimelineData] setActionTag -- @param self --- @param #int int +-- @param #int actionTag -------------------------------- +-- -- @function [parent=#ActionTimelineData] getActionTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ActionTimelineData] create -- @param self --- @param #int int +-- @param #int actionTag -- @return ActionTimelineData#ActionTimelineData ret (return value: ccs.ActionTimelineData) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua index e965b182c8..540cbad47d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua @@ -5,22 +5,30 @@ -- @parent_module ccs -------------------------------- +-- Gets the tint action color.
+-- return the tint action color. -- @function [parent=#ActionTintFrame] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Gets the ActionInterval of ActionFrame.
+-- parame duration the duration time of ActionFrame
+-- return ActionInterval -- @function [parent=#ActionTintFrame] getAction -- @param self --- @param #float float +-- @param #float duration -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- Changes the tint action color.
+-- param ccolor the tint action color -- @function [parent=#ActionTintFrame] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table ccolor -------------------------------- +-- Default constructor -- @function [parent=#ActionTintFrame] ActionTintFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ActionTween.lua b/cocos/scripting/lua-bindings/auto/api/ActionTween.lua index 0ff2568643..f221754635 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionTween.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionTween.lua @@ -5,30 +5,35 @@ -- @parent_module cc -------------------------------- +-- creates an initializes the action with the property name (key), and the from and to parameters. -- @function [parent=#ActionTween] create -- @param self --- @param #float float --- @param #string str --- @param #float float --- @param #float float +-- @param #float duration +-- @param #string key +-- @param #float from +-- @param #float to -- @return ActionTween#ActionTween ret (return value: cc.ActionTween) -------------------------------- +-- -- @function [parent=#ActionTween] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ActionTween] clone -- @param self -- @return ActionTween#ActionTween ret (return value: cc.ActionTween) -------------------------------- +-- -- @function [parent=#ActionTween] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#ActionTween] reverse -- @param self -- @return ActionTween#ActionTween ret (return value: cc.ActionTween) diff --git a/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua b/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua index 1e4849c55d..4ad0e5ed07 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua @@ -5,26 +5,31 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#AnchorPointFrame] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -------------------------------- +-- -- @function [parent=#AnchorPointFrame] getAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#AnchorPointFrame] create -- @param self -- @return AnchorPointFrame#AnchorPointFrame ret (return value: ccs.AnchorPointFrame) -------------------------------- +-- -- @function [parent=#AnchorPointFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#AnchorPointFrame] AnchorPointFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Animate.lua b/cocos/scripting/lua-bindings/auto/api/Animate.lua index de15070b65..f3bf16dc52 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animate.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animate.lua @@ -12,38 +12,45 @@ -- @return Animation#Animation ret (retunr value: cc.Animation) -------------------------------- +-- sets the Animation object to be animated -- @function [parent=#Animate] setAnimation -- @param self -- @param #cc.Animation animation -------------------------------- +-- creates the action with an Animation and will restore the original frame when the animation is over -- @function [parent=#Animate] create -- @param self -- @param #cc.Animation animation -- @return Animate#Animate ret (return value: cc.Animate) -------------------------------- +-- -- @function [parent=#Animate] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Animate] clone -- @param self -- @return Animate#Animate ret (return value: cc.Animate) -------------------------------- +-- -- @function [parent=#Animate] stop -- @param self -------------------------------- +-- -- @function [parent=#Animate] reverse -- @param self -- @return Animate#Animate ret (return value: cc.Animate) -------------------------------- +-- -- @function [parent=#Animate] update -- @param self --- @param #float float +-- @param #float t return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua index f49ae32b24..7d8635c012 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Animate3D] setSpeed -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- -- @function [parent=#Animate3D] setWeight -- @param self --- @param #float float +-- @param #float weight -------------------------------- +-- get & set speed, negative speed means playing reverse -- @function [parent=#Animate3D] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get & set blend weight, weight must positive -- @function [parent=#Animate3D] getWeight -- @param self -- @return float#float ret (return value: float) @@ -29,34 +33,39 @@ -- @overload self, cc.Animation3D -- @function [parent=#Animate3D] create -- @param self --- @param #cc.Animation3D animation3d --- @param #float float --- @param #float float +-- @param #cc.Animation3D animation +-- @param #float fromTime +-- @param #float duration -- @return Animate3D#Animate3D ret (retunr value: cc.Animate3D) -------------------------------- +-- -- @function [parent=#Animate3D] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Animate3D] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Animate3D] clone -- @param self -- @return Animate3D#Animate3D ret (return value: cc.Animate3D) -------------------------------- +-- -- @function [parent=#Animate3D] reverse -- @param self -- @return Animate3D#Animate3D ret (return value: cc.Animate3D) -------------------------------- +-- -- @function [parent=#Animate3D] update -- @param self --- @param #float float +-- @param #float t return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Animation.lua b/cocos/scripting/lua-bindings/auto/api/Animation.lua index 43b1d28a90..4dc9976680 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animation.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animation.lua @@ -5,74 +5,93 @@ -- @parent_module cc -------------------------------- +-- Gets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... -- @function [parent=#Animation] getLoops -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- Adds a SpriteFrame to a Animation.
+-- The frame will be added with one "delay unit". -- @function [parent=#Animation] addSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame frame -------------------------------- +-- Sets whether to restore the original frame when animation finishes -- @function [parent=#Animation] setRestoreOriginalFrame -- @param self --- @param #bool bool +-- @param #bool restoreOriginalFrame -------------------------------- +-- -- @function [parent=#Animation] clone -- @param self -- @return Animation#Animation ret (return value: cc.Animation) -------------------------------- +-- Gets the duration in seconds of the whole animation. It is the result of totalDelayUnits * delayPerUnit -- @function [parent=#Animation] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Sets the array of AnimationFrames -- @function [parent=#Animation] setFrames -- @param self --- @param #array_table array +-- @param #array_table frames -------------------------------- +-- Gets the array of AnimationFrames -- @function [parent=#Animation] getFrames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Sets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... -- @function [parent=#Animation] setLoops -- @param self --- @param #unsigned int int +-- @param #unsigned int loops -------------------------------- +-- Sets the delay in seconds of the "delay unit" -- @function [parent=#Animation] setDelayPerUnit -- @param self --- @param #float float +-- @param #float delayPerUnit -------------------------------- +-- Adds a frame with an image filename. Internally it will create a SpriteFrame and it will add it.
+-- The frame will be added with one "delay unit".
+-- Added to facilitate the migration from v0.8 to v0.9. -- @function [parent=#Animation] addSpriteFrameWithFile -- @param self --- @param #string str +-- @param #string filename -------------------------------- +-- Gets the total Delay units of the Animation. -- @function [parent=#Animation] getTotalDelayUnits -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets the delay in seconds of the "delay unit" -- @function [parent=#Animation] getDelayPerUnit -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Checks whether to restore the original frame when animation finishes. -- @function [parent=#Animation] getRestoreOriginalFrame -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Adds a frame with a texture and a rect. Internally it will create a SpriteFrame and it will add it.
+-- The frame will be added with one "delay unit".
+-- Added to facilitate the migration from v0.8 to v0.9. -- @function [parent=#Animation] addSpriteFrameWithTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D pobTexture -- @param #rect_table rect -------------------------------- @@ -80,17 +99,18 @@ -- @overload self -- @function [parent=#Animation] create -- @param self --- @param #array_table array --- @param #float float --- @param #unsigned int int +-- @param #array_table arrayOfAnimationFrameNames +-- @param #float delayPerUnit +-- @param #unsigned int loops -- @return Animation#Animation ret (retunr value: cc.Animation) -------------------------------- +-- -- @function [parent=#Animation] createWithSpriteFrames -- @param self --- @param #array_table array --- @param #float float --- @param #unsigned int int +-- @param #array_table arrayOfSpriteFrameNames +-- @param #float delay +-- @param #unsigned int loops -- @return Animation#Animation ret (return value: cc.Animation) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Animation3D.lua b/cocos/scripting/lua-bindings/auto/api/Animation3D.lua index 7eacf8e403..c04f1611bf 100644 --- a/cocos/scripting/lua-bindings/auto/api/Animation3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Animation3D.lua @@ -5,15 +5,17 @@ -- @parent_module cc -------------------------------- +-- get duration -- @function [parent=#Animation3D] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- read all animation or only the animation with given animationName? animationName == "" read the first. -- @function [parent=#Animation3D] create -- @param self --- @param #string str --- @param #string str +-- @param #string filename +-- @param #string animationName -- @return Animation3D#Animation3D ret (return value: cc.Animation3D) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua b/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua index 34e8325086..4b8bab06a7 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnimationCache.lua @@ -5,48 +5,66 @@ -- @parent_module cc -------------------------------- +-- Returns a Animation that was previously added.
+-- If the name is not found it will return nil.
+-- You should retain the returned copy if you are going to use it. -- @function [parent=#AnimationCache] getAnimation -- @param self --- @param #string str +-- @param #string name -- @return Animation#Animation ret (return value: cc.Animation) -------------------------------- +-- Adds a Animation with a name. -- @function [parent=#AnimationCache] addAnimation -- @param self -- @param #cc.Animation animation --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#AnimationCache] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Adds an animation from an NSDictionary
+-- Make sure that the frames were previously loaded in the SpriteFrameCache.
+-- param plist The path of the relative file,it use to find the plist path for load SpriteFrames.
+-- since v1.1 -- @function [parent=#AnimationCache] addAnimationsWithDictionary -- @param self --- @param #map_table map --- @param #string str +-- @param #map_table dictionary +-- @param #string plist -------------------------------- +-- Deletes a Animation from the cache. -- @function [parent=#AnimationCache] removeAnimation -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- Adds an animation from a plist file.
+-- Make sure that the frames were previously loaded in the SpriteFrameCache.
+-- since v1.1
+-- js addAnimations
+-- lua addAnimations -- @function [parent=#AnimationCache] addAnimationsWithFile -- @param self --- @param #string str +-- @param #string plist -------------------------------- +-- Purges the cache. It releases all the Animation objects and the shared instance. -- @function [parent=#AnimationCache] destroyInstance -- @param self -------------------------------- +-- Returns the shared instance of the Animation cache -- @function [parent=#AnimationCache] getInstance -- @param self -- @return AnimationCache#AnimationCache ret (return value: cc.AnimationCache) -------------------------------- +-- js ctor -- @function [parent=#AnimationCache] AnimationCache -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AnimationData.lua b/cocos/scripting/lua-bindings/auto/api/AnimationData.lua index f261470ff1..3ed39cf262 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnimationData.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnimationData.lua @@ -5,27 +5,32 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#AnimationData] getMovement -- @param self --- @param #string str +-- @param #string movementName -- @return MovementData#MovementData ret (return value: ccs.MovementData) -------------------------------- +-- -- @function [parent=#AnimationData] getMovementCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#AnimationData] addMovement -- @param self --- @param #ccs.MovementData movementdata +-- @param #ccs.MovementData movData -------------------------------- +-- -- @function [parent=#AnimationData] create -- @param self -- @return AnimationData#AnimationData ret (return value: ccs.AnimationData) -------------------------------- +-- js ctor -- @function [parent=#AnimationData] AnimationData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua b/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua index 9bdd79a93c..8a6609349b 100644 --- a/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#AnimationFrame] setSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame frame -------------------------------- -- @overload self @@ -17,36 +18,43 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- +-- Sets the units of time the frame takes -- @function [parent=#AnimationFrame] setDelayUnits -- @param self --- @param #float float +-- @param #float delayUnits -------------------------------- +-- -- @function [parent=#AnimationFrame] clone -- @param self -- @return AnimationFrame#AnimationFrame ret (return value: cc.AnimationFrame) -------------------------------- +-- -- @function [parent=#AnimationFrame] getSpriteFrame -- @param self -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- +-- Gets the units of time the frame takes -- @function [parent=#AnimationFrame] getDelayUnits -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Sets user infomation -- @function [parent=#AnimationFrame] setUserInfo -- @param self --- @param #map_table map +-- @param #map_table userInfo -------------------------------- +-- Creates the animation frame with a spriteframe, number of delay units and a notification user info
+-- since 3.0 -- @function [parent=#AnimationFrame] create -- @param self --- @param #cc.SpriteFrame spriteframe --- @param #float float --- @param #map_table map +-- @param #cc.SpriteFrame spriteFrame +-- @param #float delayUnits +-- @param #map_table userInfo -- @return AnimationFrame#AnimationFrame ret (return value: cc.AnimationFrame) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Application.lua b/cocos/scripting/lua-bindings/auto/api/Application.lua index ed1bc8e3e4..f458be4bee 100644 --- a/cocos/scripting/lua-bindings/auto/api/Application.lua +++ b/cocos/scripting/lua-bindings/auto/api/Application.lua @@ -4,26 +4,35 @@ -- @parent_module cc -------------------------------- +-- brief Get target platform -- @function [parent=#Application] getTargetPlatform -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- brief Get current language iso 639-1 code
+-- return Current language iso 639-1 code -- @function [parent=#Application] getCurrentLanguageCode -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- brief Get current language config
+-- return Current language config -- @function [parent=#Application] getCurrentLanguage -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- brief Callback by Director to limit FPS.
+-- param interval The time, expressed in seconds, between current frame and next. -- @function [parent=#Application] setAnimationInterval -- @param self --- @param #double double +-- @param #double interval -------------------------------- +-- brief Get current application instance.
+-- return Current application instance pointer. -- @function [parent=#Application] getInstance -- @param self -- @return Application#Application ret (return value: cc.Application) diff --git a/cocos/scripting/lua-bindings/auto/api/Armature.lua b/cocos/scripting/lua-bindings/auto/api/Armature.lua index 3a64f91aad..6aa0fd389f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Armature.lua +++ b/cocos/scripting/lua-bindings/auto/api/Armature.lua @@ -5,55 +5,70 @@ -- @parent_module ccs -------------------------------- +-- Get a bone with the specified name
+-- param name The bone's name you want to get -- @function [parent=#Armature] getBone -- @param self --- @param #string str +-- @param #string name -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- +-- Change a bone's parent with the specified parent name.
+-- param bone The bone you want to change parent
+-- param parentName The new parent's name. -- @function [parent=#Armature] changeBoneParent -- @param self -- @param #ccs.Bone bone --- @param #string str +-- @param #string parentName -------------------------------- +-- -- @function [parent=#Armature] setAnimation -- @param self --- @param #ccs.ArmatureAnimation armatureanimation +-- @param #ccs.ArmatureAnimation animation -------------------------------- +-- -- @function [parent=#Armature] getBoneAtPoint -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- +-- -- @function [parent=#Armature] getArmatureTransformDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Armature] setVersion -- @param self --- @param #float float +-- @param #float version -------------------------------- +-- Set contentsize and Calculate anchor point. -- @function [parent=#Armature] updateOffsetPoint -- @param self -------------------------------- +-- -- @function [parent=#Armature] getParentBone -- @param self -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- +-- Remove a bone with the specified name. If recursion it will also remove child Bone recursionly.
+-- param bone The bone you want to remove
+-- param recursion Determine whether remove the bone's child recursion. -- @function [parent=#Armature] removeBone -- @param self -- @param #ccs.Bone bone --- @param #bool bool +-- @param #bool recursion -------------------------------- +-- -- @function [parent=#Armature] getBatchNode -- @param self -- @return BatchNode#BatchNode ret (return value: ccs.BatchNode) @@ -64,51 +79,63 @@ -- @overload self, string, ccs.Bone -- @function [parent=#Armature] init -- @param self --- @param #string str --- @param #ccs.Bone bone +-- @param #string name +-- @param #ccs.Bone parentBone -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Armature] setParentBone -- @param self --- @param #ccs.Bone bone +-- @param #ccs.Bone parentBone -------------------------------- +-- -- @function [parent=#Armature] drawContour -- @param self -------------------------------- +-- -- @function [parent=#Armature] setBatchNode -- @param self --- @param #ccs.BatchNode batchnode +-- @param #ccs.BatchNode batchNode -------------------------------- +-- -- @function [parent=#Armature] setArmatureData -- @param self --- @param #ccs.ArmatureData armaturedata +-- @param #ccs.ArmatureData armatureData -------------------------------- +-- Add a Bone to this Armature,
+-- param bone The Bone you want to add to Armature
+-- param parentName The parent Bone's name you want to add to . If it's nullptr, then set Armature to its parent -- @function [parent=#Armature] addBone -- @param self -- @param #ccs.Bone bone --- @param #string str +-- @param #string parentName -------------------------------- +-- -- @function [parent=#Armature] getArmatureData -- @param self -- @return ArmatureData#ArmatureData ret (return value: ccs.ArmatureData) -------------------------------- +-- -- @function [parent=#Armature] getVersion -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Armature] getAnimation -- @param self -- @return ArmatureAnimation#ArmatureAnimation ret (return value: ccs.ArmatureAnimation) -------------------------------- +-- Get Armature's bone dictionary
+-- return Armature's bone dictionary -- @function [parent=#Armature] getBoneDic -- @param self -- @return map_table#map_table ret (return value: map_table) @@ -119,43 +146,50 @@ -- @overload self, string, ccs.Bone -- @function [parent=#Armature] create -- @param self --- @param #string str --- @param #ccs.Bone bone +-- @param #string name +-- @param #ccs.Bone parentBone -- @return Armature#Armature ret (retunr value: ccs.Armature) -------------------------------- +-- -- @function [parent=#Armature] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -------------------------------- +-- -- @function [parent=#Armature] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#Armature] getAnchorPointInPoints -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Armature] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Armature] getNodeToParentTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- This boundingBox will calculate all bones' boundingBox every time -- @function [parent=#Armature] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- js ctor -- @function [parent=#Armature] Armature -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua index 66320119c5..6fdfc0e155 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureAnimation.lua @@ -5,103 +5,140 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ArmatureAnimation] getSpeedScale -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Pause the Process -- @function [parent=#ArmatureAnimation] pause -- @param self -------------------------------- +-- Scale animation play speed.
+-- param animationScale Scale value -- @function [parent=#ArmatureAnimation] setSpeedScale -- @param self --- @param #float float +-- @param #float speedScale -------------------------------- +-- Init with a Armature
+-- param armature The Armature ArmatureAnimation will bind to -- @function [parent=#ArmatureAnimation] init -- @param self -- @param #ccs.Armature armature -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ArmatureAnimation] playWithIndexes -- @param self --- @param #array_table array --- @param #int int --- @param #bool bool +-- @param #array_table movementIndexes +-- @param #int durationTo +-- @param #bool loop -------------------------------- +-- Play animation by animation name.
+-- param animationName The animation name you want to play
+-- param durationTo The frames between two animation changing-over.
+-- It's meaning is changing to this animation need how many frames
+-- -1 : use the value from MovementData get from flash design panel
+-- param loop Whether the animation is loop
+-- loop < 0 : use the value from MovementData get from flash design panel
+-- loop = 0 : this animation is not loop
+-- loop > 0 : this animation is loop -- @function [parent=#ArmatureAnimation] play -- @param self --- @param #string str --- @param #int int --- @param #int int +-- @param #string animationName +-- @param #int durationTo +-- @param #int loop -------------------------------- +-- Go to specified frame and pause current movement. -- @function [parent=#ArmatureAnimation] gotoAndPause -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- Resume the Process -- @function [parent=#ArmatureAnimation] resume -- @param self -------------------------------- +-- Stop the Process -- @function [parent=#ArmatureAnimation] stop -- @param self -------------------------------- +-- -- @function [parent=#ArmatureAnimation] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#ArmatureAnimation] getAnimationData -- @param self -- @return AnimationData#AnimationData ret (return value: ccs.AnimationData) -------------------------------- +-- -- @function [parent=#ArmatureAnimation] playWithIndex -- @param self --- @param #int int --- @param #int int --- @param #int int +-- @param #int animationIndex +-- @param #int durationTo +-- @param #int loop -------------------------------- +-- Get current movementID
+-- return The name of current movement -- @function [parent=#ArmatureAnimation] getCurrentMovementID -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ArmatureAnimation] setAnimationData -- @param self --- @param #ccs.AnimationData animationdata +-- @param #ccs.AnimationData data -------------------------------- +-- Go to specified frame and play current movement.
+-- You need first switch to the movement you want to play, then call this function.
+-- example : playByIndex(0);
+-- gotoAndPlay(0);
+-- playByIndex(1);
+-- gotoAndPlay(0);
+-- gotoAndPlay(15); -- @function [parent=#ArmatureAnimation] gotoAndPlay -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- -- @function [parent=#ArmatureAnimation] playWithNames -- @param self --- @param #array_table array --- @param #int int --- @param #bool bool +-- @param #array_table movementNames +-- @param #int durationTo +-- @param #bool loop -------------------------------- +-- Get movement count -- @function [parent=#ArmatureAnimation] getMovementCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Create with a Armature
+-- param armature The Armature ArmatureAnimation will bind to -- @function [parent=#ArmatureAnimation] create -- @param self -- @param #ccs.Armature armature -- @return ArmatureAnimation#ArmatureAnimation ret (return value: ccs.ArmatureAnimation) -------------------------------- +-- js ctor -- @function [parent=#ArmatureAnimation] ArmatureAnimation -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua index d8558c9910..d22ae806e0 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureData.lua @@ -5,27 +5,32 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ArmatureData] addBoneData -- @param self --- @param #ccs.BoneData bonedata +-- @param #ccs.BoneData boneData -------------------------------- +-- -- @function [parent=#ArmatureData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ArmatureData] getBoneData -- @param self --- @param #string str +-- @param #string boneName -- @return BoneData#BoneData ret (return value: ccs.BoneData) -------------------------------- +-- -- @function [parent=#ArmatureData] create -- @param self -- @return ArmatureData#ArmatureData ret (return value: ccs.ArmatureData) -------------------------------- +-- js ctor -- @function [parent=#ArmatureData] ArmatureData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua index 8afaf2f804..690de6110a 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureDataManager.lua @@ -5,110 +5,143 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ArmatureDataManager] getAnimationDatas -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- brief remove animation data
+-- param id the id of the animation data -- @function [parent=#ArmatureDataManager] removeAnimationData -- @param self --- @param #string str +-- @param #string id -------------------------------- +-- Add armature data
+-- param id The id of the armature data
+-- param armatureData ArmatureData * -- @function [parent=#ArmatureDataManager] addArmatureData -- @param self --- @param #string str --- @param #ccs.ArmatureData armaturedata --- @param #string str +-- @param #string id +-- @param #ccs.ArmatureData armatureData +-- @param #string configFilePath -------------------------------- -- @overload self, string, string, string -- @overload self, string -- @function [parent=#ArmatureDataManager] addArmatureFileInfo -- @param self --- @param #string str --- @param #string str --- @param #string str +-- @param #string imagePath +-- @param #string plistPath +-- @param #string configFilePath -------------------------------- +-- -- @function [parent=#ArmatureDataManager] removeArmatureFileInfo -- @param self --- @param #string str +-- @param #string configFilePath -------------------------------- +-- -- @function [parent=#ArmatureDataManager] getTextureDatas -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- brief get texture data
+-- param id the id of the texture data you want to get
+-- return TextureData * -- @function [parent=#ArmatureDataManager] getTextureData -- @param self --- @param #string str +-- @param #string id -- @return TextureData#TextureData ret (return value: ccs.TextureData) -------------------------------- +-- brief get armature data
+-- param id the id of the armature data you want to get
+-- return ArmatureData * -- @function [parent=#ArmatureDataManager] getArmatureData -- @param self --- @param #string str +-- @param #string id -- @return ArmatureData#ArmatureData ret (return value: ccs.ArmatureData) -------------------------------- +-- brief get animation data from _animationDatas(Dictionary)
+-- param id the id of the animation data you want to get
+-- return AnimationData * -- @function [parent=#ArmatureDataManager] getAnimationData -- @param self --- @param #string str +-- @param #string id -- @return AnimationData#AnimationData ret (return value: ccs.AnimationData) -------------------------------- +-- brief add animation data
+-- param id the id of the animation data
+-- return AnimationData * -- @function [parent=#ArmatureDataManager] addAnimationData -- @param self --- @param #string str --- @param #ccs.AnimationData animationdata --- @param #string str +-- @param #string id +-- @param #ccs.AnimationData animationData +-- @param #string configFilePath -------------------------------- +-- Init ArmatureDataManager -- @function [parent=#ArmatureDataManager] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief remove armature data
+-- param id the id of the armature data you want to get -- @function [parent=#ArmatureDataManager] removeArmatureData -- @param self --- @param #string str +-- @param #string id -------------------------------- +-- -- @function [parent=#ArmatureDataManager] getArmatureDatas -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- brief remove texture data
+-- param id the id of the texture data you want to get -- @function [parent=#ArmatureDataManager] removeTextureData -- @param self --- @param #string str +-- @param #string id -------------------------------- +-- brief add texture data
+-- param id the id of the texture data
+-- return TextureData * -- @function [parent=#ArmatureDataManager] addTextureData -- @param self --- @param #string str --- @param #ccs.TextureData texturedata --- @param #string str +-- @param #string id +-- @param #ccs.TextureData textureData +-- @param #string configFilePath -------------------------------- +-- brief Juge whether or not need auto load sprite file -- @function [parent=#ArmatureDataManager] isAutoLoadSpriteFile -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name -- @function [parent=#ArmatureDataManager] addSpriteFrameFromFile -- @param self --- @param #string str --- @param #string str --- @param #string str +-- @param #string plistPath +-- @param #string imagePath +-- @param #string configFilePath -------------------------------- +-- -- @function [parent=#ArmatureDataManager] destroyInstance -- @param self -------------------------------- +-- -- @function [parent=#ArmatureDataManager] getInstance -- @param self -- @return ArmatureDataManager#ArmatureDataManager ret (return value: ccs.ArmatureDataManager) diff --git a/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua b/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua index 450e398de0..5fcd62e60d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ArmatureDisplayData.lua @@ -5,11 +5,13 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ArmatureDisplayData] create -- @param self -- @return ArmatureDisplayData#ArmatureDisplayData ret (return value: ccs.ArmatureDisplayData) -------------------------------- +-- js ctor -- @function [parent=#ArmatureDisplayData] ArmatureDisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua b/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua index 364244e06f..c5ae73f466 100644 --- a/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/AssetsManager.lua @@ -5,75 +5,89 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#AssetsManager] setStoragePath -- @param self --- @param #char char +-- @param #char storagePath -------------------------------- +-- -- @function [parent=#AssetsManager] setPackageUrl -- @param self --- @param #char char +-- @param #char packageUrl -------------------------------- +-- -- @function [parent=#AssetsManager] checkUpdate -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#AssetsManager] getStoragePath -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#AssetsManager] update -- @param self -------------------------------- +-- @brief Sets connection time out in seconds -- @function [parent=#AssetsManager] setConnectionTimeout -- @param self --- @param #unsigned int int +-- @param #unsigned int timeout -------------------------------- +-- -- @function [parent=#AssetsManager] setVersionFileUrl -- @param self --- @param #char char +-- @param #char versionFileUrl -------------------------------- +-- -- @function [parent=#AssetsManager] getPackageUrl -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- @brief Gets connection time out in secondes -- @function [parent=#AssetsManager] getConnectionTimeout -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#AssetsManager] getVersion -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#AssetsManager] getVersionFileUrl -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#AssetsManager] deleteVersion -- @param self -------------------------------- +-- -- @function [parent=#AssetsManager] create -- @param self --- @param #char char --- @param #char char --- @param #char char --- @param #function func --- @param #function func --- @param #function func +-- @param #char packageUrl +-- @param #char versionFileUrl +-- @param #char storagePath +-- @param #function errorCallback +-- @param #function progressCallback +-- @param #function successCallback -- @return AssetsManager#AssetsManager ret (return value: cc.AssetsManager) -------------------------------- +-- -- @function [parent=#AssetsManager] AssetsManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua b/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua index d0a1fbd5b8..e035dc27a9 100644 --- a/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua @@ -5,78 +5,93 @@ -- @parent_module cc -------------------------------- +-- updates the Atlas (indexed vertex array).
+-- Shall be overridden in subclasses -- @function [parent=#AtlasNode] updateAtlasValues -- @param self -------------------------------- +-- -- @function [parent=#AtlasNode] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- -- @function [parent=#AtlasNode] setTextureAtlas -- @param self --- @param #cc.TextureAtlas textureatlas +-- @param #cc.TextureAtlas textureAtlas -------------------------------- +-- -- @function [parent=#AtlasNode] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- +-- -- @function [parent=#AtlasNode] getQuadsToDraw -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#AtlasNode] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- -- @function [parent=#AtlasNode] setQuadsToDraw -- @param self --- @param #long long +-- @param #long quadsToDraw -------------------------------- +-- creates a AtlasNode with an Atlas file the width and height of each item and the quantity of items to render -- @function [parent=#AtlasNode] create -- @param self --- @param #string str --- @param #int int --- @param #int int --- @param #int int +-- @param #string filename +-- @param #int tileWidth +-- @param #int tileHeight +-- @param #int itemsToRender -- @return AtlasNode#AtlasNode ret (return value: cc.AtlasNode) -------------------------------- +-- -- @function [parent=#AtlasNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#AtlasNode] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#AtlasNode] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- -- @function [parent=#AtlasNode] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#AtlasNode] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool isOpacityModifyRGB -------------------------------- +-- -- @function [parent=#AtlasNode] setOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity return nil diff --git a/cocos/scripting/lua-bindings/auto/api/AttachNode.lua b/cocos/scripting/lua-bindings/auto/api/AttachNode.lua index dca12cf579..e61a0d0d48 100644 --- a/cocos/scripting/lua-bindings/auto/api/AttachNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/AttachNode.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates an AttachNode
+-- param attachBone The bone to which the AttachNode is going to attach, the attacheBone must be a bone of the AttachNode's parent -- @function [parent=#AttachNode] create -- @param self --- @param #cc.Bone3D bone3d +-- @param #cc.Bone3D attachBone -- @return AttachNode#AttachNode ret (return value: cc.AttachNode) -------------------------------- +-- -- @function [parent=#AttachNode] getWorldToNodeTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- -- @function [parent=#AttachNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/BaseData.lua b/cocos/scripting/lua-bindings/auto/api/BaseData.lua index 2d2d36b6a1..78f4aafeff 100644 --- a/cocos/scripting/lua-bindings/auto/api/BaseData.lua +++ b/cocos/scripting/lua-bindings/auto/api/BaseData.lua @@ -5,21 +5,25 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#BaseData] getColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- +-- -- @function [parent=#BaseData] setColor -- @param self --- @param #color4b_table color4b +-- @param #color4b_table color -------------------------------- +-- -- @function [parent=#BaseData] create -- @param self -- @return BaseData#BaseData ret (return value: ccs.BaseData) -------------------------------- +-- js ctor -- @function [parent=#BaseData] BaseData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/BatchNode.lua b/cocos/scripting/lua-bindings/auto/api/BatchNode.lua index dfb42d2e5e..3e153863a9 100644 --- a/cocos/scripting/lua-bindings/auto/api/BatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/BatchNode.lua @@ -5,11 +5,13 @@ -- @parent_module ccs -------------------------------- +-- js NA -- @function [parent=#BatchNode] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#BatchNode] create -- @param self -- @return BatchNode#BatchNode ret (return value: ccs.BatchNode) @@ -19,21 +21,23 @@ -- @overload self, cc.Node, int, int -- @function [parent=#BatchNode] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node pChild +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#BatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#BatchNode] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup return nil diff --git a/cocos/scripting/lua-bindings/auto/api/BezierBy.lua b/cocos/scripting/lua-bindings/auto/api/BezierBy.lua index ed228fd60c..85dc00405e 100644 --- a/cocos/scripting/lua-bindings/auto/api/BezierBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/BezierBy.lua @@ -5,23 +5,27 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#BezierBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#BezierBy] clone -- @param self -- @return BezierBy#BezierBy ret (return value: cc.BezierBy) -------------------------------- +-- -- @function [parent=#BezierBy] reverse -- @param self -- @return BezierBy#BezierBy ret (return value: cc.BezierBy) -------------------------------- +-- -- @function [parent=#BezierBy] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/BezierTo.lua b/cocos/scripting/lua-bindings/auto/api/BezierTo.lua index 5bec1c1882..6499108d03 100644 --- a/cocos/scripting/lua-bindings/auto/api/BezierTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/BezierTo.lua @@ -5,16 +5,19 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#BezierTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#BezierTo] clone -- @param self -- @return BezierTo#BezierTo ret (return value: cc.BezierTo) -------------------------------- +-- -- @function [parent=#BezierTo] reverse -- @param self -- @return BezierTo#BezierTo ret (return value: cc.BezierTo) diff --git a/cocos/scripting/lua-bindings/auto/api/Blink.lua b/cocos/scripting/lua-bindings/auto/api/Blink.lua index 91bbeeee69..d63a7f8329 100644 --- a/cocos/scripting/lua-bindings/auto/api/Blink.lua +++ b/cocos/scripting/lua-bindings/auto/api/Blink.lua @@ -5,34 +5,40 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#Blink] create -- @param self --- @param #float float --- @param #int int +-- @param #float duration +-- @param #int blinks -- @return Blink#Blink ret (return value: cc.Blink) -------------------------------- +-- -- @function [parent=#Blink] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Blink] clone -- @param self -- @return Blink#Blink ret (return value: cc.Blink) -------------------------------- +-- -- @function [parent=#Blink] stop -- @param self -------------------------------- +-- -- @function [parent=#Blink] reverse -- @param self -- @return Blink#Blink ret (return value: cc.Blink) -------------------------------- +-- -- @function [parent=#Blink] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Bone.lua b/cocos/scripting/lua-bindings/auto/api/Bone.lua index 9b646e61db..99606c4270 100644 --- a/cocos/scripting/lua-bindings/auto/api/Bone.lua +++ b/cocos/scripting/lua-bindings/auto/api/Bone.lua @@ -5,163 +5,200 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#Bone] isTransformDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Bone] isIgnoreMovementBoneData -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Update zorder -- @function [parent=#Bone] updateZOrder -- @param self -------------------------------- +-- -- @function [parent=#Bone] getDisplayRenderNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#Bone] isBlendDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Add a child to this bone, and it will let this child call setParent(Bone *parent) function to set self to it's parent
+-- param child the child you want to add -- @function [parent=#Bone] addChildBone -- @param self --- @param #ccs.Bone bone +-- @param #ccs.Bone child -------------------------------- +-- -- @function [parent=#Bone] getWorldInfo -- @param self -- @return BaseData#BaseData ret (return value: ccs.BaseData) -------------------------------- +-- -- @function [parent=#Bone] getTween -- @param self -- @return Tween#Tween ret (return value: ccs.Tween) -------------------------------- +-- Get parent bone
+-- return parent bone -- @function [parent=#Bone] getParentBone -- @param self -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- +-- Update color to render display -- @function [parent=#Bone] updateColor -- @param self -------------------------------- +-- -- @function [parent=#Bone] setTransformDirty -- @param self --- @param #bool bool +-- @param #bool dirty -------------------------------- +-- -- @function [parent=#Bone] getDisplayRenderNodeType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Bone] removeDisplay -- @param self --- @param #int int +-- @param #int index -------------------------------- +-- -- @function [parent=#Bone] setBoneData -- @param self --- @param #ccs.BoneData bonedata +-- @param #ccs.BoneData boneData -------------------------------- -- @overload self, string -- @overload self -- @function [parent=#Bone] init -- @param self --- @param #string str +-- @param #string name -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- Set parent bone.
+-- If parent is NUll, then also remove this bone from armature.
+-- It will not set the Armature, if you want to add the bone to a Armature, you should use Armature::addBone(Bone *bone, const char* parentName).
+-- param parent the parent bone.
+-- nullptr : remove this bone from armature -- @function [parent=#Bone] setParentBone -- @param self --- @param #ccs.Bone bone +-- @param #ccs.Bone parent -------------------------------- -- @overload self, cc.Node, int -- @overload self, ccs.DisplayData, int -- @function [parent=#Bone] addDisplay -- @param self --- @param #ccs.DisplayData displaydata --- @param #int int +-- @param #ccs.DisplayData displayData +-- @param #int index -------------------------------- +-- Remove itself from its parent.
+-- param recursion whether or not to remove childBone's display -- @function [parent=#Bone] removeFromParent -- @param self --- @param #bool bool +-- @param #bool recursion -------------------------------- +-- -- @function [parent=#Bone] getColliderDetector -- @param self -- @return ColliderDetector#ColliderDetector ret (return value: ccs.ColliderDetector) -------------------------------- +-- -- @function [parent=#Bone] getChildArmature -- @param self -- @return Armature#Armature ret (return value: ccs.Armature) -------------------------------- +-- -- @function [parent=#Bone] getTweenData -- @param self -- @return FrameData#FrameData ret (return value: ccs.FrameData) -------------------------------- +-- -- @function [parent=#Bone] changeDisplayWithIndex -- @param self --- @param #int int --- @param #bool bool +-- @param #int index +-- @param #bool force -------------------------------- +-- -- @function [parent=#Bone] changeDisplayWithName -- @param self --- @param #string str --- @param #bool bool +-- @param #string name +-- @param #bool force -------------------------------- +-- -- @function [parent=#Bone] setArmature -- @param self -- @param #ccs.Armature armature -------------------------------- +-- -- @function [parent=#Bone] setBlendDirty -- @param self --- @param #bool bool +-- @param #bool dirty -------------------------------- +-- Removes a child Bone
+-- param bone the bone you want to remove -- @function [parent=#Bone] removeChildBone -- @param self -- @param #ccs.Bone bone --- @param #bool bool +-- @param #bool recursion -------------------------------- +-- -- @function [parent=#Bone] setChildArmature -- @param self --- @param #ccs.Armature armature +-- @param #ccs.Armature childArmature -------------------------------- +-- -- @function [parent=#Bone] getNodeToArmatureTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- -- @function [parent=#Bone] getDisplayManager -- @param self -- @return DisplayManager#DisplayManager ret (return value: ccs.DisplayManager) -------------------------------- +-- -- @function [parent=#Bone] getArmature -- @param self -- @return Armature#Armature ret (return value: ccs.Armature) -------------------------------- +-- -- @function [parent=#Bone] getBoneData -- @param self -- @return BoneData#BoneData ret (return value: ccs.BoneData) @@ -171,35 +208,41 @@ -- @overload self -- @function [parent=#Bone] create -- @param self --- @param #string str +-- @param #string name -- @return Bone#Bone ret (retunr value: ccs.Bone) -------------------------------- +-- -- @function [parent=#Bone] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor -------------------------------- +-- -- @function [parent=#Bone] setLocalZOrder -- @param self --- @param #int int +-- @param #int zOrder -------------------------------- +-- -- @function [parent=#Bone] getNodeToWorldTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- -- @function [parent=#Bone] update -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- -- @function [parent=#Bone] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- js ctor -- @function [parent=#Bone] Bone -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/BoneData.lua b/cocos/scripting/lua-bindings/auto/api/BoneData.lua index 2b4eea933a..7cc0750efb 100644 --- a/cocos/scripting/lua-bindings/auto/api/BoneData.lua +++ b/cocos/scripting/lua-bindings/auto/api/BoneData.lua @@ -5,27 +5,32 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#BoneData] getDisplayData -- @param self --- @param #int int +-- @param #int index -- @return DisplayData#DisplayData ret (return value: ccs.DisplayData) -------------------------------- +-- -- @function [parent=#BoneData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#BoneData] addDisplayData -- @param self --- @param #ccs.DisplayData displaydata +-- @param #ccs.DisplayData displayData -------------------------------- +-- -- @function [parent=#BoneData] create -- @param self -- @return BoneData#BoneData ret (return value: ccs.BoneData) -------------------------------- +-- js ctor -- @function [parent=#BoneData] BoneData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Button.lua b/cocos/scripting/lua-bindings/auto/api/Button.lua index b0212c1988..544762f02c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Button.lua +++ b/cocos/scripting/lua-bindings/auto/api/Button.lua @@ -5,168 +5,215 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#Button] getTitleText -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Button] setTitleFontSize -- @param self --- @param #float float +-- @param #float size -------------------------------- +-- Sets if button is using scale9 renderer.
+-- param true that using scale9 renderer, false otherwise. -- @function [parent=#Button] setScale9Enabled -- @param self --- @param #bool bool +-- @param #bool able -------------------------------- +-- brief Return a zoom scale -- @function [parent=#Button] getZoomScale -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Button] getCapInsetsDisabledRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Button] setTitleColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- Sets capinsets for button, if button is using scale9 renderer.
+-- param capInsets capinsets for button -- @function [parent=#Button] setCapInsetsDisabledRenderer -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Sets capinsets for button, if button is using scale9 renderer.
+-- param capInsets capinsets for button -- @function [parent=#Button] setCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Load dark state texture for button.
+-- param disabled dark state texture.
+-- param texType @see TextureResType -- @function [parent=#Button] loadTextureDisabled -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string disabled +-- @param #int texType -------------------------------- +-- -- @function [parent=#Button] setTitleText -- @param self --- @param #string str +-- @param #string text -------------------------------- +-- Sets capinsets for button, if button is using scale9 renderer.
+-- param capInsets capinsets for button -- @function [parent=#Button] setCapInsetsNormalRenderer -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Load selected state texture for button.
+-- param selected selected state texture.
+-- param texType @see TextureResType -- @function [parent=#Button] loadTexturePressed -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string selected +-- @param #int texType -------------------------------- +-- -- @function [parent=#Button] setTitleFontName -- @param self --- @param #string str +-- @param #string fontName -------------------------------- +-- -- @function [parent=#Button] getCapInsetsNormalRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Button] getCapInsetsPressedRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Load textures for button.
+-- param normal normal state texture name.
+-- param selected selected state texture name.
+-- param disabled disabled state texture name.
+-- param texType @see TextureResType -- @function [parent=#Button] loadTextures -- @param self --- @param #string str --- @param #string str --- @param #string str --- @param #int texturerestype +-- @param #string normal +-- @param #string selected +-- @param #string disabled +-- @param #int texType -------------------------------- +-- -- @function [parent=#Button] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Load normal state texture for button.
+-- param normal normal state texture.
+-- param texType @see TextureResType -- @function [parent=#Button] loadTextureNormal -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string normal +-- @param #int texType -------------------------------- +-- Sets capinsets for button, if button is using scale9 renderer.
+-- param capInsets capinsets for button -- @function [parent=#Button] setCapInsetsPressedRenderer -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- -- @function [parent=#Button] getTitleFontSize -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Button] getTitleFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Button] getTitleColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Changes if button can be clicked zoom effect.
+-- param true that can be clicked zoom effect, false otherwise. -- @function [parent=#Button] setPressedActionEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- When user pressed the button, the button will zoom to a scale.
+-- The final scale of the button equals (button original scale + _zoomScale) -- @function [parent=#Button] setZoomScale -- @param self --- @param #float float +-- @param #float scale -------------------------------- -- @overload self, string, string, string, int -- @overload self -- @function [parent=#Button] create -- @param self --- @param #string str --- @param #string str --- @param #string str --- @param #int texturerestype +-- @param #string normalImage +-- @param #string selectedImage +-- @param #string disableImage +-- @param #int texType -- @return Button#Button ret (retunr value: ccui.Button) -------------------------------- +-- -- @function [parent=#Button] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#Button] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#Button] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Button] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Button] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- Default constructor -- @function [parent=#Button] Button -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua b/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua index 1238d0c551..eddeeae1bd 100644 --- a/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua @@ -5,197 +5,234 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#CCBAnimationManager] moveAnimationsFromNode -- @param self --- @param #cc.Node node --- @param #cc.Node node +-- @param #cc.Node fromNode +-- @param #cc.Node toNode -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setAutoPlaySequenceId -- @param self --- @param #int int +-- @param #int autoPlaySequenceId -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentCallbackNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] actionForSoundChannel -- @param self --- @param #cc.CCBSequenceProperty ccbsequenceproperty +-- @param #cc.CCBSequenceProperty channel -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setBaseValue -- @param self -- @param #cc.Value value --- @param #cc.Node node --- @param #string str +-- @param #cc.Node pNode +-- @param #string propName -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentOutletNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getLastCompletedSequenceName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setRootNode -- @param self --- @param #cc.Node node +-- @param #cc.Node pRootNode -------------------------------- +-- -- @function [parent=#CCBAnimationManager] runAnimationsForSequenceNamedTweenDuration -- @param self --- @param #char char --- @param #float float +-- @param #char pName +-- @param #float fTweenDuration -------------------------------- +-- -- @function [parent=#CCBAnimationManager] addDocumentOutletName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getSequences -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getRootContainerSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setDocumentControllerName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setObject -- @param self --- @param #cc.Ref ref --- @param #cc.Node node --- @param #string str +-- @param #cc.Ref obj +-- @param #cc.Node pNode +-- @param #string propName -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getContainerSize -- @param self --- @param #cc.Node node +-- @param #cc.Node pNode -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] actionForCallbackChannel -- @param self --- @param #cc.CCBSequenceProperty ccbsequenceproperty +-- @param #cc.CCBSequenceProperty channel -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentOutletNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] addDocumentCallbackControlEvents -- @param self --- @param #int eventtype +-- @param #int eventType -------------------------------- +-- -- @function [parent=#CCBAnimationManager] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getKeyframeCallbacks -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentCallbackControlEvents -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setRootContainerSize -- @param self --- @param #size_table size +-- @param #size_table rootContainerSize -------------------------------- +-- -- @function [parent=#CCBAnimationManager] runAnimationsForSequenceIdTweenDuration -- @param self --- @param #int int --- @param #float float +-- @param #int nSeqId +-- @param #float fTweenDuraiton -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getRunningSequenceName -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getAutoPlaySequenceId -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] addDocumentCallbackName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getRootNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] addDocumentOutletNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getSequenceDuration -- @param self --- @param #char char +-- @param #char pSequenceName -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] addDocumentCallbackNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#CCBAnimationManager] runAnimationsForSequenceNamed -- @param self --- @param #char char +-- @param #char pName -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getSequenceId -- @param self --- @param #char char +-- @param #char pSequenceName -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentCallbackNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBAnimationManager] setSequences -- @param self --- @param #array_table array +-- @param #array_table seq -------------------------------- +-- -- @function [parent=#CCBAnimationManager] debug -- @param self -------------------------------- +-- -- @function [parent=#CCBAnimationManager] getDocumentControllerName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- js ctor -- @function [parent=#CCBAnimationManager] CCBAnimationManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CCBReader.lua b/cocos/scripting/lua-bindings/auto/api/CCBReader.lua index b6fe92d042..78fba9b128 100644 --- a/cocos/scripting/lua-bindings/auto/api/CCBReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/CCBReader.lua @@ -5,101 +5,122 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#CCBReader] addOwnerOutletName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#CCBReader] getOwnerCallbackNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBReader] addDocumentCallbackControlEvents -- @param self --- @param #int eventtype +-- @param #int eventType -------------------------------- +-- -- @function [parent=#CCBReader] setCCBRootPath -- @param self --- @param #char char +-- @param #char ccbRootPath -------------------------------- +-- -- @function [parent=#CCBReader] addOwnerOutletNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#CCBReader] getOwnerCallbackNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBReader] readSoundKeyframesForSeq -- @param self --- @param #cc.CCBSequence ccbsequence +-- @param #cc.CCBSequence seq -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CCBReader] getCCBRootPath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#CCBReader] getOwnerCallbackControlEvents -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBReader] getOwnerOutletNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBReader] readUTF8 -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#CCBReader] addOwnerCallbackControlEvents -- @param self --- @param #int eventtype +-- @param #int type -------------------------------- +-- -- @function [parent=#CCBReader] getOwnerOutletNames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- js setActionManager
+-- lua setActionManager -- @function [parent=#CCBReader] setAnimationManager -- @param self --- @param #cc.CCBAnimationManager ccbanimationmanager +-- @param #cc.CCBAnimationManager pAnimationManager -------------------------------- +-- -- @function [parent=#CCBReader] readCallbackKeyframesForSeq -- @param self --- @param #cc.CCBSequence ccbsequence +-- @param #cc.CCBSequence seq -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CCBReader] getAnimationManagersForNodes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#CCBReader] getNodesWithAnimationManagers -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- js getActionManager
+-- lua getActionManager -- @function [parent=#CCBReader] getAnimationManager -- @param self -- @return CCBAnimationManager#CCBAnimationManager ret (return value: cc.CCBAnimationManager) -------------------------------- +-- -- @function [parent=#CCBReader] setResolutionScale -- @param self --- @param #float float +-- @param #float scale -------------------------------- -- @overload self, cc.CCBReader @@ -107,9 +128,9 @@ -- @overload self -- @function [parent=#CCBReader] CCBReader -- @param self --- @param #cc.NodeLoaderLibrary nodeloaderlibrary --- @param #cc.CCBMemberVariableAssigner ccbmembervariableassigner --- @param #cc.CCBSelectorResolver ccbselectorresolver --- @param #cc.NodeLoaderListener nodeloaderlistener +-- @param #cc.NodeLoaderLibrary pNodeLoaderLibrary +-- @param #cc.CCBMemberVariableAssigner pCCBMemberVariableAssigner +-- @param #cc.CCBSelectorResolver pCCBSelectorResolver +-- @param #cc.NodeLoaderListener pNodeLoaderListener return nil diff --git a/cocos/scripting/lua-bindings/auto/api/CallFunc.lua b/cocos/scripting/lua-bindings/auto/api/CallFunc.lua index f45623fe4b..678814b81e 100644 --- a/cocos/scripting/lua-bindings/auto/api/CallFunc.lua +++ b/cocos/scripting/lua-bindings/auto/api/CallFunc.lua @@ -5,30 +5,36 @@ -- @parent_module cc -------------------------------- +-- executes the callback -- @function [parent=#CallFunc] execute -- @param self -------------------------------- +-- -- @function [parent=#CallFunc] getTargetCallback -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#CallFunc] setTargetCallback -- @param self --- @param #cc.Ref ref +-- @param #cc.Ref sel -------------------------------- +-- -- @function [parent=#CallFunc] clone -- @param self -- @return CallFunc#CallFunc ret (return value: cc.CallFunc) -------------------------------- +-- -- @function [parent=#CallFunc] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#CallFunc] reverse -- @param self -- @return CallFunc#CallFunc ret (return value: cc.CallFunc) diff --git a/cocos/scripting/lua-bindings/auto/api/Camera.lua b/cocos/scripting/lua-bindings/auto/api/Camera.lua index af10889528..8f80b80254 100644 --- a/cocos/scripting/lua-bindings/auto/api/Camera.lua +++ b/cocos/scripting/lua-bindings/auto/api/Camera.lua @@ -5,79 +5,108 @@ -- @parent_module cc -------------------------------- +-- Gets the camera's projection matrix.
+-- return The camera projection matrix. -- @function [parent=#Camera] getProjectionMatrix -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- get view projection matrix -- @function [parent=#Camera] getViewProjectionMatrix -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- Gets the camera's view matrix.
+-- return The camera view matrix. -- @function [parent=#Camera] getViewMatrix -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- get & set Camera flag -- @function [parent=#Camera] getCameraFlag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Gets the type of camera.
+-- return The camera type. -- @function [parent=#Camera] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Creates a view matrix based on the specified input parameters.
+-- param eyePosition The eye position.
+-- param targetPosition The target's center position.
+-- param up The up vector.
+-- param dst A matrix to store the result in. -- @function [parent=#Camera] lookAt -- @param self --- @param #vec3_table vec3 --- @param #vec3_table vec3 +-- @param #vec3_table target +-- @param #vec3_table up -------------------------------- +-- -- @function [parent=#Camera] setCameraFlag -- @param self --- @param #int cameraflag +-- @param #int flag -------------------------------- +-- Convert the specified point of viewport from screenspace coordinate into the worldspace coordinate. -- @function [parent=#Camera] unproject -- @param self --- @param #size_table size --- @param #vec3_table vec3 --- @param #vec3_table vec3 +-- @param #size_table viewport +-- @param #vec3_table src +-- @param #vec3_table dst -------------------------------- +-- create default camera, the camera type depends on Director::getProjection -- @function [parent=#Camera] create -- @param self -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- +-- Creates a perspective camera.
+-- param fieldOfView The field of view for the perspective camera (normally in the range of 40-60 degrees).
+-- param aspectRatio The aspect ratio of the camera (normally the width of the viewport divided by the height of the viewport).
+-- param nearPlane The near plane distance.
+-- param farPlane The far plane distance. -- @function [parent=#Camera] createPerspective -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float fieldOfView +-- @param #float aspectRatio +-- @param #float nearPlane +-- @param #float farPlane -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- +-- Creates an orthographic camera.
+-- param zoomX The zoom factor along the X-axis of the orthographic projection (the width of the ortho projection).
+-- param zoomY The zoom factor along the Y-axis of the orthographic projection (the height of the ortho projection).
+-- param aspectRatio The aspect ratio of the orthographic projection.
+-- param nearPlane The near plane distance.
+-- param farPlane The far plane distance. -- @function [parent=#Camera] createOrthographic -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float zoomX +-- @param #float zoomY +-- @param #float nearPlane +-- @param #float farPlane -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- +-- -- @function [parent=#Camera] getVisitingCamera -- @param self -- @return Camera#Camera ret (return value: cc.Camera) -------------------------------- +-- Sets the position (X, Y, and Z) in its parent's coordinate system -- @function [parent=#Camera] setPosition3D -- @param self --- @param #vec3_table vec3 +-- @param #vec3_table position return nil diff --git a/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua b/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua index 48c898c9ba..cc0fd9ca76 100644 --- a/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua @@ -5,26 +5,31 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#CardinalSplineBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#CardinalSplineBy] clone -- @param self -- @return CardinalSplineBy#CardinalSplineBy ret (return value: cc.CardinalSplineBy) -------------------------------- +-- -- @function [parent=#CardinalSplineBy] updatePosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table newPos -------------------------------- +-- -- @function [parent=#CardinalSplineBy] reverse -- @param self -- @return CardinalSplineBy#CardinalSplineBy ret (return value: cc.CardinalSplineBy) -------------------------------- +-- -- @function [parent=#CardinalSplineBy] CardinalSplineBy -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua b/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua index fd5bcb141b..324ca3035f 100644 --- a/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua @@ -5,44 +5,53 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#CardinalSplineTo] getPoints -- @param self -- @return point_table#point_table ret (return value: point_table) -------------------------------- +-- -- @function [parent=#CardinalSplineTo] updatePosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table newPos -------------------------------- +-- initializes the action with a duration and an array of points -- @function [parent=#CardinalSplineTo] initWithDuration -- @param self --- @param #float float --- @param #point_table pointarray --- @param #float float +-- @param #float duration +-- @param #point_table points +-- @param #float tension -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CardinalSplineTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#CardinalSplineTo] clone -- @param self -- @return CardinalSplineTo#CardinalSplineTo ret (return value: cc.CardinalSplineTo) -------------------------------- +-- -- @function [parent=#CardinalSplineTo] reverse -- @param self -- @return CardinalSplineTo#CardinalSplineTo ret (return value: cc.CardinalSplineTo) -------------------------------- +-- -- @function [parent=#CardinalSplineTo] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- js NA
+-- lua NA -- @function [parent=#CardinalSplineTo] CardinalSplineTo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua b/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua index 3b82d8aae6..fda07cef71 100644 --- a/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/CatmullRomBy.lua @@ -5,18 +5,21 @@ -- @parent_module cc -------------------------------- +-- initializes the action with a duration and an array of points -- @function [parent=#CatmullRomBy] initWithDuration -- @param self --- @param #float float --- @param #point_table pointarray +-- @param #float dt +-- @param #point_table points -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CatmullRomBy] clone -- @param self -- @return CatmullRomBy#CatmullRomBy ret (return value: cc.CatmullRomBy) -------------------------------- +-- -- @function [parent=#CatmullRomBy] reverse -- @param self -- @return CatmullRomBy#CatmullRomBy ret (return value: cc.CatmullRomBy) diff --git a/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua b/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua index 104e624774..c0fba61301 100644 --- a/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua @@ -5,18 +5,21 @@ -- @parent_module cc -------------------------------- +-- initializes the action with a duration and an array of points -- @function [parent=#CatmullRomTo] initWithDuration -- @param self --- @param #float float --- @param #point_table pointarray +-- @param #float dt +-- @param #point_table points -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#CatmullRomTo] clone -- @param self -- @return CatmullRomTo#CatmullRomTo ret (return value: cc.CatmullRomTo) -------------------------------- +-- -- @function [parent=#CatmullRomTo] reverse -- @param self -- @return CatmullRomTo#CatmullRomTo ret (return value: cc.CatmullRomTo) diff --git a/cocos/scripting/lua-bindings/auto/api/CheckBox.lua b/cocos/scripting/lua-bindings/auto/api/CheckBox.lua index cdbab92888..3ef7cf5013 100644 --- a/cocos/scripting/lua-bindings/auto/api/CheckBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/CheckBox.lua @@ -5,94 +5,123 @@ -- @parent_module ccui -------------------------------- +-- Load backGroundSelected texture for checkbox.
+-- param backGroundSelected backGround selected state texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureBackGroundSelected -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string backGroundSelected +-- @param #int texType -------------------------------- +-- Load backGroundDisabled texture for checkbox.
+-- param backGroundDisabled backGroundDisabled texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureBackGroundDisabled -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string backGroundDisabled +-- @param #int texType -------------------------------- +-- -- @function [parent=#CheckBox] setSelected -- @param self --- @param #bool bool +-- @param #bool selected -------------------------------- +-- -- @function [parent=#CheckBox] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- Load cross texture for checkbox.
+-- param cross cross texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureFrontCross -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string +-- @param #int texType -------------------------------- +-- -- @function [parent=#CheckBox] isSelected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Load textures for checkbox.
+-- param backGround backGround texture.
+-- param backGroundSelected backGround selected state texture.
+-- param cross cross texture.
+-- param frontCrossDisabled cross dark state texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextures -- @param self --- @param #string str --- @param #string str --- @param #string str --- @param #string str --- @param #string str --- @param #int texturerestype +-- @param #string backGround +-- @param #string backGroundSelected +-- @param #string cross +-- @param #string backGroundDisabled +-- @param #string frontCrossDisabled +-- @param #int texType -------------------------------- +-- Load backGround texture for checkbox.
+-- param backGround backGround texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureBackGround -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string backGround +-- @param #int type -------------------------------- +-- Load frontCrossDisabled texture for checkbox.
+-- param frontCrossDisabled frontCrossDisabled texture.
+-- param texType @see TextureResType -- @function [parent=#CheckBox] loadTextureFrontCrossDisabled -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string frontCrossDisabled +-- @param #int texType -------------------------------- -- @overload self, string, string, string, string, string, int -- @overload self -- @function [parent=#CheckBox] create -- @param self --- @param #string str --- @param #string str --- @param #string str --- @param #string str --- @param #string str --- @param #int texturerestype +-- @param #string backGround +-- @param #string backGroundSeleted +-- @param #string cross +-- @param #string backGroundDisabled +-- @param #string frontCrossDisabled +-- @param #int texType -- @return CheckBox#CheckBox ret (retunr value: ccui.CheckBox) -------------------------------- +-- -- @function [parent=#CheckBox] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#CheckBox] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#CheckBox] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#CheckBox] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Default constructor -- @function [parent=#CheckBox] CheckBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua b/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua index f9ac0622a2..a8ac20c195 100644 --- a/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua @@ -5,48 +5,62 @@ -- @parent_module cc -------------------------------- +-- Inverted. If this is set to true,
+-- the stencil is inverted, so the content is drawn where the stencil is NOT drawn.
+-- This default to false. -- @function [parent=#ClippingNode] isInverted -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ClippingNode] setInverted -- @param self --- @param #bool bool +-- @param #bool inverted -------------------------------- +-- -- @function [parent=#ClippingNode] setStencil -- @param self --- @param #cc.Node node +-- @param #cc.Node stencil -------------------------------- +-- The alpha threshold.
+-- The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.
+-- Should be a float between 0 and 1.
+-- This default to 1 (so alpha test is disabled). -- @function [parent=#ClippingNode] getAlphaThreshold -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- The Node to use as a stencil to do the clipping.
+-- The stencil node will be retained.
+-- This default to nil. -- @function [parent=#ClippingNode] getStencil -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#ClippingNode] setAlphaThreshold -- @param self --- @param #float float +-- @param #float alphaThreshold -------------------------------- -- @overload self, cc.Node -- @overload self -- @function [parent=#ClippingNode] create -- @param self --- @param #cc.Node node +-- @param #cc.Node stencil -- @return ClippingNode#ClippingNode ret (retunr value: cc.ClippingNode) -------------------------------- +-- -- @function [parent=#ClippingNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua b/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua index ba3389570c..8d70edb97b 100644 --- a/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ColorFrame.lua @@ -5,41 +5,49 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ColorFrame] getAlpha -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- -- @function [parent=#ColorFrame] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#ColorFrame] setAlpha -- @param self --- @param #unsigned char char +-- @param #unsigned char alpha -------------------------------- +-- -- @function [parent=#ColorFrame] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- -- @function [parent=#ColorFrame] create -- @param self -- @return ColorFrame#ColorFrame ret (return value: ccs.ColorFrame) -------------------------------- +-- -- @function [parent=#ColorFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#ColorFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#ColorFrame] ColorFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua b/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua index ea707b9cd1..4924c02278 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComAttribute.lua @@ -5,82 +5,95 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ComAttribute] getFloat -- @param self --- @param #string str --- @param #float float +-- @param #string key +-- @param #float def -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ComAttribute] getString -- @param self --- @param #string str --- @param #string str +-- @param #string key +-- @param #string def -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ComAttribute] setFloat -- @param self --- @param #string str --- @param #float float +-- @param #string key +-- @param #float value -------------------------------- +-- -- @function [parent=#ComAttribute] setString -- @param self --- @param #string str --- @param #string str +-- @param #string key +-- @param #string value -------------------------------- +-- -- @function [parent=#ComAttribute] getBool -- @param self --- @param #string str --- @param #bool bool +-- @param #string key +-- @param #bool def -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAttribute] setInt -- @param self --- @param #string str --- @param #int int +-- @param #string key +-- @param #int value -------------------------------- +-- -- @function [parent=#ComAttribute] parse -- @param self --- @param #string str +-- @param #string jsonFile -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAttribute] getInt -- @param self --- @param #string str --- @param #int int +-- @param #string key +-- @param #int def -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ComAttribute] setBool -- @param self --- @param #string str --- @param #bool bool +-- @param #string key +-- @param #bool value -------------------------------- +-- -- @function [parent=#ComAttribute] create -- @param self -- @return ComAttribute#ComAttribute ret (return value: ccs.ComAttribute) -------------------------------- +-- -- @function [parent=#ComAttribute] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#ComAttribute] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAttribute] serialize -- @param self --- @param #void void +-- @param #void r -- @return bool#bool ret (return value: bool) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ComAudio.lua b/cocos/scripting/lua-bindings/auto/api/ComAudio.lua index b7d19dbb4b..a79ab68966 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComAudio.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComAudio.lua @@ -5,35 +5,42 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ComAudio] stopAllEffects -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] getEffectsVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ComAudio] stopEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- -- @function [parent=#ComAudio] getBackgroundMusicVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ComAudio] willPlayBackgroundMusic -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAudio] setBackgroundMusicVolume -- @param self --- @param #float float +-- @param #float volume -------------------------------- +-- -- @function [parent=#ComAudio] end -- @param self @@ -42,34 +49,40 @@ -- @overload self, bool -- @function [parent=#ComAudio] stopBackgroundMusic -- @param self --- @param #bool bool +-- @param #bool bReleaseData -------------------------------- +-- -- @function [parent=#ComAudio] pauseBackgroundMusic -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] isBackgroundMusicPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAudio] isLoop -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAudio] resumeAllEffects -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] pauseAllEffects -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] preloadBackgroundMusic -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- -- @overload self, char @@ -77,8 +90,8 @@ -- @overload self -- @function [parent=#ComAudio] playBackgroundMusic -- @param self --- @param #char char --- @param #bool bool +-- @param #char pszFilePath +-- @param #bool bLoop -------------------------------- -- @overload self, char @@ -86,85 +99,101 @@ -- @overload self -- @function [parent=#ComAudio] playEffect -- @param self --- @param #char char --- @param #bool bool +-- @param #char pszFilePath +-- @param #bool bLoop -- @return unsigned int#unsigned int ret (retunr value: unsigned int) -------------------------------- +-- -- @function [parent=#ComAudio] preloadEffect -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- -- @function [parent=#ComAudio] setLoop -- @param self --- @param #bool bool +-- @param #bool bLoop -------------------------------- +-- -- @function [parent=#ComAudio] unloadEffect -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- -- @function [parent=#ComAudio] rewindBackgroundMusic -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] pauseEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- -- @function [parent=#ComAudio] resumeBackgroundMusic -- @param self -------------------------------- +-- -- @function [parent=#ComAudio] setFile -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- -- @function [parent=#ComAudio] setEffectsVolume -- @param self --- @param #float float +-- @param #float volume -------------------------------- +-- -- @function [parent=#ComAudio] getFile -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#ComAudio] resumeEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- -- @function [parent=#ComAudio] create -- @param self -- @return ComAudio#ComAudio ret (return value: ccs.ComAudio) -------------------------------- +-- -- @function [parent=#ComAudio] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#ComAudio] setEnabled -- @param self --- @param #bool bool +-- @param #bool b -------------------------------- +-- -- @function [parent=#ComAudio] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAudio] serialize -- @param self --- @param #void void +-- @param #void r -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComAudio] init -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/ComController.lua b/cocos/scripting/lua-bindings/auto/api/ComController.lua index 381558d96e..9eed2a6c57 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComController.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComController.lua @@ -5,36 +5,43 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ComController] create -- @param self -- @return ComController#ComController ret (return value: ccs.ComController) -------------------------------- +-- -- @function [parent=#ComController] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#ComController] setEnabled -- @param self --- @param #bool bool +-- @param #bool b -------------------------------- +-- -- @function [parent=#ComController] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ComController] update -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- -- @function [parent=#ComController] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#ComController] ComController -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ComRender.lua b/cocos/scripting/lua-bindings/auto/api/ComRender.lua index 9c69bbac35..afc835a203 100644 --- a/cocos/scripting/lua-bindings/auto/api/ComRender.lua +++ b/cocos/scripting/lua-bindings/auto/api/ComRender.lua @@ -5,11 +5,13 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ComRender] setNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#ComRender] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) @@ -20,18 +22,20 @@ -- @function [parent=#ComRender] create -- @param self -- @param #cc.Node node --- @param #char char +-- @param #char comName -- @return ComRender#ComRender ret (retunr value: ccs.ComRender) -------------------------------- +-- -- @function [parent=#ComRender] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#ComRender] serialize -- @param self --- @param #void void +-- @param #void r -- @return bool#bool ret (return value: bool) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Component.lua b/cocos/scripting/lua-bindings/auto/api/Component.lua index 1c22bbb440..1f4132282b 100644 --- a/cocos/scripting/lua-bindings/auto/api/Component.lua +++ b/cocos/scripting/lua-bindings/auto/api/Component.lua @@ -5,46 +5,55 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Component] setEnabled -- @param self --- @param #bool bool +-- @param #bool b -------------------------------- +-- -- @function [parent=#Component] setName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#Component] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Component] update -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- -- @function [parent=#Component] getOwner -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#Component] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Component] setOwner -- @param self --- @param #cc.Node node +-- @param #cc.Node pOwner -------------------------------- +-- -- @function [parent=#Component] getName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Component] create -- @param self -- @return Component#Component ret (return value: cc.Component) diff --git a/cocos/scripting/lua-bindings/auto/api/Console.lua b/cocos/scripting/lua-bindings/auto/api/Console.lua index cdca8f4060..25abbbf30c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Console.lua +++ b/cocos/scripting/lua-bindings/auto/api/Console.lua @@ -5,24 +5,28 @@ -- @parent_module cc -------------------------------- +-- stops the Console. 'stop' will be called at destruction time as well -- @function [parent=#Console] stop -- @param self -------------------------------- +-- starts listening to specifed TCP port -- @function [parent=#Console] listenOnTCP -- @param self --- @param #int int +-- @param #int port -- @return bool#bool ret (return value: bool) -------------------------------- +-- starts listening to specifed file descriptor -- @function [parent=#Console] listenOnFileDescriptor -- @param self --- @param #int int +-- @param #int fd -- @return bool#bool ret (return value: bool) -------------------------------- +-- log something in the console -- @function [parent=#Console] log -- @param self --- @param #char char +-- @param #char buf return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ContourData.lua b/cocos/scripting/lua-bindings/auto/api/ContourData.lua index f1a46b0aa1..078b7483de 100644 --- a/cocos/scripting/lua-bindings/auto/api/ContourData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ContourData.lua @@ -5,21 +5,25 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ContourData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ContourData] addVertex -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table vertex -------------------------------- +-- -- @function [parent=#ContourData] create -- @param self -- @return ContourData#ContourData ret (return value: ccs.ContourData) -------------------------------- +-- js ctor -- @function [parent=#ContourData] ContourData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Control.lua b/cocos/scripting/lua-bindings/auto/api/Control.lua index 8e832134da..df1f899b52 100644 --- a/cocos/scripting/lua-bindings/auto/api/Control.lua +++ b/cocos/scripting/lua-bindings/auto/api/Control.lua @@ -5,53 +5,65 @@ -- @parent_module cc -------------------------------- +-- Tells whether the control is enabled. -- @function [parent=#Control] setEnabled -- @param self --- @param #bool bool +-- @param #bool bEnabled -------------------------------- +-- -- @function [parent=#Control] onTouchMoved -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- -- @function [parent=#Control] getState -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Control] onTouchEnded -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- Sends action messages for the given control events.
+-- param controlEvents A bitmask whose set flags specify the control events for
+-- which action messages are sent. See "CCControlEvent" for bitmask constants. -- @function [parent=#Control] sendActionsForControlEvents -- @param self --- @param #int eventtype +-- @param #int controlEvents -------------------------------- +-- A Boolean value that determines the control selected state. -- @function [parent=#Control] setSelected -- @param self --- @param #bool bool +-- @param #bool bSelected -------------------------------- +-- -- @function [parent=#Control] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Control] onTouchCancelled -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- Updates the control layout using its current internal state. -- @function [parent=#Control] needsLayout -- @param self -------------------------------- +-- -- @function [parent=#Control] onTouchBegan -- @param self -- @param #cc.Touch touch @@ -59,50 +71,64 @@ -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Control] hasVisibleParents -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Control] isSelected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns a boolean value that indicates whether a touch is inside the bounds
+-- of the receiver. The given touch must be relative to the world.
+-- param touch A Touch object that represents a touch.
+-- return Whether a touch is inside the receiver's rect. -- @function [parent=#Control] isTouchInside -- @param self -- @param #cc.Touch touch -- @return bool#bool ret (return value: bool) -------------------------------- +-- A Boolean value that determines whether the control is highlighted. -- @function [parent=#Control] setHighlighted -- @param self --- @param #bool bool +-- @param #bool bHighlighted -------------------------------- +-- Returns a point corresponding to the touh location converted into the
+-- control space coordinates.
+-- param touch A Touch object that represents a touch. -- @function [parent=#Control] getTouchLocation -- @param self -- @param #cc.Touch touch -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Control] isHighlighted -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Creates a Control object -- @function [parent=#Control] create -- @param self -- @return Control#Control ret (return value: cc.Control) -------------------------------- +-- -- @function [parent=#Control] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Control] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool bOpacityModifyRGB return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua index 005e6b28da..1d965170ff 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua @@ -5,102 +5,133 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlButton] isPushed -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlButton] setSelected -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Sets the title label to use for the specified state.
+-- If a property is not specified for a state, the default is to use
+-- the ButtonStateNormal value.
+-- param label The title label to use for the specified state.
+-- param state The state that uses the specified title. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setTitleLabelForState -- @param self --- @param #cc.Node node +-- @param #cc.Node label -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] setAdjustBackgroundImage -- @param self --- @param #bool bool +-- @param #bool adjustBackgroundImage -------------------------------- +-- -- @function [parent=#ControlButton] setHighlighted -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#ControlButton] setZoomOnTouchDown -- @param self --- @param #bool bool +-- @param #bool var -------------------------------- +-- Sets the title string to use for the specified state.
+-- If a property is not specified for a state, the default is to use
+-- the ButtonStateNormal value.
+-- param title The title string to use for the specified state.
+-- param state The state that uses the specified title. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setTitleForState -- @param self --- @param #string str +-- @param #string title -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] setLabelAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table var -------------------------------- +-- -- @function [parent=#ControlButton] getLabelAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ControlButton] getTitleTTFSizeForState -- @param self -- @param #int state -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlButton] setTitleTTFForState -- @param self --- @param #string str +-- @param #string fntFile -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] setTitleTTFSizeForState -- @param self --- @param #float float +-- @param #float size -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] setTitleLabel -- @param self --- @param #cc.Node node +-- @param #cc.Node var -------------------------------- +-- -- @function [parent=#ControlButton] setPreferredSize -- @param self --- @param #size_table size +-- @param #size_table var -------------------------------- +-- -- @function [parent=#ControlButton] getCurrentTitleColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#ControlButton] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Returns the background sprite used for a state.
+-- param state The state that uses the background sprite. Possible values are
+-- described in "CCControlState". -- @function [parent=#ControlButton] getBackgroundSpriteForState -- @param self -- @param #int state -- @return Scale9Sprite#Scale9Sprite ret (return value: cc.Scale9Sprite) -------------------------------- +-- -- @function [parent=#ControlButton] getHorizontalOrigin -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ControlButton] needsLayout -- @param self @@ -112,105 +143,145 @@ -- @return string#string ret (retunr value: string) -------------------------------- +-- -- @function [parent=#ControlButton] getScaleRatio -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlButton] getTitleTTFForState -- @param self -- @param #int state -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ControlButton] getBackgroundSprite -- @param self -- @return Scale9Sprite#Scale9Sprite ret (return value: cc.Scale9Sprite) -------------------------------- +-- Returns the title color used for a state.
+-- param state The state that uses the specified color. The values are described
+-- in "CCControlState".
+-- return The color of the title for the specified state. -- @function [parent=#ControlButton] getTitleColorForState -- @param self -- @param #int state -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Sets the color of the title to use for the specified state.
+-- param color The color of the title to use for the specified state.
+-- param state The state that uses the specified color. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setTitleColorForState -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -- @param #int state -------------------------------- +-- Adjust the background image. YES by default. If the property is set to NO, the
+-- background will use the prefered size of the background image. -- @function [parent=#ControlButton] doesAdjustBackgroundImage -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the background spriteFrame to use for the specified button state.
+-- param spriteFrame The background spriteFrame to use for the specified state.
+-- param state The state that uses the specified image. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setBackgroundSpriteFrameForState -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame spriteFrame -- @param #int state -------------------------------- +-- Sets the background sprite to use for the specified button state.
+-- param sprite The background sprite to use for the specified state.
+-- param state The state that uses the specified image. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setBackgroundSpriteForState -- @param self --- @param #cc.Scale9Sprite scale9sprite +-- @param #cc.Scale9Sprite sprite -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] setScaleRatio -- @param self --- @param #float float +-- @param #float var -------------------------------- +-- -- @function [parent=#ControlButton] setBackgroundSprite -- @param self --- @param #cc.Scale9Sprite scale9sprite +-- @param #cc.Scale9Sprite var -------------------------------- +-- -- @function [parent=#ControlButton] getTitleLabel -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#ControlButton] getPreferredSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#ControlButton] getVerticalMargin -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Returns the title label used for a state.
+-- param state The state that uses the title label. Possible values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] getTitleLabelForState -- @param self -- @param #int state -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#ControlButton] setMargins -- @param self --- @param #int int --- @param #int int +-- @param #int marginH +-- @param #int marginV -------------------------------- +-- Sets the font of the label, changes the label to a BMFont if neccessary.
+-- param fntFile The name of the font to change to
+-- param state The state that uses the specified fntFile. The values are described
+-- in "CCControlState". -- @function [parent=#ControlButton] setTitleBMFontForState -- @param self --- @param #string str +-- @param #string fntFile -- @param #int state -------------------------------- +-- -- @function [parent=#ControlButton] getTitleBMFontForState -- @param self -- @param #int state -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ControlButton] getZoomOnTouchDown -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the title used for a state.
+-- param state The state that uses the title. Possible values are described in
+-- "CCControlState".
+-- return The title for the specified state. -- @function [parent=#ControlButton] getTitleForState -- @param self -- @param #int state @@ -223,50 +294,58 @@ -- @overload self, string, string, float -- @function [parent=#ControlButton] create -- @param self --- @param #string str --- @param #string str --- @param #float float +-- @param #string title +-- @param #string fontName +-- @param #float fontSize -- @return ControlButton#ControlButton ret (retunr value: cc.ControlButton) -------------------------------- +-- -- @function [parent=#ControlButton] onTouchMoved -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- -- @function [parent=#ControlButton] onTouchEnded -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- -- @function [parent=#ControlButton] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table -------------------------------- +-- -- @function [parent=#ControlButton] onTouchCancelled -- @param self -- @param #cc.Touch touch -- @param #cc.Event event -------------------------------- +-- -- @function [parent=#ControlButton] setOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char var -------------------------------- +-- -- @function [parent=#ControlButton] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- -- @function [parent=#ControlButton] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor -------------------------------- +-- -- @function [parent=#ControlButton] onTouchBegan -- @param self -- @param #cc.Touch touch diff --git a/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua index f7e3e3cbe2..b46d5e855b 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua @@ -5,68 +5,81 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlColourPicker] setEnabled -- @param self --- @param #bool bool +-- @param #bool bEnabled -------------------------------- +-- -- @function [parent=#ControlColourPicker] getHuePicker -- @param self -- @return ControlHuePicker#ControlHuePicker ret (return value: cc.ControlHuePicker) -------------------------------- +-- -- @function [parent=#ControlColourPicker] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table colorValue -------------------------------- +-- -- @function [parent=#ControlColourPicker] hueSliderValueChanged -- @param self --- @param #cc.Ref ref --- @param #int eventtype +-- @param #cc.Ref sender +-- @param #int controlEvent -------------------------------- +-- -- @function [parent=#ControlColourPicker] getcolourPicker -- @param self -- @return ControlSaturationBrightnessPicker#ControlSaturationBrightnessPicker ret (return value: cc.ControlSaturationBrightnessPicker) -------------------------------- +-- -- @function [parent=#ControlColourPicker] setBackground -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlColourPicker] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlColourPicker] setcolourPicker -- @param self --- @param #cc.ControlSaturationBrightnessPicker controlsaturationbrightnesspicker +-- @param #cc.ControlSaturationBrightnessPicker var -------------------------------- +-- -- @function [parent=#ControlColourPicker] colourSliderValueChanged -- @param self --- @param #cc.Ref ref --- @param #int eventtype +-- @param #cc.Ref sender +-- @param #int controlEvent -------------------------------- +-- -- @function [parent=#ControlColourPicker] setHuePicker -- @param self --- @param #cc.ControlHuePicker controlhuepicker +-- @param #cc.ControlHuePicker var -------------------------------- +-- -- @function [parent=#ControlColourPicker] getBackground -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlColourPicker] create -- @param self -- @return ControlColourPicker#ControlColourPicker ret (return value: cc.ControlColourPicker) -------------------------------- +-- js ctor -- @function [parent=#ControlColourPicker] ControlColourPicker -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua index bedc24c43a..d907f2c9dd 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua @@ -5,83 +5,98 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlHuePicker] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#ControlHuePicker] initWithTargetAndPos -- @param self --- @param #cc.Node node --- @param #vec2_table vec2 +-- @param #cc.Node target +-- @param #vec2_table pos -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlHuePicker] setHue -- @param self --- @param #float float +-- @param #float val -------------------------------- +-- -- @function [parent=#ControlHuePicker] getStartPos -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ControlHuePicker] getHue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlHuePicker] getSlider -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlHuePicker] setBackground -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlHuePicker] setHuePercentage -- @param self --- @param #float float +-- @param #float val -------------------------------- +-- -- @function [parent=#ControlHuePicker] getBackground -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlHuePicker] getHuePercentage -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlHuePicker] setSlider -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlHuePicker] create -- @param self --- @param #cc.Node node --- @param #vec2_table vec2 +-- @param #cc.Node target +-- @param #vec2_table pos -- @return ControlHuePicker#ControlHuePicker ret (return value: cc.ControlHuePicker) -------------------------------- +-- -- @function [parent=#ControlHuePicker] onTouchMoved -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlHuePicker] onTouchBegan -- @param self -- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Event pEvent -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#ControlHuePicker] ControlHuePicker -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua b/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua index 0df5064b16..a5581e6695 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua @@ -5,143 +5,170 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setPreviousLocation -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table var -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setValue -- @param self --- @param #float float +-- @param #float value -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getProgressTimer -- @param self -- @return ProgressTimer#ProgressTimer ret (return value: cc.ProgressTimer) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getMaximumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Returns the angle in degree between line1 and line2. -- @function [parent=#ControlPotentiometer] angleInDegreesBetweenLineFromPoint_toPoint_toLineFromPoint_toPoint -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #vec2_table beginLineA +-- @param #vec2_table endLineA +-- @param #vec2_table beginLineB +-- @param #vec2_table endLineB -- @return float#float ret (return value: float) -------------------------------- +-- Factorize the event dispath into these methods. -- @function [parent=#ControlPotentiometer] potentiometerBegan -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table location -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setMaximumValue -- @param self --- @param #float float +-- @param #float maximumValue -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getMinimumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setThumbSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getPreviousLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Returns the distance between the point1 and point2. -- @function [parent=#ControlPotentiometer] distanceBetweenPointAndPoint -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #vec2_table point1 +-- @param #vec2_table point2 -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] potentiometerEnded -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table location -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setProgressTimer -- @param self --- @param #cc.ProgressTimer progresstimer +-- @param #cc.ProgressTimer var -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setMinimumValue -- @param self --- @param #float float +-- @param #float minimumValue -------------------------------- +-- -- @function [parent=#ControlPotentiometer] getThumbSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- Initializes a potentiometer with a track sprite and a progress bar.
+-- param trackSprite Sprite, that is used as a background.
+-- param progressTimer ProgressTimer, that is used as a progress bar. -- @function [parent=#ControlPotentiometer] initWithTrackSprite_ProgressTimer_ThumbSprite -- @param self --- @param #cc.Sprite sprite --- @param #cc.ProgressTimer progresstimer --- @param #cc.Sprite sprite +-- @param #cc.Sprite trackSprite +-- @param #cc.ProgressTimer progressTimer +-- @param #cc.Sprite thumbSprite -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] potentiometerMoved -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table location -------------------------------- +-- Creates potentiometer with a track filename and a progress filename. -- @function [parent=#ControlPotentiometer] create -- @param self --- @param #char char --- @param #char char --- @param #char char +-- @param #char backgroundFile +-- @param #char progressFile +-- @param #char thumbFile -- @return ControlPotentiometer#ControlPotentiometer ret (return value: cc.ControlPotentiometer) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] isTouchInside -- @param self -- @param #cc.Touch touch -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlPotentiometer] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#ControlPotentiometer] onTouchMoved -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlPotentiometer] onTouchEnded -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlPotentiometer] onTouchBegan -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#ControlPotentiometer] ControlPotentiometer -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua index 83a6a99694..332012a086 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua @@ -5,60 +5,71 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getShadow -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] initWithTargetAndPos -- @param self --- @param #cc.Node node --- @param #vec2_table vec2 +-- @param #cc.Node target +-- @param #vec2_table pos -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getStartPos -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getOverlay -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getSlider -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getBackground -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getSaturation -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] getBrightness -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSaturationBrightnessPicker] create -- @param self --- @param #cc.Node node --- @param #vec2_table vec2 +-- @param #cc.Node target +-- @param #vec2_table pos -- @return ControlSaturationBrightnessPicker#ControlSaturationBrightnessPicker ret (return value: cc.ControlSaturationBrightnessPicker) -------------------------------- +-- js ctor -- @function [parent=#ControlSaturationBrightnessPicker] ControlSaturationBrightnessPicker -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua b/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua index d192cf7a93..33e66b6ccf 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua @@ -5,76 +5,91 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlSlider] getSelectedThumbSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSlider] locationFromTouch -- @param self -- @param #cc.Touch touch -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ControlSlider] setSelectedThumbSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlSlider] setProgressSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlSlider] getMaximumAllowedValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSlider] getMinimumAllowedValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSlider] getMinimumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSlider] setThumbSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlSlider] setMinimumValue -- @param self --- @param #float float +-- @param #float val -------------------------------- +-- -- @function [parent=#ControlSlider] setMinimumAllowedValue -- @param self --- @param #float float +-- @param #float var -------------------------------- +-- -- @function [parent=#ControlSlider] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#ControlSlider] setValue -- @param self --- @param #float float +-- @param #float val -------------------------------- +-- -- @function [parent=#ControlSlider] setMaximumValue -- @param self --- @param #float float +-- @param #float val -------------------------------- +-- -- @function [parent=#ControlSlider] needsLayout -- @param self -------------------------------- +-- -- @function [parent=#ControlSlider] getBackgroundSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) @@ -84,47 +99,54 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite -- @function [parent=#ControlSlider] initWithSprites -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite +-- @param #cc.Sprite backgroundSprite +-- @param #cc.Sprite progressSprite +-- @param #cc.Sprite thumbSprite +-- @param #cc.Sprite selectedThumbSprite -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#ControlSlider] getMaximumValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSlider] isTouchInside -- @param self -- @param #cc.Touch touch -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlSlider] getValue -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ControlSlider] getThumbSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSlider] getProgressSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlSlider] setBackgroundSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlSlider] setMaximumAllowedValue -- @param self --- @param #float float +-- @param #float var -------------------------------- -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite @@ -133,13 +155,14 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite -- @function [parent=#ControlSlider] create -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite +-- @param #cc.Sprite backgroundSprite +-- @param #cc.Sprite pogressSprite +-- @param #cc.Sprite thumbSprite +-- @param #cc.Sprite selectedThumbSprite -- @return ControlSlider#ControlSlider ret (retunr value: cc.ControlSlider) -------------------------------- +-- js ctor -- @function [parent=#ControlSlider] ControlSlider -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua b/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua index f7804e0d95..0e5009c367 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua @@ -5,138 +5,164 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlStepper] setMinusSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlStepper] getMinusLabel -- @param self -- @return Label#Label ret (return value: cc.Label) -------------------------------- +-- -- @function [parent=#ControlStepper] setWraps -- @param self --- @param #bool bool +-- @param #bool wraps -------------------------------- +-- -- @function [parent=#ControlStepper] isContinuous -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlStepper] getMinusSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- Update the layout of the stepper with the given touch location. -- @function [parent=#ControlStepper] updateLayoutUsingTouchLocation -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table location -------------------------------- +-- Set the numeric value of the stepper. If send is true, the Control::EventType::VALUE_CHANGED is sent. -- @function [parent=#ControlStepper] setValueWithSendingEvent -- @param self --- @param #double double --- @param #bool bool +-- @param #double value +-- @param #bool send -------------------------------- +-- -- @function [parent=#ControlStepper] getPlusLabel -- @param self -- @return Label#Label ret (return value: cc.Label) -------------------------------- +-- Stop the autorepeat. -- @function [parent=#ControlStepper] stopAutorepeat -- @param self -------------------------------- +-- -- @function [parent=#ControlStepper] setMinimumValue -- @param self --- @param #double double +-- @param #double minimumValue -------------------------------- +-- -- @function [parent=#ControlStepper] getPlusSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#ControlStepper] setPlusSprite -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite var -------------------------------- +-- -- @function [parent=#ControlStepper] setMinusLabel -- @param self --- @param #cc.Label label +-- @param #cc.Label var -------------------------------- +-- -- @function [parent=#ControlStepper] setValue -- @param self --- @param #double double +-- @param #double value -------------------------------- +-- -- @function [parent=#ControlStepper] setStepValue -- @param self --- @param #double double +-- @param #double stepValue -------------------------------- +-- -- @function [parent=#ControlStepper] setMaximumValue -- @param self --- @param #double double +-- @param #double maximumValue -------------------------------- +-- -- @function [parent=#ControlStepper] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- Start the autorepeat increment/decrement. -- @function [parent=#ControlStepper] startAutorepeat -- @param self -------------------------------- +-- -- @function [parent=#ControlStepper] initWithMinusSpriteAndPlusSprite -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite +-- @param #cc.Sprite minusSprite +-- @param #cc.Sprite plusSprite -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlStepper] getValue -- @param self -- @return double#double ret (return value: double) -------------------------------- +-- -- @function [parent=#ControlStepper] setPlusLabel -- @param self --- @param #cc.Label label +-- @param #cc.Label var -------------------------------- +-- -- @function [parent=#ControlStepper] create -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite +-- @param #cc.Sprite minusSprite +-- @param #cc.Sprite plusSprite -- @return ControlStepper#ControlStepper ret (return value: cc.ControlStepper) -------------------------------- +-- -- @function [parent=#ControlStepper] onTouchMoved -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlStepper] onTouchEnded -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlStepper] onTouchBegan -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#ControlStepper] ControlStepper -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua b/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua index fdff4eddfa..e7841e64f2 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua @@ -5,19 +5,21 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ControlSwitch] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- -- @overload self, bool -- @overload self, bool, bool -- @function [parent=#ControlSwitch] setOn -- @param self --- @param #bool bool --- @param #bool bool +-- @param #bool isOn +-- @param #bool animated -------------------------------- +-- -- @function [parent=#ControlSwitch] isOn -- @param self -- @return bool#bool ret (return value: bool) @@ -27,20 +29,22 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite -- @function [parent=#ControlSwitch] initWithMaskSprite -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Label label --- @param #cc.Label label +-- @param #cc.Sprite maskSprite +-- @param #cc.Sprite onSprite +-- @param #cc.Sprite offSprite +-- @param #cc.Sprite thumbSprite +-- @param #cc.Label onLabel +-- @param #cc.Label offLabel -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#ControlSwitch] hasMoved -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ControlSwitch] locationFromTouch -- @param self -- @param #cc.Touch touch @@ -51,40 +55,45 @@ -- @overload self, cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite, cc.Label, cc.Label -- @function [parent=#ControlSwitch] create -- @param self --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Sprite sprite --- @param #cc.Label label --- @param #cc.Label label +-- @param #cc.Sprite maskSprite +-- @param #cc.Sprite onSprite +-- @param #cc.Sprite offSprite +-- @param #cc.Sprite thumbSprite +-- @param #cc.Label onLabel +-- @param #cc.Label offLabel -- @return ControlSwitch#ControlSwitch ret (retunr value: cc.ControlSwitch) -------------------------------- +-- -- @function [parent=#ControlSwitch] onTouchMoved -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlSwitch] onTouchEnded -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlSwitch] onTouchCancelled -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#ControlSwitch] onTouchBegan -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#ControlSwitch] ControlSwitch -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Controller.lua b/cocos/scripting/lua-bindings/auto/api/Controller.lua index 160b455817..25246a3bf9 100644 --- a/cocos/scripting/lua-bindings/auto/api/Controller.lua +++ b/cocos/scripting/lua-bindings/auto/api/Controller.lua @@ -4,48 +4,66 @@ -- @parent_module cc -------------------------------- +-- Activate receives key event from external key. e.g. back,menu.
+-- Controller receives only standard key which contained within enum Key by default.
+-- warning The API only work on the android platform for support diversified game controller.
+-- param externalKeyCode external key code
+-- param receive true if external key event on this controller should be receive, false otherwise. -- @function [parent=#Controller] receiveExternalKeyEvent -- @param self --- @param #int int --- @param #bool bool +-- @param #int externalKeyCode +-- @param #bool receive -------------------------------- +-- -- @function [parent=#Controller] getDeviceName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Controller] isConnected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Controller] getDeviceId -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Changes the tag that is used to identify the controller easily.
+-- param tag A integer that identifies the controller. -- @function [parent=#Controller] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- Returns a tag that is used to identify the controller easily.
+-- return An integer that identifies the controller. -- @function [parent=#Controller] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- To start discovering new controllers
+-- warning The API only work on the IOS platform.Empty implementation on Android -- @function [parent=#Controller] startDiscoveryController -- @param self -------------------------------- +-- End the discovery process
+-- warning The API only work on the IOS platform.Empty implementation on Android -- @function [parent=#Controller] stopDiscoveryController -- @param self -------------------------------- +-- Gets a controller with its tag
+-- param tag An identifier to find the controller. -- @function [parent=#Controller] getControllerByTag -- @param self --- @param #int int +-- @param #int tag -- @return Controller#Controller ret (return value: cc.Controller) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/DelayTime.lua b/cocos/scripting/lua-bindings/auto/api/DelayTime.lua index 958ac24a6a..295db25818 100644 --- a/cocos/scripting/lua-bindings/auto/api/DelayTime.lua +++ b/cocos/scripting/lua-bindings/auto/api/DelayTime.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#DelayTime] create -- @param self --- @param #float float +-- @param #float d -- @return DelayTime#DelayTime ret (return value: cc.DelayTime) -------------------------------- +-- -- @function [parent=#DelayTime] clone -- @param self -- @return DelayTime#DelayTime ret (return value: cc.DelayTime) -------------------------------- +-- -- @function [parent=#DelayTime] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#DelayTime] reverse -- @param self -- @return DelayTime#DelayTime ret (return value: cc.DelayTime) diff --git a/cocos/scripting/lua-bindings/auto/api/Director.lua b/cocos/scripting/lua-bindings/auto/api/Director.lua index 6d684c5988..bdabea04f8 100644 --- a/cocos/scripting/lua-bindings/auto/api/Director.lua +++ b/cocos/scripting/lua-bindings/auto/api/Director.lua @@ -4,307 +4,418 @@ -- @parent_module cc -------------------------------- +-- Pauses the running scene.
+-- The running scene will be _drawed_ but all scheduled timers will be paused
+-- While paused, the draw rate will be 4 FPS to reduce CPU consumption -- @function [parent=#Director] pause -- @param self -------------------------------- +-- Sets the EventDispatcher associated with this director
+-- since v3.0 -- @function [parent=#Director] setEventDispatcher -- @param self --- @param #cc.EventDispatcher eventdispatcher +-- @param #cc.EventDispatcher dispatcher -------------------------------- +-- Suspends the execution of the running scene, pushing it on the stack of suspended scenes.
+-- The new scene will be executed.
+-- Try to avoid big stacks of pushed scenes to reduce memory allocation.
+-- ONLY call it if there is a running scene. -- @function [parent=#Director] pushScene -- @param self -- @param #cc.Scene scene -------------------------------- +-- -- @function [parent=#Director] getDeltaTime -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Director] getContentScaleFactor -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- returns the size of the OpenGL view in pixels. -- @function [parent=#Director] getWinSizeInPixels -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Director] getConsole -- @param self -- @return Console#Console ret (return value: cc.Console) -------------------------------- +-- -- @function [parent=#Director] pushMatrix -- @param self --- @param #int matrix_stack_type +-- @param #int type -------------------------------- +-- sets the OpenGL default values -- @function [parent=#Director] setGLDefaultValues -- @param self -------------------------------- +-- Sets the ActionManager associated with this director
+-- since v2.0 -- @function [parent=#Director] setActionManager -- @param self --- @param #cc.ActionManager actionmanager +-- @param #cc.ActionManager actionManager -------------------------------- +-- enables/disables OpenGL alpha blending -- @function [parent=#Director] setAlphaBlending -- @param self --- @param #bool bool +-- @param #bool on -------------------------------- +-- Pops out all scenes from the stack until the root scene in the queue.
+-- This scene will replace the running one.
+-- Internally it will call `popToSceneStackLevel(1)` -- @function [parent=#Director] popToRootScene -- @param self -------------------------------- +-- -- @function [parent=#Director] loadMatrix -- @param self --- @param #int matrix_stack_type --- @param #mat4_table mat4 +-- @param #int type +-- @param #mat4_table mat -------------------------------- +-- This object will be visited after the main scene is visited.
+-- This object MUST implement the "visit" selector.
+-- Useful to hook a notification object, like Notifications (http:github.com/manucorporat/CCNotifications)
+-- since v0.99.5 -- @function [parent=#Director] getNotificationNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- returns the size of the OpenGL view in points. -- @function [parent=#Director] getWinSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Director] getTextureCache -- @param self -- @return TextureCache#TextureCache ret (return value: cc.TextureCache) -------------------------------- +-- Whether or not the replaced scene will receive the cleanup message.
+-- If the new scene is pushed, then the old scene won't receive the "cleanup" message.
+-- If the new scene replaces the old one, the it will receive the "cleanup" message.
+-- since v0.99.0 -- @function [parent=#Director] isSendCleanupToScene -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- returns visible origin of the OpenGL view in points. -- @function [parent=#Director] getVisibleOrigin -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Director] mainLoop -- @param self -------------------------------- +-- enables/disables OpenGL depth test -- @function [parent=#Director] setDepthTest -- @param self --- @param #bool bool +-- @param #bool on -------------------------------- +-- get Frame Rate -- @function [parent=#Director] getFrameRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- seconds per frame -- @function [parent=#Director] getSecondsPerFrame -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- converts an OpenGL coordinate to a UIKit coordinate
+-- Useful to convert node points to window points for calls such as glScissor -- @function [parent=#Director] convertToUI -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- sets the default values based on the Configuration info -- @function [parent=#Director] setDefaultValues -- @param self -------------------------------- +-- -- @function [parent=#Director] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the Scheduler associated with this director
+-- since v2.0 -- @function [parent=#Director] setScheduler -- @param self -- @param #cc.Scheduler scheduler -------------------------------- +-- The main loop is triggered again.
+-- Call this function only if [stopAnimation] was called earlier
+-- warning Don't call this function to start the main loop. To run the main loop call runWithScene -- @function [parent=#Director] startAnimation -- @param self -------------------------------- +-- Get the GLView, where everything is rendered
+-- js NA
+-- lua NA -- @function [parent=#Director] getOpenGLView -- @param self -- @return GLView#GLView ret (return value: cc.GLView) -------------------------------- +-- Get current running Scene. Director can only run one Scene at a time -- @function [parent=#Director] getRunningScene -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- Sets the glViewport -- @function [parent=#Director] setViewport -- @param self -------------------------------- +-- Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore.
+-- If you don't want to pause your animation call [pause] instead. -- @function [parent=#Director] stopAnimation -- @param self -------------------------------- +-- The size in pixels of the surface. It could be different than the screen size.
+-- High-res devices might have a higher surface size than the screen size.
+-- Only available when compiled using SDK >= 4.0.
+-- since v0.99.4 -- @function [parent=#Director] setContentScaleFactor -- @param self --- @param #float float +-- @param #float scaleFactor -------------------------------- +-- Pops out all scenes from the stack until it reaches `level`.
+-- If level is 0, it will end the director.
+-- If level is 1, it will pop all scenes until it reaches to root scene.
+-- If level is <= than the current stack level, it won't do anything. -- @function [parent=#Director] popToSceneStackLevel -- @param self --- @param #int int +-- @param #int level -------------------------------- +-- Resumes the paused scene
+-- The scheduled timers will be activated again.
+-- The "delta time" will be 0 (as if the game wasn't paused) -- @function [parent=#Director] resume -- @param self -------------------------------- +-- -- @function [parent=#Director] isNextDeltaTimeZero -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Ends the execution, releases the running scene.
+-- It doesn't remove the OpenGL view from its parent. You have to do it manually.
+-- lua endToLua -- @function [parent=#Director] end -- @param self -------------------------------- +-- -- @function [parent=#Director] setOpenGLView -- @param self --- @param #cc.GLView glview +-- @param #cc.GLView openGLView -------------------------------- +-- converts a UIKit coordinate to an OpenGL coordinate
+-- Useful to convert (multi) touch coordinates to the current layout (portrait or landscape) -- @function [parent=#Director] convertToGL -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Removes all cocos2d cached data.
+-- It will purge the TextureCache, SpriteFrameCache, LabelBMFont cache
+-- since v0.99.3 -- @function [parent=#Director] purgeCachedData -- @param self -------------------------------- +-- How many frames were called since the director started -- @function [parent=#Director] getTotalFrames -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- Enters the Director's main loop with the given Scene.
+-- Call it to run only your FIRST scene.
+-- Don't call it if there is already a running scene.
+-- It will call pushScene: and then it will call startAnimation -- @function [parent=#Director] runWithScene -- @param self -- @param #cc.Scene scene -------------------------------- +-- -- @function [parent=#Director] setNotificationNode -- @param self -- @param #cc.Node node -------------------------------- +-- Draw the scene.
+-- This method is called every frame. Don't call it manually. -- @function [parent=#Director] drawScene -- @param self -------------------------------- +-- / FIXME: missing description -- @function [parent=#Director] getZEye -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Director] getMatrix -- @param self --- @param #int matrix_stack_type +-- @param #int type -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- Pops out a scene from the stack.
+-- This scene will replace the running one.
+-- The running scene will be deleted. If there are no more scenes in the stack the execution is terminated.
+-- ONLY call it if there is a running scene. -- @function [parent=#Director] popScene -- @param self -------------------------------- +-- Whether or not to display the FPS on the bottom-left corner -- @function [parent=#Director] isDisplayStats -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Director] setProjection -- @param self -- @param #int projection -------------------------------- +-- -- @function [parent=#Director] loadIdentityMatrix -- @param self --- @param #int matrix_stack_type +-- @param #int type -------------------------------- +-- -- @function [parent=#Director] setNextDeltaTimeZero -- @param self --- @param #bool bool +-- @param #bool nextDeltaTimeZero -------------------------------- +-- -- @function [parent=#Director] resetMatrixStack -- @param self -------------------------------- +-- -- @function [parent=#Director] popMatrix -- @param self --- @param #int matrix_stack_type +-- @param #int type -------------------------------- +-- returns visible size of the OpenGL view in points.
+-- the value is equal to getWinSize if don't invoke
+-- GLView::setDesignResolutionSize() -- @function [parent=#Director] getVisibleSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Gets the Scheduler associated with this director
+-- since v2.0 -- @function [parent=#Director] getScheduler -- @param self -- @return Scheduler#Scheduler ret (return value: cc.Scheduler) -------------------------------- +-- Set the FPS value. -- @function [parent=#Director] setAnimationInterval -- @param self --- @param #double double +-- @param #double interval -------------------------------- +-- Get the FPS value -- @function [parent=#Director] getAnimationInterval -- @param self -- @return double#double ret (return value: double) -------------------------------- +-- Whether or not the Director is paused -- @function [parent=#Director] isPaused -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Display the FPS on the bottom-left corner -- @function [parent=#Director] setDisplayStats -- @param self --- @param #bool bool +-- @param #bool displayStats -------------------------------- +-- Gets the EventDispatcher associated with this director
+-- since v3.0 -- @function [parent=#Director] getEventDispatcher -- @param self -- @return EventDispatcher#EventDispatcher ret (return value: cc.EventDispatcher) -------------------------------- +-- Replaces the running scene with a new one. The running scene is terminated.
+-- ONLY call it if there is a running scene. -- @function [parent=#Director] replaceScene -- @param self -- @param #cc.Scene scene -------------------------------- +-- -- @function [parent=#Director] multiplyMatrix -- @param self --- @param #int matrix_stack_type --- @param #mat4_table mat4 +-- @param #int type +-- @param #mat4_table mat -------------------------------- +-- Gets the ActionManager associated with this director
+-- since v2.0 -- @function [parent=#Director] getActionManager -- @param self -- @return ActionManager#ActionManager ret (return value: cc.ActionManager) -------------------------------- +-- returns a shared instance of the director -- @function [parent=#Director] getInstance -- @param self -- @return Director#Director ret (return value: cc.Director) diff --git a/cocos/scripting/lua-bindings/auto/api/DisplayData.lua b/cocos/scripting/lua-bindings/auto/api/DisplayData.lua index fc4a6c1930..772d00d704 100644 --- a/cocos/scripting/lua-bindings/auto/api/DisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/DisplayData.lua @@ -5,22 +5,26 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#DisplayData] copy -- @param self --- @param #ccs.DisplayData displaydata +-- @param #ccs.DisplayData displayData -------------------------------- +-- -- @function [parent=#DisplayData] changeDisplayToTexture -- @param self --- @param #string str +-- @param #string displayName -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#DisplayData] create -- @param self -- @return DisplayData#DisplayData ret (return value: ccs.DisplayData) -------------------------------- +-- js ctor -- @function [parent=#DisplayData] DisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua b/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua index 0739f44691..efbcde86af 100644 --- a/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua @@ -5,42 +5,50 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#DisplayManager] getDisplayRenderNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#DisplayManager] getAnchorPointInPoints -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#DisplayManager] getDisplayRenderNodeType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#DisplayManager] removeDisplay -- @param self --- @param #int int +-- @param #int index -------------------------------- +-- -- @function [parent=#DisplayManager] setForceChangeDisplay -- @param self --- @param #bool bool +-- @param #bool force -------------------------------- +-- -- @function [parent=#DisplayManager] init -- @param self -- @param #ccs.Bone bone -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#DisplayManager] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#DisplayManager] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) @@ -50,67 +58,85 @@ -- @overload self, ccs.DisplayData, int -- @function [parent=#DisplayManager] addDisplay -- @param self --- @param #ccs.DisplayData displaydata --- @param #int int +-- @param #ccs.DisplayData displayData +-- @param #int index -------------------------------- -- @overload self, float, float -- @overload self, vec2_table -- @function [parent=#DisplayManager] containPoint -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- Change display by index. You can just use this method to change display in the display list.
+-- The display list is just used for this bone, and it is the displays you may use in every frame.
+-- Note : if index is the same with prev index, the method will not effect
+-- param index The index of the display you want to change
+-- param force If true, then force change display to specified display, or current display will set to display index edit in the flash every key frame. -- @function [parent=#DisplayManager] changeDisplayWithIndex -- @param self --- @param #int int --- @param #bool bool +-- @param #int index +-- @param #bool force -------------------------------- +-- -- @function [parent=#DisplayManager] changeDisplayWithName -- @param self --- @param #string str --- @param #bool bool +-- @param #string name +-- @param #bool force -------------------------------- +-- -- @function [parent=#DisplayManager] isForceChangeDisplay -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#DisplayManager] getCurrentDisplayIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#DisplayManager] getAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#DisplayManager] getDecorativeDisplayList -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Determines if the display is visible
+-- see setVisible(bool)
+-- return true if the node is visible, false if the node is hidden. -- @function [parent=#DisplayManager] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets whether the display is visible
+-- The default value is true, a node is default to visible
+-- param visible true if the node is visible, false if the node is hidden. -- @function [parent=#DisplayManager] setVisible -- @param self --- @param #bool bool +-- @param #bool visible -------------------------------- +-- -- @function [parent=#DisplayManager] create -- @param self -- @param #ccs.Bone bone -- @return DisplayManager#DisplayManager ret (return value: ccs.DisplayManager) -------------------------------- +-- -- @function [parent=#DisplayManager] DisplayManager -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/DrawNode.lua b/cocos/scripting/lua-bindings/auto/api/DrawNode.lua index 381306a3a4..0e9687481b 100644 --- a/cocos/scripting/lua-bindings/auto/api/DrawNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/DrawNode.lua @@ -5,67 +5,76 @@ -- @parent_module cc -------------------------------- +-- draw a quadratic bezier curve with color and number of segments -- @function [parent=#DrawNode] drawQuadraticBezier -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #unsigned int int --- @param #color4f_table color4f +-- @param #vec2_table from +-- @param #vec2_table control +-- @param #vec2_table to +-- @param #unsigned int segments +-- @param #color4f_table color -------------------------------- +-- -- @function [parent=#DrawNode] onDraw -- @param self --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- Clear the geometry in the node's buffer. -- @function [parent=#DrawNode] clear -- @param self -------------------------------- +-- draw a triangle with color -- @function [parent=#DrawNode] drawTriangle -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #color4f_table color4f +-- @param #vec2_table p1 +-- @param #vec2_table p2 +-- @param #vec2_table p3 +-- @param #color4f_table color -------------------------------- +-- draw a dot at a position, with a given radius and color -- @function [parent=#DrawNode] drawDot -- @param self --- @param #vec2_table vec2 --- @param #float float --- @param #color4f_table color4f +-- @param #vec2_table pos +-- @param #float radius +-- @param #color4f_table color -------------------------------- +-- draw a cubic bezier curve with color and number of segments -- @function [parent=#DrawNode] drawCubicBezier -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #unsigned int int --- @param #color4f_table color4f +-- @param #vec2_table from +-- @param #vec2_table control1 +-- @param #vec2_table control2 +-- @param #vec2_table to +-- @param #unsigned int segments +-- @param #color4f_table color -------------------------------- +-- draw a segment with a radius and color -- @function [parent=#DrawNode] drawSegment -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #float float --- @param #color4f_table color4f +-- @param #vec2_table from +-- @param #vec2_table to +-- @param #float radius +-- @param #color4f_table color -------------------------------- +-- creates and initialize a DrawNode node -- @function [parent=#DrawNode] create -- @param self -- @return DrawNode#DrawNode ret (return value: cc.DrawNode) -------------------------------- +-- -- @function [parent=#DrawNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua index 850030d9c3..2186611bf2 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBackIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBackIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBackIn#EaseBackIn ret (return value: cc.EaseBackIn) -------------------------------- +-- -- @function [parent=#EaseBackIn] clone -- @param self -- @return EaseBackIn#EaseBackIn ret (return value: cc.EaseBackIn) -------------------------------- +-- -- @function [parent=#EaseBackIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBackIn] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua index 035aeedbfb..bf34e1c7a7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBackInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBackInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBackInOut#EaseBackInOut ret (return value: cc.EaseBackInOut) -------------------------------- +-- -- @function [parent=#EaseBackInOut] clone -- @param self -- @return EaseBackInOut#EaseBackInOut ret (return value: cc.EaseBackInOut) -------------------------------- +-- -- @function [parent=#EaseBackInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBackInOut] reverse -- @param self -- @return EaseBackInOut#EaseBackInOut ret (return value: cc.EaseBackInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua index c1bdda9357..4c277e7572 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBackOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBackOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBackOut#EaseBackOut ret (return value: cc.EaseBackOut) -------------------------------- +-- -- @function [parent=#EaseBackOut] clone -- @param self -- @return EaseBackOut#EaseBackOut ret (return value: cc.EaseBackOut) -------------------------------- +-- -- @function [parent=#EaseBackOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBackOut] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua b/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua index 5b800810aa..c04acabcb5 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBezierAction.lua @@ -5,30 +5,35 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EaseBezierAction] setBezierParamer -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float p0 +-- @param #float p1 +-- @param #float p2 +-- @param #float p3 -------------------------------- +-- creates the action -- @function [parent=#EaseBezierAction] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBezierAction#EaseBezierAction ret (return value: cc.EaseBezierAction) -------------------------------- +-- -- @function [parent=#EaseBezierAction] clone -- @param self -- @return EaseBezierAction#EaseBezierAction ret (return value: cc.EaseBezierAction) -------------------------------- +-- -- @function [parent=#EaseBezierAction] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBezierAction] reverse -- @param self -- @return EaseBezierAction#EaseBezierAction ret (return value: cc.EaseBezierAction) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua index 037dce873b..bd2089568e 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounce.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EaseBounce] clone -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) -------------------------------- +-- -- @function [parent=#EaseBounce] reverse -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua index 0f7b0e7ea6..eb1e5bbd9d 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounceIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBounceIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBounceIn#EaseBounceIn ret (return value: cc.EaseBounceIn) -------------------------------- +-- -- @function [parent=#EaseBounceIn] clone -- @param self -- @return EaseBounceIn#EaseBounceIn ret (return value: cc.EaseBounceIn) -------------------------------- +-- -- @function [parent=#EaseBounceIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBounceIn] reverse -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua index e81ea374e4..740d3c8704 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounceInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBounceInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBounceInOut#EaseBounceInOut ret (return value: cc.EaseBounceInOut) -------------------------------- +-- -- @function [parent=#EaseBounceInOut] clone -- @param self -- @return EaseBounceInOut#EaseBounceInOut ret (return value: cc.EaseBounceInOut) -------------------------------- +-- -- @function [parent=#EaseBounceInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBounceInOut] reverse -- @param self -- @return EaseBounceInOut#EaseBounceInOut ret (return value: cc.EaseBounceInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua index 1dc028dfdd..64a284eede 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseBounceOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseBounceOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseBounceOut#EaseBounceOut ret (return value: cc.EaseBounceOut) -------------------------------- +-- -- @function [parent=#EaseBounceOut] clone -- @param self -- @return EaseBounceOut#EaseBounceOut ret (return value: cc.EaseBounceOut) -------------------------------- +-- -- @function [parent=#EaseBounceOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseBounceOut] reverse -- @param self -- @return EaseBounce#EaseBounce ret (return value: cc.EaseBounce) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua index 647f88bdd1..51b0b6490e 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCircleActionIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCircleActionIn#EaseCircleActionIn ret (return value: cc.EaseCircleActionIn) -------------------------------- +-- -- @function [parent=#EaseCircleActionIn] clone -- @param self -- @return EaseCircleActionIn#EaseCircleActionIn ret (return value: cc.EaseCircleActionIn) -------------------------------- +-- -- @function [parent=#EaseCircleActionIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCircleActionIn] reverse -- @param self -- @return EaseCircleActionIn#EaseCircleActionIn ret (return value: cc.EaseCircleActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua index bbe15b71c5..f879df09e5 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCircleActionInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCircleActionInOut#EaseCircleActionInOut ret (return value: cc.EaseCircleActionInOut) -------------------------------- +-- -- @function [parent=#EaseCircleActionInOut] clone -- @param self -- @return EaseCircleActionInOut#EaseCircleActionInOut ret (return value: cc.EaseCircleActionInOut) -------------------------------- +-- -- @function [parent=#EaseCircleActionInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCircleActionInOut] reverse -- @param self -- @return EaseCircleActionInOut#EaseCircleActionInOut ret (return value: cc.EaseCircleActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua index bc8c231259..1a9f175414 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCircleActionOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCircleActionOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCircleActionOut#EaseCircleActionOut ret (return value: cc.EaseCircleActionOut) -------------------------------- +-- -- @function [parent=#EaseCircleActionOut] clone -- @param self -- @return EaseCircleActionOut#EaseCircleActionOut ret (return value: cc.EaseCircleActionOut) -------------------------------- +-- -- @function [parent=#EaseCircleActionOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCircleActionOut] reverse -- @param self -- @return EaseCircleActionOut#EaseCircleActionOut ret (return value: cc.EaseCircleActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua index 4320a97977..0e53d65c72 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCubicActionIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCubicActionIn#EaseCubicActionIn ret (return value: cc.EaseCubicActionIn) -------------------------------- +-- -- @function [parent=#EaseCubicActionIn] clone -- @param self -- @return EaseCubicActionIn#EaseCubicActionIn ret (return value: cc.EaseCubicActionIn) -------------------------------- +-- -- @function [parent=#EaseCubicActionIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCubicActionIn] reverse -- @param self -- @return EaseCubicActionIn#EaseCubicActionIn ret (return value: cc.EaseCubicActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua index adcc8e1bd2..fbbb49a273 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCubicActionInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCubicActionInOut#EaseCubicActionInOut ret (return value: cc.EaseCubicActionInOut) -------------------------------- +-- -- @function [parent=#EaseCubicActionInOut] clone -- @param self -- @return EaseCubicActionInOut#EaseCubicActionInOut ret (return value: cc.EaseCubicActionInOut) -------------------------------- +-- -- @function [parent=#EaseCubicActionInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCubicActionInOut] reverse -- @param self -- @return EaseCubicActionInOut#EaseCubicActionInOut ret (return value: cc.EaseCubicActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua index e09318698c..2250af3226 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseCubicActionOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseCubicActionOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseCubicActionOut#EaseCubicActionOut ret (return value: cc.EaseCubicActionOut) -------------------------------- +-- -- @function [parent=#EaseCubicActionOut] clone -- @param self -- @return EaseCubicActionOut#EaseCubicActionOut ret (return value: cc.EaseCubicActionOut) -------------------------------- +-- -- @function [parent=#EaseCubicActionOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseCubicActionOut] reverse -- @param self -- @return EaseCubicActionOut#EaseCubicActionOut ret (return value: cc.EaseCubicActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua b/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua index 6d9f1190ab..aa8c965c02 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElastic.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- set period of the wave in radians. -- @function [parent=#EaseElastic] setPeriod -- @param self --- @param #float float +-- @param #float fPeriod -------------------------------- +-- get period of the wave in radians. default is 0.3 -- @function [parent=#EaseElastic] getPeriod -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EaseElastic] clone -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) -------------------------------- +-- -- @function [parent=#EaseElastic] reverse -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua index b38769fd4d..be975202b7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua @@ -9,21 +9,24 @@ -- @overload self, cc.ActionInterval, float -- @function [parent=#EaseElasticIn] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float period -- @return EaseElasticIn#EaseElasticIn ret (retunr value: cc.EaseElasticIn) -------------------------------- +-- -- @function [parent=#EaseElasticIn] clone -- @param self -- @return EaseElasticIn#EaseElasticIn ret (return value: cc.EaseElasticIn) -------------------------------- +-- -- @function [parent=#EaseElasticIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseElasticIn] reverse -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua index 5d836c34ae..cae6e19b10 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua @@ -9,21 +9,24 @@ -- @overload self, cc.ActionInterval, float -- @function [parent=#EaseElasticInOut] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float period -- @return EaseElasticInOut#EaseElasticInOut ret (retunr value: cc.EaseElasticInOut) -------------------------------- +-- -- @function [parent=#EaseElasticInOut] clone -- @param self -- @return EaseElasticInOut#EaseElasticInOut ret (return value: cc.EaseElasticInOut) -------------------------------- +-- -- @function [parent=#EaseElasticInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseElasticInOut] reverse -- @param self -- @return EaseElasticInOut#EaseElasticInOut ret (return value: cc.EaseElasticInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua index a3a2498473..2b825cc636 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua @@ -9,21 +9,24 @@ -- @overload self, cc.ActionInterval, float -- @function [parent=#EaseElasticOut] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float period -- @return EaseElasticOut#EaseElasticOut ret (retunr value: cc.EaseElasticOut) -------------------------------- +-- -- @function [parent=#EaseElasticOut] clone -- @param self -- @return EaseElasticOut#EaseElasticOut ret (return value: cc.EaseElasticOut) -------------------------------- +-- -- @function [parent=#EaseElasticOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseElasticOut] reverse -- @param self -- @return EaseElastic#EaseElastic ret (return value: cc.EaseElastic) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua index 75601c4396..21007fb6ee 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseExponentialIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseExponentialIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseExponentialIn#EaseExponentialIn ret (return value: cc.EaseExponentialIn) -------------------------------- +-- -- @function [parent=#EaseExponentialIn] clone -- @param self -- @return EaseExponentialIn#EaseExponentialIn ret (return value: cc.EaseExponentialIn) -------------------------------- +-- -- @function [parent=#EaseExponentialIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseExponentialIn] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua index c3985a8546..a61ad52653 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseExponentialInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseExponentialInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseExponentialInOut#EaseExponentialInOut ret (return value: cc.EaseExponentialInOut) -------------------------------- +-- -- @function [parent=#EaseExponentialInOut] clone -- @param self -- @return EaseExponentialInOut#EaseExponentialInOut ret (return value: cc.EaseExponentialInOut) -------------------------------- +-- -- @function [parent=#EaseExponentialInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseExponentialInOut] reverse -- @param self -- @return EaseExponentialInOut#EaseExponentialInOut ret (return value: cc.EaseExponentialInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua index e9a42c2a67..c434d595fd 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseExponentialOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseExponentialOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseExponentialOut#EaseExponentialOut ret (return value: cc.EaseExponentialOut) -------------------------------- +-- -- @function [parent=#EaseExponentialOut] clone -- @param self -- @return EaseExponentialOut#EaseExponentialOut ret (return value: cc.EaseExponentialOut) -------------------------------- +-- -- @function [parent=#EaseExponentialOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseExponentialOut] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseIn.lua index 139d6a7a70..bda5e33379 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseIn.lua @@ -5,23 +5,27 @@ -- @parent_module cc -------------------------------- +-- Creates the action with the inner action and the rate parameter -- @function [parent=#EaseIn] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float rate -- @return EaseIn#EaseIn ret (return value: cc.EaseIn) -------------------------------- +-- -- @function [parent=#EaseIn] clone -- @param self -- @return EaseIn#EaseIn ret (return value: cc.EaseIn) -------------------------------- +-- -- @function [parent=#EaseIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseIn] reverse -- @param self -- @return EaseIn#EaseIn ret (return value: cc.EaseIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua index 965523b368..76491459b1 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseInOut.lua @@ -5,23 +5,27 @@ -- @parent_module cc -------------------------------- +-- Creates the action with the inner action and the rate parameter -- @function [parent=#EaseInOut] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float rate -- @return EaseInOut#EaseInOut ret (return value: cc.EaseInOut) -------------------------------- +-- -- @function [parent=#EaseInOut] clone -- @param self -- @return EaseInOut#EaseInOut ret (return value: cc.EaseInOut) -------------------------------- +-- -- @function [parent=#EaseInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseInOut] reverse -- @param self -- @return EaseInOut#EaseInOut ret (return value: cc.EaseInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseOut.lua index ec630b401d..3312ee56d7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseOut.lua @@ -5,23 +5,27 @@ -- @parent_module cc -------------------------------- +-- Creates the action with the inner action and the rate parameter -- @function [parent=#EaseOut] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float rate -- @return EaseOut#EaseOut ret (return value: cc.EaseOut) -------------------------------- +-- -- @function [parent=#EaseOut] clone -- @param self -- @return EaseOut#EaseOut ret (return value: cc.EaseOut) -------------------------------- +-- -- @function [parent=#EaseOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseOut] reverse -- @param self -- @return EaseOut#EaseOut ret (return value: cc.EaseOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua index 0eab085d84..56ef34210f 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuadraticActionIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuadraticActionIn#EaseQuadraticActionIn ret (return value: cc.EaseQuadraticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionIn] clone -- @param self -- @return EaseQuadraticActionIn#EaseQuadraticActionIn ret (return value: cc.EaseQuadraticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuadraticActionIn] reverse -- @param self -- @return EaseQuadraticActionIn#EaseQuadraticActionIn ret (return value: cc.EaseQuadraticActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua index 531d387b79..2e31d2c428 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuadraticActionInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuadraticActionInOut#EaseQuadraticActionInOut ret (return value: cc.EaseQuadraticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionInOut] clone -- @param self -- @return EaseQuadraticActionInOut#EaseQuadraticActionInOut ret (return value: cc.EaseQuadraticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuadraticActionInOut] reverse -- @param self -- @return EaseQuadraticActionInOut#EaseQuadraticActionInOut ret (return value: cc.EaseQuadraticActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua index e5b5f69955..a457f90723 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuadraticActionOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuadraticActionOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuadraticActionOut#EaseQuadraticActionOut ret (return value: cc.EaseQuadraticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionOut] clone -- @param self -- @return EaseQuadraticActionOut#EaseQuadraticActionOut ret (return value: cc.EaseQuadraticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuadraticActionOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuadraticActionOut] reverse -- @param self -- @return EaseQuadraticActionOut#EaseQuadraticActionOut ret (return value: cc.EaseQuadraticActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua index 9763da5cce..71d6b84792 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuarticActionIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuarticActionIn#EaseQuarticActionIn ret (return value: cc.EaseQuarticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuarticActionIn] clone -- @param self -- @return EaseQuarticActionIn#EaseQuarticActionIn ret (return value: cc.EaseQuarticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuarticActionIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuarticActionIn] reverse -- @param self -- @return EaseQuarticActionIn#EaseQuarticActionIn ret (return value: cc.EaseQuarticActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua index 49d5f23685..9edd4fe4bd 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuarticActionInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuarticActionInOut#EaseQuarticActionInOut ret (return value: cc.EaseQuarticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuarticActionInOut] clone -- @param self -- @return EaseQuarticActionInOut#EaseQuarticActionInOut ret (return value: cc.EaseQuarticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuarticActionInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuarticActionInOut] reverse -- @param self -- @return EaseQuarticActionInOut#EaseQuarticActionInOut ret (return value: cc.EaseQuarticActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua index c63c378424..c19781f8e7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuarticActionOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuarticActionOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuarticActionOut#EaseQuarticActionOut ret (return value: cc.EaseQuarticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuarticActionOut] clone -- @param self -- @return EaseQuarticActionOut#EaseQuarticActionOut ret (return value: cc.EaseQuarticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuarticActionOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuarticActionOut] reverse -- @param self -- @return EaseQuarticActionOut#EaseQuarticActionOut ret (return value: cc.EaseQuarticActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua index a0ed09cfc3..49f216a67e 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuinticActionIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuinticActionIn#EaseQuinticActionIn ret (return value: cc.EaseQuinticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuinticActionIn] clone -- @param self -- @return EaseQuinticActionIn#EaseQuinticActionIn ret (return value: cc.EaseQuinticActionIn) -------------------------------- +-- -- @function [parent=#EaseQuinticActionIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuinticActionIn] reverse -- @param self -- @return EaseQuinticActionIn#EaseQuinticActionIn ret (return value: cc.EaseQuinticActionIn) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua index 24231cae27..ecb66dde84 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuinticActionInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuinticActionInOut#EaseQuinticActionInOut ret (return value: cc.EaseQuinticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuinticActionInOut] clone -- @param self -- @return EaseQuinticActionInOut#EaseQuinticActionInOut ret (return value: cc.EaseQuinticActionInOut) -------------------------------- +-- -- @function [parent=#EaseQuinticActionInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuinticActionInOut] reverse -- @param self -- @return EaseQuinticActionInOut#EaseQuinticActionInOut ret (return value: cc.EaseQuinticActionInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua index b87c6d5fc2..3b44212159 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseQuinticActionOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseQuinticActionOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseQuinticActionOut#EaseQuinticActionOut ret (return value: cc.EaseQuinticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuinticActionOut] clone -- @param self -- @return EaseQuinticActionOut#EaseQuinticActionOut ret (return value: cc.EaseQuinticActionOut) -------------------------------- +-- -- @function [parent=#EaseQuinticActionOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseQuinticActionOut] reverse -- @param self -- @return EaseQuinticActionOut#EaseQuinticActionOut ret (return value: cc.EaseQuinticActionOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua b/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua index 2712d20ef1..4508d53990 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseRateAction.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- set rate value for the actions -- @function [parent=#EaseRateAction] setRate -- @param self --- @param #float float +-- @param #float rate -------------------------------- +-- get rate value for the actions -- @function [parent=#EaseRateAction] getRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EaseRateAction] clone -- @param self -- @return EaseRateAction#EaseRateAction ret (return value: cc.EaseRateAction) -------------------------------- +-- -- @function [parent=#EaseRateAction] reverse -- @param self -- @return EaseRateAction#EaseRateAction ret (return value: cc.EaseRateAction) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua index fb85e63833..8f77dfde52 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseSineIn] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseSineIn#EaseSineIn ret (return value: cc.EaseSineIn) -------------------------------- +-- -- @function [parent=#EaseSineIn] clone -- @param self -- @return EaseSineIn#EaseSineIn ret (return value: cc.EaseSineIn) -------------------------------- +-- -- @function [parent=#EaseSineIn] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseSineIn] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua index d1f4828dca..0425c998db 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseSineInOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseSineInOut#EaseSineInOut ret (return value: cc.EaseSineInOut) -------------------------------- +-- -- @function [parent=#EaseSineInOut] clone -- @param self -- @return EaseSineInOut#EaseSineInOut ret (return value: cc.EaseSineInOut) -------------------------------- +-- -- @function [parent=#EaseSineInOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseSineInOut] reverse -- @param self -- @return EaseSineInOut#EaseSineInOut ret (return value: cc.EaseSineInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua index aae018e91f..b751bed6af 100644 --- a/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#EaseSineOut] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return EaseSineOut#EaseSineOut ret (return value: cc.EaseSineOut) -------------------------------- +-- -- @function [parent=#EaseSineOut] clone -- @param self -- @return EaseSineOut#EaseSineOut ret (return value: cc.EaseSineOut) -------------------------------- +-- -- @function [parent=#EaseSineOut] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#EaseSineOut] reverse -- @param self -- @return ActionEase#ActionEase ret (return value: cc.ActionEase) diff --git a/cocos/scripting/lua-bindings/auto/api/EditBox.lua b/cocos/scripting/lua-bindings/auto/api/EditBox.lua index 35579ac4c8..7aae0b17ee 100644 --- a/cocos/scripting/lua-bindings/auto/api/EditBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/EditBox.lua @@ -5,129 +5,177 @@ -- @parent_module cc -------------------------------- +-- 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) -------------------------------- +-- Set the placeholder's font name.
+-- param pFontName The font name. -- @function [parent=#EditBox] setPlaceholderFontName -- @param self --- @param #char char +-- @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 char +-- @param #char pFontName -------------------------------- +-- Set the placeholder's font size.
+-- param fontSize The font size. -- @function [parent=#EditBox] setPlaceholderFontSize -- @param self --- @param #int int +-- @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 +-- @param #int inputMode -------------------------------- +-- 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 color3b +-- @param #color3b_table color -------------------------------- +-- Set the font color of the widget's text. -- @function [parent=#EditBox] setFontColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- Set the placeholder's font.
+-- param pFontName The font name.
+-- param fontSize The font size. -- @function [parent=#EditBox] setPlaceholderFont -- @param self --- @param #char char --- @param #int int +-- @param #char pFontName +-- @param #int fontSize -------------------------------- +-- Set the font size.
+-- param fontSize The font size. -- @function [parent=#EditBox] setFontSize -- @param self --- @param #int int +-- @param #int fontSize -------------------------------- +-- Init edit box with specified size. This method should be invoked right after constructor.
+-- param size The size of edit box. -- @function [parent=#EditBox] initWithSizeAndBackgroundSprite -- @param self -- @param #size_table size --- @param #cc.Scale9Sprite scale9sprite +-- @param #cc.Scale9Sprite pNormal9SpriteBg -- @return bool#bool ret (return 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 char +-- @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 keyboardreturntype +-- @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 +-- @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 char +-- @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 int +-- @param #int maxLength -------------------------------- +-- Set the font.
+-- param pFontName The font name.
+-- param fontSize The font size. -- @function [parent=#EditBox] setFont -- @param self --- @param #char char --- @param #int int +-- @param #char pFontName +-- @param #int fontSize -------------------------------- +-- create a edit box with size.
+-- return An autorelease pointer of EditBox, you don't need to release it only if you retain it again. -- @function [parent=#EditBox] create -- @param self -- @param #size_table size --- @param #cc.Scale9Sprite scale9sprite --- @param #cc.Scale9Sprite scale9sprite --- @param #cc.Scale9Sprite scale9sprite +-- @param #cc.Scale9Sprite pNormal9SpriteBg +-- @param #cc.Scale9Sprite pPressed9SpriteBg +-- @param #cc.Scale9Sprite pDisabled9SpriteBg -- @return EditBox#EditBox ret (return value: cc.EditBox) -------------------------------- +-- -- @function [parent=#EditBox] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchorPoint -------------------------------- +-- -- @function [parent=#EditBox] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#EditBox] setVisible -- @param self --- @param #bool bool +-- @param #bool visible -------------------------------- +-- -- @function [parent=#EditBox] setContentSize -- @param self -- @param #size_table size -------------------------------- +-- Constructor.
+-- js ctor -- @function [parent=#EditBox] EditBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Event.lua b/cocos/scripting/lua-bindings/auto/api/Event.lua index aebf35b831..62e8c8347e 100644 --- a/cocos/scripting/lua-bindings/auto/api/Event.lua +++ b/cocos/scripting/lua-bindings/auto/api/Event.lua @@ -5,21 +5,28 @@ -- @parent_module cc -------------------------------- +-- Checks whether the event has been stopped -- @function [parent=#Event] isStopped -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the event type -- @function [parent=#Event] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- @brief Gets current target of the event
+-- return The target with which the event associates.
+-- note It onlys be available when the event listener is associated with node.
+-- It returns 0 when the listener is associated with fixed priority. -- @function [parent=#Event] getCurrentTarget -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Stops propagation for current event -- @function [parent=#Event] stopPropagation -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/EventController.lua b/cocos/scripting/lua-bindings/auto/api/EventController.lua index e727158d6f..108baafc32 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventController.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventController.lua @@ -5,31 +5,37 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventController] getControllerEventType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#EventController] setConnectStatus -- @param self --- @param #bool bool +-- @param #bool isConnected -------------------------------- +-- -- @function [parent=#EventController] isConnected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#EventController] setKeyCode -- @param self --- @param #int int +-- @param #int keyCode -------------------------------- +-- -- @function [parent=#EventController] getController -- @param self -- @return Controller#Controller ret (return value: cc.Controller) -------------------------------- +-- -- @function [parent=#EventController] getKeyCode -- @param self -- @return int#int ret (return value: int) @@ -39,8 +45,8 @@ -- @overload self, int, cc.Controller, int -- @function [parent=#EventController] EventController -- @param self --- @param #int controllereventtype +-- @param #int type -- @param #cc.Controller controller --- @param #int int +-- @param #int keyCode return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventCustom.lua b/cocos/scripting/lua-bindings/auto/api/EventCustom.lua index 2f8ebe818d..645d85e0a7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventCustom.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventCustom.lua @@ -5,13 +5,15 @@ -- @parent_module cc -------------------------------- +-- Gets event name -- @function [parent=#EventCustom] getEventName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Constructor -- @function [parent=#EventCustom] EventCustom -- @param self --- @param #string str +-- @param #string eventName return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua b/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua index 84c8901a93..2db1cfbe9a 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua @@ -5,83 +5,111 @@ -- @parent_module cc -------------------------------- +-- Pauses all listeners which are associated the specified target. -- @function [parent=#EventDispatcher] pauseEventListenersForTarget -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node target +-- @param #bool recursive -------------------------------- +-- Adds a event listener for a specified event with the priority of scene graph.
+-- param listener The listener of a specified event.
+-- param node The priority of the listener is based on the draw order of this node.
+-- note The priority of scene graph will be fixed value 0. So the order of listener item
+-- in the vector will be ' <0, scene graph (0 priority), >0'. -- @function [parent=#EventDispatcher] addEventListenerWithSceneGraphPriority -- @param self --- @param #cc.EventListener eventlistener +-- @param #cc.EventListener listener -- @param #cc.Node node -------------------------------- +-- Whether to enable dispatching events -- @function [parent=#EventDispatcher] setEnabled -- @param self --- @param #bool bool +-- @param #bool isEnabled -------------------------------- +-- Adds a event listener for a specified event with the fixed priority.
+-- param listener The listener of a specified event.
+-- param fixedPriority The fixed priority of the listener.
+-- note A lower priority will be called before the ones that have a higher value.
+-- 0 priority is forbidden for fixed priority since it's used for scene graph based priority. -- @function [parent=#EventDispatcher] addEventListenerWithFixedPriority -- @param self --- @param #cc.EventListener eventlistener --- @param #int int +-- @param #cc.EventListener listener +-- @param #int fixedPriority -------------------------------- +-- Remove a listener
+-- param listener The specified event listener which needs to be removed. -- @function [parent=#EventDispatcher] removeEventListener -- @param self --- @param #cc.EventListener eventlistener +-- @param #cc.EventListener listener -------------------------------- +-- Resumes all listeners which are associated the specified target. -- @function [parent=#EventDispatcher] resumeEventListenersForTarget -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node target +-- @param #bool recursive -------------------------------- +-- Removes all listeners which are associated with the specified target. -- @function [parent=#EventDispatcher] removeEventListenersForTarget -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node target +-- @param #bool recursive -------------------------------- +-- Sets listener's priority with fixed value. -- @function [parent=#EventDispatcher] setPriority -- @param self --- @param #cc.EventListener eventlistener --- @param #int int +-- @param #cc.EventListener listener +-- @param #int fixedPriority -------------------------------- +-- Adds a Custom event listener.
+-- It will use a fixed priority of 1.
+-- return the generated event. Needed in order to remove the event from the dispather -- @function [parent=#EventDispatcher] addCustomEventListener -- @param self --- @param #string str --- @param #function func +-- @param #string eventName +-- @param #function callback -- @return EventListenerCustom#EventListenerCustom ret (return value: cc.EventListenerCustom) -------------------------------- +-- Dispatches the event
+-- Also removes all EventListeners marked for deletion from the
+-- event dispatcher list. -- @function [parent=#EventDispatcher] dispatchEvent -- @param self -- @param #cc.Event event -------------------------------- +-- Removes all listeners -- @function [parent=#EventDispatcher] removeAllEventListeners -- @param self -------------------------------- +-- Removes all custom listeners with the same event name -- @function [parent=#EventDispatcher] removeCustomEventListeners -- @param self --- @param #string str +-- @param #string customEventName -------------------------------- +-- Checks whether dispatching events is enabled -- @function [parent=#EventDispatcher] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Removes all listeners with the same event listener type -- @function [parent=#EventDispatcher] removeEventListenersForType -- @param self --- @param #int type +-- @param #int listenerType -------------------------------- +-- Constructor of EventDispatcher -- @function [parent=#EventDispatcher] EventDispatcher -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/EventFocus.lua b/cocos/scripting/lua-bindings/auto/api/EventFocus.lua index 3aa39d96ff..29c49daf43 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventFocus.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventFocus.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventFocus] EventFocus -- @param self --- @param #ccui.Widget widget --- @param #ccui.Widget widget +-- @param #ccui.Widget widgetLoseFocus +-- @param #ccui.Widget widgetGetFocus return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventFrame.lua b/cocos/scripting/lua-bindings/auto/api/EventFrame.lua index 2638ad42bc..67930d7f4c 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventFrame.lua @@ -5,26 +5,31 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#EventFrame] setEvent -- @param self --- @param #string str +-- @param #string event -------------------------------- +-- -- @function [parent=#EventFrame] getEvent -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#EventFrame] create -- @param self -- @return EventFrame#EventFrame ret (return value: ccs.EventFrame) -------------------------------- +-- -- @function [parent=#EventFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#EventFrame] EventFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua b/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua index 86f722ae6b..23861ac190 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventKeyboard] EventKeyboard -- @param self --- @param #int keycode --- @param #bool bool +-- @param #int keyCode +-- @param #bool isPressed return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventListener.lua b/cocos/scripting/lua-bindings/auto/api/EventListener.lua index 2bd1addba5..220f4b3901 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListener.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListener.lua @@ -5,21 +5,29 @@ -- @parent_module cc -------------------------------- +-- Enables or disables the listener
+-- note Only listeners with `enabled` state will be able to receive events.
+-- When an listener was initialized, it's enabled by default.
+-- An event listener can receive events when it is enabled and is not paused.
+-- paused state is always false when it is a fixed priority listener. -- @function [parent=#EventListener] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Clones the listener, its subclasses have to override this method. -- @function [parent=#EventListener] clone -- @param self -- @return EventListener#EventListener ret (return value: cc.EventListener) -------------------------------- +-- Checks whether the listener is enabled -- @function [parent=#EventListener] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Checks whether the listener is available. -- @function [parent=#EventListener] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua index 0ac7abb066..33760d7da4 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- / Overrides -- @function [parent=#EventListenerAcceleration] clone -- @param self -- @return EventListenerAcceleration#EventListenerAcceleration ret (return value: cc.EventListenerAcceleration) -------------------------------- +-- -- @function [parent=#EventListenerAcceleration] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua index 338b93fcd1..362d380c5b 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerController.lua @@ -5,16 +5,19 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerController] create -- @param self -- @return EventListenerController#EventListenerController ret (return value: cc.EventListenerController) -------------------------------- +-- -- @function [parent=#EventListenerController] clone -- @param self -- @return EventListenerController#EventListenerController ret (return value: cc.EventListenerController) -------------------------------- +-- / Overrides -- @function [parent=#EventListenerController] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua index c8d4281472..c634a11605 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerCustom] clone -- @param self -- @return EventListenerCustom#EventListenerCustom ret (return value: cc.EventListenerCustom) -------------------------------- +-- / Overrides -- @function [parent=#EventListenerCustom] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua index 038a145fa7..7e6c399722 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- / Overrides -- @function [parent=#EventListenerFocus] clone -- @param self -- @return EventListenerFocus#EventListenerFocus ret (return value: cc.EventListenerFocus) -------------------------------- +-- -- @function [parent=#EventListenerFocus] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua index ff9594630a..9c8fcc5110 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- / Overrides -- @function [parent=#EventListenerKeyboard] clone -- @param self -- @return EventListenerKeyboard#EventListenerKeyboard ret (return value: cc.EventListenerKeyboard) -------------------------------- +-- -- @function [parent=#EventListenerKeyboard] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua index fc04e71698..4015a24615 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- / Overrides -- @function [parent=#EventListenerMouse] clone -- @param self -- @return EventListenerMouse#EventListenerMouse ret (return value: cc.EventListenerMouse) -------------------------------- +-- -- @function [parent=#EventListenerMouse] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua index 5c9d1e6fc5..02039547f8 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua @@ -5,16 +5,19 @@ -- @parent_module cc -------------------------------- +-- create the listener -- @function [parent=#EventListenerPhysicsContact] create -- @param self -- @return EventListenerPhysicsContact#EventListenerPhysicsContact ret (return value: cc.EventListenerPhysicsContact) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContact] clone -- @param self -- @return EventListenerPhysicsContact#EventListenerPhysicsContact ret (return value: cc.EventListenerPhysicsContact) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContact] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua index 88e8610634..02b608e263 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithBodies.lua @@ -5,20 +5,23 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithBodies] hitTest -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape shapeA +-- @param #cc.PhysicsShape shapeB -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithBodies] create -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody bodyA +-- @param #cc.PhysicsBody bodyB -- @return EventListenerPhysicsContactWithBodies#EventListenerPhysicsContactWithBodies ret (return value: cc.EventListenerPhysicsContactWithBodies) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithBodies] clone -- @param self -- @return EventListenerPhysicsContactWithBodies#EventListenerPhysicsContactWithBodies ret (return value: cc.EventListenerPhysicsContactWithBodies) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua index 73c3f799f2..0222b32314 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithGroup.lua @@ -5,19 +5,22 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithGroup] hitTest -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape shapeA +-- @param #cc.PhysicsShape shapeB -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithGroup] create -- @param self --- @param #int int +-- @param #int group -- @return EventListenerPhysicsContactWithGroup#EventListenerPhysicsContactWithGroup ret (return value: cc.EventListenerPhysicsContactWithGroup) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithGroup] clone -- @param self -- @return EventListenerPhysicsContactWithGroup#EventListenerPhysicsContactWithGroup ret (return value: cc.EventListenerPhysicsContactWithGroup) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua index 902a390148..96f49e33c7 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContactWithShapes.lua @@ -5,20 +5,23 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithShapes] hitTest -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape shapeA +-- @param #cc.PhysicsShape shapeB -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithShapes] create -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #cc.PhysicsShape physicsshape +-- @param #cc.PhysicsShape shapeA +-- @param #cc.PhysicsShape shapeB -- @return EventListenerPhysicsContactWithShapes#EventListenerPhysicsContactWithShapes ret (return value: cc.EventListenerPhysicsContactWithShapes) -------------------------------- +-- -- @function [parent=#EventListenerPhysicsContactWithShapes] clone -- @param self -- @return EventListenerPhysicsContactWithShapes#EventListenerPhysicsContactWithShapes ret (return value: cc.EventListenerPhysicsContactWithShapes) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua index fd7e487488..3c6425d423 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchAllAtOnce.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- / Overrides -- @function [parent=#EventListenerTouchAllAtOnce] clone -- @param self -- @return EventListenerTouchAllAtOnce#EventListenerTouchAllAtOnce ret (return value: cc.EventListenerTouchAllAtOnce) -------------------------------- +-- -- @function [parent=#EventListenerTouchAllAtOnce] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua index 1da5fcb02e..adfc237d07 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerTouchOneByOne.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventListenerTouchOneByOne] isSwallowTouches -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#EventListenerTouchOneByOne] setSwallowTouches -- @param self --- @param #bool bool +-- @param #bool needSwallow -------------------------------- +-- / Overrides -- @function [parent=#EventListenerTouchOneByOne] clone -- @param self -- @return EventListenerTouchOneByOne#EventListenerTouchOneByOne ret (return value: cc.EventListenerTouchOneByOne) -------------------------------- +-- -- @function [parent=#EventListenerTouchOneByOne] checkAvailable -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/EventMouse.lua b/cocos/scripting/lua-bindings/auto/api/EventMouse.lua index 4d991e49e3..4021c695a2 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventMouse.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventMouse.lua @@ -5,85 +5,101 @@ -- @parent_module cc -------------------------------- +-- returns the previous touch location in screen coordinates -- @function [parent=#EventMouse] getPreviousLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the current touch location in OpenGL coordinates -- @function [parent=#EventMouse] getLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#EventMouse] getMouseButton -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- returns the previous touch location in OpenGL coordinates -- @function [parent=#EventMouse] getPreviousLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the delta of 2 current touches locations in screen coordinates -- @function [parent=#EventMouse] getDelta -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Set mouse scroll data -- @function [parent=#EventMouse] setScrollData -- @param self --- @param #float float --- @param #float float +-- @param #float scrollX +-- @param #float scrollY -------------------------------- +-- returns the start touch location in screen coordinates -- @function [parent=#EventMouse] getStartLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the start touch location in OpenGL coordinates -- @function [parent=#EventMouse] getStartLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#EventMouse] setMouseButton -- @param self --- @param #int int +-- @param #int button -------------------------------- +-- returns the current touch location in screen coordinates -- @function [parent=#EventMouse] getLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#EventMouse] getScrollY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EventMouse] getScrollX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EventMouse] getCursorX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EventMouse] getCursorY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#EventMouse] setCursorPosition -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y -------------------------------- +-- -- @function [parent=#EventMouse] EventMouse -- @param self --- @param #int mouseeventtype +-- @param #int mouseEventCode return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventTouch.lua b/cocos/scripting/lua-bindings/auto/api/EventTouch.lua index d32256fd93..16567c6908 100644 --- a/cocos/scripting/lua-bindings/auto/api/EventTouch.lua +++ b/cocos/scripting/lua-bindings/auto/api/EventTouch.lua @@ -5,16 +5,19 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#EventTouch] getEventCode -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#EventTouch] setEventCode -- @param self --- @param #int eventcode +-- @param #int eventCode -------------------------------- +-- -- @function [parent=#EventTouch] EventTouch -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/FadeIn.lua b/cocos/scripting/lua-bindings/auto/api/FadeIn.lua index f9875e7109..9b21453127 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeIn.lua @@ -5,27 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#FadeIn] setReverseAction -- @param self --- @param #cc.FadeTo fadeto +-- @param #cc.FadeTo ac -------------------------------- +-- creates the action -- @function [parent=#FadeIn] create -- @param self --- @param #float float +-- @param #float d -- @return FadeIn#FadeIn ret (return value: cc.FadeIn) -------------------------------- +-- -- @function [parent=#FadeIn] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#FadeIn] clone -- @param self -- @return FadeIn#FadeIn ret (return value: cc.FadeIn) -------------------------------- +-- -- @function [parent=#FadeIn] reverse -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOut.lua b/cocos/scripting/lua-bindings/auto/api/FadeOut.lua index e49935eb6e..8d4ec375af 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOut.lua @@ -5,27 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#FadeOut] setReverseAction -- @param self --- @param #cc.FadeTo fadeto +-- @param #cc.FadeTo ac -------------------------------- +-- creates the action -- @function [parent=#FadeOut] create -- @param self --- @param #float float +-- @param #float d -- @return FadeOut#FadeOut ret (return value: cc.FadeOut) -------------------------------- +-- -- @function [parent=#FadeOut] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#FadeOut] clone -- @param self -- @return FadeOut#FadeOut ret (return value: cc.FadeOut) -------------------------------- +-- -- @function [parent=#FadeOut] reverse -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua index 6936709eaf..52afec3aa4 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutBLTiles.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates the action with the grid size and the duration -- @function [parent=#FadeOutBLTiles] create -- @param self --- @param #float float --- @param #size_table size +-- @param #float duration +-- @param #size_table gridSize -- @return FadeOutBLTiles#FadeOutBLTiles ret (return value: cc.FadeOutBLTiles) -------------------------------- +-- -- @function [parent=#FadeOutBLTiles] clone -- @param self -- @return FadeOutBLTiles#FadeOutBLTiles ret (return value: cc.FadeOutBLTiles) -------------------------------- +-- -- @function [parent=#FadeOutBLTiles] testFunc -- @param self --- @param #size_table size --- @param #float float +-- @param #size_table pos +-- @param #float time -- @return float#float ret (return value: float) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua index 0fdf8f3c1b..111e762731 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutDownTiles.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates the action with the grid size and the duration -- @function [parent=#FadeOutDownTiles] create -- @param self --- @param #float float --- @param #size_table size +-- @param #float duration +-- @param #size_table gridSize -- @return FadeOutDownTiles#FadeOutDownTiles ret (return value: cc.FadeOutDownTiles) -------------------------------- +-- -- @function [parent=#FadeOutDownTiles] clone -- @param self -- @return FadeOutDownTiles#FadeOutDownTiles ret (return value: cc.FadeOutDownTiles) -------------------------------- +-- -- @function [parent=#FadeOutDownTiles] testFunc -- @param self --- @param #size_table size --- @param #float float +-- @param #size_table pos +-- @param #float time -- @return float#float ret (return value: float) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua index 127a804281..6315647ab9 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua @@ -5,43 +5,50 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] turnOnTile -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] turnOffTile -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] transformTile -- @param self --- @param #vec2_table vec2 --- @param #float float +-- @param #vec2_table pos +-- @param #float distance -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] testFunc -- @param self --- @param #size_table size --- @param #float float +-- @param #size_table pos +-- @param #float time -- @return float#float ret (return value: float) -------------------------------- +-- creates the action with the grid size and the duration -- @function [parent=#FadeOutTRTiles] create -- @param self --- @param #float float --- @param #size_table size +-- @param #float duration +-- @param #size_table gridSize -- @return FadeOutTRTiles#FadeOutTRTiles ret (return value: cc.FadeOutTRTiles) -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] clone -- @param self -- @return FadeOutTRTiles#FadeOutTRTiles ret (return value: cc.FadeOutTRTiles) -------------------------------- +-- -- @function [parent=#FadeOutTRTiles] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua index 22a5bae741..9d871f5f51 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua @@ -5,28 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#FadeOutUpTiles] transformTile -- @param self --- @param #vec2_table vec2 --- @param #float float +-- @param #vec2_table pos +-- @param #float distance -------------------------------- +-- creates the action with the grid size and the duration -- @function [parent=#FadeOutUpTiles] create -- @param self --- @param #float float --- @param #size_table size +-- @param #float duration +-- @param #size_table gridSize -- @return FadeOutUpTiles#FadeOutUpTiles ret (return value: cc.FadeOutUpTiles) -------------------------------- +-- -- @function [parent=#FadeOutUpTiles] clone -- @param self -- @return FadeOutUpTiles#FadeOutUpTiles ret (return value: cc.FadeOutUpTiles) -------------------------------- +-- -- @function [parent=#FadeOutUpTiles] testFunc -- @param self --- @param #size_table size --- @param #float float +-- @param #size_table pos +-- @param #float time -- @return float#float ret (return value: float) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeTo.lua b/cocos/scripting/lua-bindings/auto/api/FadeTo.lua index 854e4047ba..81cf2e8fec 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeTo.lua @@ -5,30 +5,35 @@ -- @parent_module cc -------------------------------- +-- creates an action with duration and opacity -- @function [parent=#FadeTo] create -- @param self --- @param #float float --- @param #unsigned char char +-- @param #float duration +-- @param #unsigned char opacity -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) -------------------------------- +-- -- @function [parent=#FadeTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#FadeTo] clone -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) -------------------------------- +-- -- @function [parent=#FadeTo] reverse -- @param self -- @return FadeTo#FadeTo ret (return value: cc.FadeTo) -------------------------------- +-- -- @function [parent=#FadeTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FileUtils.lua b/cocos/scripting/lua-bindings/auto/api/FileUtils.lua index 465eafc67b..8f3aa1f787 100644 --- a/cocos/scripting/lua-bindings/auto/api/FileUtils.lua +++ b/cocos/scripting/lua-bindings/auto/api/FileUtils.lua @@ -4,166 +4,320 @@ -- @parent_module cc -------------------------------- +-- Returns the fullpath for a given filename.
+-- First it will try to get a new filename from the "filenameLookup" dictionary.
+-- If a new filename can't be found on the dictionary, it will use the original filename.
+-- Then it will try to obtain the full path of the filename using the FileUtils search rules: resolutions, and search paths.
+-- The file search is based on the array element order of search paths and resolution directories.
+-- For instance:
+-- We set two elements("/mnt/sdcard/", "internal_dir/") to search paths vector by setSearchPaths,
+-- and set three elements("resources-ipadhd/", "resources-ipad/", "resources-iphonehd")
+-- to resolutions vector by setSearchResolutionsOrder. The "internal_dir" is relative to "Resources/".
+-- If we have a file named 'sprite.png', the mapping in fileLookup dictionary contains `key: sprite.png -> value: sprite.pvr.gz`.
+-- Firstly, it will replace 'sprite.png' with 'sprite.pvr.gz', then searching the file sprite.pvr.gz as follows:
+-- /mnt/sdcard/resources-ipadhd/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/resources-ipad/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/resources-iphonehd/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/sprite.pvr.gz (if not found, search next)
+-- internal_dir/resources-ipadhd/sprite.pvr.gz (if not found, search next)
+-- internal_dir/resources-ipad/sprite.pvr.gz (if not found, search next)
+-- internal_dir/resources-iphonehd/sprite.pvr.gz (if not found, search next)
+-- internal_dir/sprite.pvr.gz (if not found, return "sprite.png")
+-- If the filename contains relative path like "gamescene/uilayer/sprite.png",
+-- and the mapping in fileLookup dictionary contains `key: gamescene/uilayer/sprite.png -> value: gamescene/uilayer/sprite.pvr.gz`.
+-- The file search order will be:
+-- /mnt/sdcard/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next)
+-- /mnt/sdcard/gamescene/uilayer/sprite.pvr.gz (if not found, search next)
+-- internal_dir/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next)
+-- internal_dir/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next)
+-- internal_dir/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next)
+-- internal_dir/gamescene/uilayer/sprite.pvr.gz (if not found, return "gamescene/uilayer/sprite.png")
+-- If the new file can't be found on the file system, it will return the parameter filename directly.
+-- This method was added to simplify multiplatform support. Whether you are using cocos2d-js or any cross-compilation toolchain like StellaSDK or Apportable,
+-- you might need to load different resources for a given file in the different platforms.
+-- since v2.1 -- @function [parent=#FileUtils] fullPathForFilename -- @param self --- @param #string str +-- @param #string filename -- @return string#string ret (return value: string) -------------------------------- +-- Gets string from a file. -- @function [parent=#FileUtils] getStringFromFile -- @param self --- @param #string str +-- @param #string filename -- @return string#string ret (return value: string) -------------------------------- +-- Sets the filenameLookup dictionary.
+-- param pFilenameLookupDict The dictionary for replacing filename.
+-- since v2.1 -- @function [parent=#FileUtils] setFilenameLookupDictionary -- @param self --- @param #map_table map +-- @param #map_table filenameLookupDict -------------------------------- +-- Remove a file
+-- param filepath The full path of the file, it must be an absolute path.
+-- return true if the file have been removed successfully, otherwise it will return false. -- @function [parent=#FileUtils] removeFile -- @param self --- @param #string str +-- @param #string filepath -- @return bool#bool ret (return value: bool) -------------------------------- +-- Checks whether the path is an absolute path.
+-- note On Android, if the parameter passed in is relative to "assets/", this method will treat it as an absolute path.
+-- Also on Blackberry, path starts with "app/native/Resources/" is treated as an absolute path.
+-- param strPath The path that needs to be checked.
+-- return true if it's an absolute path, otherwise it will return false. -- @function [parent=#FileUtils] isAbsolutePath -- @param self --- @param #string str +-- @param #string path -- @return bool#bool ret (return value: bool) -------------------------------- +-- Rename a file under the given directory
+-- param path The parent directory path of the file, it must be an absolute path.
+-- param oldname The current name of the file.
+-- param name The new name of the file.
+-- return true if the file have been renamed successfully, otherwise it will return false. -- @function [parent=#FileUtils] renameFile -- @param self --- @param #string str --- @param #string str --- @param #string str +-- @param #string path +-- @param #string oldname +-- @param #string name -- @return bool#bool ret (return value: bool) -------------------------------- +-- Loads the filenameLookup dictionary from the contents of a filename.
+-- note The plist file name should follow the format below:
+-- code
+--
+--
+--
+--
+-- filenames
+--
+-- sounds/click.wav
+-- sounds/click.caf
+-- sounds/endgame.wav
+-- sounds/endgame.caf
+-- sounds/gem-0.wav
+-- sounds/gem-0.caf
+--

+-- metadata
+--
+-- version
+-- 1
+--

+--

+--

+-- endcode
+-- param filename The plist file name.
+-- since v2.1
+-- js loadFilenameLookup
+-- lua loadFilenameLookup -- @function [parent=#FileUtils] loadFilenameLookupDictionaryFromFile -- @param self --- @param #string str +-- @param #string filename -------------------------------- +-- -- @function [parent=#FileUtils] isPopupNotify -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Converts the contents of a file to a ValueVector.
+-- note This method is used internally. -- @function [parent=#FileUtils] getValueVectorFromFile -- @param self --- @param #string str +-- @param #string filename -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Gets the array of search paths.
+-- return The array of search paths.
+-- see fullPathForFilename(const char*).
+-- lua NA -- @function [parent=#FileUtils] getSearchPaths -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Write a ValueMap to a plist file.
+-- note This method is used internally. -- @function [parent=#FileUtils] writeToFile -- @param self --- @param #map_table map --- @param #string str +-- @param #map_table dict +-- @param #string fullPath -- @return bool#bool ret (return value: bool) -------------------------------- +-- Converts the contents of a file to a ValueMap.
+-- note This method is used internally. -- @function [parent=#FileUtils] getValueMapFromFile -- @param self --- @param #string str +-- @param #string filename -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- Converts the contents of a file to a ValueMap.
+-- note This method is used internally. -- @function [parent=#FileUtils] getValueMapFromData -- @param self --- @param #char char --- @param #int int +-- @param #char filedata +-- @param #int filesize -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- Remove a directory
+-- param dirPath The full path of the directory, it must be an absolute path.
+-- return true if the directory have been removed successfully, otherwise it will return false. -- @function [parent=#FileUtils] removeDirectory -- @param self --- @param #string str +-- @param #string dirPath -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the array of search paths.
+-- You can use this array to modify the search path of the resources.
+-- If you want to use "themes" or search resources in the "cache", you can do it easily by adding new entries in this array.
+-- note This method could access relative path and absolute path.
+-- If the relative path was passed to the vector, FileUtils will add the default resource directory before the relative path.
+-- For instance:
+-- On Android, the default resource root path is "assets/".
+-- If "/mnt/sdcard/" and "resources-large" were set to the search paths vector,
+-- "resources-large" will be converted to "assets/resources-large" since it was a relative path.
+-- param searchPaths The array contains search paths.
+-- see fullPathForFilename(const char*)
+-- since v2.1
+-- In js:var setSearchPaths(var jsval);
+-- lua NA -- @function [parent=#FileUtils] setSearchPaths -- @param self --- @param #array_table array +-- @param #array_table searchPaths -------------------------------- +-- Retrieve the file size
+-- note If a relative path was passed in, it will be inserted a default root path at the beginning.
+-- param filepath The path of the file, it could be a relative or absolute path.
+-- return The file size. -- @function [parent=#FileUtils] getFileSize -- @param self --- @param #string str +-- @param #string filepath -- @return long#long ret (return value: long) -------------------------------- +-- Sets the array that contains the search order of the resources.
+-- param searchResolutionsOrder The source array that contains the search order of the resources.
+-- see getSearchResolutionsOrder(void), fullPathForFilename(const char*).
+-- since v2.1
+-- In js:var setSearchResolutionsOrder(var jsval)
+-- lua NA -- @function [parent=#FileUtils] setSearchResolutionsOrder -- @param self --- @param #array_table array +-- @param #array_table searchResolutionsOrder -------------------------------- +-- Append search order of the resources.
+-- see setSearchResolutionsOrder(), fullPathForFilename().
+-- since v2.1 -- @function [parent=#FileUtils] addSearchResolutionsOrder -- @param self --- @param #string str --- @param #bool bool +-- @param #string order +-- @param #bool front -------------------------------- +-- Add search path.
+-- since v2.1 -- @function [parent=#FileUtils] addSearchPath -- @param self --- @param #string str --- @param #bool bool +-- @param #string path +-- @param #bool front -------------------------------- +-- Checks whether a file exists.
+-- note If a relative path was passed in, it will be inserted a default root path at the beginning.
+-- param strFilePath The path of the file, it could be a relative or absolute path.
+-- return true if the file exists, otherwise it will return false. -- @function [parent=#FileUtils] isFileExist -- @param self --- @param #string str +-- @param #string filename -- @return bool#bool ret (return value: bool) -------------------------------- +-- Purges the file searching cache.
+-- note It should be invoked after the resources were updated.
+-- For instance, in the CocosPlayer sample, every time you run application from CocosBuilder,
+-- All the resources will be downloaded to the writable folder, before new js app launchs,
+-- this method should be invoked to clean the file search cache. -- @function [parent=#FileUtils] purgeCachedEntries -- @param self -------------------------------- +-- Gets full path from a file name and the path of the reletive file.
+-- param filename The file name.
+-- param pszRelativeFile The path of the relative file.
+-- return The full path.
+-- e.g. filename: hello.png, pszRelativeFile: /User/path1/path2/hello.plist
+-- Return: /User/path1/path2/hello.pvr (If there a a key(hello.png)-value(hello.pvr) in FilenameLookup dictionary. ) -- @function [parent=#FileUtils] fullPathFromRelativeFile -- @param self --- @param #string str --- @param #string str +-- @param #string filename +-- @param #string relativeFile -- @return string#string ret (return value: string) -------------------------------- +-- Sets/Gets whether to pop-up a message box when failed to load an image. -- @function [parent=#FileUtils] setPopupNotify -- @param self --- @param #bool bool +-- @param #bool notify -------------------------------- +-- Checks whether the path is a directory
+-- param dirPath The path of the directory, it could be a relative or an absolute path.
+-- return true if the directory exists, otherwise it will return false. -- @function [parent=#FileUtils] isDirectoryExist -- @param self --- @param #string str +-- @param #string dirPath -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the array that contains the search order of the resources.
+-- see setSearchResolutionsOrder(const std::vector&), fullPathForFilename(const char*).
+-- since v2.1
+-- lua NA -- @function [parent=#FileUtils] getSearchResolutionsOrder -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Creates a directory
+-- param dirPath The path of the directory, it must be an absolute path.
+-- return true if the directory have been created successfully, otherwise it will return false. -- @function [parent=#FileUtils] createDirectory -- @param self --- @param #string str +-- @param #string dirPath -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the writable path.
+-- return The path that can be write/read a file in -- @function [parent=#FileUtils] getWritablePath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Destroys the instance of FileUtils. -- @function [parent=#FileUtils] destroyInstance -- @param self -------------------------------- +-- Gets the instance of FileUtils. -- @function [parent=#FileUtils] getInstance -- @param self -- @return FileUtils#FileUtils ret (return value: cc.FileUtils) diff --git a/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua b/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua index a89deabc3f..c14f9aba2e 100644 --- a/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- set duration in seconds of the action -- @function [parent=#FiniteTimeAction] setDuration -- @param self --- @param #float float +-- @param #float duration -------------------------------- +-- get duration in seconds of the action -- @function [parent=#FiniteTimeAction] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#FiniteTimeAction] clone -- @param self -- @return FiniteTimeAction#FiniteTimeAction ret (return value: cc.FiniteTimeAction) -------------------------------- +-- -- @function [parent=#FiniteTimeAction] reverse -- @param self -- @return FiniteTimeAction#FiniteTimeAction ret (return value: cc.FiniteTimeAction) diff --git a/cocos/scripting/lua-bindings/auto/api/FlipX.lua b/cocos/scripting/lua-bindings/auto/api/FlipX.lua index ab9ca2096d..530a3978cb 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipX.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipX.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- create the action -- @function [parent=#FlipX] create -- @param self --- @param #bool bool +-- @param #bool x -- @return FlipX#FlipX ret (return value: cc.FlipX) -------------------------------- +-- -- @function [parent=#FlipX] clone -- @param self -- @return FlipX#FlipX ret (return value: cc.FlipX) -------------------------------- +-- -- @function [parent=#FlipX] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#FlipX] reverse -- @param self -- @return FlipX#FlipX ret (return value: cc.FlipX) diff --git a/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua b/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua index 4823e905f5..b948ef4880 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipX3D.lua @@ -5,19 +5,22 @@ -- @parent_module cc -------------------------------- +-- creates the action with duration -- @function [parent=#FlipX3D] create -- @param self --- @param #float float +-- @param #float duration -- @return FlipX3D#FlipX3D ret (return value: cc.FlipX3D) -------------------------------- +-- -- @function [parent=#FlipX3D] clone -- @param self -- @return FlipX3D#FlipX3D ret (return value: cc.FlipX3D) -------------------------------- +-- -- @function [parent=#FlipX3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FlipY.lua b/cocos/scripting/lua-bindings/auto/api/FlipY.lua index bb8be4aa66..f0d76b4a1e 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipY.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipY.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- create the action -- @function [parent=#FlipY] create -- @param self --- @param #bool bool +-- @param #bool y -- @return FlipY#FlipY ret (return value: cc.FlipY) -------------------------------- +-- -- @function [parent=#FlipY] clone -- @param self -- @return FlipY#FlipY ret (return value: cc.FlipY) -------------------------------- +-- -- @function [parent=#FlipY] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#FlipY] reverse -- @param self -- @return FlipY#FlipY ret (return value: cc.FlipY) diff --git a/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua b/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua index dda47890cb..47b8104226 100644 --- a/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/FlipY3D.lua @@ -5,19 +5,22 @@ -- @parent_module cc -------------------------------- +-- creates the action with duration -- @function [parent=#FlipY3D] create -- @param self --- @param #float float +-- @param #float duration -- @return FlipY3D#FlipY3D ret (return value: cc.FlipY3D) -------------------------------- +-- -- @function [parent=#FlipY3D] clone -- @param self -- @return FlipY3D#FlipY3D ret (return value: cc.FlipY3D) -------------------------------- +-- -- @function [parent=#FlipY3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Follow.lua b/cocos/scripting/lua-bindings/auto/api/Follow.lua index ebc67f26dc..c4cc29986b 100644 --- a/cocos/scripting/lua-bindings/auto/api/Follow.lua +++ b/cocos/scripting/lua-bindings/auto/api/Follow.lua @@ -5,42 +5,53 @@ -- @parent_module cc -------------------------------- +-- alter behavior - turn on/off boundary -- @function [parent=#Follow] setBoudarySet -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- -- @function [parent=#Follow] isBoundarySet -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Creates the action with a set boundary or with no boundary.
+-- param followedNode The node to be followed.
+-- param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work
+-- with no boundary. -- @function [parent=#Follow] create -- @param self --- @param #cc.Node node +-- @param #cc.Node followedNode -- @param #rect_table rect -- @return Follow#Follow ret (return value: cc.Follow) -------------------------------- +-- -- @function [parent=#Follow] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Follow] clone -- @param self -- @return Follow#Follow ret (return value: cc.Follow) -------------------------------- +-- -- @function [parent=#Follow] stop -- @param self -------------------------------- +-- -- @function [parent=#Follow] reverse -- @param self -- @return Follow#Follow ret (return value: cc.Follow) -------------------------------- +-- -- @function [parent=#Follow] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/Frame.lua b/cocos/scripting/lua-bindings/auto/api/Frame.lua index e339312138..a2f7cb095d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Frame.lua +++ b/cocos/scripting/lua-bindings/auto/api/Frame.lua @@ -5,51 +5,61 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#Frame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#Frame] setNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#Frame] setTimeline -- @param self -- @param #ccs.Timeline timeline -------------------------------- +-- -- @function [parent=#Frame] getFrameIndex -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#Frame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#Frame] isTween -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Frame] setFrameIndex -- @param self --- @param #unsigned int int +-- @param #unsigned int frameIndex -------------------------------- +-- -- @function [parent=#Frame] setTween -- @param self --- @param #bool bool +-- @param #bool tween -------------------------------- +-- -- @function [parent=#Frame] getTimeline -- @param self -- @return Timeline#Timeline ret (return value: ccs.Timeline) -------------------------------- +-- -- @function [parent=#Frame] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) diff --git a/cocos/scripting/lua-bindings/auto/api/FrameData.lua b/cocos/scripting/lua-bindings/auto/api/FrameData.lua index 038aa1923b..3bc8f4334f 100644 --- a/cocos/scripting/lua-bindings/auto/api/FrameData.lua +++ b/cocos/scripting/lua-bindings/auto/api/FrameData.lua @@ -5,16 +5,19 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#FrameData] copy -- @param self --- @param #ccs.BaseData basedata +-- @param #ccs.BaseData baseData -------------------------------- +-- -- @function [parent=#FrameData] create -- @param self -- @return FrameData#FrameData ret (return value: ccs.FrameData) -------------------------------- +-- js ctor -- @function [parent=#FrameData] FrameData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgram.lua b/cocos/scripting/lua-bindings/auto/api/GLProgram.lua index 21a267ccf7..125f68811d 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgram.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgram.lua @@ -5,29 +5,34 @@ -- @parent_module cc -------------------------------- +-- returns the fragmentShader error log -- @function [parent=#GLProgram] getFragmentShaderLog -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#GLProgram] initWithByteArrays -- @param self --- @param #char char --- @param #char char +-- @param #char vShaderByteArray +-- @param #char fShaderByteArray -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#GLProgram] initWithFilenames -- @param self --- @param #string str --- @param #string str +-- @param #string vShaderFilename +-- @param #string fShaderFilename -- @return bool#bool ret (return value: bool) -------------------------------- +-- it will call glUseProgram() -- @function [parent=#GLProgram] use -- @param self -------------------------------- +-- returns the vertexShader error log -- @function [parent=#GLProgram] getVertexShaderLog -- @param self -- @return string#string ret (return value: string) @@ -37,54 +42,74 @@ -- @overload self -- @function [parent=#GLProgram] setUniformsForBuiltins -- @param self --- @param #mat4_table mat4 +-- @param #mat4_table modelView -------------------------------- +-- It will create 4 uniforms:
+-- - kUniformPMatrix
+-- - kUniformMVMatrix
+-- - kUniformMVPMatrix
+-- - GLProgram::UNIFORM_SAMPLER
+-- And it will bind "GLProgram::UNIFORM_SAMPLER" to 0 -- @function [parent=#GLProgram] updateUniforms -- @param self -------------------------------- +-- calls glUniform1i only if the values are different than the previous call for this same shader program.
+-- js setUniformLocationI32
+-- lua setUniformLocationI32 -- @function [parent=#GLProgram] setUniformLocationWith1i -- @param self --- @param #int int --- @param #int int +-- @param #int location +-- @param #int i1 -------------------------------- +-- -- @function [parent=#GLProgram] reset -- @param self -------------------------------- +-- It will add a new attribute to the shader by calling glBindAttribLocation -- @function [parent=#GLProgram] bindAttribLocation -- @param self --- @param #string str --- @param #unsigned int int +-- @param #string attributeName +-- @param #unsigned int index -------------------------------- +-- calls glGetAttribLocation -- @function [parent=#GLProgram] getAttribLocation -- @param self --- @param #string str +-- @param #string attributeName -- @return int#int ret (return value: int) -------------------------------- +-- links the glProgram -- @function [parent=#GLProgram] link -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Initializes the GLProgram with a vertex and fragment with bytes array
+-- js initWithString
+-- lua initWithString -- @function [parent=#GLProgram] createWithByteArrays -- @param self --- @param #char char --- @param #char char +-- @param #char vShaderByteArray +-- @param #char fShaderByteArray -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- Initializes the GLProgram with a vertex and fragment with contents of filenames
+-- js init
+-- lua init -- @function [parent=#GLProgram] createWithFilenames -- @param self --- @param #string str --- @param #string str +-- @param #string vShaderFilename +-- @param #string fShaderFilename -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- -- @function [parent=#GLProgram] GLProgram -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua b/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua index a7ddd24ba7..405063fd94 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua @@ -5,35 +5,42 @@ -- @parent_module cc -------------------------------- +-- adds a GLProgram to the cache for a given name -- @function [parent=#GLProgramCache] addGLProgram -- @param self --- @param #cc.GLProgram glprogram --- @param #string str +-- @param #cc.GLProgram program +-- @param #string key -------------------------------- +-- returns a GL program for a given key -- @function [parent=#GLProgramCache] getGLProgram -- @param self --- @param #string str +-- @param #string key -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- reload the default shaders -- @function [parent=#GLProgramCache] reloadDefaultGLPrograms -- @param self -------------------------------- +-- loads the default shaders -- @function [parent=#GLProgramCache] loadDefaultGLPrograms -- @param self -------------------------------- +-- purges the cache. It releases the retained instance. -- @function [parent=#GLProgramCache] destroyInstance -- @param self -------------------------------- +-- returns the shared instance -- @function [parent=#GLProgramCache] getInstance -- @param self -- @return GLProgramCache#GLProgramCache ret (return value: cc.GLProgramCache) -------------------------------- +-- js ctor -- @function [parent=#GLProgramCache] GLProgramCache -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua b/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua index 45e1e90168..0cd5f93193 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgramState.lua @@ -11,32 +11,37 @@ -- @overload self, int, unsigned int -- @function [parent=#GLProgramState] setUniformTexture -- @param self --- @param #int int --- @param #unsigned int int +-- @param #int uniformLocation +-- @param #unsigned int textureId -------------------------------- -- @overload self, int, mat4_table -- @overload self, string, mat4_table -- @function [parent=#GLProgramState] setUniformMat4 -- @param self --- @param #string str --- @param #mat4_table mat4 +-- @param #string uniformName +-- @param #mat4_table value -------------------------------- +-- -- @function [parent=#GLProgramState] applyUniforms -- @param self -------------------------------- +-- -- @function [parent=#GLProgramState] applyGLProgram -- @param self --- @param #mat4_table mat4 +-- @param #mat4_table modelView -------------------------------- +-- -- @function [parent=#GLProgramState] getUniformCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- apply vertex attributes
+-- param applyAttribFlags Call GL::enableVertexAttribs(_vertexAttribsFlags) or not -- @function [parent=#GLProgramState] applyAttributes -- @param self @@ -45,26 +50,27 @@ -- @overload self, string, float -- @function [parent=#GLProgramState] setUniformFloat -- @param self --- @param #string str --- @param #float float +-- @param #string uniformName +-- @param #float value -------------------------------- -- @overload self, int, vec3_table -- @overload self, string, vec3_table -- @function [parent=#GLProgramState] setUniformVec3 -- @param self --- @param #string str --- @param #vec3_table vec3 +-- @param #string uniformName +-- @param #vec3_table value -------------------------------- -- @overload self, int, int -- @overload self, string, int -- @function [parent=#GLProgramState] setUniformInt -- @param self --- @param #string str --- @param #int int +-- @param #string uniformName +-- @param #int value -------------------------------- +-- -- @function [parent=#GLProgramState] getVertexAttribCount -- @param self -- @return long#long ret (return value: long) @@ -74,10 +80,11 @@ -- @overload self, string, vec4_table -- @function [parent=#GLProgramState] setUniformVec4 -- @param self --- @param #string str --- @param #vec4_table vec4 +-- @param #string uniformName +-- @param #vec4_table value -------------------------------- +-- -- @function [parent=#GLProgramState] setGLProgram -- @param self -- @param #cc.GLProgram glprogram @@ -87,37 +94,43 @@ -- @overload self, string, vec2_table -- @function [parent=#GLProgramState] setUniformVec2 -- @param self --- @param #string str --- @param #vec2_table vec2 +-- @param #string uniformName +-- @param #vec2_table value -------------------------------- +-- -- @function [parent=#GLProgramState] getVertexAttribsFlags -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#GLProgramState] apply -- @param self --- @param #mat4_table mat4 +-- @param #mat4_table modelView -------------------------------- +-- -- @function [parent=#GLProgramState] getGLProgram -- @param self -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- returns a new instance of GLProgramState for a given GLProgram -- @function [parent=#GLProgramState] create -- @param self -- @param #cc.GLProgram glprogram -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- +-- gets-or-creates an instance of GLProgramState for a given GLProgramName -- @function [parent=#GLProgramState] getOrCreateWithGLProgramName -- @param self --- @param #string str +-- @param #string glProgramName -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- +-- gets-or-creates an instance of GLProgramState for a given GLProgram -- @function [parent=#GLProgramState] getOrCreateWithGLProgram -- @param self -- @param #cc.GLProgram glprogram diff --git a/cocos/scripting/lua-bindings/auto/api/GLView.lua b/cocos/scripting/lua-bindings/auto/api/GLView.lua index fd42bfe851..85456927f0 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLView.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLView.lua @@ -5,163 +5,203 @@ -- @parent_module cc -------------------------------- +-- Set the frame size of EGL view. -- @function [parent=#GLView] setFrameSize -- @param self --- @param #float float --- @param #float float +-- @param #float width +-- @param #float height -------------------------------- +-- Get the opengl view port rectangle. -- @function [parent=#GLView] getViewPortRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- only works on ios platform -- @function [parent=#GLView] setContentScaleFactor -- @param self --- @param #float float +-- @param #float scaleFactor -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#GLView] getContentScaleFactor -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Open or close IME keyboard , subclass must implement this method. -- @function [parent=#GLView] setIMEKeyboardState -- @param self --- @param #bool bool +-- @param #bool open -------------------------------- +-- Set Scissor rectangle with points. -- @function [parent=#GLView] setScissorInPoints -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y +-- @param #float w +-- @param #float h -------------------------------- +-- -- @function [parent=#GLView] getViewName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Get whether opengl render system is ready, subclass must implement this method. -- @function [parent=#GLView] isOpenGLReady -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Force destroying EGL view, subclass must implement this method. -- @function [parent=#GLView] end -- @param self -------------------------------- +-- Get scale factor of the vertical direction. -- @function [parent=#GLView] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Get scale factor of the horizontal direction. -- @function [parent=#GLView] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Get the visible origin point of opengl viewport. -- @function [parent=#GLView] getVisibleOrigin -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Get the frame size of EGL view.
+-- In general, it returns the screen size since the EGL view is a fullscreen view. -- @function [parent=#GLView] getFrameSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Set and get zoom factor for frame. This two methods are for
+-- debugging big resolution (e.g.new ipad) app on desktop. -- @function [parent=#GLView] setFrameZoomFactor -- @param self --- @param #float float +-- @param #float zoomFactor -------------------------------- +-- -- @function [parent=#GLView] getFrameZoomFactor -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Get design resolution size.
+-- Default resolution size is the same as 'getFrameSize'. -- @function [parent=#GLView] getDesignResolutionSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#GLView] windowShouldClose -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Exchanges the front and back buffers, subclass must implement this method. -- @function [parent=#GLView] swapBuffers -- @param self -------------------------------- +-- Set the design resolution size.
+-- param width Design resolution width.
+-- param height Design resolution height.
+-- param resolutionPolicy The resolution policy desired, you may choose:
+-- [1] EXACT_FIT Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched.
+-- [2] NO_BORDER Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut.
+-- [3] SHOW_ALL Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown. -- @function [parent=#GLView] setDesignResolutionSize -- @param self --- @param #float float --- @param #float float --- @param #int resolutionpolicy +-- @param #float width +-- @param #float height +-- @param #int resolutionPolicy -------------------------------- +-- returns the current Resolution policy -- @function [parent=#GLView] getResolutionPolicy -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- returns whether or not the view is in Retina Display mode -- @function [parent=#GLView] isRetinaDisplay -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Set opengl view port rectangle with points. -- @function [parent=#GLView] setViewPortInPoints -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y +-- @param #float w +-- @param #float h -------------------------------- +-- Get the current scissor rectangle -- @function [parent=#GLView] getScissorRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Get retina factor -- @function [parent=#GLView] getRetinaFactor -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#GLView] setViewName -- @param self --- @param #string str +-- @param #string viewname -------------------------------- +-- Get the visible rectangle of opengl viewport. -- @function [parent=#GLView] getVisibleRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Get the visible area size of opengl viewport. -- @function [parent=#GLView] getVisibleSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Get whether GL_SCISSOR_TEST is enable -- @function [parent=#GLView] isScissorEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#GLView] pollEvents -- @param self -------------------------------- +-- -- @function [parent=#GLView] setGLContextAttrs -- @param self --- @param #GLContextAttrs glcontextattrs +-- @param #GLContextAttrs glContextAttrs -------------------------------- +-- -- @function [parent=#GLView] getGLContextAttrs -- @param self -- @return GLContextAttrs#GLContextAttrs ret (return value: GLContextAttrs) diff --git a/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua b/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua index 37b80b7f7e..433292ff64 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLViewImpl.lua @@ -5,31 +5,36 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#GLViewImpl] createWithRect -- @param self --- @param #string str +-- @param #string viewName -- @param #rect_table rect --- @param #float float +-- @param #float frameZoomFactor -- @return GLViewImpl#GLViewImpl ret (return value: cc.GLViewImpl) -------------------------------- +-- -- @function [parent=#GLViewImpl] create -- @param self --- @param #string str +-- @param #string viewname -- @return GLViewImpl#GLViewImpl ret (return value: cc.GLViewImpl) -------------------------------- +-- -- @function [parent=#GLViewImpl] createWithFullScreen -- @param self --- @param #string str +-- @param #string viewName -- @return GLViewImpl#GLViewImpl ret (return value: cc.GLViewImpl) -------------------------------- +-- -- @function [parent=#GLViewImpl] setIMEKeyboardState -- @param self --- @param #bool bool +-- @param #bool bOpen -------------------------------- +-- -- @function [parent=#GLViewImpl] isOpenGLReady -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/GUIReader.lua b/cocos/scripting/lua-bindings/auto/api/GUIReader.lua index b32f8d0270..cd73bb0fce 100644 --- a/cocos/scripting/lua-bindings/auto/api/GUIReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/GUIReader.lua @@ -5,38 +5,45 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#GUIReader] setFilePath -- @param self --- @param #string str +-- @param #string strFilePath -------------------------------- +-- -- @function [parent=#GUIReader] widgetFromJsonFile -- @param self --- @param #char char +-- @param #char fileName -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- -- @function [parent=#GUIReader] getFilePath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#GUIReader] widgetFromBinaryFile -- @param self --- @param #char char +-- @param #char fileName -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- -- @function [parent=#GUIReader] getVersionInteger -- @param self --- @param #char char +-- @param #char str -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#GUIReader] destroyInstance -- @param self -------------------------------- +-- -- @function [parent=#GUIReader] getInstance -- @param self -- @return GUIReader#GUIReader ret (return value: ccs.GUIReader) diff --git a/cocos/scripting/lua-bindings/auto/api/Grid3D.lua b/cocos/scripting/lua-bindings/auto/api/Grid3D.lua index 8adbad9174..b20675bf6f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Grid3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Grid3D.lua @@ -9,24 +9,28 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#Grid3D] create -- @param self --- @param #size_table size --- @param #cc.Texture2D texture2d --- @param #bool bool +-- @param #size_table gridSize +-- @param #cc.Texture2D texture +-- @param #bool flipped -- @return Grid3D#Grid3D ret (retunr value: cc.Grid3D) -------------------------------- +-- -- @function [parent=#Grid3D] calculateVertexPoints -- @param self -------------------------------- +-- -- @function [parent=#Grid3D] blit -- @param self -------------------------------- +-- -- @function [parent=#Grid3D] reuse -- @param self -------------------------------- +-- js ctor -- @function [parent=#Grid3D] Grid3D -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua b/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua index 5863941c70..d4dec67c66 100644 --- a/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/Grid3DAction.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- returns the grid -- @function [parent=#Grid3DAction] getGrid -- @param self -- @return GridBase#GridBase ret (return value: cc.GridBase) -------------------------------- +-- -- @function [parent=#Grid3DAction] clone -- @param self -- @return Grid3DAction#Grid3DAction ret (return value: cc.Grid3DAction) diff --git a/cocos/scripting/lua-bindings/auto/api/GridAction.lua b/cocos/scripting/lua-bindings/auto/api/GridAction.lua index 4f6abb4c43..b9d8e572bc 100644 --- a/cocos/scripting/lua-bindings/auto/api/GridAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/GridAction.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- returns the grid -- @function [parent=#GridAction] getGrid -- @param self -- @return GridBase#GridBase ret (return value: cc.GridBase) -------------------------------- +-- -- @function [parent=#GridAction] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#GridAction] clone -- @param self -- @return GridAction#GridAction ret (return value: cc.GridAction) -------------------------------- +-- -- @function [parent=#GridAction] reverse -- @param self -- @return GridAction#GridAction ret (return value: cc.GridAction) diff --git a/cocos/scripting/lua-bindings/auto/api/GridBase.lua b/cocos/scripting/lua-bindings/auto/api/GridBase.lua index e42656495f..bfea6b3f12 100644 --- a/cocos/scripting/lua-bindings/auto/api/GridBase.lua +++ b/cocos/scripting/lua-bindings/auto/api/GridBase.lua @@ -5,62 +5,75 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#GridBase] setGridSize -- @param self --- @param #size_table size +-- @param #size_table gridSize -------------------------------- +-- -- @function [parent=#GridBase] calculateVertexPoints -- @param self -------------------------------- +-- -- @function [parent=#GridBase] afterDraw -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#GridBase] beforeDraw -- @param self -------------------------------- +-- is texture flipped -- @function [parent=#GridBase] isTextureFlipped -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- size of the grid -- @function [parent=#GridBase] getGridSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- pixels between the grids -- @function [parent=#GridBase] getStep -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#GridBase] set2DProjection -- @param self -------------------------------- +-- -- @function [parent=#GridBase] setStep -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table step -------------------------------- +-- -- @function [parent=#GridBase] setTextureFlipped -- @param self --- @param #bool bool +-- @param #bool flipped -------------------------------- +-- -- @function [parent=#GridBase] blit -- @param self -------------------------------- +-- -- @function [parent=#GridBase] setActive -- @param self --- @param #bool bool +-- @param #bool active -------------------------------- +-- number of times that the grid will be reused -- @function [parent=#GridBase] getReuseGrid -- @param self -- @return int#int ret (return value: int) @@ -70,22 +83,25 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#GridBase] initWithSize -- @param self --- @param #size_table size --- @param #cc.Texture2D texture2d --- @param #bool bool +-- @param #size_table gridSize +-- @param #cc.Texture2D texture +-- @param #bool flipped -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#GridBase] setReuseGrid -- @param self --- @param #int int +-- @param #int reuseGrid -------------------------------- +-- whether or not the grid is active -- @function [parent=#GridBase] isActive -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#GridBase] reuse -- @param self @@ -94,9 +110,9 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#GridBase] create -- @param self --- @param #size_table size --- @param #cc.Texture2D texture2d --- @param #bool bool +-- @param #size_table gridSize +-- @param #cc.Texture2D texture +-- @param #bool flipped -- @return GridBase#GridBase ret (retunr value: cc.GridBase) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/HBox.lua b/cocos/scripting/lua-bindings/auto/api/HBox.lua index 54ce53f9e3..cec73b279a 100644 --- a/cocos/scripting/lua-bindings/auto/api/HBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/HBox.lua @@ -13,6 +13,7 @@ -- @return HBox#HBox ret (retunr value: ccui.HBox) -------------------------------- +-- Default constructor -- @function [parent=#HBox] HBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Helper.lua b/cocos/scripting/lua-bindings/auto/api/Helper.lua index f7d6579957..539ae88abb 100644 --- a/cocos/scripting/lua-bindings/auto/api/Helper.lua +++ b/cocos/scripting/lua-bindings/auto/api/Helper.lua @@ -4,32 +4,46 @@ -- @parent_module ccui -------------------------------- +-- brief Get a UTF8 substring from a std::string with a given start position and length
+-- Sample: std::string str = "中国中国中国”; substr = getSubStringOfUTF8String(str,0,2) will = "中国"
+-- param start The start position of the substring.
+-- param length The length of the substring in UTF8 count
+-- return a UTF8 substring -- @function [parent=#Helper] getSubStringOfUTF8String -- @param self -- @param #string str --- @param #unsigned long long --- @param #unsigned long long +-- @param #unsigned long start +-- @param #unsigned long length -- @return string#string ret (return value: string) -------------------------------- +-- Finds a widget whose tag equals to param tag from root widget.
+-- param root widget which will be seeked.
+-- tag tag value.
+-- return finded result. -- @function [parent=#Helper] seekWidgetByTag -- @param self --- @param #ccui.Widget widget --- @param #int int +-- @param #ccui.Widget root +-- @param #int tag -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- -- @function [parent=#Helper] seekActionWidgetByActionTag -- @param self --- @param #ccui.Widget widget --- @param #int int +-- @param #ccui.Widget root +-- @param #int tag -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- Finds a widget whose name equals to param name from root widget.
+-- param root widget which will be seeked.
+-- name name value.
+-- return finded result. -- @function [parent=#Helper] seekWidgetByName -- @param self --- @param #ccui.Widget widget --- @param #string str +-- @param #ccui.Widget root +-- @param #string name -- @return Widget#Widget ret (return value: ccui.Widget) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Hide.lua b/cocos/scripting/lua-bindings/auto/api/Hide.lua index b40dbd8ea7..4aa81b057e 100644 --- a/cocos/scripting/lua-bindings/auto/api/Hide.lua +++ b/cocos/scripting/lua-bindings/auto/api/Hide.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- Allocates and initializes the action -- @function [parent=#Hide] create -- @param self -- @return Hide#Hide ret (return value: cc.Hide) -------------------------------- +-- -- @function [parent=#Hide] clone -- @param self -- @return Hide#Hide ret (return value: cc.Hide) -------------------------------- +-- -- @function [parent=#Hide] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#Hide] reverse -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) diff --git a/cocos/scripting/lua-bindings/auto/api/Image.lua b/cocos/scripting/lua-bindings/auto/api/Image.lua index 4ce6cd8d50..bc93b29571 100644 --- a/cocos/scripting/lua-bindings/auto/api/Image.lua +++ b/cocos/scripting/lua-bindings/auto/api/Image.lua @@ -5,69 +5,89 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Image] hasPremultipliedAlpha -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief Save Image data to the specified file, with specified format.
+-- param filePath the file's absolute path, including file suffix.
+-- param isToRGB whether the image is saved as RGB format. -- @function [parent=#Image] saveToFile -- @param self --- @param #string str --- @param #bool bool +-- @param #string filename +-- @param #bool isToRGB -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Image] hasAlpha -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Image] isCompressed -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Image] getHeight -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- brief Load the image from the specified path.
+-- param path the absolute file path.
+-- return true if loaded correctly. -- @function [parent=#Image] initWithImageFile -- @param self --- @param #string str +-- @param #string path -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Image] getWidth -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Image] getBitPerPixel -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Image] getFileType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Image] getNumberOfMipmaps -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Image] getRenderFormat -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- treats (or not) PVR files as if they have alpha premultiplied.
+-- Since it is impossible to know at runtime if the PVR images have the alpha channel premultiplied, it is
+-- possible load them as if they have (or not) the alpha channel premultiplied.
+-- By default it is disabled. -- @function [parent=#Image] setPVRImagesHavePremultipliedAlpha -- @param self --- @param #bool bool +-- @param #bool haveAlphaPremultiplied -------------------------------- +-- js ctor -- @function [parent=#Image] Image -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ImageView.lua b/cocos/scripting/lua-bindings/auto/api/ImageView.lua index 395449e067..6bfec98e56 100644 --- a/cocos/scripting/lua-bindings/auto/api/ImageView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ImageView.lua @@ -5,32 +5,43 @@ -- @parent_module ccui -------------------------------- +-- Load texture for imageview.
+-- param fileName file name of texture.
+-- param texType @see TextureResType -- @function [parent=#ImageView] loadTexture -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string fileName +-- @param #int texType -------------------------------- +-- Sets if imageview is using scale9 renderer.
+-- param able true that using scale9 renderer, false otherwise. -- @function [parent=#ImageView] setScale9Enabled -- @param self --- @param #bool bool +-- @param #bool able -------------------------------- +-- Updates the texture rect of the ImageView in points.
+-- It will call setTextureRect:rotated:untrimmedSize with rotated = NO, and utrimmedSize = rect.size. -- @function [parent=#ImageView] setTextureRect -- @param self -- @param #rect_table rect -------------------------------- +-- Sets capinsets for imageview, if imageview is using scale9 renderer.
+-- param capInsets capinsets for imageview -- @function [parent=#ImageView] setCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- -- @function [parent=#ImageView] getCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#ImageView] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) @@ -40,36 +51,42 @@ -- @overload self -- @function [parent=#ImageView] create -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string imageFileName +-- @param #int texType -- @return ImageView#ImageView ret (retunr value: ccui.ImageView) -------------------------------- +-- -- @function [parent=#ImageView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#ImageView] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#ImageView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ImageView] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#ImageView] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- Default constructor -- @function [parent=#ImageView] ImageView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua b/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua index 5de5259f53..1ca735b5ef 100644 --- a/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua @@ -5,36 +5,43 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#InnerActionFrame] getInnerActionType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#InnerActionFrame] setStartFrameIndex -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- -- @function [parent=#InnerActionFrame] setInnerActionType -- @param self --- @param #int inneractiontype +-- @param #int type -------------------------------- +-- -- @function [parent=#InnerActionFrame] getStartFrameIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#InnerActionFrame] create -- @param self -- @return InnerActionFrame#InnerActionFrame ret (return value: ccs.InnerActionFrame) -------------------------------- +-- -- @function [parent=#InnerActionFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#InnerActionFrame] InnerActionFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/JumpBy.lua b/cocos/scripting/lua-bindings/auto/api/JumpBy.lua index d507b67485..14eb4a8885 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpBy.lua @@ -5,32 +5,37 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#JumpBy] create -- @param self --- @param #float float --- @param #vec2_table vec2 --- @param #float float --- @param #int int +-- @param #float duration +-- @param #vec2_table position +-- @param #float height +-- @param #int jumps -- @return JumpBy#JumpBy ret (return value: cc.JumpBy) -------------------------------- +-- -- @function [parent=#JumpBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#JumpBy] clone -- @param self -- @return JumpBy#JumpBy ret (return value: cc.JumpBy) -------------------------------- +-- -- @function [parent=#JumpBy] reverse -- @param self -- @return JumpBy#JumpBy ret (return value: cc.JumpBy) -------------------------------- +-- -- @function [parent=#JumpBy] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua index 53c834be5b..dd54c6becf 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- amplitude rate -- @function [parent=#JumpTiles3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#JumpTiles3D] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- -- @function [parent=#JumpTiles3D] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- amplitude of the sin -- @function [parent=#JumpTiles3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- creates the action with the number of jumps, the sin amplitude, the grid size and the duration -- @function [parent=#JumpTiles3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int numberOfJumps +-- @param #float amplitude -- @return JumpTiles3D#JumpTiles3D ret (return value: cc.JumpTiles3D) -------------------------------- +-- -- @function [parent=#JumpTiles3D] clone -- @param self -- @return JumpTiles3D#JumpTiles3D ret (return value: cc.JumpTiles3D) -------------------------------- +-- -- @function [parent=#JumpTiles3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/JumpTo.lua b/cocos/scripting/lua-bindings/auto/api/JumpTo.lua index d2e4081e8d..daeb353815 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpTo.lua @@ -5,25 +5,29 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#JumpTo] create -- @param self --- @param #float float --- @param #vec2_table vec2 --- @param #float float --- @param #int int +-- @param #float duration +-- @param #vec2_table position +-- @param #float height +-- @param #int jumps -- @return JumpTo#JumpTo ret (return value: cc.JumpTo) -------------------------------- +-- -- @function [parent=#JumpTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#JumpTo] clone -- @param self -- @return JumpTo#JumpTo ret (return value: cc.JumpTo) -------------------------------- +-- -- @function [parent=#JumpTo] reverse -- @param self -- @return JumpTo#JumpTo ret (return value: cc.JumpTo) diff --git a/cocos/scripting/lua-bindings/auto/api/Label.lua b/cocos/scripting/lua-bindings/auto/api/Label.lua index 52319e86ec..ccd1e9e660 100644 --- a/cocos/scripting/lua-bindings/auto/api/Label.lua +++ b/cocos/scripting/lua-bindings/auto/api/Label.lua @@ -5,123 +5,157 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Label] isClipMarginEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Enable shadow for the label
+-- todo support blur for shadow effect -- @function [parent=#Label] enableShadow -- @param self -------------------------------- +-- Sets the untransformed size of the label in a more efficient way. -- @function [parent=#Label] setDimensions -- @param self --- @param #unsigned int int --- @param #unsigned int int +-- @param #unsigned int width +-- @param #unsigned int height -------------------------------- +-- -- @function [parent=#Label] getString -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Label] getHeight -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- disable shadow/outline/glow rendering -- @function [parent=#Label] disableEffect -- @param self -------------------------------- +-- set TTF configuration for Label -- @function [parent=#Label] setTTFConfig -- @param self --- @param #cc._ttfConfig _ttfconfig +-- @param #cc._ttfConfig ttfConfig -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the text color of this label
+-- Only support for TTF and system font
+-- warning Different from the color of Node. -- @function [parent=#Label] getTextColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- +-- Sets the untransformed size of the label.
+-- The label's width be used for text align if the set value not equal zero.
+-- The label's max line width will be equal to the same value. -- @function [parent=#Label] setWidth -- @param self --- @param #unsigned int int +-- @param #unsigned int width -------------------------------- +-- -- @function [parent=#Label] getMaxLineWidth -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#Label] getHorizontalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- clip upper and lower margin for reduce height of label. -- @function [parent=#Label] setClipMarginEnabled -- @param self --- @param #bool bool +-- @param #bool clipEnabled -------------------------------- +-- changes the string to render
+-- warning It is as expensive as changing the string if you haven't set up TTF/BMFont/CharMap for the label. -- @function [parent=#Label] setString -- @param self --- @param #string str +-- @param #string text -------------------------------- +-- -- @function [parent=#Label] setSystemFontName -- @param self --- @param #string str +-- @param #string systemFont -------------------------------- +-- -- @function [parent=#Label] setBMFontFilePath -- @param self --- @param #string str --- @param #vec2_table vec2 +-- @param #string bmfontFilePath +-- @param #vec2_table imageOffset -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Label] getFontAtlas -- @param self -- @return FontAtlas#FontAtlas ret (return value: cc.FontAtlas) -------------------------------- +-- Sets the line height of the label
+-- warning Not support system font
+-- since v3.2.0 -- @function [parent=#Label] setLineHeight -- @param self --- @param #float float +-- @param #float height -------------------------------- +-- -- @function [parent=#Label] setSystemFontSize -- @param self --- @param #float float +-- @param #float fontSize -------------------------------- +-- update content immediately. -- @function [parent=#Label] updateContent -- @param self -------------------------------- +-- -- @function [parent=#Label] getStringLength -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Label] setLineBreakWithoutSpace -- @param self --- @param #bool bool +-- @param #bool breakWithoutSpace -------------------------------- +-- -- @function [parent=#Label] getStringNumLines -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- only support for TTF -- @function [parent=#Label] enableOutline -- @param self --- @param #color4b_table color4b --- @param #int int +-- @param #color4b_table outlineColor +-- @param #int outlineSize -------------------------------- +-- Returns the additional kerning of this label
+-- warning Not support system font
+-- since v3.2.0 -- @function [parent=#Label] getAdditionalKerning -- @param self -- @return float#float ret (return value: float) @@ -132,117 +166,145 @@ -- @overload self, string -- @function [parent=#Label] setCharMap -- @param self --- @param #string str --- @param #int int --- @param #int int --- @param #int int +-- @param #string charMapFile +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #int startCharMap -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Label] getDimensions -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Sets the max line width of the label.
+-- The label's max line width be used for force line breaks if the set value not equal zero.
+-- The label's width and max line width has not always to be equal. -- @function [parent=#Label] setMaxLineWidth -- @param self --- @param #unsigned int int +-- @param #unsigned int maxLineWidth -------------------------------- +-- -- @function [parent=#Label] getSystemFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Label] setVerticalAlignment -- @param self --- @param #int textvalignment +-- @param #int vAlignment -------------------------------- +-- Returns the line height of this label
+-- warning Not support system font -- @function [parent=#Label] getLineHeight -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Label] getTTFConfig -- @param self -- @return _ttfConfig#_ttfConfig ret (return value: cc._ttfConfig) -------------------------------- +-- -- @function [parent=#Label] getVerticalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Sets the text color of the label
+-- Only support for TTF and system font
+-- warning Different from the color of Node. -- @function [parent=#Label] setTextColor -- @param self --- @param #color4b_table color4b +-- @param #color4b_table color -------------------------------- +-- Sets the untransformed size of the label.
+-- The label's height be used for text align if the set value not equal zero.
+-- The text will display of incomplete when the size of label not enough to support display all text. -- @function [parent=#Label] setHeight -- @param self --- @param #unsigned int int +-- @param #unsigned int height -------------------------------- +-- -- @function [parent=#Label] getWidth -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- only support for TTF -- @function [parent=#Label] enableGlow -- @param self --- @param #color4b_table color4b +-- @param #color4b_table glowColor -------------------------------- +-- -- @function [parent=#Label] getLetter -- @param self --- @param #int int +-- @param #int lettetIndex -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- Sets the additional kerning of the label
+-- warning Not support system font
+-- since v3.2.0 -- @function [parent=#Label] setAdditionalKerning -- @param self --- @param #float float +-- @param #float space -------------------------------- +-- -- @function [parent=#Label] getSystemFontSize -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Label] getTextAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Label] getBMFontFilePath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Label] setHorizontalAlignment -- @param self --- @param #int texthalignment +-- @param #int hAlignment -------------------------------- -- @overload self, int, int -- @overload self, int -- @function [parent=#Label] setAlignment -- @param self --- @param #int texthalignment --- @param #int textvalignment +-- @param #int hAlignment +-- @param #int vAlignment -------------------------------- +-- -- @function [parent=#Label] createWithBMFont -- @param self --- @param #string str --- @param #string str --- @param #int texthalignment --- @param #int int --- @param #vec2_table vec2 +-- @param #string bmfontFilePath +-- @param #string text +-- @param #int alignment +-- @param #int maxLineWidth +-- @param #vec2_table imageOffset -- @return Label#Label ret (return value: cc.Label) -------------------------------- +-- -- @function [parent=#Label] create -- @param self -- @return Label#Label ret (return value: cc.Label) @@ -253,111 +315,130 @@ -- @overload self, string -- @function [parent=#Label] createWithCharMap -- @param self --- @param #string str --- @param #int int --- @param #int int --- @param #int int +-- @param #string charMapFile +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #int startCharMap -- @return Label#Label ret (retunr value: cc.Label) -------------------------------- +-- Creates a label with an initial string,font[font name or font file],font size, dimension in points, horizontal alignment and vertical alignment.
+-- warning It will generate texture by the platform-dependent code -- @function [parent=#Label] createWithSystemFont -- @param self --- @param #string str --- @param #string str --- @param #float float --- @param #size_table size --- @param #int texthalignment --- @param #int textvalignment +-- @param #string text +-- @param #string font +-- @param #float fontSize +-- @param #size_table dimensions +-- @param #int hAlignment +-- @param #int vAlignment -- @return Label#Label ret (return value: cc.Label) -------------------------------- +-- -- @function [parent=#Label] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#Label] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#Label] setScaleY -- @param self --- @param #float float +-- @param #float scaleY -------------------------------- +-- -- @function [parent=#Label] setScaleX -- @param self --- @param #float float +-- @param #float scaleX -------------------------------- +-- -- @function [parent=#Label] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Label] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Label] setBlendFunc -- @param self --- @param #cc.BlendFunc blendfunc +-- @param #cc.BlendFunc blendFunc -------------------------------- +-- -- @function [parent=#Label] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#Label] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Label] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Label] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool isOpacityModifyRGB -------------------------------- +-- -- @function [parent=#Label] setScale -- @param self --- @param #float float +-- @param #float scale -------------------------------- +-- -- @function [parent=#Label] sortAllChildren -- @param self -------------------------------- +-- -- @function [parent=#Label] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- -- @function [parent=#Label] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Label] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Label] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor return nil diff --git a/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua b/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua index 50753ea4c0..53d042dc5f 100644 --- a/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua +++ b/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#LabelAtlas] setString -- @param self --- @param #string str +-- @param #string label -------------------------------- -- @overload self, string, string @@ -15,18 +16,20 @@ -- @overload self, string, cc.Texture2D, int, int, int -- @function [parent=#LabelAtlas] initWithString -- @param self --- @param #string str --- @param #cc.Texture2D texture2d --- @param #int int --- @param #int int --- @param #int int +-- @param #string string +-- @param #cc.Texture2D texture +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #int startCharMap -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#LabelAtlas] updateAtlasValues -- @param self -------------------------------- +-- -- @function [parent=#LabelAtlas] getString -- @param self -- @return string#string ret (return value: string) @@ -37,14 +40,15 @@ -- @overload self, string, string -- @function [parent=#LabelAtlas] create -- @param self --- @param #string str --- @param #string str --- @param #int int --- @param #int int --- @param #int int +-- @param #string string +-- @param #string charMapFile +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #int startCharMap -- @return LabelAtlas#LabelAtlas ret (retunr value: cc.LabelAtlas) -------------------------------- +-- -- @function [parent=#LabelAtlas] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/Layer.lua b/cocos/scripting/lua-bindings/auto/api/Layer.lua index 8918c08dbe..cca3874464 100644 --- a/cocos/scripting/lua-bindings/auto/api/Layer.lua +++ b/cocos/scripting/lua-bindings/auto/api/Layer.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- creates a fullscreen black layer -- @function [parent=#Layer] create -- @param self -- @return Layer#Layer ret (return value: cc.Layer) -------------------------------- +-- -- @function [parent=#Layer] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/LayerColor.lua b/cocos/scripting/lua-bindings/auto/api/LayerColor.lua index 6a190c9eb1..c4cdc21e89 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerColor.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerColor.lua @@ -5,20 +5,24 @@ -- @parent_module cc -------------------------------- +-- change width and height in Points
+-- since v0.8 -- @function [parent=#LayerColor] changeWidthAndHeight -- @param self --- @param #float float --- @param #float float +-- @param #float w +-- @param #float h -------------------------------- +-- change height in Points -- @function [parent=#LayerColor] changeHeight -- @param self --- @param #float float +-- @param #float h -------------------------------- +-- change width in Points -- @function [parent=#LayerColor] changeWidth -- @param self --- @param #float float +-- @param #float w -------------------------------- -- @overload self, color4b_table, float, float @@ -26,26 +30,29 @@ -- @overload self, color4b_table -- @function [parent=#LayerColor] create -- @param self --- @param #color4b_table color4b --- @param #float float --- @param #float float +-- @param #color4b_table color +-- @param #float width +-- @param #float height -- @return LayerColor#LayerColor ret (retunr value: cc.LayerColor) -------------------------------- +-- -- @function [parent=#LayerColor] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#LayerColor] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#LayerColor] setContentSize -- @param self --- @param #size_table size +-- @param #size_table var return nil diff --git a/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua b/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua index 8f18269408..fda8a00876 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua @@ -5,64 +5,78 @@ -- @parent_module cc -------------------------------- +-- Returns the start color of the gradient -- @function [parent=#LayerGradient] getStartColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#LayerGradient] isCompressedInterpolation -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the start opacity of the gradient -- @function [parent=#LayerGradient] getStartOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- Sets the directional vector that will be used for the gradient.
+-- The default value is vertical direction (0,-1). -- @function [parent=#LayerGradient] setVector -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table alongVector -------------------------------- +-- Returns the start opacity of the gradient -- @function [parent=#LayerGradient] setStartOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char startOpacity -------------------------------- +-- Whether or not the interpolation will be compressed in order to display all the colors of the gradient both in canonical and non canonical vectors
+-- Default: true -- @function [parent=#LayerGradient] setCompressedInterpolation -- @param self --- @param #bool bool +-- @param #bool compressedInterpolation -------------------------------- +-- Returns the end opacity of the gradient -- @function [parent=#LayerGradient] setEndOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char endOpacity -------------------------------- +-- Returns the directional vector used for the gradient -- @function [parent=#LayerGradient] getVector -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Sets the end color of the gradient -- @function [parent=#LayerGradient] setEndColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table endColor -------------------------------- +-- Returns the end color of the gradient -- @function [parent=#LayerGradient] getEndColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Returns the end opacity of the gradient -- @function [parent=#LayerGradient] getEndOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- Sets the start color of the gradient -- @function [parent=#LayerGradient] setStartColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table startColor -------------------------------- -- @overload self, color4b_table, color4b_table @@ -70,12 +84,13 @@ -- @overload self, color4b_table, color4b_table, vec2_table -- @function [parent=#LayerGradient] create -- @param self --- @param #color4b_table color4b --- @param #color4b_table color4b --- @param #vec2_table vec2 +-- @param #color4b_table start +-- @param #color4b_table end +-- @param #vec2_table v -- @return LayerGradient#LayerGradient ret (retunr value: cc.LayerGradient) -------------------------------- +-- -- @function [parent=#LayerGradient] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua b/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua index 3f577da04d..b413d3dd25 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerMultiplex.lua @@ -5,21 +5,27 @@ -- @parent_module cc -------------------------------- +-- release the current layer and switches to another layer indexed by n.
+-- The current (old) layer will be removed from it's parent with 'cleanup=true'. -- @function [parent=#LayerMultiplex] switchToAndReleaseMe -- @param self --- @param #int int +-- @param #int n -------------------------------- +-- -- @function [parent=#LayerMultiplex] addLayer -- @param self -- @param #cc.Layer layer -------------------------------- +-- switches to a certain layer indexed by n.
+-- The current (old) layer will be removed from it's parent with 'cleanup=true'. -- @function [parent=#LayerMultiplex] switchTo -- @param self --- @param #int int +-- @param #int n -------------------------------- +-- -- @function [parent=#LayerMultiplex] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/Layout.lua b/cocos/scripting/lua-bindings/auto/api/Layout.lua index fc0c574ce7..4612380c7a 100644 --- a/cocos/scripting/lua-bindings/auto/api/Layout.lua +++ b/cocos/scripting/lua-bindings/auto/api/Layout.lua @@ -5,177 +5,223 @@ -- @parent_module ccui -------------------------------- +-- Sets background color vector for layout, if color type is BackGroundColorType::GRADIENT
+-- param vector -- @function [parent=#Layout] setBackGroundColorVector -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table vector -------------------------------- +-- -- @function [parent=#Layout] setClippingType -- @param self --- @param #int clippingtype +-- @param #int type -------------------------------- +-- Sets Color Type for layout.
+-- param type @see LayoutBackGroundColorType. -- @function [parent=#Layout] setBackGroundColorType -- @param self --- @param #int backgroundcolortype +-- @param #int type -------------------------------- +-- If a layout is loop focused which means that the focus movement will be inside the layout
+-- param loop pass true to let the focus movement loop inside the layout -- @function [parent=#Layout] setLoopFocus -- @param self --- @param #bool bool +-- @param #bool loop -------------------------------- +-- -- @function [parent=#Layout] setBackGroundImageColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- -- @function [parent=#Layout] getBackGroundColorVector -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Layout] getClippingType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- return If focus loop is enabled, then it will return true, otherwise it returns false. The default value is false. -- @function [parent=#Layout] isLoopFocus -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Remove the background image of layout. -- @function [parent=#Layout] removeBackGroundImage -- @param self -------------------------------- +-- -- @function [parent=#Layout] getBackGroundColorOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- Gets if layout is clipping enabled.
+-- return if layout is clipping enabled. -- @function [parent=#Layout] isClippingEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Layout] setBackGroundImageOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity -------------------------------- +-- Sets a background image for layout
+-- param fileName image file path.
+-- param texType @see TextureResType. TextureResType::LOCAL means local file, TextureResType::PLIST means sprite frame. -- @function [parent=#Layout] setBackGroundImage -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string fileName +-- @param #int texType -------------------------------- -- @overload self, color3b_table, color3b_table -- @overload self, color3b_table -- @function [parent=#Layout] setBackGroundColor -- @param self --- @param #color3b_table color3b --- @param #color3b_table color3b +-- @param #color3b_table startColor +-- @param #color3b_table endColor -------------------------------- +-- request to refresh widget layout -- @function [parent=#Layout] requestDoLayout -- @param self -------------------------------- +-- -- @function [parent=#Layout] getBackGroundImageCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Layout] getBackGroundColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Changes if layout can clip it's content and child.
+-- If you really need this, please enable it. But it would reduce the rendering efficiency.
+-- param clipping enabled. -- @function [parent=#Layout] setClippingEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#Layout] getBackGroundImageColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#Layout] isBackGroundImageScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Layout] getBackGroundColorType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Layout] getBackGroundEndColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Sets background opacity layout.
+-- param opacity -- @function [parent=#Layout] setBackGroundColorOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity -------------------------------- +-- -- @function [parent=#Layout] getBackGroundImageOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- return To query whether the layout will pass the focus to its children or not. The default value is true -- @function [parent=#Layout] isPassFocusToChild -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets a background image capinsets for layout, if the background image is a scale9 render.
+-- param capinsets of background image. -- @function [parent=#Layout] setBackGroundImageCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Gets background image texture size.
+-- return background image texture size. -- @function [parent=#Layout] getBackGroundImageTextureSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- force refresh widget layout -- @function [parent=#Layout] forceDoLayout -- @param self -------------------------------- +-- -- @function [parent=#Layout] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- param pass To specify whether the layout pass its focus to its child -- @function [parent=#Layout] setPassFocusToChild -- @param self --- @param #bool bool +-- @param #bool pass -------------------------------- +-- -- @function [parent=#Layout] getBackGroundStartColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Sets background iamge use scale9 renderer.
+-- param enabled true that use scale9 renderer, false otherwise. -- @function [parent=#Layout] setBackGroundImageScale9Enabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#Layout] setLayoutType -- @param self -- @param #int type -------------------------------- +-- Allocates and initializes a layout. -- @function [parent=#Layout] create -- @param self -- @return Layout#Layout ret (return value: ccui.Layout) -------------------------------- +-- -- @function [parent=#Layout] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) @@ -187,38 +233,52 @@ -- @overload self, cc.Node, int, string -- @function [parent=#Layout] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #string str +-- @param #cc.Node child +-- @param #int zOrder +-- @param #string name -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#Layout] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
+-- param cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
+-- js removeAllChildren
+-- lua removeAllChildren -- @function [parent=#Layout] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- Removes all children from the container with a cleanup.
+-- see `removeAllChildrenWithCleanup(bool)` -- @function [parent=#Layout] removeAllChildren -- @param self -------------------------------- +-- When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
+-- If the widget is not in a layout, it will return itself
+-- param dir the direction to look for the next focused widget in a layout
+-- param current the current focused widget
+-- return the next focused widget in a layout -- @function [parent=#Layout] findNextFocusedWidget -- @param self --- @param #int focusdirection --- @param #ccui.Widget widget +-- @param #int direction +-- @param #ccui.Widget current -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- -- @function [parent=#Layout] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- Default constructor -- @function [parent=#Layout] Layout -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua b/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua index 590f5ea26d..93f935f428 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayoutParameter.lua @@ -5,31 +5,40 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#LayoutParameter] clone -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- Gets LayoutParameterType of LayoutParameter.
+-- see LayoutParameterType
+-- return LayoutParameterType -- @function [parent=#LayoutParameter] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#LayoutParameter] createCloneInstance -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- -- @function [parent=#LayoutParameter] copyProperties -- @param self --- @param #ccui.LayoutParameter layoutparameter +-- @param #ccui.LayoutParameter model -------------------------------- +-- Allocates and initializes.
+-- return A initialized LayoutParameter which is marked as "autorelease". -- @function [parent=#LayoutParameter] create -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- Default constructor -- @function [parent=#LayoutParameter] LayoutParameter -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Lens3D.lua b/cocos/scripting/lua-bindings/auto/api/Lens3D.lua index 2bfdba6006..780fef9f24 100644 --- a/cocos/scripting/lua-bindings/auto/api/Lens3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Lens3D.lua @@ -5,47 +5,55 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Lens3D] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- Set whether lens is concave -- @function [parent=#Lens3D] setConcave -- @param self --- @param #bool bool +-- @param #bool concave -------------------------------- +-- Set lens center position -- @function [parent=#Lens3D] setLensEffect -- @param self --- @param #float float +-- @param #float lensEffect -------------------------------- +-- -- @function [parent=#Lens3D] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Get lens center position -- @function [parent=#Lens3D] getLensEffect -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- creates the action with center position, radius, a grid size and duration -- @function [parent=#Lens3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #vec2_table vec2 --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #vec2_table position +-- @param #float radius -- @return Lens3D#Lens3D ret (return value: cc.Lens3D) -------------------------------- +-- -- @function [parent=#Lens3D] clone -- @param self -- @return Lens3D#Lens3D ret (return value: cc.Lens3D) -------------------------------- +-- -- @function [parent=#Lens3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua b/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua index 81db029efb..0b73c6dce6 100644 --- a/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua +++ b/cocos/scripting/lua-bindings/auto/api/LinearLayoutParameter.lua @@ -5,31 +5,42 @@ -- @parent_module ccui -------------------------------- +-- Sets LinearGravity parameter for LayoutParameter.
+-- see LinearGravity
+-- param LinearGravity -- @function [parent=#LinearLayoutParameter] setGravity -- @param self --- @param #int lineargravity +-- @param #int gravity -------------------------------- +-- Gets LinearGravity parameter for LayoutParameter.
+-- see LinearGravity
+-- return LinearGravity -- @function [parent=#LinearLayoutParameter] getGravity -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Allocates and initializes.
+-- return A initialized LayoutParameter which is marked as "autorelease". -- @function [parent=#LinearLayoutParameter] create -- @param self -- @return LinearLayoutParameter#LinearLayoutParameter ret (return value: ccui.LinearLayoutParameter) -------------------------------- +-- -- @function [parent=#LinearLayoutParameter] createCloneInstance -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- -- @function [parent=#LinearLayoutParameter] copyProperties -- @param self --- @param #ccui.LayoutParameter layoutparameter +-- @param #ccui.LayoutParameter model -------------------------------- +-- Default constructor -- @function [parent=#LinearLayoutParameter] LinearLayoutParameter -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Liquid.lua b/cocos/scripting/lua-bindings/auto/api/Liquid.lua index 1d70bc7690..d572cb528b 100644 --- a/cocos/scripting/lua-bindings/auto/api/Liquid.lua +++ b/cocos/scripting/lua-bindings/auto/api/Liquid.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Liquid] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Liquid] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- -- @function [parent=#Liquid] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- -- @function [parent=#Liquid] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- creates the action with amplitude, a grid and duration -- @function [parent=#Liquid] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int waves +-- @param #float amplitude -- @return Liquid#Liquid ret (return value: cc.Liquid) -------------------------------- +-- -- @function [parent=#Liquid] clone -- @param self -- @return Liquid#Liquid ret (return value: cc.Liquid) -------------------------------- +-- -- @function [parent=#Liquid] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ListView.lua b/cocos/scripting/lua-bindings/auto/api/ListView.lua index eb0b32815d..550f7ede5d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ListView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ListView.lua @@ -5,103 +5,133 @@ -- @parent_module ccui -------------------------------- +-- Returns the index of item.
+-- param item the item which need to be checked.
+-- return the index of item. -- @function [parent=#ListView] getIndex -- @param self --- @param #ccui.Widget widget +-- @param #ccui.Widget item -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#ListView] removeAllItems -- @param self -------------------------------- +-- Changes the gravity of listview.
+-- see ListViewGravity -- @function [parent=#ListView] setGravity -- @param self -- @param #int gravity -------------------------------- +-- Push back custom item into listview. -- @function [parent=#ListView] pushBackCustomItem -- @param self --- @param #ccui.Widget widget +-- @param #ccui.Widget item -------------------------------- +-- Returns the item container. -- @function [parent=#ListView] getItems -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Removes a item whose index is same as the parameter.
+-- param index of item. -- @function [parent=#ListView] removeItem -- @param self --- @param #long long +-- @param #long index -------------------------------- +-- -- @function [parent=#ListView] getCurSelectedIndex -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Insert a default item(create by a cloned model) into listview. -- @function [parent=#ListView] insertDefaultItem -- @param self --- @param #long long +-- @param #long index -------------------------------- +-- -- @function [parent=#ListView] requestRefreshView -- @param self -------------------------------- +-- Changes the margin between each item.
+-- param margin -- @function [parent=#ListView] setItemsMargin -- @param self --- @param #float float +-- @param #float margin -------------------------------- +-- -- @function [parent=#ListView] refreshView -- @param self -------------------------------- +-- Removes the last item of listview. -- @function [parent=#ListView] removeLastItem -- @param self -------------------------------- +-- -- @function [parent=#ListView] getItemsMargin -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ListView] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- Returns a item whose index is same as the parameter.
+-- param index of item.
+-- return the item widget. -- @function [parent=#ListView] getItem -- @param self --- @param #long long +-- @param #long index -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- Sets a item model for listview
+-- A model will be cloned for adding default item.
+-- param model item model for listview -- @function [parent=#ListView] setItemModel -- @param self --- @param #ccui.Widget widget +-- @param #ccui.Widget model -------------------------------- +-- -- @function [parent=#ListView] doLayout -- @param self -------------------------------- +-- Push back a default item(create by a cloned model) into listview. -- @function [parent=#ListView] pushBackDefaultItem -- @param self -------------------------------- +-- Insert custom item into listview. -- @function [parent=#ListView] insertCustomItem -- @param self --- @param #ccui.Widget widget --- @param #long long +-- @param #ccui.Widget item +-- @param #long index -------------------------------- +-- Allocates and initializes. -- @function [parent=#ListView] create -- @param self -- @return ListView#ListView ret (return value: ccui.ListView) -------------------------------- +-- -- @function [parent=#ListView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) @@ -113,36 +143,44 @@ -- @overload self, cc.Node, int, string -- @function [parent=#ListView] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #string str +-- @param #cc.Node child +-- @param #int zOrder +-- @param #string name -------------------------------- +-- Changes scroll direction of scrollview.
+-- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
+-- param dir, set the list view's scroll direction -- @function [parent=#ListView] setDirection -- @param self --- @param #int direction +-- @param #int dir -------------------------------- +-- -- @function [parent=#ListView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ListView] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#ListView] removeAllChildren -- @param self -------------------------------- +-- -- @function [parent=#ListView] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleaup -------------------------------- +-- Default constructor -- @function [parent=#ListView] ListView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua b/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua index 132912332c..bb0fa5deff 100644 --- a/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua +++ b/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua @@ -5,47 +5,66 @@ -- @parent_module ccui -------------------------------- +-- Changes the progress direction of loadingbar.
+-- param percent percent value from 1 to 100. -- @function [parent=#LoadingBar] setPercent -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- Load texture for loadingbar.
+-- param texture file name of texture.
+-- param texType @see TextureResType -- @function [parent=#LoadingBar] loadTexture -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string texture +-- @param #int texType -------------------------------- +-- Changes the progress direction of loadingbar.
+-- see Direction LEFT means progress left to right, RIGHT otherwise.
+-- param direction Direction -- @function [parent=#LoadingBar] setDirection -- @param self -- @param #int direction -------------------------------- +-- Sets if loadingbar is using scale9 renderer.
+-- param enabled true that using scale9 renderer, false otherwise. -- @function [parent=#LoadingBar] setScale9Enabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Sets capinsets for loadingbar, if loadingbar is using scale9 renderer.
+-- param capInsets capinsets for loadingbar -- @function [parent=#LoadingBar] setCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Gets the progress direction of loadingbar.
+-- see Direction LEFT means progress left to right, RIGHT otherwise.
+-- return Direction -- @function [parent=#LoadingBar] getDirection -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#LoadingBar] getCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#LoadingBar] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the progress direction of loadingbar.
+-- return percent value from 1 to 100. -- @function [parent=#LoadingBar] getPercent -- @param self -- @return float#float ret (return value: float) @@ -55,36 +74,42 @@ -- @overload self -- @function [parent=#LoadingBar] create -- @param self --- @param #string str --- @param #float float +-- @param #string textureName +-- @param #float percentage -- @return LoadingBar#LoadingBar ret (retunr value: ccui.LoadingBar) -------------------------------- +-- -- @function [parent=#LoadingBar] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#LoadingBar] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#LoadingBar] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#LoadingBar] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#LoadingBar] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- Default constructor -- @function [parent=#LoadingBar] LoadingBar -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Menu.lua b/cocos/scripting/lua-bindings/auto/api/Menu.lua index 3a228e3443..9c5f8e0bc4 100644 --- a/cocos/scripting/lua-bindings/auto/api/Menu.lua +++ b/cocos/scripting/lua-bindings/auto/api/Menu.lua @@ -5,30 +5,38 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Menu] setEnabled -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- align items vertically -- @function [parent=#Menu] alignItemsVertically -- @param self -------------------------------- +-- -- @function [parent=#Menu] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- align items horizontally with padding
+-- since v0.7.2 -- @function [parent=#Menu] alignItemsHorizontallyWithPadding -- @param self --- @param #float float +-- @param #float padding -------------------------------- +-- align items vertically with padding
+-- since v0.7.2 -- @function [parent=#Menu] alignItemsVerticallyWithPadding -- @param self --- @param #float float +-- @param #float padding -------------------------------- +-- align items horizontally -- @function [parent=#Menu] alignItemsHorizontally -- @param self @@ -39,29 +47,33 @@ -- @overload self, cc.Node, int, string -- @function [parent=#Menu] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #string str +-- @param #cc.Node child +-- @param #int zOrder +-- @param #string name -------------------------------- +-- -- @function [parent=#Menu] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Menu] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Menu] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool bValue -------------------------------- +-- -- @function [parent=#Menu] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItem.lua b/cocos/scripting/lua-bindings/auto/api/MenuItem.lua index 12a0238e4c..b525b9112c 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItem.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItem.lua @@ -5,38 +5,46 @@ -- @parent_module cc -------------------------------- +-- enables or disables the item -- @function [parent=#MenuItem] setEnabled -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- Activate the item -- @function [parent=#MenuItem] activate -- @param self -------------------------------- +-- returns whether or not the item is enabled -- @function [parent=#MenuItem] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- The item was selected (not activated), similar to "mouse-over" -- @function [parent=#MenuItem] selected -- @param self -------------------------------- +-- returns whether or not the item is selected -- @function [parent=#MenuItem] isSelected -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- The item was unselected -- @function [parent=#MenuItem] unselected -- @param self -------------------------------- +-- Returns the outside box -- @function [parent=#MenuItem] rect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#MenuItem] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua index 7f0c2f5767..fd9baf15a8 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemFont.lua @@ -5,43 +5,59 @@ -- @parent_module cc -------------------------------- +-- get font size
+-- js getFontSize -- @function [parent=#MenuItemFont] getFontSizeObj -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- returns the name of the Font
+-- js getFontNameObj -- @function [parent=#MenuItemFont] getFontNameObj -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- set font size
+-- c++ can not overload static and non-static member functions with the same parameter types
+-- so change the name to setFontSizeObj
+-- js setFontSize -- @function [parent=#MenuItemFont] setFontSizeObj -- @param self --- @param #int int +-- @param #int size -------------------------------- +-- set the font name
+-- c++ can not overload static and non-static member functions with the same parameter types
+-- so change the name to setFontNameObj
+-- js setFontName -- @function [parent=#MenuItemFont] setFontNameObj -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- set the default font name -- @function [parent=#MenuItemFont] setFontName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- get default font size -- @function [parent=#MenuItemFont] getFontSize -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- get the default font name -- @function [parent=#MenuItemFont] getFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- set default font size -- @function [parent=#MenuItemFont] setFontSize -- @param self --- @param #int int +-- @param #int size return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua index 81b37760cd..bdad1c852f 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemImage.lua @@ -5,18 +5,21 @@ -- @parent_module cc -------------------------------- +-- sets the sprite frame for the disabled image -- @function [parent=#MenuItemImage] setDisabledSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame frame -------------------------------- +-- sets the sprite frame for the selected image -- @function [parent=#MenuItemImage] setSelectedSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame frame -------------------------------- +-- sets the sprite frame for the normal image -- @function [parent=#MenuItemImage] setNormalSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame frame return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua index 177d9f914b..9048226099 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua @@ -5,44 +5,53 @@ -- @parent_module cc -------------------------------- +-- Gets the color that will be used to disable the item -- @function [parent=#MenuItemLabel] getDisabledColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- sets a new string to the inner label -- @function [parent=#MenuItemLabel] setString -- @param self --- @param #string str +-- @param #string label -------------------------------- +-- Sets the label that is rendered. -- @function [parent=#MenuItemLabel] setLabel -- @param self -- @param #cc.Node node -------------------------------- +-- Sets the color that will be used to disable the item -- @function [parent=#MenuItemLabel] setDisabledColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- Gets the label that is rendered. -- @function [parent=#MenuItemLabel] getLabel -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#MenuItemLabel] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#MenuItemLabel] activate -- @param self -------------------------------- +-- -- @function [parent=#MenuItemLabel] unselected -- @param self -------------------------------- +-- -- @function [parent=#MenuItemLabel] selected -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua index 881f690df1..5af7c2fd8e 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemSprite.lua @@ -5,45 +5,54 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#MenuItemSprite] setEnabled -- @param self --- @param #bool bool +-- @param #bool bEnabled -------------------------------- +-- since v0.99.5 -- @function [parent=#MenuItemSprite] selected -- @param self -------------------------------- +-- Sets the image used when the item is not selected -- @function [parent=#MenuItemSprite] setNormalImage -- @param self --- @param #cc.Node node +-- @param #cc.Node image -------------------------------- +-- Sets the image used when the item is disabled -- @function [parent=#MenuItemSprite] setDisabledImage -- @param self --- @param #cc.Node node +-- @param #cc.Node image -------------------------------- +-- Sets the image used when the item is selected -- @function [parent=#MenuItemSprite] setSelectedImage -- @param self --- @param #cc.Node node +-- @param #cc.Node image -------------------------------- +-- Gets the image used when the item is disabled -- @function [parent=#MenuItemSprite] getDisabledImage -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Gets the image used when the item is selected -- @function [parent=#MenuItemSprite] getSelectedImage -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Gets the image used when the item is not selected -- @function [parent=#MenuItemSprite] getNormalImage -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#MenuItemSprite] unselected -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua index 7442feb1b5..a2e32d4499 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemToggle.lua @@ -5,44 +5,53 @@ -- @parent_module cc -------------------------------- +-- Sets the array that contains the subitems. -- @function [parent=#MenuItemToggle] setSubItems -- @param self --- @param #array_table array +-- @param #array_table items -------------------------------- +-- Gets the index of the selected item -- @function [parent=#MenuItemToggle] getSelectedIndex -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- add more menu item -- @function [parent=#MenuItemToggle] addSubItem -- @param self --- @param #cc.MenuItem menuitem +-- @param #cc.MenuItem item -------------------------------- +-- return the selected item -- @function [parent=#MenuItemToggle] getSelectedItem -- @param self -- @return MenuItem#MenuItem ret (return value: cc.MenuItem) -------------------------------- +-- Sets the index of the selected item -- @function [parent=#MenuItemToggle] setSelectedIndex -- @param self --- @param #unsigned int int +-- @param #unsigned int index -------------------------------- +-- -- @function [parent=#MenuItemToggle] setEnabled -- @param self --- @param #bool bool +-- @param #bool var -------------------------------- +-- -- @function [parent=#MenuItemToggle] activate -- @param self -------------------------------- +-- -- @function [parent=#MenuItemToggle] unselected -- @param self -------------------------------- +-- -- @function [parent=#MenuItemToggle] selected -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Mesh.lua b/cocos/scripting/lua-bindings/auto/api/Mesh.lua index b9b817d4f2..2b58a7a1dc 100644 --- a/cocos/scripting/lua-bindings/auto/api/Mesh.lua +++ b/cocos/scripting/lua-bindings/auto/api/Mesh.lua @@ -5,6 +5,7 @@ -- @parent_module cc -------------------------------- +-- get mesh vertex attribute count -- @function [parent=#Mesh] getMeshVertexAttribCount -- @param self -- @return long#long ret (return value: long) @@ -14,93 +15,110 @@ -- @overload self, string -- @function [parent=#Mesh] setTexture -- @param self --- @param #string str +-- @param #string texPath -------------------------------- +-- mesh index data getter -- @function [parent=#Mesh] getMeshIndexData -- @param self -- @return MeshIndexData#MeshIndexData ret (return value: cc.MeshIndexData) -------------------------------- +-- -- @function [parent=#Mesh] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- skin getter -- @function [parent=#Mesh] getSkin -- @param self -- @return MeshSkin#MeshSkin ret (return value: cc.MeshSkin) -------------------------------- +-- name getter -- @function [parent=#Mesh] getName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Mesh] setBlendFunc -- @param self --- @param #cc.BlendFunc blendfunc +-- @param #cc.BlendFunc blendFunc -------------------------------- +-- get index format -- @function [parent=#Mesh] getIndexFormat -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- get per vertex size in bytes -- @function [parent=#Mesh] getVertexSizeInBytes -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Mesh] getBlendFunc -- @param self -- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) -------------------------------- +-- get GLProgramState -- @function [parent=#Mesh] getGLProgramState -- @param self -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- +-- get index count -- @function [parent=#Mesh] getIndexCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- get vertex buffer -- @function [parent=#Mesh] getVertexBuffer -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- get MeshVertexAttribute by index -- @function [parent=#Mesh] getMeshVertexAttribute -- @param self --- @param #int int +-- @param #int idx -- @return MeshVertexAttrib#MeshVertexAttrib ret (return value: cc.MeshVertexAttrib) -------------------------------- +-- -- @function [parent=#Mesh] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- get index buffer -- @function [parent=#Mesh] getIndexBuffer -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- has vertex attribute? -- @function [parent=#Mesh] hasVertexAttrib -- @param self --- @param #int int +-- @param #int attrib -- @return bool#bool ret (return value: bool) -------------------------------- +-- get primitive type -- @function [parent=#Mesh] getPrimitiveType -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- visible getter and setter -- @function [parent=#Mesh] setVisible -- @param self --- @param #bool bool +-- @param #bool visible return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua b/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua index 47f6c9dbeb..63d586f109 100644 --- a/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua +++ b/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua @@ -5,92 +5,108 @@ -- @parent_module cc -------------------------------- +-- Remove all living segments of the ribbon -- @function [parent=#MotionStreak] reset -- @param self -------------------------------- +-- -- @function [parent=#MotionStreak] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- -- @function [parent=#MotionStreak] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- color used for the tint -- @function [parent=#MotionStreak] tintWithColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table colors -------------------------------- +-- -- @function [parent=#MotionStreak] setStartingPositionInitialized -- @param self --- @param #bool bool +-- @param #bool bStartingPositionInitialized -------------------------------- +-- -- @function [parent=#MotionStreak] isStartingPositionInitialized -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- When fast mode is enabled, new points are added faster but with lower precision -- @function [parent=#MotionStreak] isFastMode -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#MotionStreak] setFastMode -- @param self --- @param #bool bool +-- @param #bool bFastMode -------------------------------- -- @overload self, float, float, float, color3b_table, cc.Texture2D -- @overload self, float, float, float, color3b_table, string -- @function [parent=#MotionStreak] create -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #color3b_table color3b --- @param #string str +-- @param #float fade +-- @param #float minSeg +-- @param #float stroke +-- @param #color3b_table color +-- @param #string path -- @return MotionStreak#MotionStreak ret (retunr value: cc.MotionStreak) -------------------------------- +-- -- @function [parent=#MotionStreak] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#MotionStreak] setPositionY -- @param self --- @param #float float +-- @param #float y -------------------------------- +-- -- @function [parent=#MotionStreak] setPositionX -- @param self --- @param #float float +-- @param #float x -------------------------------- +-- -- @function [parent=#MotionStreak] getPositionY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#MotionStreak] getPositionX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#MotionStreak] setOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity -------------------------------- +-- -- @function [parent=#MotionStreak] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- -- @function [parent=#MotionStreak] getOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) @@ -100,15 +116,15 @@ -- @overload self, vec2_table -- @function [parent=#MotionStreak] setPosition -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y -------------------------------- -- @overload self, float, float -- @overload self -- @function [parent=#MotionStreak] getPosition -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MoveBy.lua b/cocos/scripting/lua-bindings/auto/api/MoveBy.lua index c478aff92a..ee6d677fce 100644 --- a/cocos/scripting/lua-bindings/auto/api/MoveBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/MoveBy.lua @@ -5,30 +5,35 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#MoveBy] create -- @param self --- @param #float float --- @param #vec2_table vec2 +-- @param #float duration +-- @param #vec2_table deltaPosition -- @return MoveBy#MoveBy ret (return value: cc.MoveBy) -------------------------------- +-- -- @function [parent=#MoveBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#MoveBy] clone -- @param self -- @return MoveBy#MoveBy ret (return value: cc.MoveBy) -------------------------------- +-- -- @function [parent=#MoveBy] reverse -- @param self -- @return MoveBy#MoveBy ret (return value: cc.MoveBy) -------------------------------- +-- -- @function [parent=#MoveBy] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/MoveTo.lua b/cocos/scripting/lua-bindings/auto/api/MoveTo.lua index 432c2baff3..0212565eda 100644 --- a/cocos/scripting/lua-bindings/auto/api/MoveTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/MoveTo.lua @@ -5,18 +5,21 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#MoveTo] create -- @param self --- @param #float float --- @param #vec2_table vec2 +-- @param #float duration +-- @param #vec2_table position -- @return MoveTo#MoveTo ret (return value: cc.MoveTo) -------------------------------- +-- -- @function [parent=#MoveTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#MoveTo] clone -- @param self -- @return MoveTo#MoveTo ret (return value: cc.MoveTo) diff --git a/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua b/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua index 89f032a8ad..c6c456be00 100644 --- a/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua +++ b/cocos/scripting/lua-bindings/auto/api/MovementBoneData.lua @@ -5,27 +5,32 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#MovementBoneData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#MovementBoneData] getFrameData -- @param self --- @param #int int +-- @param #int index -- @return FrameData#FrameData ret (return value: ccs.FrameData) -------------------------------- +-- -- @function [parent=#MovementBoneData] addFrameData -- @param self --- @param #ccs.FrameData framedata +-- @param #ccs.FrameData frameData -------------------------------- +-- -- @function [parent=#MovementBoneData] create -- @param self -- @return MovementBoneData#MovementBoneData ret (return value: ccs.MovementBoneData) -------------------------------- +-- js ctor -- @function [parent=#MovementBoneData] MovementBoneData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/MovementData.lua b/cocos/scripting/lua-bindings/auto/api/MovementData.lua index 0e79adf323..3bc6b1b16a 100644 --- a/cocos/scripting/lua-bindings/auto/api/MovementData.lua +++ b/cocos/scripting/lua-bindings/auto/api/MovementData.lua @@ -5,22 +5,26 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#MovementData] getMovementBoneData -- @param self --- @param #string str +-- @param #string boneName -- @return MovementBoneData#MovementBoneData ret (return value: ccs.MovementBoneData) -------------------------------- +-- -- @function [parent=#MovementData] addMovementBoneData -- @param self --- @param #ccs.MovementBoneData movementbonedata +-- @param #ccs.MovementBoneData movBoneData -------------------------------- +-- -- @function [parent=#MovementData] create -- @param self -- @return MovementData#MovementData ret (return value: ccs.MovementData) -------------------------------- +-- js ctor -- @function [parent=#MovementData] MovementData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index e97163ead5..3fc9d7d51d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -11,42 +11,57 @@ -- @overload self, cc.Node, int, string -- @function [parent=#Node] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #string str +-- @param #cc.Node child +-- @param #int localZOrder +-- @param #string name -------------------------------- -- @overload self, cc.Component -- @overload self, string -- @function [parent=#Node] removeComponent -- @param self --- @param #string str +-- @param #string name -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- set the PhysicsBody that let the sprite effect with physics
+-- note This method will set anchor point to Vec2::ANCHOR_MIDDLE if body not null, and you cann't change anchor point if node has a physics body. -- @function [parent=#Node] setPhysicsBody -- @param self --- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody body -------------------------------- +-- Gets the description string. It makes debugging easier.
+-- return A string
+-- js NA
+-- lua NA -- @function [parent=#Node] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
+-- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
+-- while the second one uses the real skew function.
+-- 0 is the default rotation angle.
+-- Positive values rotate node clockwise, and negative values for anti-clockwise.
+-- param rotationY The Y rotation in degrees.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setRotationSkewY -- @param self --- @param #float float +-- @param #float rotationY -------------------------------- +-- -- @function [parent=#Node] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- -- @function [parent=#Node] setCascadeOpacityEnabled -- @param self --- @param #bool bool +-- @param #bool cascadeOpacityEnabled -------------------------------- -- @overload self @@ -56,159 +71,237 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- -- @function [parent=#Node] setOnExitCallback -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- Pauses all scheduled selectors, actions and event listeners..
+-- This method is called internally by onExit -- @function [parent=#Node] pause -- @param self -------------------------------- +-- Converts a local Vec2 to world space coordinates.The result is in Points.
+-- treating the returned/received node point as anchor relative. -- @function [parent=#Node] convertToWorldSpaceAR -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table nodePoint -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Gets whether the anchor point will be (0,0) when you position this node.
+-- see `ignoreAnchorPointForPosition(bool)`
+-- return true if the anchor point will be (0,0) when you position this node. -- @function [parent=#Node] isIgnoreAnchorPointForPosition -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets a child from the container with its name
+-- param name An identifier to find the child node.
+-- return a Node object whose name equals to the input parameter
+-- since v3.2 -- @function [parent=#Node] getChildByName -- @param self --- @param #string str +-- @param #string name -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#Node] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- get & set camera mask, the node is visible by the camera whose camera flag & node's camera mask is true -- @function [parent=#Node] getCameraMask -- @param self -- @return unsigned short#unsigned short ret (return value: unsigned short) -------------------------------- +-- Sets the rotation (angle) of the node in degrees.
+-- 0 is the default rotation angle.
+-- Positive values rotate node clockwise, and negative values for anti-clockwise.
+-- param rotation The rotation of the node in degrees. -- @function [parent=#Node] setRotation -- @param self --- @param #float float +-- @param #float rotation -------------------------------- +-- Changes the scale factor on Z axis of this node
+-- The Default value is 1.0 if you haven't changed it before.
+-- param scaleY The scale factor on Y axis.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setScaleZ -- @param self --- @param #float float +-- @param #float scaleZ -------------------------------- +-- Sets the scale (y) of the node.
+-- It is a scaling factor that multiplies the height of the node and its children.
+-- param scaleY The scale factor on Y axis.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setScaleY -- @param self --- @param #float float +-- @param #float scaleY -------------------------------- +-- Sets the scale (x) of the node.
+-- It is a scaling factor that multiplies the width of the node and its children.
+-- param scaleX The scale factor on X axis.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setScaleX -- @param self --- @param #float float +-- @param #float scaleX -------------------------------- +-- Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
+-- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
+-- while the second one uses the real skew function.
+-- 0 is the default rotation angle.
+-- Positive values rotate node clockwise, and negative values for anti-clockwise.
+-- param rotationX The X rotation in degrees which performs a horizontal rotational skew.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setRotationSkewX -- @param self --- @param #float float +-- @param #float rotationX -------------------------------- +-- -- @function [parent=#Node] setonEnterTransitionDidFinishCallback -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- removes all components -- @function [parent=#Node] removeAllComponents -- @param self -------------------------------- +-- -- @function [parent=#Node] _setLocalZOrder -- @param self --- @param #int int +-- @param #int z -------------------------------- +-- -- @function [parent=#Node] setCameraMask -- @param self --- @param #unsigned short short --- @param #bool bool +-- @param #unsigned short mask +-- @param #bool applyChildren -------------------------------- +-- Returns a tag that is used to identify the node easily.
+-- return An integer that identifies the node.
+-- Please use `getTag()` instead. -- @function [parent=#Node] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- / @{/ @name GLProgram
+-- Return the GLProgram (shader) currently used for this node
+-- return The GLProgram (shader) currently used for this node -- @function [parent=#Node] getGLProgram -- @param self -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- Returns the world affine transform matrix. The matrix is in Pixels. -- @function [parent=#Node] getNodeToWorldTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- returns the position (X,Y,Z) in its parent's coordinate system -- @function [parent=#Node] getPosition3D -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- +-- Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
+-- param child The child node which will be removed.
+-- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#Node] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- Converts a Vec2 to world space coordinates. The result is in Points. -- @function [parent=#Node] convertToWorldSpace -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table nodePoint -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Returns the Scene that contains the Node.
+-- It returns `nullptr` if the node doesn't belong to any Scene.
+-- This function recursively calls parent->getScene() until parent is a Scene object. The results are not cached. It is that the user caches the results in case this functions is being used inside a loop. -- @function [parent=#Node] getScene -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- -- @function [parent=#Node] getEventDispatcher -- @param self -- @return EventDispatcher#EventDispatcher ret (return value: cc.EventDispatcher) -------------------------------- +-- Changes the X skew angle of the node in degrees.
+-- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
+-- while the second one uses the real skew function.
+-- This angle describes the shear distortion in the X direction.
+-- Thus, it is the angle between the Y coordinate and the left edge of the shape
+-- The default skewX angle is 0. Positive values distort the node in a CW direction.
+-- param skewX The X skew angle of the node in degrees.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setSkewX -- @param self --- @param #float float +-- @param #float skewX -------------------------------- +-- -- @function [parent=#Node] setGLProgramState -- @param self --- @param #cc.GLProgramState glprogramstate +-- @param #cc.GLProgramState glProgramState -------------------------------- +-- -- @function [parent=#Node] setOnEnterCallback -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- -- @function [parent=#Node] getOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- Sets the position (x,y) using values between 0 and 1.
+-- The positions in pixels is calculated like the following:
+-- code pseudo code
+-- void setNormalizedPosition(Vec2 pos) {
+-- Size s = getParent()->getContentSize();
+-- _position = pos * s;
+-- }
+-- endcode -- @function [parent=#Node] setNormalizedPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- -- @function [parent=#Node] setonExitTransitionDidStartCallback -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- convenience methods which take a Touch instead of Vec2 -- @function [parent=#Node] convertTouchToNodeSpace -- @param self -- @param #cc.Touch touch @@ -219,55 +312,70 @@ -- @overload self -- @function [parent=#Node] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#Node] getNodeToParentAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- +-- -- @function [parent=#Node] isCascadeOpacityEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the parent node
+-- param parent A pointer to the parent node -- @function [parent=#Node] setParent -- @param self --- @param #cc.Node node +-- @param #cc.Node parent -------------------------------- +-- Returns a string that is used to identify the node.
+-- return A string that identifies the node.
+-- since v3.2 -- @function [parent=#Node] getName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- returns the rotation (X,Y,Z) in degrees. -- @function [parent=#Node] getRotation3D -- @param self -- @return vec3_table#vec3_table ret (return value: vec3_table) -------------------------------- +-- Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
+-- The matrix is in Pixels. -- @function [parent=#Node] getNodeToParentTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- converts a Touch (world coordinates) into a local coordinate. This method is AR (Anchor Relative). -- @function [parent=#Node] convertTouchToNodeSpaceAR -- @param self -- @param #cc.Touch touch -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Converts a Vec2 to node (local) space coordinates. The result is in Points. -- @function [parent=#Node] convertToNodeSpace -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table worldPoint -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Resumes all scheduled selectors, actions and event listeners.
+-- This method is called internally by onEnter -- @function [parent=#Node] resume -- @param self -------------------------------- +-- get the PhysicsBody the sprite have -- @function [parent=#Node] getPhysicsBody -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) @@ -277,108 +385,178 @@ -- @overload self, vec2_table -- @function [parent=#Node] setPosition -- @param self --- @param #float float --- @param #float float +-- @param #float x +-- @param #float y -------------------------------- +-- Removes an action from the running action list by its tag.
+-- param tag A tag that indicates the action to be removed. -- @function [parent=#Node] stopActionByTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- Reorders a child according to a new z value.
+-- param child An already added child node. It MUST be already added.
+-- param localZOrder Z order for drawing priority. Please refer to setLocalZOrder(int) -- @function [parent=#Node] reorderChild -- @param self --- @param #cc.Node node --- @param #int int +-- @param #cc.Node child +-- @param #int localZOrder -------------------------------- +-- Sets whether the anchor point will be (0,0) when you position this node.
+-- This is an internal method, only used by Layer and Scene. Don't call it outside framework.
+-- The default value is false, while in Layer and Scene are true
+-- param ignore true if anchor point will be (0,0) when you position this node
+-- todo This method should be renamed as setIgnoreAnchorPointForPosition(bool) or something with "set" -- @function [parent=#Node] ignoreAnchorPointForPosition -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- Changes the Y skew angle of the node in degrees.
+-- The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
+-- while the second one uses the real skew function.
+-- This angle describes the shear distortion in the Y direction.
+-- Thus, it is the angle between the X coordinate and the bottom edge of the shape
+-- The default skewY angle is 0. Positive values distort the node in a CCW direction.
+-- param skewY The Y skew angle of the node in degrees.
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setSkewY -- @param self --- @param #float float +-- @param #float skewY -------------------------------- +-- Sets the 'z' coordinate in the position. It is the OpenGL Z vertex value.
+-- The OpenGL depth buffer and depth testing are disabled by default. You need to turn them on
+-- in order to use this property correctly.
+-- `setPositionZ()` also sets the `setGlobalZValue()` with the positionZ as value.
+-- see `setGlobalZValue()`
+-- param vertexZ OpenGL Z vertex of this node. -- @function [parent=#Node] setPositionZ -- @param self --- @param #float float +-- @param #float positionZ -------------------------------- +-- Sets the rotation (X,Y,Z) in degrees.
+-- Useful for 3d rotations
+-- warning The physics body doesn't support this. -- @function [parent=#Node] setRotation3D -- @param self --- @param #vec3_table vec3 +-- @param #vec3_table rotation -------------------------------- +-- Gets/Sets x or y coordinate individually for position.
+-- These methods are used in Lua and Javascript Bindings -- @function [parent=#Node] setPositionX -- @param self --- @param #float float +-- @param #float x -------------------------------- +-- Sets the Transformation matrix manually. -- @function [parent=#Node] setNodeToParentTransform -- @param self --- @param #mat4_table mat4 +-- @param #mat4_table transform -------------------------------- +-- Returns the anchor point in percent.
+-- see `setAnchorPoint(const Vec2&)`
+-- return The anchor point of node. -- @function [parent=#Node] getAnchorPoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
+-- Composable actions are counted as 1 action. Example:
+-- If you are running 1 Sequence of 7 actions, it will return 1.
+-- If you are running 7 Sequences of 2 actions, it will return 7.
+-- todo Rename to getNumberOfRunningActions()
+-- return The number of actions that are running plus the ones that are schedule to run -- @function [parent=#Node] getNumberOfRunningActions -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Calls children's updateTransform() method recursively.
+-- This method is moved from Sprite, so it's no longer specific to Sprite.
+-- As the result, you apply SpriteBatchNode's optimization on your customed Node.
+-- e.g., `batchNode->addChild(myCustomNode)`, while you can only addChild(sprite) before. -- @function [parent=#Node] updateTransform -- @param self -------------------------------- +-- Sets the shader program for this node
+-- Since v2.0, each rendering node must set its shader program.
+-- It should be set in initialize phase.
+-- code
+-- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));
+-- endcode
+-- param shaderProgram The shader program -- @function [parent=#Node] setGLProgram -- @param self -- @param #cc.GLProgram glprogram -------------------------------- +-- Determines if the node is visible
+-- see `setVisible(bool)`
+-- return true if the node is visible, false if the node is hidden. -- @function [parent=#Node] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the amount of children
+-- return The amount of children. -- @function [parent=#Node] getChildrenCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Converts a Vec2 to node (local) space coordinates. The result is in Points.
+-- treating the returned/received node point as anchor relative. -- @function [parent=#Node] convertToNodeSpaceAR -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table worldPoint -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- adds a component -- @function [parent=#Node] addComponent -- @param self -- @param #cc.Component component -- @return bool#bool ret (return value: bool) -------------------------------- +-- Executes an action, and returns the action that is executed.
+-- This node becomes the action's target. Refer to Action::getTarget()
+-- warning Actions don't retain their target.
+-- return An Action pointer -- @function [parent=#Node] runAction -- @param self -- @param #cc.Action action -- @return Action#Action ret (return value: cc.Action) -------------------------------- +-- -- @function [parent=#Node] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the rotation of the node in degrees.
+-- see `setRotation(float)`
+-- return The rotation of the node in degrees. -- @function [parent=#Node] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Returns the anchorPoint in absolute pixels.
+-- warning You can only read it. If you wish to modify it, use anchorPoint instead.
+-- see `getAnchorPoint()`
+-- return The anchor point in absolute pixels. -- @function [parent=#Node] getAnchorPointInPoints -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) @@ -389,68 +567,93 @@ -- @function [parent=#Node] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
+-- param name A string that identifies a child node
+-- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#Node] removeChildByName -- @param self --- @param #string str --- @param #bool bool +-- @param #string name +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#Node] getGLProgramState -- @param self -- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState) -------------------------------- +-- Sets a Scheduler object that is used to schedule all "updates" and timers.
+-- warning If you set a new Scheduler, then previously created timers/update are going to be removed.
+-- param scheduler A Shdeduler object that is used to schedule all "update" and timers. -- @function [parent=#Node] setScheduler -- @param self -- @param #cc.Scheduler scheduler -------------------------------- +-- Stops and removes all actions from the running action list . -- @function [parent=#Node] stopAllActions -- @param self -------------------------------- +-- Returns the X skew angle of the node in degrees.
+-- see `setSkewX(float)`
+-- return The X skew angle of the node in degrees. -- @function [parent=#Node] getSkewX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Returns the Y skew angle of the node in degrees.
+-- see `setSkewY(float)`
+-- return The Y skew angle of the node in degrees. -- @function [parent=#Node] getSkewY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Node] getDisplayedColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Gets an action from the running action list by its tag.
+-- see `setTag(int)`, `getTag()`.
+-- return The action object with the given tag. -- @function [parent=#Node] getActionByTag -- @param self --- @param #int int +-- @param #int tag -- @return Action#Action ret (return value: cc.Action) -------------------------------- +-- Changes the name that is used to identify the node easily.
+-- param name A string that identifies the node.
+-- since v3.2 -- @function [parent=#Node] setName -- @param self --- @param #string str +-- @param #string name -------------------------------- -- @overload self, cc.AffineTransform -- @overload self, mat4_table -- @function [parent=#Node] setAdditionalTransform -- @param self --- @param #mat4_table mat4 +-- @param #mat4_table additionalTransform -------------------------------- +-- -- @function [parent=#Node] getDisplayedOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- +-- Gets the local Z order of this node.
+-- see `setLocalZOrder(int)`
+-- return The local (relative to its siblings) Z order. -- @function [parent=#Node] getLocalZOrder -- @param self -- @return int#int ret (return value: int) @@ -463,26 +666,37 @@ -- @return Scheduler#Scheduler ret (retunr value: cc.Scheduler) -------------------------------- +-- -- @function [parent=#Node] getParentToNodeAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- +-- Returns the arrival order, indicates which children is added previously.
+-- see `setOrderOfArrival(unsigned int)`
+-- return The arrival order. -- @function [parent=#Node] getOrderOfArrival -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Sets the ActionManager object that is used by all actions.
+-- warning If you set a new ActionManager, then previously created actions will be removed.
+-- param actionManager A ActionManager object that is used by all actions. -- @function [parent=#Node] setActionManager -- @param self --- @param #cc.ActionManager actionmanager +-- @param #cc.ActionManager actionManager -------------------------------- +-- -- @function [parent=#Node] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- Returns whether or not the node is "running".
+-- If the node is running it will accept event callbacks like onEnter(), onExit(), update()
+-- return Whether or not the node is running. -- @function [parent=#Node] isRunning -- @param self -- @return bool#bool ret (return value: bool) @@ -495,146 +709,218 @@ -- @return Node#Node ret (retunr value: cc.Node) -------------------------------- +-- Gets position Z coordinate of this node.
+-- see setPositionZ(float)
+-- return the position Z coordinate of this node. -- @function [parent=#Node] getPositionZ -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Node] getPositionY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Node] getPositionX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
+-- param tag An interger number that identifies a child node
+-- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise.
+-- Please use `removeChildByName` instead. -- @function [parent=#Node] removeChildByTag -- @param self --- @param #int int --- @param #bool bool +-- @param #int tag +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#Node] setPositionY -- @param self --- @param #float float +-- @param #float y -------------------------------- +-- -- @function [parent=#Node] getNodeToWorldAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- +-- -- @function [parent=#Node] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor -------------------------------- +-- Sets whether the node is visible
+-- The default value is true, a node is default to visible
+-- param visible true if the node is visible, false if the node is hidden. -- @function [parent=#Node] setVisible -- @param self --- @param #bool bool +-- @param #bool visible -------------------------------- +-- Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
+-- The matrix is in Pixels. -- @function [parent=#Node] getParentToNodeTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- Defines the oder in which the nodes are renderer.
+-- Nodes that have a Global Z Order lower, are renderer first.
+-- In case two or more nodes have the same Global Z Order, the oder is not guaranteed.
+-- The only exception if the Nodes have a Global Z Order == 0. In that case, the Scene Graph order is used.
+-- By default, all nodes have a Global Z Order = 0. That means that by default, the Scene Graph order is used to render the nodes.
+-- Global Z Order is useful when you need to render nodes in an order different than the Scene Graph order.
+-- Limitations: Global Z Order can't be used used by Nodes that have SpriteBatchNode as one of their acenstors.
+-- And if ClippingNode is one of the ancestors, then "global Z order" will be relative to the ClippingNode.
+-- see `setLocalZOrder()`
+-- see `setVertexZ()`
+-- since v3.0 -- @function [parent=#Node] setGlobalZOrder -- @param self --- @param #float float +-- @param #float globalZOrder -------------------------------- -- @overload self, float, float -- @overload self, float -- @function [parent=#Node] setScale -- @param self --- @param #float float --- @param #float float +-- @param #float scaleX +-- @param #float scaleY -------------------------------- +-- Gets a child from the container with its tag
+-- param tag An identifier to find the child node.
+-- return a Node object whose tag equals to the input parameter
+-- Please use `getChildByName()` instead -- @function [parent=#Node] getChildByTag -- @param self --- @param #int int +-- @param #int tag -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Sets the arrival order when this node has a same ZOrder with other children.
+-- A node which called addChild subsequently will take a larger arrival order,
+-- If two children have the same Z order, the child with larger arrival order will be drawn later.
+-- warning This method is used internally for localZOrder sorting, don't change this manually
+-- param orderOfArrival The arrival order. -- @function [parent=#Node] setOrderOfArrival -- @param self --- @param #int int +-- @param #int orderOfArrival -------------------------------- +-- Returns the scale factor on Z axis of this node
+-- see `setScaleZ(float)`
+-- return The scale factor on Z axis. -- @function [parent=#Node] getScaleZ -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Returns the scale factor on Y axis of this node
+-- see `setScaleY(float)`
+-- return The scale factor on Y axis. -- @function [parent=#Node] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Returns the scale factor on X axis of this node
+-- see setScaleX(float)
+-- return The scale factor on X axis. -- @function [parent=#Node] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- LocalZOrder is the 'key' used to sort the node relative to its siblings.
+-- The Node's parent will sort all its children based ont the LocalZOrder value.
+-- If two nodes have the same LocalZOrder, then the node that was added first to the children's array will be in front of the other node in the array.
+-- Also, the Scene Graph is traversed using the "In-Order" tree traversal algorithm ( http:en.wikipedia.org/wiki/Tree_traversal#In-order )
+-- And Nodes that have LocalZOder values < 0 are the "left" subtree
+-- While Nodes with LocalZOder >=0 are the "right" subtree.
+-- see `setGlobalZOrder`
+-- see `setVertexZ` -- @function [parent=#Node] setLocalZOrder -- @param self --- @param #int int +-- @param #int localZOrder -------------------------------- +-- -- @function [parent=#Node] getWorldToNodeAffineTransform -- @param self -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -------------------------------- +-- -- @function [parent=#Node] setCascadeColorEnabled -- @param self --- @param #bool bool +-- @param #bool cascadeColorEnabled -------------------------------- +-- -- @function [parent=#Node] setOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity -------------------------------- +-- Stops all running actions and schedulers -- @function [parent=#Node] cleanup -- @param self -------------------------------- +-- / @{/ @name component functions
+-- gets a component by its name -- @function [parent=#Node] getComponent -- @param self --- @param #string str +-- @param #string name -- @return Component#Component ret (return value: cc.Component) -------------------------------- +-- Returns the untransformed size of the node.
+-- see `setContentSize(const Size&)`
+-- return The untransformed size of the node. -- @function [parent=#Node] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Removes all actions from the running action list by its tag.
+-- param tag A tag that indicates the action to be removed. -- @function [parent=#Node] stopAllActionsByTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- -- @function [parent=#Node] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- Returns an AABB (axis-aligned bounding-box) in its parent's coordinate system.
+-- return An AABB (axis-aligned bounding-box) in its parent's coordinate system -- @function [parent=#Node] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Node] setEventDispatcher -- @param self --- @param #cc.EventDispatcher eventdispatcher +-- @param #cc.EventDispatcher dispatcher -------------------------------- +-- Returns the Node's Global Z Order.
+-- see `setGlobalZOrder(int)`
+-- return The node's global Z order -- @function [parent=#Node] getGlobalZOrder -- @param self -- @return float#float ret (return value: float) @@ -645,71 +931,101 @@ -- @function [parent=#Node] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- Returns a user assigned Object
+-- Similar to UserData, but instead of holding a void* it holds an object.
+-- The UserObject will be retained once in this method,
+-- and the previous UserObject (if existed) will be released.
+-- The UserObject will be released in Node's destructor.
+-- param userObject A user assigned Object -- @function [parent=#Node] setUserObject -- @param self --- @param #cc.Ref ref +-- @param #cc.Ref userObject -------------------------------- -- @overload self, bool -- @overload self -- @function [parent=#Node] removeFromParentAndCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- Sets the position (X, Y, and Z) in its parent's coordinate system -- @function [parent=#Node] setPosition3D -- @param self --- @param #vec3_table vec3 +-- @param #vec3_table position -------------------------------- +-- -- @function [parent=#Node] update -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- Sorts the children array once before drawing, instead of every time when a child is added or reordered.
+-- This appraoch can improves the performance massively.
+-- note Don't call this manually unless a child added needs to be removed in the same frame -- @function [parent=#Node] sortAllChildren -- @param self -------------------------------- +-- Returns the inverse world affine transform matrix. The matrix is in Pixels. -- @function [parent=#Node] getWorldToNodeTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- Gets the scale factor of the node, when X and Y have the same scale factor.
+-- warning Assert when `_scaleX != _scaleY`
+-- see setScale(float)
+-- return The scale factor of the node. -- @function [parent=#Node] getScale -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- returns the normalized position -- @function [parent=#Node] getNormalizedPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew.
+-- see `setRotationSkewX(float)`
+-- return The X rotation in degrees. -- @function [parent=#Node] getRotationSkewX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
+-- see `setRotationSkewY(float)`
+-- return The Y rotation in degrees. -- @function [parent=#Node] getRotationSkewY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Changes the tag that is used to identify the node easily.
+-- Please refer to getTag for the sample code.
+-- param tag A integer that identifies the node.
+-- Please use `setName()` instead. -- @function [parent=#Node] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- -- @function [parent=#Node] isCascadeColorEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Stops and removes an action from the running action list.
+-- param action The action object to be removed. -- @function [parent=#Node] stopAction -- @param self -- @param #cc.Action action @@ -722,6 +1038,8 @@ -- @return ActionManager#ActionManager ret (retunr value: cc.ActionManager) -------------------------------- +-- Allocates and initializes a node.
+-- return A initialized node which is marked as "autorelease". -- @function [parent=#Node] create -- @param self -- @return Node#Node ret (return value: cc.Node) diff --git a/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua b/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua index 2d99049a3c..7ccb4f01c2 100644 --- a/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua +++ b/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#NodeGrid] setTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- -- @overload self @@ -17,20 +18,24 @@ -- @return GridBase#GridBase ret (retunr value: cc.GridBase) -------------------------------- +-- Changes a grid object that is used when applying effects
+-- param grid A Grid object that is used when applying effects -- @function [parent=#NodeGrid] setGrid -- @param self --- @param #cc.GridBase gridbase +-- @param #cc.GridBase grid -------------------------------- +-- -- @function [parent=#NodeGrid] create -- @param self -- @return NodeGrid#NodeGrid ret (return value: cc.NodeGrid) -------------------------------- +-- -- @function [parent=#NodeGrid] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/NodeReader.lua b/cocos/scripting/lua-bindings/auto/api/NodeReader.lua index 51e345250a..989c2ae99b 100644 --- a/cocos/scripting/lua-bindings/auto/api/NodeReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/NodeReader.lua @@ -4,56 +4,67 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#NodeReader] setJsonPath -- @param self --- @param #string str +-- @param #string jsonPath -------------------------------- +-- -- @function [parent=#NodeReader] createNode -- @param self --- @param #string str +-- @param #string filename -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#NodeReader] loadNodeWithFile -- @param self --- @param #string str +-- @param #string fileName -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#NodeReader] purge -- @param self -------------------------------- +-- -- @function [parent=#NodeReader] init -- @param self -------------------------------- +-- -- @function [parent=#NodeReader] loadNodeWithContent -- @param self --- @param #string str +-- @param #string content -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#NodeReader] isRecordJsonPath -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#NodeReader] getJsonPath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#NodeReader] setRecordJsonPath -- @param self --- @param #bool bool +-- @param #bool record -------------------------------- +-- -- @function [parent=#NodeReader] destroyInstance -- @param self -------------------------------- +-- -- @function [parent=#NodeReader] NodeReader -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua b/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua index c4130a75c8..9919cf681e 100644 --- a/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua +++ b/cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua @@ -5,30 +5,34 @@ -- @parent_module cc -------------------------------- +-- creates a OrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX -- @function [parent=#OrbitCamera] create -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float t +-- @param #float radius +-- @param #float deltaRadius +-- @param #float angleZ +-- @param #float deltaAngleZ +-- @param #float angleX +-- @param #float deltaAngleX -- @return OrbitCamera#OrbitCamera ret (return value: cc.OrbitCamera) -------------------------------- +-- -- @function [parent=#OrbitCamera] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#OrbitCamera] clone -- @param self -- @return OrbitCamera#OrbitCamera ret (return value: cc.OrbitCamera) -------------------------------- +-- -- @function [parent=#OrbitCamera] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua b/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua index aa9eff0b3d..2d17a6451a 100644 --- a/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua @@ -5,20 +5,23 @@ -- @parent_module cc -------------------------------- +-- create the action -- @function [parent=#PageTurn3D] create -- @param self --- @param #float float --- @param #size_table size +-- @param #float duration +-- @param #size_table gridSize -- @return PageTurn3D#PageTurn3D ret (return value: cc.PageTurn3D) -------------------------------- +-- -- @function [parent=#PageTurn3D] clone -- @param self -- @return PageTurn3D#PageTurn3D ret (return value: cc.PageTurn3D) -------------------------------- +-- -- @function [parent=#PageTurn3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PageView.lua b/cocos/scripting/lua-bindings/auto/api/PageView.lua index f68253b507..f32fed2e39 100644 --- a/cocos/scripting/lua-bindings/auto/api/PageView.lua +++ b/cocos/scripting/lua-bindings/auto/api/PageView.lua @@ -5,114 +5,150 @@ -- @parent_module ccui -------------------------------- +-- brief Return user defined scroll page threshold -- @function [parent=#PageView] getCustomScrollThreshold -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Gets current page index.
+-- return current page index. -- @function [parent=#PageView] getCurPageIndex -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Add a widget to a page of pageview.
+-- param widget widget to be added to pageview.
+-- param pageIdx index of page.
+-- param forceCreate if force create and there is no page exsit, pageview would create a default page for adding widget. -- @function [parent=#PageView] addWidgetToPage -- @param self -- @param #ccui.Widget widget --- @param #long long --- @param #bool bool +-- @param #long pageIdx +-- @param #bool forceCreate -------------------------------- +-- brief Query whether we are using user defined scroll page threshold or not -- @function [parent=#PageView] isUsingCustomScrollThreshold -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#PageView] getPage -- @param self --- @param #long long +-- @param #long index -- @return Layout#Layout ret (return value: ccui.Layout) -------------------------------- +-- Remove a page of pageview.
+-- param page page which will be removed. -- @function [parent=#PageView] removePage -- @param self --- @param #ccui.Layout layout +-- @param #ccui.Layout page -------------------------------- +-- -- @function [parent=#PageView] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- brief Set using user defined scroll page threshold or not
+-- If you set it to false, then the default scroll threshold is pageView.width / 2 -- @function [parent=#PageView] setUsingCustomScrollThreshold -- @param self --- @param #bool bool +-- @param #bool flag -------------------------------- +-- brief If you don't specify the value, the pageView will scroll when half pageview width reached -- @function [parent=#PageView] setCustomScrollThreshold -- @param self --- @param #float float +-- @param #float threshold -------------------------------- +-- Insert a page to pageview.
+-- param page page to be added to pageview. -- @function [parent=#PageView] insertPage -- @param self --- @param #ccui.Layout layout --- @param #int int +-- @param #ccui.Layout page +-- @param #int idx -------------------------------- +-- scroll pageview to index.
+-- param idx index of page. -- @function [parent=#PageView] scrollToPage -- @param self --- @param #long long +-- @param #long idx -------------------------------- +-- Remove a page at index of pageview.
+-- param index index of page. -- @function [parent=#PageView] removePageAtIndex -- @param self --- @param #long long +-- @param #long index -------------------------------- +-- -- @function [parent=#PageView] getPages -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#PageView] removeAllPages -- @param self -------------------------------- +-- Push back a page to pageview.
+-- param page page to be added to pageview. -- @function [parent=#PageView] addPage -- @param self --- @param #ccui.Layout layout +-- @param #ccui.Layout page -------------------------------- +-- Allocates and initializes. -- @function [parent=#PageView] create -- @param self -- @return PageView#PageView ret (return value: ccui.PageView) -------------------------------- +-- -- @function [parent=#PageView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- Gets LayoutType.
+-- see LayoutType
+-- return LayoutType -- @function [parent=#PageView] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#PageView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#PageView] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- Sets LayoutType.
+-- see LayoutType
+-- param type LayoutType -- @function [parent=#PageView] setLayoutType -- @param self -- @param #int type -------------------------------- +-- Default constructor -- @function [parent=#PageView] PageView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua b/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua index 3a55ee2e5a..08e5385b90 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua @@ -5,19 +5,22 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParallaxNode] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #cc.Node child +-- @param #int z +-- @param #vec2_table parallaxRatio +-- @param #vec2_table positionOffset -------------------------------- +-- -- @function [parent=#ParallaxNode] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#ParallaxNode] create -- @param self -- @return ParallaxNode#ParallaxNode ret (return value: cc.ParallaxNode) @@ -27,21 +30,23 @@ -- @overload self, cc.Node, int, int -- @function [parent=#ParallaxNode] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#ParallaxNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#ParallaxNode] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua b/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua index 1adde946b7..7207e4e41e 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua @@ -5,59 +5,69 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleBatchNode] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- disables a particle by inserting a 0'd quad into the texture atlas -- @function [parent=#ParticleBatchNode] disableParticle -- @param self --- @param #int int +-- @param #int particleIndex -------------------------------- +-- -- @function [parent=#ParticleBatchNode] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- Sets the texture atlas used for drawing the quads -- @function [parent=#ParticleBatchNode] setTextureAtlas -- @param self --- @param #cc.TextureAtlas textureatlas +-- @param #cc.TextureAtlas atlas -------------------------------- +-- -- @function [parent=#ParticleBatchNode] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool doCleanup -------------------------------- +-- Gets the texture atlas used for drawing the quads -- @function [parent=#ParticleBatchNode] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- +-- Inserts a child into the ParticleBatchNode -- @function [parent=#ParticleBatchNode] insertChild -- @param self --- @param #cc.ParticleSystem particlesystem --- @param #int int +-- @param #cc.ParticleSystem system +-- @param #int index -------------------------------- +-- -- @function [parent=#ParticleBatchNode] removeChildAtIndex -- @param self --- @param #int int --- @param #bool bool +-- @param #int index +-- @param #bool doCleanup -------------------------------- +-- initializes the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles -- @function [parent=#ParticleBatchNode] create -- @param self --- @param #string str --- @param #int int +-- @param #string fileImage +-- @param #int capacity -- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode) -------------------------------- +-- initializes the particle system with Texture2D, a capacity of particles, which particle system to use -- @function [parent=#ParticleBatchNode] createWithTexture -- @param self --- @param #cc.Texture2D texture2d --- @param #int int +-- @param #cc.Texture2D tex +-- @param #int capacity -- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode) -------------------------------- @@ -65,34 +75,38 @@ -- @overload self, cc.Node, int, int -- @function [parent=#ParticleBatchNode] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#ParticleBatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#ParticleBatchNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#ParticleBatchNode] reorderChild -- @param self --- @param #cc.Node node --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder -------------------------------- +-- -- @function [parent=#ParticleBatchNode] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua b/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua index d9f24aa9d7..7e2361d90e 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleDisplayData.lua @@ -5,11 +5,13 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ParticleDisplayData] create -- @param self -- @return ParticleDisplayData#ParticleDisplayData ret (return value: ccs.ParticleDisplayData) -------------------------------- +-- js ctor -- @function [parent=#ParticleDisplayData] ParticleDisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua b/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua index 693f1ebd46..5fded9bb0f 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleExplosion.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleExplosion] create -- @param self -- @return ParticleExplosion#ParticleExplosion ret (return value: cc.ParticleExplosion) -------------------------------- +-- -- @function [parent=#ParticleExplosion] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleExplosion#ParticleExplosion ret (return value: cc.ParticleExplosion) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua b/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua index 1c9d89cda7..d26181214a 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleFire.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleFire] create -- @param self -- @return ParticleFire#ParticleFire ret (return value: cc.ParticleFire) -------------------------------- +-- -- @function [parent=#ParticleFire] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleFire#ParticleFire ret (return value: cc.ParticleFire) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua b/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua index 3a6549d5ab..cf8cc88409 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleFireworks.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleFireworks] create -- @param self -- @return ParticleFireworks#ParticleFireworks ret (return value: cc.ParticleFireworks) -------------------------------- +-- -- @function [parent=#ParticleFireworks] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleFireworks#ParticleFireworks ret (return value: cc.ParticleFireworks) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua b/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua index 55c7f9cd33..1d69ebf5ec 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleFlower.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleFlower] create -- @param self -- @return ParticleFlower#ParticleFlower ret (return value: cc.ParticleFlower) -------------------------------- +-- -- @function [parent=#ParticleFlower] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleFlower#ParticleFlower ret (return value: cc.ParticleFlower) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua b/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua index c99c2ead77..5ec68f2b85 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleGalaxy.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleGalaxy] create -- @param self -- @return ParticleGalaxy#ParticleGalaxy ret (return value: cc.ParticleGalaxy) -------------------------------- +-- -- @function [parent=#ParticleGalaxy] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleGalaxy#ParticleGalaxy ret (return value: cc.ParticleGalaxy) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua b/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua index 556a9f56ca..ed1c10d29f 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleMeteor.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleMeteor] create -- @param self -- @return ParticleMeteor#ParticleMeteor ret (return value: cc.ParticleMeteor) -------------------------------- +-- -- @function [parent=#ParticleMeteor] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleMeteor#ParticleMeteor ret (return value: cc.ParticleMeteor) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua b/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua index 36921412b2..602a43e5fc 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleRain.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleRain] create -- @param self -- @return ParticleRain#ParticleRain ret (return value: cc.ParticleRain) -------------------------------- +-- -- @function [parent=#ParticleRain] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleRain#ParticleRain ret (return value: cc.ParticleRain) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua index 61c5124bf6..8ba9f90ca0 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSmoke.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleSmoke] create -- @param self -- @return ParticleSmoke#ParticleSmoke ret (return value: cc.ParticleSmoke) -------------------------------- +-- -- @function [parent=#ParticleSmoke] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSmoke#ParticleSmoke ret (return value: cc.ParticleSmoke) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua index 9f72153785..4b872058bb 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSnow.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleSnow] create -- @param self -- @return ParticleSnow#ParticleSnow ret (return value: cc.ParticleSnow) -------------------------------- +-- -- @function [parent=#ParticleSnow] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSnow#ParticleSnow ret (return value: cc.ParticleSnow) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua index 0179b56720..6f653e601d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSpiral.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleSpiral] create -- @param self -- @return ParticleSpiral#ParticleSpiral ret (return value: cc.ParticleSpiral) -------------------------------- +-- -- @function [parent=#ParticleSpiral] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSpiral#ParticleSpiral ret (return value: cc.ParticleSpiral) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua index 93f07dafde..d702a58839 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSun.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ParticleSun] create -- @param self -- @return ParticleSun#ParticleSun ret (return value: cc.ParticleSun) -------------------------------- +-- -- @function [parent=#ParticleSun] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSun#ParticleSun ret (return value: cc.ParticleSun) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua index 3a36b92a5c..5151144bb3 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua @@ -5,506 +5,613 @@ -- @parent_module cc -------------------------------- +-- size variance in pixels of each particle -- @function [parent=#ParticleSystem] getStartSizeVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- whether or not the system is full -- @function [parent=#ParticleSystem] isFull -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] getBatchNode -- @param self -- @return ParticleBatchNode#ParticleBatchNode ret (return value: cc.ParticleBatchNode) -------------------------------- +-- start color of each particle -- @function [parent=#ParticleSystem] getStartColor -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- +-- particles movement type: Free or Grouped
+-- since v0.8 -- @function [parent=#ParticleSystem] getPositionType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ParticleSystem] setPosVar -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#ParticleSystem] getEndSpin -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setRotatePerSecondVar -- @param self --- @param #float float +-- @param #float degrees -------------------------------- +-- -- @function [parent=#ParticleSystem] getStartSpinVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] getRadialAccelVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- end size variance in pixels of each particle -- @function [parent=#ParticleSystem] getEndSizeVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setRotation -- @param self --- @param #float float +-- @param #float newRotation -------------------------------- +-- -- @function [parent=#ParticleSystem] setTangentialAccel -- @param self --- @param #float float +-- @param #float t -------------------------------- +-- -- @function [parent=#ParticleSystem] setScaleY -- @param self --- @param #float float +-- @param #float newScaleY -------------------------------- +-- -- @function [parent=#ParticleSystem] setScaleX -- @param self --- @param #float float +-- @param #float newScaleX -------------------------------- +-- -- @function [parent=#ParticleSystem] getRadialAccel -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartRadius -- @param self --- @param #float float +-- @param #float startRadius -------------------------------- +-- -- @function [parent=#ParticleSystem] setRotatePerSecond -- @param self --- @param #float float +-- @param #float degrees -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndSize -- @param self --- @param #float float +-- @param #float endSize -------------------------------- +-- -- @function [parent=#ParticleSystem] getGravity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ParticleSystem] getTangentialAccel -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndRadius -- @param self --- @param #float float +-- @param #float endRadius -------------------------------- +-- -- @function [parent=#ParticleSystem] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- angle and angle variation of each particle -- @function [parent=#ParticleSystem] getAngle -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndColor -- @param self --- @param #color4f_table color4f +-- @param #color4f_table color -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartSpin -- @param self --- @param #float float +-- @param #float spin -------------------------------- +-- -- @function [parent=#ParticleSystem] setDuration -- @param self --- @param #float float +-- @param #float duration -------------------------------- +-- -- @function [parent=#ParticleSystem] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- Position variance of the emitter -- @function [parent=#ParticleSystem] getPosVar -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ParticleSystem] updateWithNoTime -- @param self -------------------------------- +-- -- @function [parent=#ParticleSystem] isBlendAdditive -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] getSpeedVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setPositionType -- @param self --- @param #int positiontype +-- @param #int type -------------------------------- +-- stop emitting particles. Running particles will continue to run until they die -- @function [parent=#ParticleSystem] stopSystem -- @param self -------------------------------- +-- sourcePosition of the emitter -- @function [parent=#ParticleSystem] getSourcePosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ParticleSystem] setLifeVar -- @param self --- @param #float float +-- @param #float lifeVar -------------------------------- +-- -- @function [parent=#ParticleSystem] setTotalParticles -- @param self --- @param #int int +-- @param #int totalParticles -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndColorVar -- @param self --- @param #color4f_table color4f +-- @param #color4f_table color -------------------------------- +-- -- @function [parent=#ParticleSystem] getAtlasIndex -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- start size in pixels of each particle -- @function [parent=#ParticleSystem] getStartSize -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartSpinVar -- @param self --- @param #float float +-- @param #float pinVar -------------------------------- +-- Kill all living particles. -- @function [parent=#ParticleSystem] resetSystem -- @param self -------------------------------- +-- -- @function [parent=#ParticleSystem] setAtlasIndex -- @param self --- @param #int int +-- @param #int index -------------------------------- +-- -- @function [parent=#ParticleSystem] setTangentialAccelVar -- @param self --- @param #float float +-- @param #float t -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndRadiusVar -- @param self --- @param #float float +-- @param #float endRadiusVar -------------------------------- +-- -- @function [parent=#ParticleSystem] getEndRadius -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] isActive -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] setRadialAccelVar -- @param self --- @param #float float +-- @param #float t -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartSize -- @param self --- @param #float float +-- @param #float startSize -------------------------------- +-- -- @function [parent=#ParticleSystem] setSpeed -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- -- @function [parent=#ParticleSystem] getStartSpin -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] getRotatePerSecond -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setEmitterMode -- @param self -- @param #int mode -------------------------------- +-- How many seconds the emitter will run. -1 means 'forever' -- @function [parent=#ParticleSystem] getDuration -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setSourcePosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#ParticleSystem] getEndSpinVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setBlendAdditive -- @param self --- @param #bool bool +-- @param #bool value -------------------------------- +-- -- @function [parent=#ParticleSystem] setLife -- @param self --- @param #float float +-- @param #float life -------------------------------- +-- -- @function [parent=#ParticleSystem] setAngleVar -- @param self --- @param #float float +-- @param #float angleVar -------------------------------- +-- -- @function [parent=#ParticleSystem] setRotationIsDir -- @param self --- @param #bool bool +-- @param #bool t -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndSizeVar -- @param self --- @param #float float +-- @param #float sizeVar -------------------------------- +-- -- @function [parent=#ParticleSystem] setAngle -- @param self --- @param #float float +-- @param #float angle -------------------------------- +-- -- @function [parent=#ParticleSystem] setBatchNode -- @param self --- @param #cc.ParticleBatchNode particlebatchnode +-- @param #cc.ParticleBatchNode batchNode -------------------------------- +-- -- @function [parent=#ParticleSystem] getTangentialAccelVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Switch between different kind of emitter modes:
+-- - kParticleModeGravity: uses gravity, speed, radial and tangential acceleration
+-- - kParticleModeRadius: uses radius movement + rotation -- @function [parent=#ParticleSystem] getEmitterMode -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndSpinVar -- @param self --- @param #float float +-- @param #float endSpinVar -------------------------------- +-- angle variance of each particle -- @function [parent=#ParticleSystem] getAngleVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartColor -- @param self --- @param #color4f_table color4f +-- @param #color4f_table color -------------------------------- +-- -- @function [parent=#ParticleSystem] getRotatePerSecondVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- end size in pixels of each particle -- @function [parent=#ParticleSystem] getEndSize -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- life, and life variation of each particle -- @function [parent=#ParticleSystem] getLife -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setSpeedVar -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- -- @function [parent=#ParticleSystem] setAutoRemoveOnFinish -- @param self --- @param #bool bool +-- @param #bool var -------------------------------- +-- -- @function [parent=#ParticleSystem] setGravity -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table g -------------------------------- +-- should be overridden by subclasses -- @function [parent=#ParticleSystem] postStep -- @param self -------------------------------- +-- -- @function [parent=#ParticleSystem] setEmissionRate -- @param self --- @param #float float +-- @param #float rate -------------------------------- +-- end color variance of each particle -- @function [parent=#ParticleSystem] getEndColorVar -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- +-- -- @function [parent=#ParticleSystem] getRotationIsDir -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] setScale -- @param self --- @param #float float +-- @param #float s -------------------------------- +-- emission rate of the particles -- @function [parent=#ParticleSystem] getEmissionRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- end color and end color variation of each particle -- @function [parent=#ParticleSystem] getEndColor -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- +-- life variance of each particle -- @function [parent=#ParticleSystem] getLifeVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartSizeVar -- @param self --- @param #float float +-- @param #float sizeVar -------------------------------- +-- does the alpha value modify color -- @function [parent=#ParticleSystem] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool opacityModifyRGB -------------------------------- +-- Add a particle to the emitter -- @function [parent=#ParticleSystem] addParticle -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#ParticleSystem] getStartRadius -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Quantity of particles that are being simulated at the moment -- @function [parent=#ParticleSystem] getParticleCount -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#ParticleSystem] getStartRadiusVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartColorVar -- @param self --- @param #color4f_table color4f +-- @param #color4f_table color -------------------------------- +-- -- @function [parent=#ParticleSystem] setEndSpin -- @param self --- @param #float float +-- @param #float endSpin -------------------------------- +-- -- @function [parent=#ParticleSystem] setRadialAccel -- @param self --- @param #float float +-- @param #float t -------------------------------- +-- -- @function [parent=#ParticleSystem] isAutoRemoveOnFinish -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- maximum particles of the system -- @function [parent=#ParticleSystem] getTotalParticles -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ParticleSystem] setStartRadiusVar -- @param self --- @param #float float +-- @param #float startRadiusVar -------------------------------- +-- -- @function [parent=#ParticleSystem] getEndRadiusVar -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- start color variance of each particle -- @function [parent=#ParticleSystem] getStartColorVar -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- +-- creates an initializes a ParticleSystem from a plist file.
+-- This plist files can be created manually or with Particle Designer:
+-- http:particledesigner.71squared.com/
+-- since v2.0 -- @function [parent=#ParticleSystem] create -- @param self --- @param #string str +-- @param #string plistFile -- @return ParticleSystem#ParticleSystem ret (return value: cc.ParticleSystem) -------------------------------- +-- create a system with a fixed number of particles -- @function [parent=#ParticleSystem] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSystem#ParticleSystem ret (return value: cc.ParticleSystem) -------------------------------- +-- -- @function [parent=#ParticleSystem] update -- @param self --- @param #float float +-- @param #float dt return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua index 92e7402676..b4efdc78a4 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua @@ -5,20 +5,30 @@ -- @parent_module cc -------------------------------- +-- Sets a new SpriteFrame as particle.
+-- WARNING: this method is experimental. Use setTextureWithRect instead.
+-- since v0.99.4 -- @function [parent=#ParticleSystemQuad] setDisplayFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame spriteFrame -------------------------------- +-- Sets a new texture with a rect. The rect is in Points.
+-- since v0.99.4
+-- js NA
+-- lua NA -- @function [parent=#ParticleSystemQuad] setTextureWithRect -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -- @param #rect_table rect -------------------------------- +-- listen the event that renderer was recreated on Android/WP8
+-- js NA
+-- lua NA -- @function [parent=#ParticleSystemQuad] listenRendererRecreated -- @param self --- @param #cc.EventCustom eventcustom +-- @param #cc.EventCustom event -------------------------------- -- @overload self, string @@ -26,16 +36,18 @@ -- @overload self, map_table -- @function [parent=#ParticleSystemQuad] create -- @param self --- @param #map_table map +-- @param #map_table dictionary -- @return ParticleSystemQuad#ParticleSystemQuad ret (retunr value: cc.ParticleSystemQuad) -------------------------------- +-- creates a Particle Emitter with a number of particles -- @function [parent=#ParticleSystemQuad] createWithTotalParticles -- @param self --- @param #int int +-- @param #int numberOfParticles -- @return ParticleSystemQuad#ParticleSystemQuad ret (return value: cc.ParticleSystemQuad) -------------------------------- +-- -- @function [parent=#ParticleSystemQuad] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua index 6e90f80f52..62e4933a0b 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua @@ -5,45 +5,56 @@ -- @parent_module cc -------------------------------- +-- whether this physics body is affected by the physics world’s gravitational force. -- @function [parent=#PhysicsBody] isGravityEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- reset all the force applied to body. -- @function [parent=#PhysicsBody] resetForces -- @param self -------------------------------- +-- get the max of velocity -- @function [parent=#PhysicsBody] getVelocityLimit -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set the group of body
+-- Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index)
+-- it have high priority than bit masks -- @function [parent=#PhysicsBody] setGroup -- @param self --- @param #int int +-- @param #int group -------------------------------- +-- get the body mass. -- @function [parent=#PhysicsBody] getMass -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Return bitmask of first shape, if there is no shape in body, return default value.(0xFFFFFFFF) -- @function [parent=#PhysicsBody] getCollisionBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- set the body rotation offset -- @function [parent=#PhysicsBody] getRotationOffset -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get the body rotation. -- @function [parent=#PhysicsBody] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get the body moment of inertia. -- @function [parent=#PhysicsBody] getMoment -- @param self -- @return float#float ret (return value: float) @@ -53,166 +64,204 @@ -- @overload self, vec2_table -- @function [parent=#PhysicsBody] applyImpulse -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #vec2_table impulse +-- @param #vec2_table offset -------------------------------- +-- set body rotation offset, it's the rotation witch relative to node -- @function [parent=#PhysicsBody] setRotationOffset -- @param self --- @param #float float +-- @param #float rotation -------------------------------- -- @overload self, vec2_table, vec2_table -- @overload self, vec2_table -- @function [parent=#PhysicsBody] applyForce -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #vec2_table force +-- @param #vec2_table offset -------------------------------- +-- -- @function [parent=#PhysicsBody] addShape -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #bool bool +-- @param #cc.PhysicsShape shape +-- @param #bool addMassAndMoment -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- +-- Applies a torque force to body. -- @function [parent=#PhysicsBody] applyTorque -- @param self --- @param #float float +-- @param #float torque -------------------------------- +-- get the max of angular velocity -- @function [parent=#PhysicsBody] getAngularVelocityLimit -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set the max of angular velocity -- @function [parent=#PhysicsBody] setAngularVelocityLimit -- @param self --- @param #float float +-- @param #float limit -------------------------------- +-- get the velocity of a body -- @function [parent=#PhysicsBody] getVelocity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- get linear damping. -- @function [parent=#PhysicsBody] getLinearDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsBody] removeAllShapes -- @param self -------------------------------- +-- set angular damping.
+-- it is used to simulate fluid or air friction forces on the body.
+-- the value is 0.0f to 1.0f. -- @function [parent=#PhysicsBody] setAngularDamping -- @param self --- @param #float float +-- @param #float damping -------------------------------- +-- set the max of velocity -- @function [parent=#PhysicsBody] setVelocityLimit -- @param self --- @param #float float +-- @param #float limit -------------------------------- +-- set body to rest -- @function [parent=#PhysicsBody] setResting -- @param self --- @param #bool bool +-- @param #bool rest -------------------------------- +-- get body position offset. -- @function [parent=#PhysicsBody] getPositionOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- A mask that defines which categories this physics body belongs to.
+-- Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions.
+-- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsBody] setCategoryBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- get the world body added to. -- @function [parent=#PhysicsBody] getWorld -- @param self -- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld) -------------------------------- +-- get the angular velocity of a body -- @function [parent=#PhysicsBody] getAngularVelocity -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get the body position. -- @function [parent=#PhysicsBody] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- set the enable value.
+-- if the body it isn't enabled, it will not has simulation by world -- @function [parent=#PhysicsBody] setEnable -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- set the body is affected by the physics world's gravitational force or not. -- @function [parent=#PhysicsBody] setGravityEnable -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- Return group of first shape, if there is no shape in body, return default value.(0) -- @function [parent=#PhysicsBody] getGroup -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- brief set the body moment of inertia.
+-- note if you need add/subtract moment to body, don't use setMoment(getMoment() +/- moment), because the moment of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMoment() instead. -- @function [parent=#PhysicsBody] setMoment -- @param self --- @param #float float +-- @param #float moment -------------------------------- +-- get the body's tag -- @function [parent=#PhysicsBody] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- convert the local point to world -- @function [parent=#PhysicsBody] local2World -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Return bitmask of first shape, if there is no shape in body, return default value.(0xFFFFFFFF) -- @function [parent=#PhysicsBody] getCategoryBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- brief set dynamic to body.
+-- a dynamic body will effect with gravity. -- @function [parent=#PhysicsBody] setDynamic -- @param self --- @param #bool bool +-- @param #bool dynamic -------------------------------- +-- -- @function [parent=#PhysicsBody] getFirstShape -- @param self -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- +-- -- @function [parent=#PhysicsBody] getShapes -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- Return bitmask of first shape, if there is no shape in body, return default value.(0x00000000) -- @function [parent=#PhysicsBody] getContactTestBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- set the angular velocity of a body -- @function [parent=#PhysicsBody] setAngularVelocity -- @param self --- @param #float float +-- @param #float velocity -------------------------------- +-- convert the world point to local -- @function [parent=#PhysicsBody] world2Local -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- whether the body is enabled
+-- if the body it isn't enabled, it will not has simulation by world -- @function [parent=#PhysicsBody] isEnabled -- @param self -- @return bool#bool ret (return value: bool) @@ -222,121 +271,160 @@ -- @overload self, cc.PhysicsShape, bool -- @function [parent=#PhysicsBody] removeShape -- @param self --- @param #cc.PhysicsShape physicsshape --- @param #bool bool +-- @param #cc.PhysicsShape shape +-- @param #bool reduceMassAndMoment -------------------------------- +-- brief set the body mass.
+-- note if you need add/subtract mass to body, don't use setMass(getMass() +/- mass), because the mass of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMass() instead. -- @function [parent=#PhysicsBody] setMass -- @param self --- @param #float float +-- @param #float mass -------------------------------- +-- brief add moment of inertia to body.
+-- if _moment(moment of the body) == PHYSICS_INFINITY, it remains.
+-- if moment == PHYSICS_INFINITY, _moment will be PHYSICS_INFINITY.
+-- if moment == -PHYSICS_INFINITY, _moment will not change.
+-- if moment + _moment <= 0, _moment will equal to MASS_DEFAULT(1.0)
+-- other wise, moment = moment + _moment; -- @function [parent=#PhysicsBody] addMoment -- @param self --- @param #float float +-- @param #float moment -------------------------------- +-- set the velocity of a body -- @function [parent=#PhysicsBody] setVelocity -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table velocity -------------------------------- +-- set linear damping.
+-- it is used to simulate fluid or air friction forces on the body.
+-- the value is 0.0f to 1.0f. -- @function [parent=#PhysicsBody] setLinearDamping -- @param self --- @param #float float +-- @param #float damping -------------------------------- +-- A mask that defines which categories of physics bodies can collide with this physics body.
+-- When two physics bodies contact each other, a collision may occur. This body’s collision mask is compared to the other body’s category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body’s velocity.
+-- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsBody] setCollisionBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- set body position offset, it's the position witch relative to node -- @function [parent=#PhysicsBody] setPositionOffset -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- set the body is allow rotation or not -- @function [parent=#PhysicsBody] setRotationEnable -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- whether the body can rotation -- @function [parent=#PhysicsBody] isRotationEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- get angular damping. -- @function [parent=#PhysicsBody] getAngularDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get the angular velocity of a body at a local point -- @function [parent=#PhysicsBody] getVelocityAtLocalPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- whether the body is at rest -- @function [parent=#PhysicsBody] isResting -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief add mass to body.
+-- if _mass(mass of the body) == PHYSICS_INFINITY, it remains.
+-- if mass == PHYSICS_INFINITY, _mass will be PHYSICS_INFINITY.
+-- if mass == -PHYSICS_INFINITY, _mass will not change.
+-- if mass + _mass <= 0, _mass will equal to MASS_DEFAULT(1.0)
+-- other wise, mass = mass + _mass; -- @function [parent=#PhysicsBody] addMass -- @param self --- @param #float float +-- @param #float mass -------------------------------- +-- -- @function [parent=#PhysicsBody] getShape -- @param self --- @param #int int +-- @param #int tag -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- +-- set the body's tag -- @function [parent=#PhysicsBody] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- get the angular velocity of a body at a world point -- @function [parent=#PhysicsBody] getVelocityAtWorldPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- A mask that defines which categories of bodies cause intersection notifications with this physics body.
+-- When two bodies share the same space, each body’s category mask is tested against the other body’s contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
+-- The default value is 0x00000000 (all bits cleared). -- @function [parent=#PhysicsBody] setContactTestBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- remove the body from the world it added to -- @function [parent=#PhysicsBody] removeFromWorld -- @param self -------------------------------- +-- brief test the body is dynamic or not.
+-- a dynamic body will effect with gravity. -- @function [parent=#PhysicsBody] isDynamic -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- get the sprite the body set to. -- @function [parent=#PhysicsBody] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Create a body contains a box shape. -- @function [parent=#PhysicsBody] createBox -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial physicsmaterial --- @param #vec2_table vec2 +-- @param #cc.PhysicsMaterial material +-- @param #vec2_table offset -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- +-- Create a body contains a EdgeSegment shape. -- @function [parent=#PhysicsBody] createEdgeSegment -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #cc.PhysicsMaterial physicsmaterial --- @param #float float +-- @param #vec2_table a +-- @param #vec2_table b +-- @param #cc.PhysicsMaterial material +-- @param #float border -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- @@ -345,25 +433,27 @@ -- @overload self, float, float -- @function [parent=#PhysicsBody] create -- @param self --- @param #float float --- @param #float float +-- @param #float mass +-- @param #float moment -- @return PhysicsBody#PhysicsBody ret (retunr value: cc.PhysicsBody) -------------------------------- +-- Create a body contains a EdgeBox shape. -- @function [parent=#PhysicsBody] createEdgeBox -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial physicsmaterial --- @param #float float --- @param #vec2_table vec2 +-- @param #cc.PhysicsMaterial material +-- @param #float border +-- @param #vec2_table offset -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- +-- Create a body contains a circle shape. -- @function [parent=#PhysicsBody] createCircle -- @param self --- @param #float float --- @param #cc.PhysicsMaterial physicsmaterial --- @param #vec2_table vec2 +-- @param #float radius +-- @param #cc.PhysicsMaterial material +-- @param #vec2_table offset -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua index 30d6f985d3..c7fce04e0a 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua @@ -5,26 +5,31 @@ -- @parent_module cc -------------------------------- +-- get contact data -- @function [parent=#PhysicsContact] getContactData -- @param self -- @return PhysicsContactData#PhysicsContactData ret (return value: cc.PhysicsContactData) -------------------------------- +-- get the event code -- @function [parent=#PhysicsContact] getEventCode -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- get previous contact data -- @function [parent=#PhysicsContact] getPreContactData -- @param self -- @return PhysicsContactData#PhysicsContactData ret (return value: cc.PhysicsContactData) -------------------------------- +-- get contact shape A. -- @function [parent=#PhysicsContact] getShapeA -- @param self -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- +-- get contact shape B. -- @function [parent=#PhysicsContact] getShapeB -- @param self -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua index 30efdef896..15b4e7932a 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua @@ -4,16 +4,19 @@ -- @parent_module cc -------------------------------- +-- get friction between two bodies -- @function [parent=#PhysicsContactPostSolve] getFriction -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get surface velocity between two bodies -- @function [parent=#PhysicsContactPostSolve] getSurfaceVelocity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- get restitution between two bodies -- @function [parent=#PhysicsContactPostSolve] getRestitution -- @param self -- @return float#float ret (return value: float) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua index fdf2df8e50..911ca67ece 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua @@ -4,37 +4,44 @@ -- @parent_module cc -------------------------------- +-- get friction between two bodies -- @function [parent=#PhysicsContactPreSolve] getFriction -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get restitution between two bodies -- @function [parent=#PhysicsContactPreSolve] getRestitution -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set the friction -- @function [parent=#PhysicsContactPreSolve] setFriction -- @param self --- @param #float float +-- @param #float friction -------------------------------- +-- ignore the rest of the contact presolve and postsolve callbacks -- @function [parent=#PhysicsContactPreSolve] ignore -- @param self -------------------------------- +-- get surface velocity between two bodies -- @function [parent=#PhysicsContactPreSolve] getSurfaceVelocity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- set the surface velocity -- @function [parent=#PhysicsContactPreSolve] setSurfaceVelocity -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table velocity -------------------------------- +-- set the restitution -- @function [parent=#PhysicsContactPreSolve] setRestitution -- @param self --- @param #float float +-- @param #float restitution return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua index 93cffc0a79..bd755d2459 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJoint.lua @@ -4,67 +4,80 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJoint] getBodyA -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- +-- -- @function [parent=#PhysicsJoint] getBodyB -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- +-- Get the max force setting -- @function [parent=#PhysicsJoint] getMaxForce -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Set the max force between two bodies -- @function [parent=#PhysicsJoint] setMaxForce -- @param self --- @param #float float +-- @param #float force -------------------------------- +-- -- @function [parent=#PhysicsJoint] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Enable/Disable the joint -- @function [parent=#PhysicsJoint] setEnable -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- Enable/disable the collision between two bodies -- @function [parent=#PhysicsJoint] setCollisionEnable -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#PhysicsJoint] getWorld -- @param self -- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld) -------------------------------- +-- -- @function [parent=#PhysicsJoint] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- Remove the joint from the world -- @function [parent=#PhysicsJoint] removeFormWorld -- @param self -------------------------------- +-- -- @function [parent=#PhysicsJoint] isCollisionEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#PhysicsJoint] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Distory the joint -- @function [parent=#PhysicsJoint] destroy -- @param self --- @param #cc.PhysicsJoint physicsjoint +-- @param #cc.PhysicsJoint joint return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua index 854ab0a0da..2bfabc2470 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointDistance] setDistance -- @param self --- @param #float float +-- @param #float distance -------------------------------- +-- -- @function [parent=#PhysicsJointDistance] getDistance -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointDistance] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table anchr1 +-- @param #vec2_table anchr2 -- @return PhysicsJointDistance#PhysicsJointDistance ret (return value: cc.PhysicsJointDistance) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua index b3daf9fcb2..a4f86b1dc5 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua @@ -5,11 +5,12 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointFixed] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table anchr -- @return PhysicsJointFixed#PhysicsJointFixed ret (return value: cc.PhysicsJointFixed) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua index 08c0c858cf..80c94bce3b 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGear.lua @@ -5,32 +5,37 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointGear] setRatio -- @param self --- @param #float float +-- @param #float ratchet -------------------------------- +-- -- @function [parent=#PhysicsJointGear] getPhase -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointGear] setPhase -- @param self --- @param #float float +-- @param #float phase -------------------------------- +-- -- @function [parent=#PhysicsJointGear] getRatio -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointGear] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #float phase +-- @param #float ratio -- @return PhysicsJointGear#PhysicsJointGear ret (return value: cc.PhysicsJointGear) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua index 9f71e7cfc6..1e0c0f8b9e 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua @@ -5,43 +5,50 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] setAnchr2 -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchr2 -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] setGrooveA -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table grooveA -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] setGrooveB -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table grooveB -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] getGrooveA -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] getGrooveB -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] getAnchr2 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointGroove] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #vec2_table vec2 +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table grooveA +-- @param #vec2_table grooveB +-- @param #vec2_table anchr2 -- @return PhysicsJointGroove#PhysicsJointGroove ret (return value: cc.PhysicsJointGroove) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua index 796d4143c2..6b4a92acd8 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua @@ -5,56 +5,64 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] setAnchr2 -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchr2 -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] setAnchr1 -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchr1 -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] setMax -- @param self --- @param #float float +-- @param #float max -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] getAnchr2 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] getAnchr1 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] getMin -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] getMax -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointLimit] setMin -- @param self --- @param #float float +-- @param #float min -------------------------------- -- @overload self, cc.PhysicsBody, cc.PhysicsBody, vec2_table, vec2_table, float, float -- @overload self, cc.PhysicsBody, cc.PhysicsBody, vec2_table, vec2_table -- @function [parent=#PhysicsJointLimit] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table anchr1 +-- @param #vec2_table anchr2 +-- @param #float min +-- @param #float max -- @return PhysicsJointLimit#PhysicsJointLimit ret (retunr value: cc.PhysicsJointLimit) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua index 733df66a22..27f44d36aa 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointMotor.lua @@ -5,21 +5,24 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointMotor] setRate -- @param self --- @param #float float +-- @param #float rate -------------------------------- +-- -- @function [parent=#PhysicsJointMotor] getRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointMotor] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #float rate -- @return PhysicsJointMotor#PhysicsJointMotor ret (return value: cc.PhysicsJointMotor) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua index 0934a2f851..c45189c216 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua @@ -5,11 +5,12 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointPin] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table anchr -- @return PhysicsJointPin#PhysicsJointPin ret (return value: cc.PhysicsJointPin) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua index 7002033ba4..f61f444ffd 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRatchet.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] getAngle -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] setAngle -- @param self --- @param #float float +-- @param #float angle -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] setPhase -- @param self --- @param #float float +-- @param #float phase -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] getPhase -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] setRatchet -- @param self --- @param #float float +-- @param #float ratchet -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] getRatchet -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRatchet] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #float phase +-- @param #float ratchet -- @return PhysicsJointRatchet#PhysicsJointRatchet ret (return value: cc.PhysicsJointRatchet) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua index db5d66222e..8feaf87785 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointRotaryLimit] getMax -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRotaryLimit] setMin -- @param self --- @param #float float +-- @param #float min -------------------------------- +-- -- @function [parent=#PhysicsJointRotaryLimit] setMax -- @param self --- @param #float float +-- @param #float max -------------------------------- +-- -- @function [parent=#PhysicsJointRotaryLimit] getMin -- @param self -- @return float#float ret (return value: float) @@ -29,10 +33,10 @@ -- @overload self, cc.PhysicsBody, cc.PhysicsBody, float, float -- @function [parent=#PhysicsJointRotaryLimit] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #float min +-- @param #float max -- @return PhysicsJointRotaryLimit#PhysicsJointRotaryLimit ret (retunr value: cc.PhysicsJointRotaryLimit) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua index 56e2bc4242..e8df535554 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotarySpring.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] getDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] setRestAngle -- @param self --- @param #float float +-- @param #float restAngle -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] getStiffness -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] setStiffness -- @param self --- @param #float float +-- @param #float stiffness -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] setDamping -- @param self --- @param #float float +-- @param #float damping -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] getRestAngle -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointRotarySpring] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #float stiffness +-- @param #float damping -- @return PhysicsJointRotarySpring#PhysicsJointRotarySpring ret (return value: cc.PhysicsJointRotarySpring) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua index b3c3b916b6..0b177ac1f4 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua @@ -5,64 +5,75 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] setAnchr2 -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchr2 -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] setAnchr1 -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchr1 -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] getDamping -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] setStiffness -- @param self --- @param #float float +-- @param #float stiffness -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] getRestLength -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] getAnchr2 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] getAnchr1 -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] getStiffness -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] setRestLength -- @param self --- @param #float float +-- @param #float restLength -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] setDamping -- @param self --- @param #float float +-- @param #float damping -------------------------------- +-- -- @function [parent=#PhysicsJointSpring] construct -- @param self --- @param #cc.PhysicsBody physicsbody --- @param #cc.PhysicsBody physicsbody --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #float float --- @param #float float +-- @param #cc.PhysicsBody a +-- @param #cc.PhysicsBody b +-- @param #vec2_table anchr1 +-- @param #vec2_table anchr2 +-- @param #float stiffness +-- @param #float damping -- @return PhysicsJointSpring#PhysicsJointSpring ret (return value: cc.PhysicsJointSpring) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua index 56d5538836..f3ee8f5126 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua @@ -5,147 +5,184 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShape] getFriction -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set the group of body
+-- Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index)
+-- it have high priority than bit masks -- @function [parent=#PhysicsShape] setGroup -- @param self --- @param #int int +-- @param #int group -------------------------------- +-- -- @function [parent=#PhysicsShape] setDensity -- @param self --- @param #float float +-- @param #float density -------------------------------- +-- get mass -- @function [parent=#PhysicsShape] getMass -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShape] getMaterial -- @param self -- @return PhysicsMaterial#PhysicsMaterial ret (return value: cc.PhysicsMaterial) -------------------------------- +-- -- @function [parent=#PhysicsShape] getCollisionBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- return the area of this shape -- @function [parent=#PhysicsShape] getArea -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- A mask that defines which categories this physics body belongs to.
+-- Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions.
+-- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsShape] setCategoryBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- -- @function [parent=#PhysicsShape] getGroup -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Set moment, it will change the body's moment this shape attaches -- @function [parent=#PhysicsShape] setMoment -- @param self --- @param #float float +-- @param #float moment -------------------------------- +-- Test point is in shape or not -- @function [parent=#PhysicsShape] containsPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#PhysicsShape] getCategoryBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Return the type of this shape -- @function [parent=#PhysicsShape] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#PhysicsShape] getContactTestBitmask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Get center of this shape -- @function [parent=#PhysicsShape] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShape] getDensity -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Set mass, it will change the body's mass this shape attaches -- @function [parent=#PhysicsShape] setMass -- @param self --- @param #float float +-- @param #float mass -------------------------------- +-- -- @function [parent=#PhysicsShape] getTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Calculate the default moment value -- @function [parent=#PhysicsShape] calculateDefaultMoment -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- A mask that defines which categories of physics bodies can collide with this physics body.
+-- When two physics bodies contact each other, a collision may occur. This body’s collision mask is compared to the other body’s category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body’s velocity.
+-- The default value is 0xFFFFFFFF (all bits set). -- @function [parent=#PhysicsShape] setCollisionBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- get moment -- @function [parent=#PhysicsShape] getMoment -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Get offset -- @function [parent=#PhysicsShape] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShape] getRestitution -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShape] setFriction -- @param self --- @param #float float +-- @param #float friction -------------------------------- +-- -- @function [parent=#PhysicsShape] setMaterial -- @param self --- @param #cc.PhysicsMaterial physicsmaterial +-- @param #cc.PhysicsMaterial material -------------------------------- +-- -- @function [parent=#PhysicsShape] setTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- A mask that defines which categories of bodies cause intersection notifications with this physics body.
+-- When two bodies share the same space, each body’s category mask is tested against the other body’s contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
+-- The default value is 0x00000000 (all bits cleared). -- @function [parent=#PhysicsShape] setContactTestBitmask -- @param self --- @param #int int +-- @param #int bitmask -------------------------------- +-- -- @function [parent=#PhysicsShape] setRestitution -- @param self --- @param #float float +-- @param #float restitution -------------------------------- +-- Get the body that this shape attaches -- @function [parent=#PhysicsShape] getBody -- @param self -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua index 338ac5add2..a2a6c2a5ac 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua @@ -5,19 +5,22 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeBox] getSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#PhysicsShapeBox] create -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial physicsmaterial --- @param #vec2_table vec2 +-- @param #cc.PhysicsMaterial material +-- @param #vec2_table offset -- @return PhysicsShapeBox#PhysicsShapeBox ret (return value: cc.PhysicsShapeBox) -------------------------------- +-- -- @function [parent=#PhysicsShapeBox] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua index 2fb52b6df9..324465d163 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua @@ -5,38 +5,44 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] getRadius -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] create -- @param self --- @param #float float --- @param #cc.PhysicsMaterial physicsmaterial --- @param #vec2_table vec2 +-- @param #float radius +-- @param #cc.PhysicsMaterial material +-- @param #vec2_table offset -- @return PhysicsShapeCircle#PhysicsShapeCircle ret (return value: cc.PhysicsShapeCircle) -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] calculateArea -- @param self --- @param #float float +-- @param #float radius -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] calculateMoment -- @param self --- @param #float float --- @param #float float --- @param #vec2_table vec2 +-- @param #float mass +-- @param #float radius +-- @param #vec2_table offset -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShapeCircle] calculateDefaultMoment -- @param self -- @return float#float ret (return value: float) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua index 6e879ad541..14fe760243 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua @@ -5,15 +5,17 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeBox] create -- @param self -- @param #size_table size --- @param #cc.PhysicsMaterial physicsmaterial --- @param #float float --- @param #vec2_table vec2 +-- @param #cc.PhysicsMaterial material +-- @param #float border +-- @param #vec2_table offset -- @return PhysicsShapeEdgeBox#PhysicsShapeEdgeBox ret (return value: cc.PhysicsShapeEdgeBox) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeBox] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua index d4dc91703e..40b42cf74a 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeChain] getPointsCount -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeChain] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua index d2bbb2d42e..de1165c4ae 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgePolygon] getPointsCount -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgePolygon] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua index c4588a7bf8..852c62a8af 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua @@ -5,25 +5,29 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeSegment] getPointB -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeSegment] getPointA -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeSegment] create -- @param self --- @param #vec2_table vec2 --- @param #vec2_table vec2 --- @param #cc.PhysicsMaterial physicsmaterial --- @param #float float +-- @param #vec2_table a +-- @param #vec2_table b +-- @param #cc.PhysicsMaterial material +-- @param #float border -- @return PhysicsShapeEdgeSegment#PhysicsShapeEdgeSegment ret (return value: cc.PhysicsShapeEdgeSegment) -------------------------------- +-- -- @function [parent=#PhysicsShapeEdgeSegment] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua index c924c1a867..81c6bf76c1 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#PhysicsShapePolygon] getPointsCount -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#PhysicsShapePolygon] getPoint -- @param self --- @param #int int +-- @param #int i -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PhysicsShapePolygon] calculateDefaultMoment -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PhysicsShapePolygon] getCenter -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua index 6c16ea6dc4..7a15ac9d59 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua @@ -4,35 +4,44 @@ -- @parent_module cc -------------------------------- +-- set the gravity value -- @function [parent=#PhysicsWorld] setGravity -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table gravity -------------------------------- +-- Get all the bodys that in the physics world. -- @function [parent=#PhysicsWorld] getAllBodies -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- get the bebug draw mask -- @function [parent=#PhysicsWorld] getDebugDrawMask -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- To control the step of physics, if you want control it by yourself( fixed-timestep for example ), you can set this to false and call step by yourself.
+-- Defaut value is true.
+-- Note: if you set auto step to false, setSpeed and setUpdateRate won't work, you need to control the time step by yourself. -- @function [parent=#PhysicsWorld] setAutoStep -- @param self --- @param #bool bool +-- @param #bool autoStep -------------------------------- +-- Adds a joint to the physics world. -- @function [parent=#PhysicsWorld] addJoint -- @param self --- @param #cc.PhysicsJoint physicsjoint +-- @param #cc.PhysicsJoint joint -------------------------------- +-- Remove all joints from physics world. -- @function [parent=#PhysicsWorld] removeAllJoints -- @param self -------------------------------- +-- Get the auto step -- @function [parent=#PhysicsWorld] isAutoStep -- @param self -- @return bool#bool ret (return value: bool) @@ -42,69 +51,86 @@ -- @overload self, cc.PhysicsBody -- @function [parent=#PhysicsWorld] removeBody -- @param self --- @param #cc.PhysicsBody physicsbody +-- @param #cc.PhysicsBody body -------------------------------- +-- Remove a joint from physics world. -- @function [parent=#PhysicsWorld] removeJoint -- @param self --- @param #cc.PhysicsJoint physicsjoint --- @param #bool bool +-- @param #cc.PhysicsJoint joint +-- @param #bool destroy -------------------------------- +-- Get phsyics shapes that contains the point. -- @function [parent=#PhysicsWorld] getShapes -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- The step for physics world, The times passing for simulate the physics.
+-- Note: you need to setAutoStep(false) first before it can work. -- @function [parent=#PhysicsWorld] step -- @param self --- @param #float float +-- @param #float delta -------------------------------- +-- set the debug draw mask -- @function [parent=#PhysicsWorld] setDebugDrawMask -- @param self --- @param #int int +-- @param #int mask -------------------------------- +-- get the gravity value -- @function [parent=#PhysicsWorld] getGravity -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- set the update rate of physics world, update rate is the value of EngineUpdateTimes/PhysicsWorldUpdateTimes.
+-- set it higher can improve performance, set it lower can improve accuracy of physics world simulation.
+-- default value is 1.0
+-- Note: if you setAutoStep(false), this won't work. -- @function [parent=#PhysicsWorld] setUpdateRate -- @param self --- @param #int int +-- @param #int rate -------------------------------- +-- get the speed of physics world -- @function [parent=#PhysicsWorld] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- get the update rate -- @function [parent=#PhysicsWorld] getUpdateRate -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Remove all bodies from physics world. -- @function [parent=#PhysicsWorld] removeAllBodies -- @param self -------------------------------- +-- Set the speed of physics world, speed is the rate at which the simulation executes. default value is 1.0
+-- Note: if you setAutoStep(false), this won't work. -- @function [parent=#PhysicsWorld] setSpeed -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- return physics shape that contains the point. -- @function [parent=#PhysicsWorld] getShape -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- +-- Get body by tag -- @function [parent=#PhysicsWorld] getBody -- @param self --- @param #int int +-- @param #int tag -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Place.lua b/cocos/scripting/lua-bindings/auto/api/Place.lua index 11fb95222a..8592661d0f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Place.lua +++ b/cocos/scripting/lua-bindings/auto/api/Place.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates a Place action with a position -- @function [parent=#Place] create -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -- @return Place#Place ret (return value: cc.Place) -------------------------------- +-- -- @function [parent=#Place] clone -- @param self -- @return Place#Place ret (return value: cc.Place) -------------------------------- +-- -- @function [parent=#Place] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#Place] reverse -- @param self -- @return Place#Place ret (return value: cc.Place) diff --git a/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua b/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua index 1fa6573504..8f31161282 100644 --- a/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/PositionFrame.lua @@ -5,51 +5,61 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#PositionFrame] getX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PositionFrame] getY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#PositionFrame] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- -- @function [parent=#PositionFrame] setX -- @param self --- @param #float float +-- @param #float x -------------------------------- +-- -- @function [parent=#PositionFrame] setY -- @param self --- @param #float float +-- @param #float y -------------------------------- +-- -- @function [parent=#PositionFrame] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#PositionFrame] create -- @param self -- @return PositionFrame#PositionFrame ret (return value: ccs.PositionFrame) -------------------------------- +-- -- @function [parent=#PositionFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#PositionFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#PositionFrame] PositionFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua b/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua index 2b24b53b37..426f309feb 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua @@ -5,31 +5,36 @@ -- @parent_module cc -------------------------------- +-- Creates and initializes the action with a duration, a "from" percentage and a "to" percentage -- @function [parent=#ProgressFromTo] create -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float fromPercentage +-- @param #float toPercentage -- @return ProgressFromTo#ProgressFromTo ret (return value: cc.ProgressFromTo) -------------------------------- +-- -- @function [parent=#ProgressFromTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ProgressFromTo] clone -- @param self -- @return ProgressFromTo#ProgressFromTo ret (return value: cc.ProgressFromTo) -------------------------------- +-- -- @function [parent=#ProgressFromTo] reverse -- @param self -- @return ProgressFromTo#ProgressFromTo ret (return value: cc.ProgressFromTo) -------------------------------- +-- -- @function [parent=#ProgressFromTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua b/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua index d19cf74354..7182839fc3 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua @@ -5,41 +5,59 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ProgressTimer] isReverseDirection -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- This allows the bar type to move the component at a specific rate
+-- Set the component to 0 to make sure it stays at 100%.
+-- For example you want a left to right bar but not have the height stay 100%
+-- Set the rate to be Vec2(0,1); and set the midpoint to = Vec2(0,.5f); -- @function [parent=#ProgressTimer] setBarChangeRate -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table barChangeRate -------------------------------- +-- Percentages are from 0 to 100 -- @function [parent=#ProgressTimer] getPercentage -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ProgressTimer] setSprite -- @param self -- @param #cc.Sprite sprite -------------------------------- +-- Change the percentage to change progress. -- @function [parent=#ProgressTimer] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- The image to show the progress percentage, retain -- @function [parent=#ProgressTimer] getSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- Midpoint is used to modify the progress start position.
+-- If you're using radials type then the midpoint changes the center point
+-- If you're using bar type the the midpoint changes the bar growth
+-- it expands from the center but clamps to the sprites edge so:
+-- you want a left to right then set the midpoint all the way to Vec2(0,y)
+-- you want a right to left then set the midpoint all the way to Vec2(1,y)
+-- you want a bottom to top then set the midpoint all the way to Vec2(x,0)
+-- you want a top to bottom then set the midpoint all the way to Vec2(x,1) -- @function [parent=#ProgressTimer] setMidpoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -------------------------------- +-- Returns the BarChangeRate -- @function [parent=#ProgressTimer] getBarChangeRate -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) @@ -49,57 +67,67 @@ -- @overload self, bool -- @function [parent=#ProgressTimer] setReverseDirection -- @param self --- @param #bool bool +-- @param #bool reverse -------------------------------- +-- Returns the Midpoint -- @function [parent=#ProgressTimer] getMidpoint -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#ProgressTimer] setPercentage -- @param self --- @param #float float +-- @param #float percentage -------------------------------- +-- -- @function [parent=#ProgressTimer] setType -- @param self -- @param #int type -------------------------------- +-- Creates a progress timer with the sprite as the shape the timer goes through -- @function [parent=#ProgressTimer] create -- @param self --- @param #cc.Sprite sprite +-- @param #cc.Sprite sp -- @return ProgressTimer#ProgressTimer ret (return value: cc.ProgressTimer) -------------------------------- +-- -- @function [parent=#ProgressTimer] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchorPoint -------------------------------- +-- -- @function [parent=#ProgressTimer] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#ProgressTimer] setColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- -- @function [parent=#ProgressTimer] getColor -- @param self -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- -- @function [parent=#ProgressTimer] setOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char opacity -------------------------------- +-- -- @function [parent=#ProgressTimer] getOpacity -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua b/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua index 1eed2eefe4..1cf3d03f21 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressTo.lua @@ -5,30 +5,35 @@ -- @parent_module cc -------------------------------- +-- Creates and initializes with a duration and a percent -- @function [parent=#ProgressTo] create -- @param self --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float percent -- @return ProgressTo#ProgressTo ret (return value: cc.ProgressTo) -------------------------------- +-- -- @function [parent=#ProgressTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ProgressTo] clone -- @param self -- @return ProgressTo#ProgressTo ret (return value: cc.ProgressTo) -------------------------------- +-- -- @function [parent=#ProgressTo] reverse -- @param self -- @return ProgressTo#ProgressTo ret (return value: cc.ProgressTo) -------------------------------- +-- -- @function [parent=#ProgressTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua b/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua index 64c2d01165..c49c9574ad 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua @@ -10,78 +10,106 @@ -- @overload self, cc.Node, int, int -- @function [parent=#ProtectedNode] addProtectedChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int localZOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#ProtectedNode] disableCascadeColor -- @param self -------------------------------- +-- Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
+-- param tag An interger number that identifies a child node
+-- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#ProtectedNode] removeProtectedChildByTag -- @param self --- @param #int int --- @param #bool bool +-- @param #int tag +-- @param #bool cleanup -------------------------------- +-- Reorders a child according to a new z value.
+-- param child An already added child node. It MUST be already added.
+-- param localZOrder Z order for drawing priority. Please refer to setLocalZOrder(int) -- @function [parent=#ProtectedNode] reorderProtectedChild -- @param self --- @param #cc.Node node --- @param #int int +-- @param #cc.Node child +-- @param #int localZOrder -------------------------------- +-- Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
+-- param cleanup true if all running actions on all children nodes should be cleanup, false oterwise.
+-- js removeAllChildren
+-- lua removeAllChildren -- @function [parent=#ProtectedNode] removeAllProtectedChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#ProtectedNode] disableCascadeOpacity -- @param self -------------------------------- +-- Sorts the children array once before drawing, instead of every time when a child is added or reordered.
+-- This appraoch can improves the performance massively.
+-- note Don't call this manually unless a child added needs to be removed in the same frame -- @function [parent=#ProtectedNode] sortAllProtectedChildren -- @param self -------------------------------- +-- Gets a child from the container with its tag
+-- param tag An identifier to find the child node.
+-- return a Node object whose tag equals to the input parameter -- @function [parent=#ProtectedNode] getProtectedChildByTag -- @param self --- @param #int int +-- @param #int tag -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
+-- param child The child node which will be removed.
+-- param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. -- @function [parent=#ProtectedNode] removeProtectedChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- Removes all children from the container with a cleanup.
+-- see `removeAllChildrenWithCleanup(bool)` -- @function [parent=#ProtectedNode] removeAllProtectedChildren -- @param self -------------------------------- +-- -- @function [parent=#ProtectedNode] create -- @param self -- @return ProtectedNode#ProtectedNode ret (return value: cc.ProtectedNode) -------------------------------- +-- / @} end of Children and Parent -- @function [parent=#ProtectedNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#ProtectedNode] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- -- @function [parent=#ProtectedNode] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor -------------------------------- +-- -- @function [parent=#ProtectedNode] cleanup -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Ref.lua b/cocos/scripting/lua-bindings/auto/api/Ref.lua index 23aa688f85..8ab85e5d9f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Ref.lua +++ b/cocos/scripting/lua-bindings/auto/api/Ref.lua @@ -4,14 +4,27 @@ -- @parent_module cc -------------------------------- +-- Releases the ownership immediately.
+-- This decrements the Ref's reference count.
+-- If the reference count reaches 0 after the descrement, this Ref is
+-- destructed.
+-- see retain, autorelease
+-- js NA -- @function [parent=#Ref] release -- @param self -------------------------------- +-- Retains the ownership.
+-- This increases the Ref's reference count.
+-- see release, autorelease
+-- js NA -- @function [parent=#Ref] retain -- @param self -------------------------------- +-- Returns the Ref's current reference count.
+-- returns The Ref's reference count.
+-- js NA -- @function [parent=#Ref] getReferenceCount -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) diff --git a/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua b/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua index a12a3b8f4a..b919424813 100644 --- a/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua @@ -13,6 +13,7 @@ -- @return RelativeBox#RelativeBox ret (retunr value: ccui.RelativeBox) -------------------------------- +-- Default constructor -- @function [parent=#RelativeBox] RelativeBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua b/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua index ec81d4f44e..d40ea5f727 100644 --- a/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua +++ b/cocos/scripting/lua-bindings/auto/api/RelativeLayoutParameter.lua @@ -5,51 +5,70 @@ -- @parent_module ccui -------------------------------- +-- Sets RelativeAlign parameter for LayoutParameter.
+-- see RelativeAlign
+-- param RelativeAlign -- @function [parent=#RelativeLayoutParameter] setAlign -- @param self --- @param #int relativealign +-- @param #int align -------------------------------- +-- Sets a key for LayoutParameter. Witch widget named this is relative to.
+-- param name -- @function [parent=#RelativeLayoutParameter] setRelativeToWidgetName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- Gets a name in Relative Layout of LayoutParameter.
+-- return name -- @function [parent=#RelativeLayoutParameter] getRelativeName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Gets the key of LayoutParameter. Witch widget named this is relative to.
+-- return name -- @function [parent=#RelativeLayoutParameter] getRelativeToWidgetName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Sets a name in Relative Layout for LayoutParameter.
+-- param name -- @function [parent=#RelativeLayoutParameter] setRelativeName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- Gets RelativeAlign parameter for LayoutParameter.
+-- see RelativeAlign
+-- return RelativeAlign -- @function [parent=#RelativeLayoutParameter] getAlign -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Allocates and initializes.
+-- return A initialized LayoutParameter which is marked as "autorelease". -- @function [parent=#RelativeLayoutParameter] create -- @param self -- @return RelativeLayoutParameter#RelativeLayoutParameter ret (return value: ccui.RelativeLayoutParameter) -------------------------------- +-- -- @function [parent=#RelativeLayoutParameter] createCloneInstance -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- -- @function [parent=#RelativeLayoutParameter] copyProperties -- @param self --- @param #ccui.LayoutParameter layoutparameter +-- @param #ccui.LayoutParameter model -------------------------------- +-- Default constructor -- @function [parent=#RelativeLayoutParameter] RelativeLayoutParameter -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua b/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua index 27ef10c677..c477540f27 100644 --- a/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua +++ b/cocos/scripting/lua-bindings/auto/api/RemoveSelf.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- create the action -- @function [parent=#RemoveSelf] create -- @param self -- @return RemoveSelf#RemoveSelf ret (return value: cc.RemoveSelf) -------------------------------- +-- -- @function [parent=#RemoveSelf] clone -- @param self -- @return RemoveSelf#RemoveSelf ret (return value: cc.RemoveSelf) -------------------------------- +-- -- @function [parent=#RemoveSelf] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#RemoveSelf] reverse -- @param self -- @return RemoveSelf#RemoveSelf ret (return value: cc.RemoveSelf) diff --git a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua index 661a25c17e..d7f705032c 100644 --- a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua +++ b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua @@ -5,62 +5,75 @@ -- @parent_module cc -------------------------------- +-- Used for grab part of screen to a texture.rtBegin: the position of renderTexture on the fullRectfullRect: the total size of screenfullViewport: the total viewportSize -- @function [parent=#RenderTexture] setVirtualViewport -- @param self --- @param #vec2_table vec2 --- @param #rect_table rect --- @param #rect_table rect +-- @param #vec2_table rtBegin +-- @param #rect_table fullRect +-- @param #rect_table fullViewport -------------------------------- +-- clears the texture with a specified stencil value -- @function [parent=#RenderTexture] clearStencil -- @param self --- @param #int int +-- @param #int stencilValue -------------------------------- +-- Value for clearDepth. Valid only when "autoDraw" is true. -- @function [parent=#RenderTexture] getClearDepth -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Value for clear Stencil. Valid only when "autoDraw" is true -- @function [parent=#RenderTexture] getClearStencil -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- ends grabbing -- @function [parent=#RenderTexture] end -- @param self -------------------------------- +-- -- @function [parent=#RenderTexture] setClearStencil -- @param self --- @param #int int +-- @param #int clearStencil -------------------------------- +-- Sets the Sprite being used. -- @function [parent=#RenderTexture] setSprite -- @param self -- @param #cc.Sprite sprite -------------------------------- +-- Gets the Sprite being used. -- @function [parent=#RenderTexture] getSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons.
+-- Will be enabled in the future. -- @function [parent=#RenderTexture] isAutoDraw -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RenderTexture] setKeepMatrix -- @param self --- @param #bool bool +-- @param #bool keepMatrix -------------------------------- +-- -- @function [parent=#RenderTexture] setClearFlags -- @param self --- @param #unsigned int int +-- @param #unsigned int clearFlags -------------------------------- +-- starts grabbing -- @function [parent=#RenderTexture] begin -- @param self @@ -69,23 +82,26 @@ -- @overload self, string, bool, function -- @function [parent=#RenderTexture] saveToFile -- @param self --- @param #string str +-- @param #string filename -- @param #int format --- @param #bool bool --- @param #function func +-- @param #bool isRGBA +-- @param #function callback -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#RenderTexture] setAutoDraw -- @param self --- @param #bool bool +-- @param #bool isAutoDraw -------------------------------- +-- -- @function [parent=#RenderTexture] setClearColor -- @param self --- @param #color4f_table color4f +-- @param #color4f_table clearColor -------------------------------- +-- end is key word of lua, use other name to export to lua. -- @function [parent=#RenderTexture] endToLua -- @param self @@ -95,55 +111,61 @@ -- @overload self, float, float, float, float, float, int -- @function [parent=#RenderTexture] beginWithClear -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float --- @param #float float --- @param #int int +-- @param #float r +-- @param #float g +-- @param #float b +-- @param #float a +-- @param #float depthValue +-- @param #int stencilValue -------------------------------- +-- clears the texture with a specified depth value -- @function [parent=#RenderTexture] clearDepth -- @param self --- @param #float float +-- @param #float depthValue -------------------------------- +-- Clear color value. Valid only when "autoDraw" is true. -- @function [parent=#RenderTexture] getClearColor -- @param self -- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- +-- clears the texture with a color -- @function [parent=#RenderTexture] clear -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float r +-- @param #float g +-- @param #float b +-- @param #float a -------------------------------- +-- Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw" is true. -- @function [parent=#RenderTexture] getClearFlags -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- -- @function [parent=#RenderTexture] newImage -- @param self -- @return Image#Image ret (return value: cc.Image) -------------------------------- +-- -- @function [parent=#RenderTexture] setClearDepth -- @param self --- @param #float float +-- @param #float clearDepth -------------------------------- -- @overload self, int, int, int, unsigned int -- @overload self, int, int, int -- @function [parent=#RenderTexture] initWithWidthAndHeight -- @param self --- @param #int int --- @param #int int --- @param #int pixelformat --- @param #unsigned int int +-- @param #int w +-- @param #int h +-- @param #int format +-- @param #unsigned int depthStencilFormat -- @return bool#bool ret (retunr value: bool) -------------------------------- @@ -152,27 +174,30 @@ -- @overload self, int, int -- @function [parent=#RenderTexture] create -- @param self --- @param #int int --- @param #int int --- @param #int pixelformat --- @param #unsigned int int +-- @param #int w +-- @param #int h +-- @param #int format +-- @param #unsigned int depthStencilFormat -- @return RenderTexture#RenderTexture ret (retunr value: cc.RenderTexture) -------------------------------- +-- -- @function [parent=#RenderTexture] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#RenderTexture] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#RenderTexture] RenderTexture -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Repeat.lua b/cocos/scripting/lua-bindings/auto/api/Repeat.lua index 0fceefb74c..6416570584 100644 --- a/cocos/scripting/lua-bindings/auto/api/Repeat.lua +++ b/cocos/scripting/lua-bindings/auto/api/Repeat.lua @@ -5,47 +5,56 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Repeat] setInnerAction -- @param self --- @param #cc.FiniteTimeAction finitetimeaction +-- @param #cc.FiniteTimeAction action -------------------------------- +-- -- @function [parent=#Repeat] getInnerAction -- @param self -- @return FiniteTimeAction#FiniteTimeAction ret (return value: cc.FiniteTimeAction) -------------------------------- +-- creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30) -- @function [parent=#Repeat] create -- @param self --- @param #cc.FiniteTimeAction finitetimeaction --- @param #unsigned int int +-- @param #cc.FiniteTimeAction action +-- @param #unsigned int times -- @return Repeat#Repeat ret (return value: cc.Repeat) -------------------------------- +-- -- @function [parent=#Repeat] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Repeat] reverse -- @param self -- @return Repeat#Repeat ret (return value: cc.Repeat) -------------------------------- +-- -- @function [parent=#Repeat] clone -- @param self -- @return Repeat#Repeat ret (return value: cc.Repeat) -------------------------------- +-- -- @function [parent=#Repeat] stop -- @param self -------------------------------- +-- -- @function [parent=#Repeat] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Repeat] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua b/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua index d846b49287..bd2f1b1b8f 100644 --- a/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua +++ b/cocos/scripting/lua-bindings/auto/api/RepeatForever.lua @@ -5,44 +5,52 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#RepeatForever] setInnerAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -------------------------------- +-- -- @function [parent=#RepeatForever] getInnerAction -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- creates the action -- @function [parent=#RepeatForever] create -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return RepeatForever#RepeatForever ret (return value: cc.RepeatForever) -------------------------------- +-- -- @function [parent=#RepeatForever] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#RepeatForever] clone -- @param self -- @return RepeatForever#RepeatForever ret (return value: cc.RepeatForever) -------------------------------- +-- -- @function [parent=#RepeatForever] isDone -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RepeatForever] reverse -- @param self -- @return RepeatForever#RepeatForever ret (return value: cc.RepeatForever) -------------------------------- +-- -- @function [parent=#RepeatForever] step -- @param self --- @param #float float +-- @param #float dt return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua b/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua index d36121c163..d5d09ff12e 100644 --- a/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua +++ b/cocos/scripting/lua-bindings/auto/api/ReuseGrid.lua @@ -5,22 +5,26 @@ -- @parent_module cc -------------------------------- +-- creates an action with the number of times that the current grid will be reused -- @function [parent=#ReuseGrid] create -- @param self --- @param #int int +-- @param #int times -- @return ReuseGrid#ReuseGrid ret (return value: cc.ReuseGrid) -------------------------------- +-- -- @function [parent=#ReuseGrid] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ReuseGrid] clone -- @param self -- @return ReuseGrid#ReuseGrid ret (return value: cc.ReuseGrid) -------------------------------- +-- -- @function [parent=#ReuseGrid] reverse -- @param self -- @return ReuseGrid#ReuseGrid ret (return value: cc.ReuseGrid) diff --git a/cocos/scripting/lua-bindings/auto/api/RichElement.lua b/cocos/scripting/lua-bindings/auto/api/RichElement.lua index 6043d0bf08..dcb76df400 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElement.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElement.lua @@ -5,14 +5,16 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#RichElement] init -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RichElement] RichElement -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua b/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua index df0910149b..12663cbf56 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua @@ -5,24 +5,27 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#RichElementCustomNode] init -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #cc.Node node +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #cc.Node customNode -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RichElementCustomNode] create -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #cc.Node node +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #cc.Node customNode -- @return RichElementCustomNode#RichElementCustomNode ret (return value: ccui.RichElementCustomNode) -------------------------------- +-- -- @function [parent=#RichElementCustomNode] RichElementCustomNode -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua b/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua index c94db3c5cc..bbccb743f8 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua @@ -5,24 +5,27 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#RichElementImage] init -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #string str +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #string filePath -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RichElementImage] create -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #string str +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #string filePath -- @return RichElementImage#RichElementImage ret (return value: ccui.RichElementImage) -------------------------------- +-- -- @function [parent=#RichElementImage] RichElementImage -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementText.lua b/cocos/scripting/lua-bindings/auto/api/RichElementText.lua index e92a8c5916..35ceb7e869 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementText.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementText.lua @@ -5,28 +5,31 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#RichElementText] init -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #string str --- @param #string str --- @param #float float +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #string text +-- @param #string fontName +-- @param #float fontSize -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#RichElementText] create -- @param self --- @param #int int --- @param #color3b_table color3b --- @param #unsigned char char --- @param #string str --- @param #string str --- @param #float float +-- @param #int tag +-- @param #color3b_table color +-- @param #unsigned char opacity +-- @param #string text +-- @param #string fontName +-- @param #float fontSize -- @return RichElementText#RichElementText ret (return value: ccui.RichElementText) -------------------------------- +-- -- @function [parent=#RichElementText] RichElementText -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RichText.lua b/cocos/scripting/lua-bindings/auto/api/RichText.lua index c332a6f8e7..ff84a62b20 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichText.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichText.lua @@ -5,32 +5,38 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#RichText] insertElement -- @param self --- @param #ccui.RichElement richelement --- @param #int int +-- @param #ccui.RichElement element +-- @param #int index -------------------------------- +-- -- @function [parent=#RichText] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pt -------------------------------- +-- -- @function [parent=#RichText] pushBackElement -- @param self --- @param #ccui.RichElement richelement +-- @param #ccui.RichElement element -------------------------------- +-- -- @function [parent=#RichText] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- -- @function [parent=#RichText] setVerticalSpace -- @param self --- @param #float float +-- @param #float space -------------------------------- +-- -- @function [parent=#RichText] formatText -- @param self @@ -39,24 +45,28 @@ -- @overload self, int -- @function [parent=#RichText] removeElement -- @param self --- @param #int int +-- @param #int index -------------------------------- +-- -- @function [parent=#RichText] create -- @param self -- @return RichText#RichText ret (return value: ccui.RichText) -------------------------------- +-- -- @function [parent=#RichText] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#RichText] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#RichText] RichText -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua b/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua index 22ecc16a89..d335042d84 100644 --- a/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua @@ -5,54 +5,63 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Ripple3D] setAmplitudeRate -- @param self --- @param #float float +-- @param #float fAmplitudeRate -------------------------------- +-- -- @function [parent=#Ripple3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Ripple3D] setAmplitude -- @param self --- @param #float float +-- @param #float fAmplitude -------------------------------- +-- -- @function [parent=#Ripple3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set center position -- @function [parent=#Ripple3D] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- get center position -- @function [parent=#Ripple3D] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- creates the action with radius, number of waves, amplitude, a grid size and duration -- @function [parent=#Ripple3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #vec2_table vec2 --- @param #float float --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #vec2_table position +-- @param #float radius +-- @param #unsigned int waves +-- @param #float amplitude -- @return Ripple3D#Ripple3D ret (return value: cc.Ripple3D) -------------------------------- +-- -- @function [parent=#Ripple3D] clone -- @param self -- @return Ripple3D#Ripple3D ret (return value: cc.Ripple3D) -------------------------------- +-- -- @function [parent=#Ripple3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/RotateBy.lua b/cocos/scripting/lua-bindings/auto/api/RotateBy.lua index 8d1d33c55e..05a24a7f5a 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotateBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotateBy.lua @@ -10,29 +10,33 @@ -- @overload self, float, vec3_table -- @function [parent=#RotateBy] create -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float deltaAngleZ_X +-- @param #float deltaAngleZ_Y -- @return RotateBy#RotateBy ret (retunr value: cc.RotateBy) -------------------------------- +-- -- @function [parent=#RotateBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#RotateBy] clone -- @param self -- @return RotateBy#RotateBy ret (return value: cc.RotateBy) -------------------------------- +-- -- @function [parent=#RotateBy] reverse -- @param self -- @return RotateBy#RotateBy ret (return value: cc.RotateBy) -------------------------------- +-- -- @function [parent=#RotateBy] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/RotateTo.lua b/cocos/scripting/lua-bindings/auto/api/RotateTo.lua index 1631a28fbd..9a03166d87 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotateTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotateTo.lua @@ -10,29 +10,33 @@ -- @overload self, float, vec3_table -- @function [parent=#RotateTo] create -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float dstAngleX +-- @param #float dstAngleY -- @return RotateTo#RotateTo ret (retunr value: cc.RotateTo) -------------------------------- +-- -- @function [parent=#RotateTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#RotateTo] clone -- @param self -- @return RotateTo#RotateTo ret (return value: cc.RotateTo) -------------------------------- +-- -- @function [parent=#RotateTo] reverse -- @param self -- @return RotateTo#RotateTo ret (return value: cc.RotateTo) -------------------------------- +-- -- @function [parent=#RotateTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua b/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua index 0d0e14cd48..6be076892d 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotationFrame.lua @@ -5,31 +5,37 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#RotationFrame] setRotation -- @param self --- @param #float float +-- @param #float rotation -------------------------------- +-- -- @function [parent=#RotationFrame] getRotation -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#RotationFrame] create -- @param self -- @return RotationFrame#RotationFrame ret (return value: ccs.RotationFrame) -------------------------------- +-- -- @function [parent=#RotationFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#RotationFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#RotationFrame] RotationFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua b/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua index 7fb9190a5b..340f6f167e 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua @@ -5,21 +5,25 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#RotationSkewFrame] create -- @param self -- @return RotationSkewFrame#RotationSkewFrame ret (return value: ccs.RotationSkewFrame) -------------------------------- +-- -- @function [parent=#RotationSkewFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#RotationSkewFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#RotationSkewFrame] RotationSkewFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua index 3e353cf61d..6264f3826f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua @@ -5,65 +5,82 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#Scale9Sprite] disableCascadeColor -- @param self -------------------------------- +-- -- @function [parent=#Scale9Sprite] updateWithSprite -- @param self -- @param #cc.Sprite sprite -- @param #rect_table rect --- @param #bool bool --- @param #rect_table rect +-- @param #bool rotated +-- @param #rect_table capInsets -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the flag which indicates whether the widget is flipped horizontally or not.
+-- It only flips the texture of the widget, and not the texture of the widget's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- widget->setScaleX(sprite->getScaleX() * -1);
+-- return true if the widget is flipped horizaontally, false otherwise. -- @function [parent=#Scale9Sprite] isFlippedX -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets whether the widget should be flipped vertically or not.
+-- param bFlippedY true if the widget should be flipped vertically, flase otherwise. -- @function [parent=#Scale9Sprite] setFlippedY -- @param self --- @param #bool bool +-- @param #bool flippedY -------------------------------- +-- Sets whether the widget should be flipped horizontally or not.
+-- param bFlippedX true if the widget should be flipped horizaontally, false otherwise. -- @function [parent=#Scale9Sprite] setFlippedX -- @param self --- @param #bool bool +-- @param #bool flippedX -------------------------------- +-- -- @function [parent=#Scale9Sprite] setScale9Enabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#Scale9Sprite] disableCascadeOpacity -- @param self -------------------------------- +-- -- @function [parent=#Scale9Sprite] setInsetBottom -- @param self --- @param #float float +-- @param #float bottomInset -------------------------------- -- @overload self, string -- @overload self, string, rect_table -- @function [parent=#Scale9Sprite] initWithSpriteFrameName -- @param self --- @param #string str --- @param #rect_table rect +-- @param #string spriteFrameName +-- @param #rect_table capInsets -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getSprite -- @param self -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setInsetTop -- @param self --- @param #float float +-- @param #float topInset -------------------------------- -- @overload self, cc.Sprite, rect_table, bool, rect_table @@ -73,47 +90,59 @@ -- @param self -- @param #cc.Sprite sprite -- @param #rect_table rect --- @param #bool bool --- @param #rect_table rect +-- @param #bool rotated +-- @param #rect_table capInsets -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setPreferredSize -- @param self -- @param #size_table size -------------------------------- +-- -- @function [parent=#Scale9Sprite] getInsetRight -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame spriteFrame -------------------------------- +-- -- @function [parent=#Scale9Sprite] getInsetBottom -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Creates and returns a new sprite object with the specified cap insets.
+-- You use this method to add cap insets to a sprite or to change the existing
+-- cap insets of a sprite. In both cases, you get back a new image and the
+-- original sprite remains untouched.
+-- param capInsets The values to use for the cap insets. -- @function [parent=#Scale9Sprite] resizableSpriteWithCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -- @return Scale9Sprite#Scale9Sprite ret (return value: ccui.Scale9Sprite) -------------------------------- +-- -- @function [parent=#Scale9Sprite] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getCapInsets -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getOriginalSize -- @param self -- @return size_table#size_table ret (return value: size_table) @@ -125,54 +154,66 @@ -- @overload self, string -- @function [parent=#Scale9Sprite] initWithFile -- @param self --- @param #string str --- @param #rect_table rect +-- @param #string file -- @param #rect_table rect +-- @param #rect_table capInsets -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getInsetTop -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setInsetLeft -- @param self --- @param #float float +-- @param #float leftInset -------------------------------- -- @overload self, cc.SpriteFrame -- @overload self, cc.SpriteFrame, rect_table -- @function [parent=#Scale9Sprite] initWithSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe --- @param #rect_table rect +-- @param #cc.SpriteFrame spriteFrame +-- @param #rect_table capInsets -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getPreferredSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setCapInsets -- @param self -- @param #rect_table rect -------------------------------- +-- Return the flag which indicates whether the widget is flipped vertically or not.
+-- It only flips the texture of the widget, and not the texture of the widget's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- widget->setScaleY(widget->getScaleY() * -1);
+-- return true if the widget is flipped vertically, flase otherwise. -- @function [parent=#Scale9Sprite] isFlippedY -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Scale9Sprite] getInsetLeft -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setInsetRight -- @param self --- @param #float float +-- @param #float rightInset -------------------------------- -- @overload self, string, rect_table, rect_table @@ -182,9 +223,9 @@ -- @overload self, string -- @function [parent=#Scale9Sprite] create -- @param self --- @param #string str --- @param #rect_table rect +-- @param #string file -- @param #rect_table rect +-- @param #rect_table capInsets -- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite) -------------------------------- @@ -192,8 +233,8 @@ -- @overload self, string -- @function [parent=#Scale9Sprite] createWithSpriteFrameName -- @param self --- @param #string str --- @param #rect_table rect +-- @param #string spriteFrameName +-- @param #rect_table capInsets -- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite) -------------------------------- @@ -201,35 +242,41 @@ -- @overload self, cc.SpriteFrame -- @function [parent=#Scale9Sprite] createWithSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe --- @param #rect_table rect +-- @param #cc.SpriteFrame spriteFrame +-- @param #rect_table capInsets -- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite) -------------------------------- +-- -- @function [parent=#Scale9Sprite] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchorPoint -------------------------------- +-- -- @function [parent=#Scale9Sprite] updateDisplayedOpacity -- @param self --- @param #unsigned char char +-- @param #unsigned char parentOpacity -------------------------------- +-- -- @function [parent=#Scale9Sprite] cleanup -- @param self -------------------------------- +-- -- @function [parent=#Scale9Sprite] updateDisplayedColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table parentColor -------------------------------- +-- -- @function [parent=#Scale9Sprite] setContentSize -- @param self -- @param #size_table size -------------------------------- +-- js ctor -- @function [parent=#Scale9Sprite] Scale9Sprite -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua b/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua index 3d2e657b72..f7e93e6bfb 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua @@ -10,23 +10,26 @@ -- @overload self, float, float, float, float -- @function [parent=#ScaleBy] create -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float sx +-- @param #float sy +-- @param #float sz -- @return ScaleBy#ScaleBy ret (retunr value: cc.ScaleBy) -------------------------------- +-- -- @function [parent=#ScaleBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ScaleBy] clone -- @param self -- @return ScaleBy#ScaleBy ret (return value: cc.ScaleBy) -------------------------------- +-- -- @function [parent=#ScaleBy] reverse -- @param self -- @return ScaleBy#ScaleBy ret (return value: cc.ScaleBy) diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua b/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua index d8fa8f909b..e7bca6756f 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua @@ -5,46 +5,55 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ScaleFrame] setScaleY -- @param self --- @param #float float +-- @param #float scaleY -------------------------------- +-- -- @function [parent=#ScaleFrame] setScaleX -- @param self --- @param #float float +-- @param #float scaleX -------------------------------- +-- -- @function [parent=#ScaleFrame] getScaleY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ScaleFrame] getScaleX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#ScaleFrame] setScale -- @param self --- @param #float float +-- @param #float scale -------------------------------- +-- -- @function [parent=#ScaleFrame] create -- @param self -- @return ScaleFrame#ScaleFrame ret (return value: ccs.ScaleFrame) -------------------------------- +-- -- @function [parent=#ScaleFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#ScaleFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#ScaleFrame] ScaleFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua b/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua index 3869dffc97..7709deadf1 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua @@ -10,30 +10,34 @@ -- @overload self, float, float, float, float -- @function [parent=#ScaleTo] create -- @param self --- @param #float float --- @param #float float --- @param #float float --- @param #float float +-- @param #float duration +-- @param #float sx +-- @param #float sy +-- @param #float sz -- @return ScaleTo#ScaleTo ret (retunr value: cc.ScaleTo) -------------------------------- +-- -- @function [parent=#ScaleTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ScaleTo] clone -- @param self -- @return ScaleTo#ScaleTo ret (return value: cc.ScaleTo) -------------------------------- +-- -- @function [parent=#ScaleTo] reverse -- @param self -- @return ScaleTo#ScaleTo ret (return value: cc.ScaleTo) -------------------------------- +-- -- @function [parent=#ScaleTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Scene.lua b/cocos/scripting/lua-bindings/auto/api/Scene.lua index ba1bec9356..671e74d783 100644 --- a/cocos/scripting/lua-bindings/auto/api/Scene.lua +++ b/cocos/scripting/lua-bindings/auto/api/Scene.lua @@ -5,48 +5,55 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Scene] getPhysicsWorld -- @param self -- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld) -------------------------------- +-- creates a new Scene object with a predefined Size -- @function [parent=#Scene] createWithSize -- @param self -- @param #size_table size -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- creates a new Scene object -- @function [parent=#Scene] create -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- -- @function [parent=#Scene] createWithPhysics -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- -- @function [parent=#Scene] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Scene] getScene -- @param self -- @return Scene#Scene ret (return value: cc.Scene) -------------------------------- +-- -- @function [parent=#Scene] update -- @param self --- @param #float float +-- @param #float delta -------------------------------- -- @overload self, cc.Node, int, string -- @overload self, cc.Node, int, int -- @function [parent=#Scene] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SceneReader.lua b/cocos/scripting/lua-bindings/auto/api/SceneReader.lua index 7ea99e4d21..eb30a5ff16 100644 --- a/cocos/scripting/lua-bindings/auto/api/SceneReader.lua +++ b/cocos/scripting/lua-bindings/auto/api/SceneReader.lua @@ -4,38 +4,46 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#SceneReader] setTarget -- @param self --- @param #function func +-- @param #function selector -------------------------------- +-- -- @function [parent=#SceneReader] createNodeWithSceneFile -- @param self --- @param #string str --- @param #int attachcomponenttype +-- @param #string fileName +-- @param #int attachComponent -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#SceneReader] getAttachComponentType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#SceneReader] getNodeByTag -- @param self --- @param #int int +-- @param #int nTag -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- js purge
+-- lua destroySceneReader -- @function [parent=#SceneReader] destroyInstance -- @param self -------------------------------- +-- -- @function [parent=#SceneReader] sceneReaderVersion -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#SceneReader] getInstance -- @param self -- @return SceneReader#SceneReader ret (return value: ccs.SceneReader) diff --git a/cocos/scripting/lua-bindings/auto/api/Scheduler.lua b/cocos/scripting/lua-bindings/auto/api/Scheduler.lua index 7a3870c4d6..b1b7d560f3 100644 --- a/cocos/scripting/lua-bindings/auto/api/Scheduler.lua +++ b/cocos/scripting/lua-bindings/auto/api/Scheduler.lua @@ -5,16 +5,24 @@ -- @parent_module cc -------------------------------- +-- Modifies the time of all scheduled callbacks.
+-- You can use this property to create a 'slow motion' or 'fast forward' effect.
+-- Default is 1.0. To create a 'slow motion' effect, use values below 1.0.
+-- To create a 'fast forward' effect, use values higher than 1.0.
+-- since v0.8
+-- warning It will affect EVERY scheduled selector / action. -- @function [parent=#Scheduler] setTimeScale -- @param self --- @param #float float +-- @param #float timeScale -------------------------------- +-- -- @function [parent=#Scheduler] getTimeScale -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- js ctor -- @function [parent=#Scheduler] Scheduler -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ScrollView.lua b/cocos/scripting/lua-bindings/auto/api/ScrollView.lua index f1a9bab896..1cd19f24c4 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScrollView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScrollView.lua @@ -5,177 +5,221 @@ -- @parent_module ccui -------------------------------- +-- Scroll inner container to top boundary of scrollview. -- @function [parent=#ScrollView] scrollToTop -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Scroll inner container to horizontal percent position of scrollview. -- @function [parent=#ScrollView] scrollToPercentHorizontal -- @param self --- @param #float float --- @param #float float --- @param #bool bool +-- @param #float percent +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- -- @function [parent=#ScrollView] isInertiaScrollEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Scroll inner container to both direction percent position of scrollview. -- @function [parent=#ScrollView] scrollToPercentBothDirection -- @param self --- @param #vec2_table vec2 --- @param #float float --- @param #bool bool +-- @param #vec2_table percent +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Gets scroll direction of scrollview.
+-- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
+-- return Direction -- @function [parent=#ScrollView] getDirection -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Scroll inner container to bottom and left boundary of scrollview. -- @function [parent=#ScrollView] scrollToBottomLeft -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Gets inner container of scrollview.
+-- Inner container is the container of scrollview's children.
+-- return inner container. -- @function [parent=#ScrollView] getInnerContainer -- @param self -- @return Layout#Layout ret (return value: ccui.Layout) -------------------------------- +-- Move inner container to bottom boundary of scrollview. -- @function [parent=#ScrollView] jumpToBottom -- @param self -------------------------------- +-- Changes scroll direction of scrollview.
+-- see Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
+-- param dir -- @function [parent=#ScrollView] setDirection -- @param self --- @param #int direction +-- @param #int dir -------------------------------- +-- Scroll inner container to top and left boundary of scrollview. -- @function [parent=#ScrollView] scrollToTopLeft -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Move inner container to top and right boundary of scrollview. -- @function [parent=#ScrollView] jumpToTopRight -- @param self -------------------------------- +-- Move inner container to bottom and left boundary of scrollview. -- @function [parent=#ScrollView] jumpToBottomLeft -- @param self -------------------------------- +-- Changes inner container size of scrollview.
+-- Inner container size must be larger than or equal scrollview's size.
+-- param inner container size. -- @function [parent=#ScrollView] setInnerContainerSize -- @param self -- @param #size_table size -------------------------------- +-- Gets inner container size of scrollview.
+-- Inner container size must be larger than or equal scrollview's size.
+-- return inner container size. -- @function [parent=#ScrollView] getInnerContainerSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#ScrollView] isBounceEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Move inner container to vertical percent position of scrollview. -- @function [parent=#ScrollView] jumpToPercentVertical -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#ScrollView] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- -- @function [parent=#ScrollView] setInertiaScrollEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Move inner container to top and left boundary of scrollview. -- @function [parent=#ScrollView] jumpToTopLeft -- @param self -------------------------------- +-- Move inner container to horizontal percent position of scrollview. -- @function [parent=#ScrollView] jumpToPercentHorizontal -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- Move inner container to bottom and right boundary of scrollview. -- @function [parent=#ScrollView] jumpToBottomRight -- @param self -------------------------------- +-- -- @function [parent=#ScrollView] setBounceEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Move inner container to top boundary of scrollview. -- @function [parent=#ScrollView] jumpToTop -- @param self -------------------------------- +-- Scroll inner container to left boundary of scrollview. -- @function [parent=#ScrollView] scrollToLeft -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Move inner container to both direction percent position of scrollview. -- @function [parent=#ScrollView] jumpToPercentBothDirection -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table percent -------------------------------- +-- Scroll inner container to vertical percent position of scrollview. -- @function [parent=#ScrollView] scrollToPercentVertical -- @param self --- @param #float float --- @param #float float --- @param #bool bool +-- @param #float percent +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Scroll inner container to bottom boundary of scrollview. -- @function [parent=#ScrollView] scrollToBottom -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Scroll inner container to bottom and right boundary of scrollview. -- @function [parent=#ScrollView] scrollToBottomRight -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Move inner container to left boundary of scrollview. -- @function [parent=#ScrollView] jumpToLeft -- @param self -------------------------------- +-- Scroll inner container to right boundary of scrollview. -- @function [parent=#ScrollView] scrollToRight -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Move inner container to right boundary of scrollview. -- @function [parent=#ScrollView] jumpToRight -- @param self -------------------------------- +-- Scroll inner container to top and right boundary of scrollview. -- @function [parent=#ScrollView] scrollToTopRight -- @param self --- @param #float float --- @param #bool bool +-- @param #float time +-- @param #bool attenuated -------------------------------- +-- Allocates and initializes. -- @function [parent=#ScrollView] create -- @param self -- @return ScrollView#ScrollView ret (return value: ccui.ScrollView) -------------------------------- +-- -- @function [parent=#ScrollView] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) @@ -187,52 +231,66 @@ -- @overload self, cc.Node, int, string -- @function [parent=#ScrollView] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #string str +-- @param #cc.Node child +-- @param #int zOrder +-- @param #string name -------------------------------- +-- -- @function [parent=#ScrollView] getChildByName -- @param self --- @param #string str +-- @param #string name -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#ScrollView] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#ScrollView] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- Gets LayoutType.
+-- see LayoutType
+-- return LayoutType -- @function [parent=#ScrollView] getLayoutType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ScrollView] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#ScrollView] removeAllChildren -- @param self -------------------------------- +-- When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
+-- If the widget is not in a layout, it will return itself
+-- param dir the direction to look for the next focused widget in a layout
+-- param current the current focused widget
+-- return the next focused widget in a layout -- @function [parent=#ScrollView] findNextFocusedWidget -- @param self --- @param #int focusdirection --- @param #ccui.Widget widget +-- @param #int direction +-- @param #ccui.Widget current -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- -- @function [parent=#ScrollView] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleaup -------------------------------- -- @overload self @@ -242,22 +300,28 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- -- @function [parent=#ScrollView] getChildByTag -- @param self --- @param #int int +-- @param #int tag -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#ScrollView] getChildrenCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Sets LayoutType.
+-- see LayoutType
+-- param LayoutType -- @function [parent=#ScrollView] setLayoutType -- @param self -- @param #int type -------------------------------- +-- Default constructor -- @function [parent=#ScrollView] ScrollView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Sequence.lua b/cocos/scripting/lua-bindings/auto/api/Sequence.lua index feda1c3c1f..965c25b93d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sequence.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sequence.lua @@ -5,27 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Sequence] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Sequence] clone -- @param self -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- +-- -- @function [parent=#Sequence] stop -- @param self -------------------------------- +-- -- @function [parent=#Sequence] reverse -- @param self -- @return Sequence#Sequence ret (return value: cc.Sequence) -------------------------------- +-- -- @function [parent=#Sequence] update -- @param self --- @param #float float +-- @param #float t return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua b/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua index 2458883412..f16b0bca3f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Shaky3D.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates the action with a range, shake Z vertices, a grid and duration -- @function [parent=#Shaky3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #int int --- @param #bool bool +-- @param #float duration +-- @param #size_table gridSize +-- @param #int range +-- @param #bool shakeZ -- @return Shaky3D#Shaky3D ret (return value: cc.Shaky3D) -------------------------------- +-- -- @function [parent=#Shaky3D] clone -- @param self -- @return Shaky3D#Shaky3D ret (return value: cc.Shaky3D) -------------------------------- +-- -- @function [parent=#Shaky3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua index dbf2de70f6..f8f94b06e4 100644 --- a/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/ShakyTiles3D.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates the action with a range, whether or not to shake Z vertices, a grid size, and duration -- @function [parent=#ShakyTiles3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #int int --- @param #bool bool +-- @param #float duration +-- @param #size_table gridSize +-- @param #int range +-- @param #bool shakeZ -- @return ShakyTiles3D#ShakyTiles3D ret (return value: cc.ShakyTiles3D) -------------------------------- +-- -- @function [parent=#ShakyTiles3D] clone -- @param self -- @return ShakyTiles3D#ShakyTiles3D ret (return value: cc.ShakyTiles3D) -------------------------------- +-- -- @function [parent=#ShakyTiles3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua index 6e59cf6e15..68a37cd638 100644 --- a/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/ShatteredTiles3D.lua @@ -5,22 +5,25 @@ -- @parent_module cc -------------------------------- +-- creates the action with a range, whether of not to shatter Z vertices, a grid size and duration -- @function [parent=#ShatteredTiles3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #int int --- @param #bool bool +-- @param #float duration +-- @param #size_table gridSize +-- @param #int range +-- @param #bool shatterZ -- @return ShatteredTiles3D#ShatteredTiles3D ret (return value: cc.ShatteredTiles3D) -------------------------------- +-- -- @function [parent=#ShatteredTiles3D] clone -- @param self -- @return ShatteredTiles3D#ShatteredTiles3D ret (return value: cc.ShatteredTiles3D) -------------------------------- +-- -- @function [parent=#ShatteredTiles3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Show.lua b/cocos/scripting/lua-bindings/auto/api/Show.lua index a09d54705a..7b53551bf0 100644 --- a/cocos/scripting/lua-bindings/auto/api/Show.lua +++ b/cocos/scripting/lua-bindings/auto/api/Show.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- Allocates and initializes the action -- @function [parent=#Show] create -- @param self -- @return Show#Show ret (return value: cc.Show) -------------------------------- +-- -- @function [parent=#Show] clone -- @param self -- @return Show#Show ret (return value: cc.Show) -------------------------------- +-- -- @function [parent=#Show] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#Show] reverse -- @param self -- @return ActionInstant#ActionInstant ret (return value: cc.ActionInstant) diff --git a/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua b/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua index 231f1e070b..c8e89ce80c 100644 --- a/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua @@ -5,32 +5,37 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#ShuffleTiles] getDelta -- @param self --- @param #size_table size +-- @param #size_table pos -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- creates the action with a random seed, the grid size and the duration -- @function [parent=#ShuffleTiles] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int seed -- @return ShuffleTiles#ShuffleTiles ret (return value: cc.ShuffleTiles) -------------------------------- +-- -- @function [parent=#ShuffleTiles] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#ShuffleTiles] clone -- @param self -- @return ShuffleTiles#ShuffleTiles ret (return value: cc.ShuffleTiles) -------------------------------- +-- -- @function [parent=#ShuffleTiles] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua b/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua index c56c9104b3..2cb9410358 100644 --- a/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua +++ b/cocos/scripting/lua-bindings/auto/api/SimpleAudioEngine.lua @@ -4,114 +4,181 @@ -- @parent_module cc -------------------------------- +-- brief Preload background music
+-- param pszFilePath The path of the background music file.
+-- js preloadMusic
+-- lua preloadMusic -- @function [parent=#SimpleAudioEngine] preloadBackgroundMusic -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- brief Stop playing background music
+-- param bReleaseData If release the background music data or not.As default value is false
+-- js stopMusic
+-- lua stopMusic -- @function [parent=#SimpleAudioEngine] stopBackgroundMusic -- @param self -------------------------------- +-- brief Stop all playing sound effects -- @function [parent=#SimpleAudioEngine] stopAllEffects -- @param self -------------------------------- +-- brief The volume of the background music within the range of 0.0 as the minimum and 1.0 as the maximum.
+-- js getMusicVolume
+-- lua getMusicVolume -- @function [parent=#SimpleAudioEngine] getBackgroundMusicVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- brief Resume playing background music
+-- js resumeMusic
+-- lua resumeMusic -- @function [parent=#SimpleAudioEngine] resumeBackgroundMusic -- @param self -------------------------------- +-- brief Set the volume of background music
+-- param volume must be within the range of 0.0 as the minimum and 1.0 as the maximum.
+-- js setMusicVolume
+-- lua setMusicVolume -- @function [parent=#SimpleAudioEngine] setBackgroundMusicVolume -- @param self --- @param #float float +-- @param #float volume -------------------------------- +-- brief preload a compressed audio file
+-- details the compressed audio will be decoded to wave, then written into an internal buffer in SimpleAudioEngine
+-- param pszFilePath The path of the effect file -- @function [parent=#SimpleAudioEngine] preloadEffect -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- brief Indicates whether the background music is playing
+-- return true if the background music is playing, otherwise false
+-- js isMusicPlaying
+-- lua isMusicPlaying -- @function [parent=#SimpleAudioEngine] isBackgroundMusicPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief The volume of the effects within the range of 0.0 as the minimum and 1.0 as the maximum. -- @function [parent=#SimpleAudioEngine] getEffectsVolume -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- brief Indicates whether any background music can be played or not.
+-- return true if background music can be played, otherwise false.
+-- js willPlayMusic
+-- lua willPlayMusic -- @function [parent=#SimpleAudioEngine] willPlayBackgroundMusic -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- brief Pause playing sound effect
+-- param nSoundId The return value of function playEffect -- @function [parent=#SimpleAudioEngine] pauseEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- brief Play sound effect with a file path, pitch, pan and gain
+-- param pszFilePath The path of the effect file.
+-- param bLoop Determines whether to loop the effect playing or not. The default value is false.
+-- param pitch Frequency, normal value is 1.0. Will also change effect play time.
+-- param pan Stereo effect, in the range of [-1..1] where -1 enables only left channel.
+-- param gain Volume, in the range of [0..1]. The normal value is 1.
+-- return the OpenAL source id
+-- note Full support is under development, now there are limitations:
+-- - no pitch effect on Samsung Galaxy S2 with OpenSL backend enabled;
+-- - no pitch/pan/gain on emscrippten, win32, marmalade. -- @function [parent=#SimpleAudioEngine] playEffect -- @param self --- @param #char char --- @param #bool bool --- @param #float float --- @param #float float --- @param #float float +-- @param #char pszFilePath +-- @param #bool bLoop +-- @param #float pitch +-- @param #float pan +-- @param #float gain -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- +-- brief Rewind playing background music
+-- js rewindMusic
+-- lua rewindMusic -- @function [parent=#SimpleAudioEngine] rewindBackgroundMusic -- @param self -------------------------------- +-- brief Play background music
+-- param pszFilePath The path of the background music file,or the FileName of T_SoundResInfo
+-- param bLoop Whether the background music loop or not
+-- js playMusic
+-- lua playMusic -- @function [parent=#SimpleAudioEngine] playBackgroundMusic -- @param self --- @param #char char --- @param #bool bool +-- @param #char pszFilePath +-- @param #bool bLoop -------------------------------- +-- brief Resume all playing sound effect -- @function [parent=#SimpleAudioEngine] resumeAllEffects -- @param self -------------------------------- +-- brief Set the volume of sound effects
+-- param volume must be within the range of 0.0 as the minimum and 1.0 as the maximum. -- @function [parent=#SimpleAudioEngine] setEffectsVolume -- @param self --- @param #float float +-- @param #float volume -------------------------------- +-- brief Stop playing sound effect
+-- param nSoundId The return value of function playEffect -- @function [parent=#SimpleAudioEngine] stopEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- brief Pause playing background music
+-- js pauseMusic
+-- lua pauseMusic -- @function [parent=#SimpleAudioEngine] pauseBackgroundMusic -- @param self -------------------------------- +-- brief Pause all playing sound effect -- @function [parent=#SimpleAudioEngine] pauseAllEffects -- @param self -------------------------------- +-- brief unload the preloaded effect from internal buffer
+-- param pszFilePath The path of the effect file -- @function [parent=#SimpleAudioEngine] unloadEffect -- @param self --- @param #char char +-- @param #char pszFilePath -------------------------------- +-- brief Resume playing sound effect
+-- param nSoundId The return value of function playEffect -- @function [parent=#SimpleAudioEngine] resumeEffect -- @param self --- @param #unsigned int int +-- @param #unsigned int nSoundId -------------------------------- +-- brief Release the shared Engine object
+-- warning It must be called before the application exit, or a memory leak will be casued. -- @function [parent=#SimpleAudioEngine] end -- @param self -------------------------------- +-- brief Get the shared Engine object,it will new one when first time be called -- @function [parent=#SimpleAudioEngine] getInstance -- @param self -- @return SimpleAudioEngine#SimpleAudioEngine ret (return value: cc.SimpleAudioEngine) diff --git a/cocos/scripting/lua-bindings/auto/api/Skeleton.lua b/cocos/scripting/lua-bindings/auto/api/Skeleton.lua index 893bef22d1..51d4c7a9e6 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skeleton.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skeleton.lua @@ -5,49 +5,59 @@ -- @parent_module sp -------------------------------- +-- -- @function [parent=#Skeleton] setToSetupPose -- @param self -------------------------------- +-- -- @function [parent=#Skeleton] setBlendFunc -- @param self --- @param #cc.BlendFunc blendfunc +-- @param #cc.BlendFunc func -------------------------------- +-- -- @function [parent=#Skeleton] onDraw -- @param self --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#Skeleton] setSlotsToSetupPose -- @param self -------------------------------- +-- -- @function [parent=#Skeleton] getBlendFunc -- @param self -- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) -------------------------------- +-- -- @function [parent=#Skeleton] setSkin -- @param self --- @param #char char +-- @param #char skinName -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Skeleton] setBonesToSetupPose -- @param self -------------------------------- +-- -- @function [parent=#Skeleton] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- -- @function [parent=#Skeleton] onEnter -- @param self -------------------------------- +-- -- @function [parent=#Skeleton] onExit -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua b/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua index 3f5fb38b02..b4271af29d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skeleton3D.lua @@ -5,39 +5,46 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Skeleton3D] getBoneByName -- @param self --- @param #string str +-- @param #string id -- @return Bone3D#Bone3D ret (return value: cc.Bone3D) -------------------------------- +-- -- @function [parent=#Skeleton3D] getRootBone -- @param self --- @param #int int +-- @param #int index -- @return Bone3D#Bone3D ret (return value: cc.Bone3D) -------------------------------- +-- refresh bone world matrix -- @function [parent=#Skeleton3D] updateBoneMatrix -- @param self -------------------------------- +-- get bone -- @function [parent=#Skeleton3D] getBoneByIndex -- @param self --- @param #unsigned int int +-- @param #unsigned int index -- @return Bone3D#Bone3D ret (return value: cc.Bone3D) -------------------------------- +-- get & set root bone -- @function [parent=#Skeleton3D] getRootCount -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- get bone index -- @function [parent=#Skeleton3D] getBoneIndex -- @param self --- @param #cc.Bone3D bone3d +-- @param #cc.Bone3D bone -- @return int#int ret (return value: int) -------------------------------- +-- get total bone count -- @function [parent=#Skeleton3D] getBoneCount -- @param self -- @return long#long ret (return value: long) diff --git a/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua b/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua index a3cd0aad24..c57eb13010 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua @@ -5,17 +5,20 @@ -- @parent_module sp -------------------------------- +-- -- @function [parent=#SkeletonAnimation] setMix -- @param self --- @param #char char --- @param #char char --- @param #float float +-- @param #char fromAnimation +-- @param #char toAnimation +-- @param #float duration -------------------------------- +-- -- @function [parent=#SkeletonAnimation] clearTracks -- @param self -------------------------------- +-- -- @function [parent=#SkeletonAnimation] clearTrack -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/SkewBy.lua b/cocos/scripting/lua-bindings/auto/api/SkewBy.lua index 4aeb6a83ac..637696e2cc 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkewBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkewBy.lua @@ -5,24 +5,28 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#SkewBy] create -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float t +-- @param #float deltaSkewX +-- @param #float deltaSkewY -- @return SkewBy#SkewBy ret (return value: cc.SkewBy) -------------------------------- +-- -- @function [parent=#SkewBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#SkewBy] clone -- @param self -- @return SkewBy#SkewBy ret (return value: cc.SkewBy) -------------------------------- +-- -- @function [parent=#SkewBy] reverse -- @param self -- @return SkewBy#SkewBy ret (return value: cc.SkewBy) diff --git a/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua b/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua index 3616dd1b88..53b967470e 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkewFrame.lua @@ -5,41 +5,49 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#SkewFrame] getSkewY -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#SkewFrame] setSkewX -- @param self --- @param #float float +-- @param #float skewx -------------------------------- +-- -- @function [parent=#SkewFrame] setSkewY -- @param self --- @param #float float +-- @param #float skewy -------------------------------- +-- -- @function [parent=#SkewFrame] getSkewX -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#SkewFrame] create -- @param self -- @return SkewFrame#SkewFrame ret (return value: ccs.SkewFrame) -------------------------------- +-- -- @function [parent=#SkewFrame] apply -- @param self --- @param #float float +-- @param #float percent -------------------------------- +-- -- @function [parent=#SkewFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#SkewFrame] SkewFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/SkewTo.lua b/cocos/scripting/lua-bindings/auto/api/SkewTo.lua index 65979d1638..be1840199a 100644 --- a/cocos/scripting/lua-bindings/auto/api/SkewTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/SkewTo.lua @@ -5,31 +5,36 @@ -- @parent_module cc -------------------------------- +-- creates the action -- @function [parent=#SkewTo] create -- @param self --- @param #float float --- @param #float float --- @param #float float +-- @param #float t +-- @param #float sx +-- @param #float sy -- @return SkewTo#SkewTo ret (return value: cc.SkewTo) -------------------------------- +-- -- @function [parent=#SkewTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#SkewTo] clone -- @param self -- @return SkewTo#SkewTo ret (return value: cc.SkewTo) -------------------------------- +-- -- @function [parent=#SkewTo] reverse -- @param self -- @return SkewTo#SkewTo ret (return value: cc.SkewTo) -------------------------------- +-- -- @function [parent=#SkewTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Skin.lua b/cocos/scripting/lua-bindings/auto/api/Skin.lua index 10b1e77183..c0f870f33f 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skin.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skin.lua @@ -5,37 +5,44 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#Skin] getBone -- @param self -- @return Bone#Bone ret (return value: ccs.Bone) -------------------------------- +-- -- @function [parent=#Skin] getNodeToWorldTransformAR -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- -- @function [parent=#Skin] initWithFile -- @param self --- @param #string str +-- @param #string filename -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Skin] getDisplayName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Skin] updateArmatureTransform -- @param self -------------------------------- +-- -- @function [parent=#Skin] initWithSpriteFrameName -- @param self --- @param #string str +-- @param #string spriteFrameName -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Skin] setBone -- @param self -- @param #ccs.Bone bone @@ -45,32 +52,37 @@ -- @overload self -- @function [parent=#Skin] create -- @param self --- @param #string str +-- @param #string pszFileName -- @return Skin#Skin ret (retunr value: ccs.Skin) -------------------------------- +-- -- @function [parent=#Skin] createWithSpriteFrameName -- @param self --- @param #string str +-- @param #string pszSpriteFrameName -- @return Skin#Skin ret (return value: ccs.Skin) -------------------------------- +-- -- @function [parent=#Skin] updateTransform -- @param self -------------------------------- +-- -- @function [parent=#Skin] getNodeToWorldTransform -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) -------------------------------- +-- -- @function [parent=#Skin] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- js ctor -- @function [parent=#Skin] Skin -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Slider.lua b/cocos/scripting/lua-bindings/auto/api/Slider.lua index ade0016d08..69dc0e637e 100644 --- a/cocos/scripting/lua-bindings/auto/api/Slider.lua +++ b/cocos/scripting/lua-bindings/auto/api/Slider.lua @@ -5,130 +5,174 @@ -- @parent_module ccui -------------------------------- +-- Changes the progress direction of slider.
+-- param percent percent value from 1 to 100. -- @function [parent=#Slider] setPercent -- @param self --- @param #int int +-- @param #int percent -------------------------------- +-- Load dark state texture for slider ball.
+-- param disabled dark state texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTextureDisabled -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string disabled +-- @param #int texType -------------------------------- +-- Load normal state texture for slider ball.
+-- param normal normal state texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTextureNormal -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string normal +-- @param #int texType -------------------------------- +-- Load texture for slider bar.
+-- param fileName file name of texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadBarTexture -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string fileName +-- @param #int texType -------------------------------- +-- Load dark state texture for slider progress bar.
+-- param fileName file path of texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadProgressBarTexture -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string fileName +-- @param #int texType -------------------------------- +-- Load textures for slider ball.
+-- param slider ball normal normal state texture.
+-- param slider ball selected selected state texture.
+-- param slider ball disabled dark state texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTextures -- @param self --- @param #string str --- @param #string str --- @param #string str --- @param #int texturerestype +-- @param #string normal +-- @param #string pressed +-- @param #string disabled +-- @param #int texType -------------------------------- +-- Sets capinsets for slider, if slider is using scale9 renderer.
+-- param capInsets capinsets for slider -- @function [parent=#Slider] setCapInsetProgressBarRebderer -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- Sets capinsets for slider, if slider is using scale9 renderer.
+-- param capInsets capinsets for slider -- @function [parent=#Slider] setCapInsetsBarRenderer -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- -- @function [parent=#Slider] getCapInsetsProgressBarRebderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Sets if slider is using scale9 renderer.
+-- param true that using scale9 renderer, false otherwise. -- @function [parent=#Slider] setScale9Enabled -- @param self --- @param #bool bool +-- @param #bool able -------------------------------- +-- Sets capinsets for slider, if slider is using scale9 renderer.
+-- param capInsets capinsets for slider -- @function [parent=#Slider] setCapInsets -- @param self --- @param #rect_table rect +-- @param #rect_table capInsets -------------------------------- +-- -- @function [parent=#Slider] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- Load selected state texture for slider ball.
+-- param selected selected state texture.
+-- param texType @see TextureResType -- @function [parent=#Slider] loadSlidBallTexturePressed -- @param self --- @param #string str --- @param #int texturerestype +-- @param #string pressed +-- @param #int texType -------------------------------- +-- -- @function [parent=#Slider] isScale9Enabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Slider] getCapInsetsBarRenderer -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Gets the progress direction of slider.
+-- return percent percent value from 1 to 100. -- @function [parent=#Slider] getPercent -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Allocates and initializes. -- @function [parent=#Slider] create -- @param self -- @return Slider#Slider ret (return value: ccui.Slider) -------------------------------- +-- -- @function [parent=#Slider] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#Slider] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#Slider] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#Slider] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Slider] hitTest -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pt -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Slider] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Default constructor -- @function [parent=#Slider] Slider -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Spawn.lua b/cocos/scripting/lua-bindings/auto/api/Spawn.lua index 8188b52d7c..1bdc516a1d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Spawn.lua +++ b/cocos/scripting/lua-bindings/auto/api/Spawn.lua @@ -5,27 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Spawn] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Spawn] clone -- @param self -- @return Spawn#Spawn ret (return value: cc.Spawn) -------------------------------- +-- -- @function [parent=#Spawn] stop -- @param self -------------------------------- +-- -- @function [parent=#Spawn] reverse -- @param self -- @return Spawn#Spawn ret (return value: cc.Spawn) -------------------------------- +-- -- @function [parent=#Spawn] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Speed.lua b/cocos/scripting/lua-bindings/auto/api/Speed.lua index f45b157ffa..20fdf2985b 100644 --- a/cocos/scripting/lua-bindings/auto/api/Speed.lua +++ b/cocos/scripting/lua-bindings/auto/api/Speed.lua @@ -5,57 +5,68 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Speed] setInnerAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -------------------------------- +-- alter the speed of the inner function in runtime -- @function [parent=#Speed] setSpeed -- @param self --- @param #float float +-- @param #float speed -------------------------------- +-- -- @function [parent=#Speed] getInnerAction -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#Speed] getSpeed -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- create the action -- @function [parent=#Speed] create -- @param self --- @param #cc.ActionInterval actioninterval --- @param #float float +-- @param #cc.ActionInterval action +-- @param #float speed -- @return Speed#Speed ret (return value: cc.Speed) -------------------------------- +-- -- @function [parent=#Speed] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#Speed] reverse -- @param self -- @return Speed#Speed ret (return value: cc.Speed) -------------------------------- +-- -- @function [parent=#Speed] clone -- @param self -- @return Speed#Speed ret (return value: cc.Speed) -------------------------------- +-- -- @function [parent=#Speed] stop -- @param self -------------------------------- +-- -- @function [parent=#Speed] step -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Speed] isDone -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/SplitCols.lua b/cocos/scripting/lua-bindings/auto/api/SplitCols.lua index 96730e20c7..852bd2a2fc 100644 --- a/cocos/scripting/lua-bindings/auto/api/SplitCols.lua +++ b/cocos/scripting/lua-bindings/auto/api/SplitCols.lua @@ -5,25 +5,29 @@ -- @parent_module cc -------------------------------- +-- creates the action with the number of columns to split and the duration -- @function [parent=#SplitCols] create -- @param self --- @param #float float --- @param #unsigned int int +-- @param #float duration +-- @param #unsigned int cols -- @return SplitCols#SplitCols ret (return value: cc.SplitCols) -------------------------------- +-- -- @function [parent=#SplitCols] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#SplitCols] clone -- @param self -- @return SplitCols#SplitCols ret (return value: cc.SplitCols) -------------------------------- +-- -- @function [parent=#SplitCols] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SplitRows.lua b/cocos/scripting/lua-bindings/auto/api/SplitRows.lua index 1e362c2676..2dc41380a3 100644 --- a/cocos/scripting/lua-bindings/auto/api/SplitRows.lua +++ b/cocos/scripting/lua-bindings/auto/api/SplitRows.lua @@ -5,25 +5,29 @@ -- @parent_module cc -------------------------------- +-- creates the action with the number of rows to split and the duration -- @function [parent=#SplitRows] create -- @param self --- @param #float float --- @param #unsigned int int +-- @param #float duration +-- @param #unsigned int rows -- @return SplitRows#SplitRows ret (return value: cc.SplitRows) -------------------------------- +-- -- @function [parent=#SplitRows] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#SplitRows] clone -- @param self -- @return SplitRows#SplitRows ret (return value: cc.SplitRows) -------------------------------- +-- -- @function [parent=#SplitRows] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Sprite.lua index 7be402618d..1450fafc8d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite.lua @@ -9,46 +9,57 @@ -- @overload self, string -- @function [parent=#Sprite] setSpriteFrame -- @param self --- @param #string str +-- @param #string spriteFrameName -------------------------------- -- @overload self, cc.Texture2D -- @overload self, string -- @function [parent=#Sprite] setTexture -- @param self --- @param #string str +-- @param #string filename -------------------------------- +-- returns the Texture2D object used by the sprite -- @function [parent=#Sprite] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- Sets whether the sprite should be flipped vertically or not.
+-- param flippedY true if the sprite should be flipped vertically, false otherwise. -- @function [parent=#Sprite] setFlippedY -- @param self --- @param #bool bool +-- @param #bool flippedY -------------------------------- +-- Sets whether the sprite should be flipped horizontally or not.
+-- param flippedX true if the sprite should be flipped horizontally, false otherwise. -- @function [parent=#Sprite] setFlippedX -- @param self --- @param #bool bool +-- @param #bool flippedX -------------------------------- +-- Returns the batch node object if this sprite is rendered by SpriteBatchNode
+-- return The SpriteBatchNode object if this sprite is rendered by SpriteBatchNode,
+-- nullptr if the sprite isn't used batch node. -- @function [parent=#Sprite] getBatchNode -- @param self -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- +-- Gets the offset position of the sprite. Calculated automatically by editors like Zwoptex. -- @function [parent=#Sprite] getOffsetPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Sprite] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- Updates the quad according the rotation, position, scale values. -- @function [parent=#Sprite] updateTransform -- @param self @@ -58,82 +69,121 @@ -- @function [parent=#Sprite] setTextureRect -- @param self -- @param #rect_table rect --- @param #bool bool --- @param #size_table size +-- @param #bool rotated +-- @param #size_table untrimmedSize -------------------------------- +-- Returns whether or not a SpriteFrame is being displayed -- @function [parent=#Sprite] isFrameDisplayed -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame pFrame -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the index used on the TextureAtlas. -- @function [parent=#Sprite] getAtlasIndex -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Sets the batch node to sprite
+-- warning This method is not recommended for game developers. Sample code for using batch node
+-- code
+-- SpriteBatchNode *batch = SpriteBatchNode::create("Images/grossini_dance_atlas.png", 15);
+-- Sprite *sprite = Sprite::createWithTexture(batch->getTexture(), Rect(0, 0, 57, 57));
+-- batch->addChild(sprite);
+-- layer->addChild(batch);
+-- endcode -- @function [parent=#Sprite] setBatchNode -- @param self --- @param #cc.SpriteBatchNode spritebatchnode +-- @param #cc.SpriteBatchNode spriteBatchNode -------------------------------- +-- / @{/ @name Animation methods
+-- Changes the display frame with animation name and index.
+-- The animation name will be get from the AnimationCache -- @function [parent=#Sprite] setDisplayFrameWithAnimationName -- @param self --- @param #string str --- @param #long long +-- @param #string animationName +-- @param #long frameIndex -------------------------------- +-- Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode -- @function [parent=#Sprite] setTextureAtlas -- @param self --- @param #cc.TextureAtlas textureatlas +-- @param #cc.TextureAtlas pobTextureAtlas -------------------------------- +-- Returns the current displayed frame. -- @function [parent=#Sprite] getSpriteFrame -- @param self -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- +-- Whether or not the Sprite needs to be updated in the Atlas.
+-- return true if the sprite needs to be updated in the Atlas, false otherwise. -- @function [parent=#Sprite] isDirty -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the index used on the TextureAtlas.
+-- warning Don't modify this value unless you know what you are doing -- @function [parent=#Sprite] setAtlasIndex -- @param self --- @param #long long +-- @param #long atlasIndex -------------------------------- +-- Makes the Sprite to be updated in the Atlas. -- @function [parent=#Sprite] setDirty -- @param self --- @param #bool bool +-- @param #bool dirty -------------------------------- +-- Returns whether or not the texture rectangle is rotated. -- @function [parent=#Sprite] isTextureRectRotated -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Returns the rect of the Sprite in points -- @function [parent=#Sprite] getTextureRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode -- @function [parent=#Sprite] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- +-- Returns the flag which indicates whether the sprite is flipped horizontally or not.
+-- It only flips the texture of the sprite, and not the texture of the sprite's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- sprite->setScaleX(sprite->getScaleX() * -1);
+-- return true if the sprite is flipped horizontally, false otherwise. -- @function [parent=#Sprite] isFlippedX -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Return the flag which indicates whether the sprite is flipped vertically or not.
+-- It only flips the texture of the sprite, and not the texture of the sprite's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- sprite->setScaleY(sprite->getScaleY() * -1);
+-- return true if the sprite is flipped vertically, false otherwise. -- @function [parent=#Sprite] isFlippedY -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets the vertex rect.
+-- It will be called internally by setTextureRect.
+-- Useful if you want to create 2x images from SD images in Retina Display.
+-- Do not call it manually. Use setTextureRect instead. -- @function [parent=#Sprite] setVertexRect -- @param self -- @param #rect_table rect @@ -144,7 +194,7 @@ -- @overload self, string, rect_table -- @function [parent=#Sprite] create -- @param self --- @param #string str +-- @param #string filename -- @param #rect_table rect -- @return Sprite#Sprite ret (retunr value: cc.Sprite) @@ -153,131 +203,157 @@ -- @overload self, cc.Texture2D -- @function [parent=#Sprite] createWithTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -- @param #rect_table rect --- @param #bool bool +-- @param #bool rotated -- @return Sprite#Sprite ret (retunr value: cc.Sprite) -------------------------------- +-- Creates a sprite with an sprite frame name.
+-- A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param.
+-- If the SpriteFrame doesn't exist it will raise an exception.
+-- param spriteFrameName A null terminated string which indicates the sprite frame name.
+-- return An autoreleased sprite object -- @function [parent=#Sprite] createWithSpriteFrameName -- @param self --- @param #string str +-- @param #string spriteFrameName -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- Creates a sprite with an sprite frame.
+-- param spriteFrame A sprite frame which involves a texture and a rect
+-- return An autoreleased sprite object -- @function [parent=#Sprite] createWithSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe +-- @param #cc.SpriteFrame spriteFrame -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- -- @function [parent=#Sprite] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- -- @overload self, cc.Node, int, string -- @overload self, cc.Node, int, int -- @function [parent=#Sprite] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#Sprite] setScaleY -- @param self --- @param #float float +-- @param #float scaleY -------------------------------- +-- / @{/ @name Functions inherited from Node -- @function [parent=#Sprite] setScaleX -- @param self --- @param #float float +-- @param #float scaleX -------------------------------- +-- -- @function [parent=#Sprite] isOpacityModifyRGB -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Sprite] setPositionZ -- @param self --- @param #float float +-- @param #float positionZ -------------------------------- +-- -- @function [parent=#Sprite] setAnchorPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table anchor -------------------------------- +-- -- @function [parent=#Sprite] setRotationSkewX -- @param self --- @param #float float +-- @param #float rotationX -------------------------------- +-- / @} -- @function [parent=#Sprite] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Sprite] setRotationSkewY -- @param self --- @param #float float +-- @param #float rotationY -------------------------------- -- @overload self, float -- @overload self, float, float -- @function [parent=#Sprite] setScale -- @param self --- @param #float float --- @param #float float +-- @param #float scaleX +-- @param #float scaleY -------------------------------- +-- -- @function [parent=#Sprite] reorderChild -- @param self --- @param #cc.Node node --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder -------------------------------- +-- -- @function [parent=#Sprite] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#Sprite] sortAllChildren -- @param self -------------------------------- +-- -- @function [parent=#Sprite] setOpacityModifyRGB -- @param self --- @param #bool bool +-- @param #bool modify -------------------------------- +-- -- @function [parent=#Sprite] setRotation -- @param self --- @param #float float +-- @param #float rotation -------------------------------- +-- -- @function [parent=#Sprite] setSkewY -- @param self --- @param #float float +-- @param #float sy -------------------------------- +-- -- @function [parent=#Sprite] setVisible -- @param self --- @param #bool bool +-- @param #bool bVisible -------------------------------- +-- -- @function [parent=#Sprite] setSkewX -- @param self --- @param #float float +-- @param #float sx -------------------------------- +-- -- @function [parent=#Sprite] ignoreAnchorPointForPosition -- @param self --- @param #bool bool +-- @param #bool value return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua index 281ad2ac27..002556c277 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua @@ -5,67 +5,78 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Sprite3D] setCullFaceEnabled -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- -- @overload self, cc.Texture2D -- @overload self, string -- @function [parent=#Sprite3D] setTexture -- @param self --- @param #string str +-- @param #string texFile -------------------------------- +-- remove all attach nodes -- @function [parent=#Sprite3D] removeAllAttachNode -- @param self -------------------------------- +-- -- @function [parent=#Sprite3D] setBlendFunc -- @param self --- @param #cc.BlendFunc blendfunc +-- @param #cc.BlendFunc blendFunc -------------------------------- +-- get mesh -- @function [parent=#Sprite3D] getMesh -- @param self -- @return Mesh#Mesh ret (return value: cc.Mesh) -------------------------------- +-- -- @function [parent=#Sprite3D] getBlendFunc -- @param self -- @return BlendFunc#BlendFunc ret (return value: cc.BlendFunc) -------------------------------- +-- -- @function [parent=#Sprite3D] setCullFace -- @param self --- @param #unsigned int int +-- @param #unsigned int cullFace -------------------------------- +-- remove attach node -- @function [parent=#Sprite3D] removeAttachNode -- @param self --- @param #string str +-- @param #string boneName -------------------------------- +-- get SubMeshState by index -- @function [parent=#Sprite3D] getMeshByIndex -- @param self --- @param #int int +-- @param #int index -- @return Mesh#Mesh ret (return value: cc.Mesh) -------------------------------- +-- get SubMeshState by Name -- @function [parent=#Sprite3D] getMeshByName -- @param self --- @param #string str +-- @param #string name -- @return Mesh#Mesh ret (return value: cc.Mesh) -------------------------------- +-- -- @function [parent=#Sprite3D] getSkeleton -- @param self -- @return Skeleton3D#Skeleton3D ret (return value: cc.Skeleton3D) -------------------------------- +-- get AttachNode by bone name, return nullptr if not exist -- @function [parent=#Sprite3D] getAttachNode -- @param self --- @param #string str +-- @param #string boneName -- @return AttachNode#AttachNode ret (return value: cc.AttachNode) -------------------------------- @@ -73,21 +84,25 @@ -- @overload self, string -- @function [parent=#Sprite3D] create -- @param self --- @param #string str --- @param #string str +-- @param #string modelPath +-- @param #string texturePath -- @return Sprite3D#Sprite3D ret (retunr value: cc.Sprite3D) -------------------------------- +-- Returns 2d bounding-box
+-- Note: the bouding-box is just get from the AABB which as Z=0, so that is not very accurate. -- @function [parent=#Sprite3D] getBoundingBox -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- set GLProgramState, you should bind attributes by yourself -- @function [parent=#Sprite3D] setGLProgramState -- @param self --- @param #cc.GLProgramState glprogramstate +-- @param #cc.GLProgramState glProgramState -------------------------------- +-- just rember bind attributes -- @function [parent=#Sprite3D] setGLProgram -- @param self -- @param #cc.GLProgram glprogram diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua b/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua index 66321568dd..51e356b39d 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua @@ -5,107 +5,131 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#SpriteBatchNode] appendChild -- @param self -- @param #cc.Sprite sprite -------------------------------- +-- -- @function [parent=#SpriteBatchNode] addSpriteWithoutQuad -- @param self --- @param #cc.Sprite sprite --- @param #int int --- @param #int int +-- @param #cc.Sprite child +-- @param #int z +-- @param #int aTag -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- +-- -- @function [parent=#SpriteBatchNode] reorderBatch -- @param self --- @param #bool bool +-- @param #bool reorder -------------------------------- +-- -- @function [parent=#SpriteBatchNode] removeAllChildrenWithCleanup -- @param self --- @param #bool bool +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#SpriteBatchNode] lowestAtlasIndexInChild -- @param self -- @param #cc.Sprite sprite -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#SpriteBatchNode] atlasIndexForChild -- @param self -- @param #cc.Sprite sprite --- @param #int int +-- @param #int z -- @return long#long ret (return value: long) -------------------------------- +-- sets the TextureAtlas object -- @function [parent=#SpriteBatchNode] setTextureAtlas -- @param self --- @param #cc.TextureAtlas textureatlas +-- @param #cc.TextureAtlas textureAtlas -------------------------------- +-- -- @function [parent=#SpriteBatchNode] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- -- @function [parent=#SpriteBatchNode] increaseAtlasCapacity -- @param self -------------------------------- +-- returns the TextureAtlas object -- @function [parent=#SpriteBatchNode] getTextureAtlas -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) -------------------------------- +-- Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.
+-- This method should be called only when you are dealing with very big AtlasSrite and when most of the Sprite won't be updated.
+-- For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont) -- @function [parent=#SpriteBatchNode] insertQuadFromSprite -- @param self -- @param #cc.Sprite sprite --- @param #long long +-- @param #long index -------------------------------- +-- -- @function [parent=#SpriteBatchNode] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- -- @function [parent=#SpriteBatchNode] rebuildIndexInOrder -- @param self --- @param #cc.Sprite sprite --- @param #long long +-- @param #cc.Sprite parent +-- @param #long index -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#SpriteBatchNode] highestAtlasIndexInChild -- @param self -- @param #cc.Sprite sprite -- @return long#long ret (return value: long) -------------------------------- +-- removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter.
+-- warning Removing a child from a SpriteBatchNode is very slow -- @function [parent=#SpriteBatchNode] removeChildAtIndex -- @param self --- @param #long long --- @param #bool bool +-- @param #long index +-- @param #bool doCleanup -------------------------------- +-- -- @function [parent=#SpriteBatchNode] removeSpriteFromAtlas -- @param self -- @param #cc.Sprite sprite -------------------------------- +-- creates a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.
+-- The capacity will be increased in 33% in runtime if it run out of space.
+-- The file will be loaded using the TextureMgr. -- @function [parent=#SpriteBatchNode] create -- @param self --- @param #string str --- @param #long long +-- @param #string fileImage +-- @param #long capacity -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- +-- creates a SpriteBatchNode with a texture2d and capacity of children.
+-- The capacity will be increased in 33% in runtime if it run out of space. -- @function [parent=#SpriteBatchNode] createWithTexture -- @param self --- @param #cc.Texture2D texture2d --- @param #long long +-- @param #cc.Texture2D tex +-- @param #long capacity -- @return SpriteBatchNode#SpriteBatchNode ret (return value: cc.SpriteBatchNode) -------------------------------- @@ -113,43 +137,49 @@ -- @overload self, cc.Node, int, int -- @function [parent=#SpriteBatchNode] addChild -- @param self --- @param #cc.Node node --- @param #int int --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder +-- @param #int tag -------------------------------- +-- -- @function [parent=#SpriteBatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#SpriteBatchNode] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#SpriteBatchNode] visit -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table parentTransform +-- @param #unsigned int parentFlags -------------------------------- +-- -- @function [parent=#SpriteBatchNode] sortAllChildren -- @param self -------------------------------- +-- -- @function [parent=#SpriteBatchNode] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#SpriteBatchNode] reorderChild -- @param self --- @param #cc.Node node --- @param #int int +-- @param #cc.Node child +-- @param #int zOrder return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua b/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua index 1f7cc32b52..4b0c6c07bc 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteDisplayData.lua @@ -5,16 +5,19 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#SpriteDisplayData] copy -- @param self --- @param #ccs.DisplayData displaydata +-- @param #ccs.DisplayData displayData -------------------------------- +-- -- @function [parent=#SpriteDisplayData] create -- @param self -- @return SpriteDisplayData#SpriteDisplayData ret (return value: ccs.SpriteDisplayData) -------------------------------- +-- js ctor -- @function [parent=#SpriteDisplayData] SpriteDisplayData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua b/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua index cca90af1d0..b71c6eeaad 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua @@ -5,86 +5,103 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#SpriteFrame] clone -- @param self -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- +-- -- @function [parent=#SpriteFrame] setRotated -- @param self --- @param #bool bool +-- @param #bool rotated -------------------------------- +-- set texture of the frame, the texture is retained -- @function [parent=#SpriteFrame] setTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D pobTexture -------------------------------- +-- -- @function [parent=#SpriteFrame] getOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#SpriteFrame] setRectInPixels -- @param self --- @param #rect_table rect +-- @param #rect_table rectInPixels -------------------------------- +-- get texture of the frame -- @function [parent=#SpriteFrame] getTexture -- @param self -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- get rect of the frame -- @function [parent=#SpriteFrame] getRect -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- set offset of the frame -- @function [parent=#SpriteFrame] setOffsetInPixels -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table offsetInPixels -------------------------------- +-- -- @function [parent=#SpriteFrame] getRectInPixels -- @param self -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- set original size of the trimmed image -- @function [parent=#SpriteFrame] setOriginalSize -- @param self --- @param #size_table size +-- @param #size_table sizeInPixels -------------------------------- +-- get original size of the trimmed image -- @function [parent=#SpriteFrame] getOriginalSizeInPixels -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- set original size of the trimmed image -- @function [parent=#SpriteFrame] setOriginalSizeInPixels -- @param self --- @param #size_table size +-- @param #size_table sizeInPixels -------------------------------- +-- -- @function [parent=#SpriteFrame] setOffset -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table offsets -------------------------------- +-- -- @function [parent=#SpriteFrame] isRotated -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- set rect of the frame -- @function [parent=#SpriteFrame] setRect -- @param self -- @param #rect_table rect -------------------------------- +-- get offset of the frame -- @function [parent=#SpriteFrame] getOffsetInPixels -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- get original size of the trimmed image -- @function [parent=#SpriteFrame] getOriginalSize -- @param self -- @return size_table#size_table ret (return value: size_table) @@ -94,11 +111,11 @@ -- @overload self, string, rect_table -- @function [parent=#SpriteFrame] create -- @param self --- @param #string str +-- @param #string filename -- @param #rect_table rect --- @param #bool bool --- @param #vec2_table vec2 --- @param #size_table size +-- @param #bool rotated +-- @param #vec2_table offset +-- @param #size_table originalSize -- @return SpriteFrame#SpriteFrame ret (retunr value: cc.SpriteFrame) -------------------------------- @@ -106,11 +123,11 @@ -- @overload self, cc.Texture2D, rect_table -- @function [parent=#SpriteFrame] createWithTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D pobTexture -- @param #rect_table rect --- @param #bool bool --- @param #vec2_table vec2 --- @param #size_table size +-- @param #bool rotated +-- @param #vec2_table offset +-- @param #size_table originalSize -- @return SpriteFrame#SpriteFrame ret (retunr value: cc.SpriteFrame) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua b/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua index 33e686b786..8b6ceba0a9 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteFrameCache.lua @@ -5,10 +5,13 @@ -- @parent_module cc -------------------------------- +-- Adds multiple Sprite Frames from a plist file content. The texture will be associated with the created sprite frames.
+-- js addSpriteFrames
+-- lua addSpriteFrames -- @function [parent=#SpriteFrameCache] addSpriteFramesWithFileContent -- @param self --- @param #string str --- @param #cc.Texture2D texture2d +-- @param #string plist_content +-- @param #cc.Texture2D texture -------------------------------- -- @overload self, string, string @@ -16,59 +19,88 @@ -- @overload self, string, cc.Texture2D -- @function [parent=#SpriteFrameCache] addSpriteFramesWithFile -- @param self --- @param #string str --- @param #cc.Texture2D texture2d +-- @param #string plist +-- @param #cc.Texture2D texture -------------------------------- +-- Adds an sprite frame with a given name.
+-- If the name already exists, then the contents of the old name will be replaced with the new one. -- @function [parent=#SpriteFrameCache] addSpriteFrame -- @param self --- @param #cc.SpriteFrame spriteframe --- @param #string str +-- @param #cc.SpriteFrame frame +-- @param #string frameName -------------------------------- +-- Removes unused sprite frames.
+-- Sprite Frames that have a retain count of 1 will be deleted.
+-- It is convenient to call this method after when starting a new Scene. -- @function [parent=#SpriteFrameCache] removeUnusedSpriteFrames -- @param self -------------------------------- +-- Returns an Sprite Frame that was previously added.
+-- If the name is not found it will return nil.
+-- You should retain the returned copy if you are going to use it.
+-- js getSpriteFrame
+-- lua getSpriteFrame -- @function [parent=#SpriteFrameCache] getSpriteFrameByName -- @param self --- @param #string str +-- @param #string name -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- +-- Removes multiple Sprite Frames from a plist file.
+-- Sprite Frames stored in this file will be removed.
+-- It is convenient to call this method when a specific texture needs to be removed.
+-- since v0.99.5 -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromFile -- @param self --- @param #string str +-- @param #string plist -------------------------------- +-- -- @function [parent=#SpriteFrameCache] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Purges the dictionary of loaded sprite frames.
+-- Call this method if you receive the "Memory Warning".
+-- In the short term: it will free some resources preventing your app from being killed.
+-- In the medium term: it will allocate more resources.
+-- In the long term: it will be the same. -- @function [parent=#SpriteFrameCache] removeSpriteFrames -- @param self -------------------------------- +-- Removes all Sprite Frames associated with the specified textures.
+-- It is convenient to call this method when a specific texture needs to be removed.
+-- since v0.995. -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- Removes multiple Sprite Frames from a plist file content.
+-- Sprite Frames stored in this file will be removed.
+-- It is convenient to call this method when a specific texture needs to be removed. -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromFileContent -- @param self --- @param #string str +-- @param #string plist_content -------------------------------- +-- Deletes an sprite frame from the sprite frame cache. -- @function [parent=#SpriteFrameCache] removeSpriteFrameByName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- Destroys the cache. It releases all the Sprite Frames and the retained instance. -- @function [parent=#SpriteFrameCache] destroyInstance -- @param self -------------------------------- +-- Returns the shared instance of the Sprite Frame cache -- @function [parent=#SpriteFrameCache] getInstance -- @param self -- @return SpriteFrameCache#SpriteFrameCache ret (return value: cc.SpriteFrameCache) diff --git a/cocos/scripting/lua-bindings/auto/api/StopGrid.lua b/cocos/scripting/lua-bindings/auto/api/StopGrid.lua index 7dd7245795..7859d30d7f 100644 --- a/cocos/scripting/lua-bindings/auto/api/StopGrid.lua +++ b/cocos/scripting/lua-bindings/auto/api/StopGrid.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- Allocates and initializes the action -- @function [parent=#StopGrid] create -- @param self -- @return StopGrid#StopGrid ret (return value: cc.StopGrid) -------------------------------- +-- -- @function [parent=#StopGrid] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#StopGrid] clone -- @param self -- @return StopGrid#StopGrid ret (return value: cc.StopGrid) -------------------------------- +-- -- @function [parent=#StopGrid] reverse -- @param self -- @return StopGrid#StopGrid ret (return value: cc.StopGrid) diff --git a/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua b/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua index 315b1a4f20..92d5b7e46b 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua @@ -5,45 +5,53 @@ -- @parent_module ccexp -------------------------------- +-- returns the position in points of a given tile coordinate -- @function [parent=#TMXLayer] getPositionAt -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table tileCoordinate -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#TMXLayer] setLayerOrientation -- @param self --- @param #int int +-- @param #int orientation -------------------------------- +-- size of the layer in tiles -- @function [parent=#TMXLayer] getLayerSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#TMXLayer] setMapTileSize -- @param self -- @param #size_table size -------------------------------- +-- Layer orientation, which is the same as the map orientation -- @function [parent=#TMXLayer] getLayerOrientation -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TMXLayer] setProperties -- @param self --- @param #map_table map +-- @param #map_table properties -------------------------------- +-- -- @function [parent=#TMXLayer] setLayerName -- @param self --- @param #string str +-- @param #string layerName -------------------------------- +-- removes a tile at given tile coordinate -- @function [parent=#TMXLayer] removeTileAt -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table tileCoordinate -------------------------------- -- @overload self @@ -53,89 +61,107 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- +-- Creates the tiles -- @function [parent=#TMXLayer] setupTiles -- @param self -------------------------------- +-- -- @function [parent=#TMXLayer] setupTileSprite -- @param self -- @param #cc.Sprite sprite --- @param #vec2_table vec2 --- @param #int int +-- @param #vec2_table pos +-- @param #int gid -------------------------------- -- @overload self, int, vec2_table, int -- @overload self, int, vec2_table -- @function [parent=#TMXLayer] setTileGID -- @param self --- @param #int int --- @param #vec2_table vec2 --- @param #int tmxtileflags_ +-- @param #int gid +-- @param #vec2_table tileCoordinate +-- @param #int flags -------------------------------- +-- size of the map's tile (could be different from the tile's size) -- @function [parent=#TMXLayer] getMapTileSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- return the value for the specific property name -- @function [parent=#TMXLayer] getProperty -- @param self --- @param #string str +-- @param #string propertyName -- @return Value#Value ret (return value: cc.Value) -------------------------------- +-- -- @function [parent=#TMXLayer] setLayerSize -- @param self -- @param #size_table size -------------------------------- +-- -- @function [parent=#TMXLayer] getLayerName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TMXLayer] setTileSet -- @param self --- @param #cc.TMXTilesetInfo tmxtilesetinfo +-- @param #cc.TMXTilesetInfo info -------------------------------- +-- Tileset information for the layer -- @function [parent=#TMXLayer] getTileSet -- @param self -- @return TMXTilesetInfo#TMXTilesetInfo ret (return value: cc.TMXTilesetInfo) -------------------------------- +-- returns the tile (Sprite) at a given a tile coordinate.
+-- The returned Sprite will be already added to the TMXLayer. Don't add it again.
+-- The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.
+-- You can remove either by calling:
+-- - layer->removeChild(sprite, cleanup); -- @function [parent=#TMXLayer] getTileAt -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table tileCoordinate -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- +-- creates a FastTMXLayer with an tileset info, a layer info and a map info -- @function [parent=#TMXLayer] create -- @param self --- @param #cc.TMXTilesetInfo tmxtilesetinfo --- @param #cc.TMXLayerInfo tmxlayerinfo --- @param #cc.TMXMapInfo map +-- @param #cc.TMXTilesetInfo tilesetInfo +-- @param #cc.TMXLayerInfo layerInfo +-- @param #cc.TMXMapInfo mapInfo -- @return experimental::TMXLayer#experimental::TMXLayer ret (return value: cc.experimental::TMXLayer) -------------------------------- +-- -- @function [parent=#TMXLayer] removeChild -- @param self --- @param #cc.Node node --- @param #bool bool +-- @param #cc.Node child +-- @param #bool cleanup -------------------------------- +-- -- @function [parent=#TMXLayer] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#TMXLayer] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- js ctor -- @function [parent=#TMXLayer] TMXLayer -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua b/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua index fad88388e2..acb406eb7a 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXLayerInfo.lua @@ -5,16 +5,19 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TMXLayerInfo] setProperties -- @param self --- @param #map_table map +-- @param #map_table properties -------------------------------- +-- -- @function [parent=#TMXLayerInfo] getProperties -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- js ctor -- @function [parent=#TMXLayerInfo] TMXLayerInfo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua b/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua index ef098ce6f2..3a77a877b5 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua @@ -4,56 +4,66 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TMXMapInfo] setObjectGroups -- @param self --- @param #array_table array +-- @param #array_table groups -------------------------------- +-- -- @function [parent=#TMXMapInfo] setTileSize -- @param self --- @param #size_table size +-- @param #size_table tileSize -------------------------------- +-- initializes a TMX format with a tmx file -- @function [parent=#TMXMapInfo] initWithTMXFile -- @param self --- @param #string str +-- @param #string tmxFile -- @return bool#bool ret (return value: bool) -------------------------------- +-- / map orientation -- @function [parent=#TMXMapInfo] getOrientation -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- / is storing characters? -- @function [parent=#TMXMapInfo] isStoringCharacters -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setLayers -- @param self --- @param #array_table array +-- @param #array_table layers -------------------------------- +-- initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file -- @function [parent=#TMXMapInfo] parseXMLFile -- @param self --- @param #string str +-- @param #string xmlFilename -- @return bool#bool ret (return value: bool) -------------------------------- +-- / parent element -- @function [parent=#TMXMapInfo] getParentElement -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setTMXFileName -- @param self --- @param #string str +-- @param #string fileName -------------------------------- +-- -- @function [parent=#TMXMapInfo] parseXMLString -- @param self --- @param #string str +-- @param #string xmlString -- @return bool#bool ret (return value: bool) -------------------------------- @@ -71,38 +81,45 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- / parent GID -- @function [parent=#TMXMapInfo] getParentGID -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setParentElement -- @param self --- @param #int int +-- @param #int element -------------------------------- +-- initializes a TMX format with an XML string and a TMX resource path -- @function [parent=#TMXMapInfo] initWithXML -- @param self --- @param #string str --- @param #string str +-- @param #string tmxString +-- @param #string resourcePath -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setParentGID -- @param self --- @param #int int +-- @param #int gid -------------------------------- +-- / layer attribs -- @function [parent=#TMXMapInfo] getLayerAttribs -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- / tiles width & height -- @function [parent=#TMXMapInfo] getTileSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#TMXMapInfo] getTileProperties -- @param self -- @return map_table#map_table ret (return value: map_table) @@ -115,49 +132,58 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- -- @function [parent=#TMXMapInfo] getTMXFileName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setCurrentString -- @param self --- @param #string str +-- @param #string currentString -------------------------------- +-- -- @function [parent=#TMXMapInfo] setProperties -- @param self --- @param #map_table map +-- @param #map_table properties -------------------------------- +-- -- @function [parent=#TMXMapInfo] setOrientation -- @param self --- @param #int int +-- @param #int orientation -------------------------------- +-- -- @function [parent=#TMXMapInfo] setTileProperties -- @param self --- @param #map_table map +-- @param #map_table tileProperties -------------------------------- +-- -- @function [parent=#TMXMapInfo] setMapSize -- @param self --- @param #size_table size +-- @param #size_table mapSize -------------------------------- +-- -- @function [parent=#TMXMapInfo] setStoringCharacters -- @param self --- @param #bool bool +-- @param #bool storingCharacters -------------------------------- +-- / map width & height -- @function [parent=#TMXMapInfo] getMapSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setTilesets -- @param self --- @param #array_table array +-- @param #array_table tilesets -------------------------------- -- @overload self @@ -167,29 +193,34 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- +-- -- @function [parent=#TMXMapInfo] getCurrentString -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TMXMapInfo] setLayerAttribs -- @param self --- @param #int int +-- @param #int layerAttribs -------------------------------- +-- creates a TMX Format with a tmx file -- @function [parent=#TMXMapInfo] create -- @param self --- @param #string str +-- @param #string tmxFile -- @return TMXMapInfo#TMXMapInfo ret (return value: cc.TMXMapInfo) -------------------------------- +-- creates a TMX Format with an XML string and a TMX resource path -- @function [parent=#TMXMapInfo] createWithXML -- @param self --- @param #string str --- @param #string str +-- @param #string tmxString +-- @param #string resourcePath -- @return TMXMapInfo#TMXMapInfo ret (return value: cc.TMXMapInfo) -------------------------------- +-- js ctor -- @function [parent=#TMXMapInfo] TMXMapInfo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua b/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua index 2a2330d036..3d6c1ebed2 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua @@ -5,25 +5,30 @@ -- @parent_module cc -------------------------------- +-- Sets the offset position of child objects -- @function [parent=#TMXObjectGroup] setPositionOffset -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table offset -------------------------------- +-- return the value for the specific property name -- @function [parent=#TMXObjectGroup] getProperty -- @param self --- @param #string str +-- @param #string propertyName -- @return Value#Value ret (return value: cc.Value) -------------------------------- +-- Gets the offset position of child objects -- @function [parent=#TMXObjectGroup] getPositionOffset -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- return the dictionary for the specific object name.
+-- It will return the 1st object found on the array for the given name. -- @function [parent=#TMXObjectGroup] getObject -- @param self --- @param #string str +-- @param #string objectName -- @return map_table#map_table ret (return value: map_table) -------------------------------- @@ -34,9 +39,10 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- -- @function [parent=#TMXObjectGroup] setGroupName -- @param self --- @param #string str +-- @param #string groupName -------------------------------- -- @overload self @@ -46,21 +52,25 @@ -- @return map_table#map_table ret (retunr value: map_table) -------------------------------- +-- -- @function [parent=#TMXObjectGroup] getGroupName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Sets the list of properties -- @function [parent=#TMXObjectGroup] setProperties -- @param self --- @param #map_table map +-- @param #map_table properties -------------------------------- +-- Sets the array of the objects -- @function [parent=#TMXObjectGroup] setObjects -- @param self --- @param #array_table array +-- @param #array_table objects -------------------------------- +-- js ctor -- @function [parent=#TMXObjectGroup] TMXObjectGroup -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua b/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua index 86175d51f4..1e36be8fd4 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua @@ -5,25 +5,29 @@ -- @parent_module ccexp -------------------------------- +-- -- @function [parent=#TMXTiledMap] setObjectGroups -- @param self --- @param #array_table array +-- @param #array_table groups -------------------------------- +-- return the value for the specific property name -- @function [parent=#TMXTiledMap] getProperty -- @param self --- @param #string str +-- @param #string propertyName -- @return Value#Value ret (return value: cc.Value) -------------------------------- +-- -- @function [parent=#TMXTiledMap] setMapSize -- @param self --- @param #size_table size +-- @param #size_table mapSize -------------------------------- +-- return the TMXObjectGroup for the specific group -- @function [parent=#TMXTiledMap] getObjectGroup -- @param self --- @param #string str +-- @param #string groupName -- @return TMXObjectGroup#TMXObjectGroup ret (return value: cc.TMXObjectGroup) -------------------------------- @@ -34,66 +38,78 @@ -- @return array_table#array_table ret (retunr value: array_table) -------------------------------- +-- the tiles's size property measured in pixels -- @function [parent=#TMXTiledMap] getTileSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- the map's size property measured in tiles -- @function [parent=#TMXTiledMap] getMapSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- properties -- @function [parent=#TMXTiledMap] getProperties -- @param self -- @return map_table#map_table ret (return value: map_table) -------------------------------- +-- return properties dictionary for tile GID -- @function [parent=#TMXTiledMap] getPropertiesForGID -- @param self --- @param #int int +-- @param #int GID -- @return Value#Value ret (return value: cc.Value) -------------------------------- +-- -- @function [parent=#TMXTiledMap] setTileSize -- @param self --- @param #size_table size +-- @param #size_table tileSize -------------------------------- +-- -- @function [parent=#TMXTiledMap] setProperties -- @param self --- @param #map_table map +-- @param #map_table properties -------------------------------- +-- return the FastTMXLayer for the specific layer -- @function [parent=#TMXTiledMap] getLayer -- @param self --- @param #string str +-- @param #string layerName -- @return experimental::TMXLayer#experimental::TMXLayer ret (return value: cc.experimental::TMXLayer) -------------------------------- +-- map orientation -- @function [parent=#TMXTiledMap] getMapOrientation -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TMXTiledMap] setMapOrientation -- @param self --- @param #int int +-- @param #int mapOrientation -------------------------------- +-- creates a TMX Tiled Map with a TMX file. -- @function [parent=#TMXTiledMap] create -- @param self --- @param #string str +-- @param #string tmxFile -- @return experimental::TMXTiledMap#experimental::TMXTiledMap ret (return value: cc.experimental::TMXTiledMap) -------------------------------- +-- initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources -- @function [parent=#TMXTiledMap] createWithXML -- @param self --- @param #string str --- @param #string str +-- @param #string tmxString +-- @param #string resourcePath -- @return experimental::TMXTiledMap#experimental::TMXTiledMap ret (return value: cc.experimental::TMXTiledMap) -------------------------------- +-- -- @function [parent=#TMXTiledMap] getDescription -- @param self -- @return string#string ret (return value: string) diff --git a/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua b/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua index 3d07264e37..b782adde5f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXTilesetInfo.lua @@ -5,12 +5,14 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TMXTilesetInfo] getRectForGID -- @param self --- @param #unsigned int int +-- @param #unsigned int gid -- @return rect_table#rect_table ret (return value: rect_table) -------------------------------- +-- js ctor -- @function [parent=#TMXTilesetInfo] TMXTilesetInfo -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TableView.lua b/cocos/scripting/lua-bindings/auto/api/TableView.lua index 2efa32f127..21e38bd249 100644 --- a/cocos/scripting/lua-bindings/auto/api/TableView.lua +++ b/cocos/scripting/lua-bindings/auto/api/TableView.lua @@ -5,92 +5,115 @@ -- @parent_module cc -------------------------------- +-- Updates the content of the cell at a given index.
+-- param idx index to find a cell -- @function [parent=#TableView] updateCellAtIndex -- @param self --- @param #long long +-- @param #long idx -------------------------------- +-- determines how cell is ordered and filled in the view. -- @function [parent=#TableView] setVerticalFillOrder -- @param self --- @param #int verticalfillorder +-- @param #int order -------------------------------- +-- -- @function [parent=#TableView] scrollViewDidZoom -- @param self --- @param #cc.ScrollView scrollview +-- @param #cc.ScrollView view -------------------------------- +-- -- @function [parent=#TableView] _updateContentSize -- @param self -------------------------------- +-- -- @function [parent=#TableView] getVerticalFillOrder -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Removes a cell at a given index
+-- param idx index to find a cell -- @function [parent=#TableView] removeCellAtIndex -- @param self --- @param #long long +-- @param #long idx -------------------------------- +-- -- @function [parent=#TableView] initWithViewSize -- @param self -- @param #size_table size --- @param #cc.Node node +-- @param #cc.Node container -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TableView] scrollViewDidScroll -- @param self --- @param #cc.ScrollView scrollview +-- @param #cc.ScrollView view -------------------------------- +-- reloads data from data source. the view will be refreshed. -- @function [parent=#TableView] reloadData -- @param self -------------------------------- +-- Inserts a new cell at a given index
+-- param idx location to insert -- @function [parent=#TableView] insertCellAtIndex -- @param self --- @param #long long +-- @param #long idx -------------------------------- +-- Returns an existing cell at a given index. Returns nil if a cell is nonexistent at the moment of query.
+-- param idx index
+-- return a cell at a given index -- @function [parent=#TableView] cellAtIndex -- @param self --- @param #long long +-- @param #long idx -- @return TableViewCell#TableViewCell ret (return value: cc.TableViewCell) -------------------------------- +-- Dequeues a free cell if available. nil if not.
+-- return free cell -- @function [parent=#TableView] dequeueCell -- @param self -- @return TableViewCell#TableViewCell ret (return value: cc.TableViewCell) -------------------------------- +-- -- @function [parent=#TableView] onTouchMoved -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#TableView] onTouchEnded -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#TableView] onTouchCancelled -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -------------------------------- +-- -- @function [parent=#TableView] onTouchBegan -- @param self --- @param #cc.Touch touch --- @param #cc.Event event +-- @param #cc.Touch pTouch +-- @param #cc.Event pEvent -- @return bool#bool ret (return value: bool) -------------------------------- +-- js ctor -- @function [parent=#TableView] TableView -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua b/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua index dc649d0806..8b243b0548 100644 --- a/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua +++ b/cocos/scripting/lua-bindings/auto/api/TableViewCell.lua @@ -5,25 +5,30 @@ -- @parent_module cc -------------------------------- +-- Cleans up any resources linked to this cell and resets idx property. -- @function [parent=#TableViewCell] reset -- @param self -------------------------------- +-- The index used internally by SWTableView and its subclasses -- @function [parent=#TableViewCell] getIdx -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#TableViewCell] setIdx -- @param self --- @param #long long +-- @param #long uIdx -------------------------------- +-- -- @function [parent=#TableViewCell] create -- @param self -- @return TableViewCell#TableViewCell ret (return value: cc.TableViewCell) -------------------------------- +-- -- @function [parent=#TableViewCell] TableViewCell -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua b/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua index 82d934aab5..432a7b9a50 100644 --- a/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua @@ -12,39 +12,46 @@ -- @return Node#Node ret (retunr value: cc.Node) -------------------------------- +-- Sets the target that the action will be forced to run with -- @function [parent=#TargetedAction] setForcedTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node forcedTarget -------------------------------- +-- Create an action with the specified action and forced target -- @function [parent=#TargetedAction] create -- @param self --- @param #cc.Node node --- @param #cc.FiniteTimeAction finitetimeaction +-- @param #cc.Node target +-- @param #cc.FiniteTimeAction action -- @return TargetedAction#TargetedAction ret (return value: cc.TargetedAction) -------------------------------- +-- -- @function [parent=#TargetedAction] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#TargetedAction] clone -- @param self -- @return TargetedAction#TargetedAction ret (return value: cc.TargetedAction) -------------------------------- +-- -- @function [parent=#TargetedAction] stop -- @param self -------------------------------- +-- -- @function [parent=#TargetedAction] reverse -- @param self -- @return TargetedAction#TargetedAction ret (return value: cc.TargetedAction) -------------------------------- +-- -- @function [parent=#TargetedAction] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Text.lua b/cocos/scripting/lua-bindings/auto/api/Text.lua index b6b97605b6..7b1945dc30 100644 --- a/cocos/scripting/lua-bindings/auto/api/Text.lua +++ b/cocos/scripting/lua-bindings/auto/api/Text.lua @@ -5,145 +5,186 @@ -- @parent_module ccui -------------------------------- +-- Enable shadow for the label
+-- todo support blur for shadow effect -- @function [parent=#Text] enableShadow -- @param self -------------------------------- +-- -- @function [parent=#Text] getFontSize -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Text] getString -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- disable shadow/outline/glow rendering -- @function [parent=#Text] disableEffect -- @param self -------------------------------- +-- -- @function [parent=#Text] getTextColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- +-- -- @function [parent=#Text] setTextVerticalAlignment -- @param self --- @param #int textvalignment +-- @param #int alignment -------------------------------- +-- Sets the font name of label.
+-- If you are trying to use a system font, you could just pass a font name
+-- If you are trying to use a TTF, you should pass a file path to the TTF file
+-- Usage: Text *text = Text::create("Hello", "Arial", 20);create a system font UIText
+-- text->setFontName("Marfelt"); it will change the font to system font no matter the previous font type is TTF or system font
+-- text->setFontName("xxxx/xxx.ttf");it will change the font to TTF font no matter the previous font type is TTF or system font
+-- param name font name. -- @function [parent=#Text] setFontName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- Sets the touch scale enabled of label.
+-- param enabled touch scale enabled of label. -- @function [parent=#Text] setTouchScaleChangeEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#Text] setString -- @param self --- @param #string str +-- @param #string text -------------------------------- +-- Gets the touch scale enabled of label.
+-- return touch scale enabled of label. -- @function [parent=#Text] isTouchScaleChangeEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Text] getFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Text] setTextAreaSize -- @param self -- @param #size_table size -------------------------------- +-- Gets the string length of the label.
+-- Note: This length will be larger than the raw string length,
+-- if you want to get the raw string length, you should call this->getString().size() instead
+-- return string length. -- @function [parent=#Text] getStringLength -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- Enable outline for the label
+-- It only works on IOS and Android when you use System fonts -- @function [parent=#Text] enableOutline -- @param self --- @param #color4b_table color4b --- @param #int int +-- @param #color4b_table outlineColor +-- @param #int outlineSize -------------------------------- +-- -- @function [parent=#Text] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Text] getTextHorizontalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Sets the font size of label.
+-- param size font size. -- @function [parent=#Text] setFontSize -- @param self --- @param #int int +-- @param #int size -------------------------------- +-- -- @function [parent=#Text] setTextColor -- @param self --- @param #color4b_table color4b +-- @param #color4b_table color -------------------------------- +-- only support for TTF -- @function [parent=#Text] enableGlow -- @param self --- @param #color4b_table color4b +-- @param #color4b_table glowColor -------------------------------- +-- -- @function [parent=#Text] getTextVerticalAlignment -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Text] getTextAreaSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Text] setTextHorizontalAlignment -- @param self --- @param #int texthalignment +-- @param #int alignment -------------------------------- -- @overload self, string, string, int -- @overload self -- @function [parent=#Text] create -- @param self --- @param #string str --- @param #string str --- @param #int int +-- @param #string textContent +-- @param #string fontName +-- @param #int fontSize -- @return Text#Text ret (retunr value: ccui.Text) -------------------------------- +-- -- @function [parent=#Text] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#Text] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#Text] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#Text] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Default constructor -- @function [parent=#Text] Text -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua b/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua index 2ee69b8e6e..7a23761192 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua @@ -5,30 +5,38 @@ -- @parent_module ccui -------------------------------- +-- Gets the string length of the label.
+-- Note: This length will be larger than the raw string length,
+-- if you want to get the raw string length, you should call this->getString().size() instead
+-- return string length. -- @function [parent=#TextAtlas] getStringLength -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#TextAtlas] getString -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextAtlas] setString -- @param self --- @param #string str +-- @param #string value -------------------------------- +-- initializes the LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas -- @function [parent=#TextAtlas] setProperty -- @param self --- @param #string str --- @param #string str --- @param #int int --- @param #int int --- @param #string str +-- @param #string stringValue +-- @param #string charMapFile +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #string startCharMap -------------------------------- +-- -- @function [parent=#TextAtlas] adaptRenderers -- @param self @@ -37,34 +45,39 @@ -- @overload self -- @function [parent=#TextAtlas] create -- @param self --- @param #string str --- @param #string str --- @param #int int --- @param #int int --- @param #string str +-- @param #string stringValue +-- @param #string charMapFile +-- @param #int itemWidth +-- @param #int itemHeight +-- @param #string startCharMap -- @return TextAtlas#TextAtlas ret (retunr value: ccui.TextAtlas) -------------------------------- +-- -- @function [parent=#TextAtlas] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#TextAtlas] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#TextAtlas] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextAtlas] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Default constructor -- @function [parent=#TextAtlas] TextAtlas -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua b/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua index 424c43eda3..7903e704e1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua @@ -5,21 +5,28 @@ -- @parent_module ccui -------------------------------- +-- init a bitmap font atlas with an initial string and the FNT file -- @function [parent=#TextBMFont] setFntFile -- @param self --- @param #string str +-- @param #string fileName -------------------------------- +-- Gets the string length of the label.
+-- Note: This length will be larger than the raw string length,
+-- if you want to get the raw string length, you should call this->getString().size() instead
+-- return string length. -- @function [parent=#TextBMFont] getStringLength -- @param self -- @return long#long ret (return value: long) -------------------------------- +-- -- @function [parent=#TextBMFont] setString -- @param self --- @param #string str +-- @param #string value -------------------------------- +-- -- @function [parent=#TextBMFont] getString -- @param self -- @return string#string ret (return value: string) @@ -29,31 +36,36 @@ -- @overload self -- @function [parent=#TextBMFont] create -- @param self --- @param #string str --- @param #string str +-- @param #string text +-- @param #string filename -- @return TextBMFont#TextBMFont ret (retunr value: ccui.TextBMFont) -------------------------------- +-- -- @function [parent=#TextBMFont] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#TextBMFont] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#TextBMFont] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextBMFont] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Default constructor -- @function [parent=#TextBMFont] TextBMFont -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextField.lua b/cocos/scripting/lua-bindings/auto/api/TextField.lua index c4e22b25bc..eb5014b7c7 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextField.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextField.lua @@ -5,192 +5,229 @@ -- @parent_module ccui -------------------------------- +-- -- @function [parent=#TextField] setAttachWithIME -- @param self --- @param #bool bool +-- @param #bool attach -------------------------------- +-- -- @function [parent=#TextField] getFontSize -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TextField] getStringValue -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextField] setPasswordStyleText -- @param self --- @param #char char +-- @param #char styleText -------------------------------- +-- -- @function [parent=#TextField] getDeleteBackward -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] getPlaceHolder -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextField] getAttachWithIME -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setFontName -- @param self --- @param #string str +-- @param #string name -------------------------------- +-- -- @function [parent=#TextField] getInsertText -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setInsertText -- @param self --- @param #bool bool +-- @param #bool insertText -------------------------------- +-- -- @function [parent=#TextField] getDetachWithIME -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setTextVerticalAlignment -- @param self --- @param #int textvalignment +-- @param #int alignment -------------------------------- +-- -- @function [parent=#TextField] addEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- -- @function [parent=#TextField] didNotSelectSelf -- @param self -------------------------------- +-- -- @function [parent=#TextField] getFontName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextField] setTextAreaSize -- @param self -- @param #size_table size -------------------------------- +-- -- @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 --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#TextField] getPlaceHolderColor -- @param self -- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- +-- -- @function [parent=#TextField] getPasswordStyleText -- @param self -- @return char#char ret (return value: char) -------------------------------- +-- -- @function [parent=#TextField] setMaxLengthEnabled -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#TextField] isPasswordEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setDeleteBackward -- @param self --- @param #bool bool +-- @param #bool deleteBackward -------------------------------- +-- -- @function [parent=#TextField] setFontSize -- @param self --- @param #int int +-- @param #int size -------------------------------- +-- -- @function [parent=#TextField] setPlaceHolder -- @param self --- @param #string str +-- @param #string value -------------------------------- -- @overload self, color4b_table -- @overload self, color3b_table -- @function [parent=#TextField] setPlaceHolderColor -- @param self --- @param #color3b_table color3b +-- @param #color3b_table color -------------------------------- +-- -- @function [parent=#TextField] setTextHorizontalAlignment -- @param self --- @param #int texthalignment +-- @param #int alignment -------------------------------- +-- -- @function [parent=#TextField] setTextColor -- @param self --- @param #color4b_table color4b +-- @param #color4b_table textColor -------------------------------- +-- -- @function [parent=#TextField] getMaxLength -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#TextField] isMaxLengthEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setDetachWithIME -- @param self --- @param #bool bool +-- @param #bool detach -------------------------------- +-- -- @function [parent=#TextField] setText -- @param self --- @param #string str +-- @param #string text -------------------------------- +-- -- @function [parent=#TextField] setTouchAreaEnabled -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#TextField] hitTest -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pt -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextField] setMaxLength -- @param self --- @param #int int +-- @param #int length -------------------------------- +-- -- @function [parent=#TextField] setTouchSize -- @param self -- @param #size_table size -------------------------------- +-- -- @function [parent=#TextField] getTouchSize -- @param self -- @return size_table#size_table ret (return value: size_table) @@ -200,37 +237,43 @@ -- @overload self -- @function [parent=#TextField] create -- @param self --- @param #string str --- @param #string str --- @param #int int +-- @param #string placeholder +-- @param #string fontName +-- @param #int fontSize -- @return TextField#TextField ret (retunr value: ccui.TextField) -------------------------------- +-- -- @function [parent=#TextField] createInstance -- @param self -- @return Ref#Ref ret (return value: cc.Ref) -------------------------------- +-- -- @function [parent=#TextField] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#TextField] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextField] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#TextField] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#TextField] TextField -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua index c7c1456291..77a95a5282 100644 --- a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua @@ -5,11 +5,14 @@ -- @parent_module cc -------------------------------- +-- Gets max T -- @function [parent=#Texture2D] getMaxT -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- returns the pixel format.
+-- since v2.0 -- @function [parent=#Texture2D] getStringForFormat -- @param self -- @return char#char ret (return value: char) @@ -20,24 +23,30 @@ -- @function [parent=#Texture2D] initWithImage -- @param self -- @param #cc.Image image --- @param #int pixelformat +-- @param #int format -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- Gets max S -- @function [parent=#Texture2D] getMaxS -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- release only the gl texture.
+-- js NA
+-- lua NA -- @function [parent=#Texture2D] releaseGLTexture -- @param self -------------------------------- +-- -- @function [parent=#Texture2D] hasPremultipliedAlpha -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the height of the texture in pixels -- @function [parent=#Texture2D] getPixelsHigh -- @param self -- @return int#int ret (return value: int) @@ -47,10 +56,11 @@ -- @overload self -- @function [parent=#Texture2D] getBitsPerPixelForFormat -- @param self --- @param #int pixelformat +-- @param #int format -- @return unsigned int#unsigned int ret (retunr value: unsigned int) -------------------------------- +-- Gets the texture name -- @function [parent=#Texture2D] getName -- @param self -- @return unsigned int#unsigned int ret (return value: unsigned int) @@ -60,97 +70,141 @@ -- @overload self, char, string, float, size_table, int, int -- @function [parent=#Texture2D] initWithString -- @param self --- @param #char char --- @param #string str --- @param #float float --- @param #size_table size --- @param #int texthalignment --- @param #int textvalignment +-- @param #char text +-- @param #string fontName +-- @param #float fontSize +-- @param #size_table dimensions +-- @param #int hAlignment +-- @param #int vAlignment -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- Sets max T -- @function [parent=#Texture2D] setMaxT -- @param self --- @param #float float +-- @param #float maxT -------------------------------- +-- draws a texture inside a rect -- @function [parent=#Texture2D] drawInRect -- @param self -- @param #rect_table rect -------------------------------- +-- -- @function [parent=#Texture2D] getContentSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- sets alias texture parameters:
+-- - GL_TEXTURE_MIN_FILTER = GL_NEAREST
+-- - GL_TEXTURE_MAG_FILTER = GL_NEAREST
+-- warning Calling this method could allocate additional texture memory.
+-- since v0.8 -- @function [parent=#Texture2D] setAliasTexParameters -- @param self -------------------------------- +-- sets antialias texture parameters:
+-- - GL_TEXTURE_MIN_FILTER = GL_LINEAR
+-- - GL_TEXTURE_MAG_FILTER = GL_LINEAR
+-- warning Calling this method could allocate additional texture memory.
+-- since v0.8 -- @function [parent=#Texture2D] setAntiAliasTexParameters -- @param self -------------------------------- +-- Generates mipmap images for the texture.
+-- It only works if the texture size is POT (power of 2).
+-- since v0.99.0 -- @function [parent=#Texture2D] generateMipmap -- @param self -------------------------------- +-- js NA
+-- lua NA -- @function [parent=#Texture2D] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Gets the pixel format of the texture -- @function [parent=#Texture2D] getPixelFormat -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Texture2D] setGLProgram -- @param self --- @param #cc.GLProgram glprogram +-- @param #cc.GLProgram program -------------------------------- +-- content size -- @function [parent=#Texture2D] getContentSizeInPixels -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Gets the width of the texture in pixels -- @function [parent=#Texture2D] getPixelsWide -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Drawing extensions to make it easy to draw basic quads using a Texture2D object.
+-- These functions require GL_TEXTURE_2D and both GL_VERTEX_ARRAY and GL_TEXTURE_COORD_ARRAY client states to be enabled.
+-- draws a texture at a given point -- @function [parent=#Texture2D] drawAtPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table point -------------------------------- +-- -- @function [parent=#Texture2D] getGLProgram -- @param self -- @return GLProgram#GLProgram ret (return value: cc.GLProgram) -------------------------------- +-- -- @function [parent=#Texture2D] hasMipmaps -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Sets max S -- @function [parent=#Texture2D] setMaxS -- @param self --- @param #float float +-- @param #float maxS -------------------------------- +-- sets the default pixel format for UIImagescontains alpha channel.
+-- If the UIImage contains alpha channel, then the options are:
+-- - generate 32-bit textures: Texture2D::PixelFormat::RGBA8888 (default one)
+-- - generate 24-bit textures: Texture2D::PixelFormat::RGB888
+-- - generate 16-bit textures: Texture2D::PixelFormat::RGBA4444
+-- - generate 16-bit textures: Texture2D::PixelFormat::RGB5A1
+-- - generate 16-bit textures: Texture2D::PixelFormat::RGB565
+-- - generate 8-bit textures: Texture2D::PixelFormat::A8 (only use it if you use just 1 color)
+-- How does it work ?
+-- - If the image is an RGBA (with Alpha) then the default pixel format will be used (it can be a 8-bit, 16-bit or 32-bit texture)
+-- - If the image is an RGB (without Alpha) then: If the default pixel format is RGBA8888 then a RGBA8888 (32-bit) will be used. Otherwise a RGB565 (16-bit texture) will be used.
+-- This parameter is not valid for PVR / PVR.CCZ images.
+-- since v0.8 -- @function [parent=#Texture2D] setDefaultAlphaPixelFormat -- @param self --- @param #int pixelformat +-- @param #int format -------------------------------- +-- returns the alpha pixel format
+-- since v0.8 -- @function [parent=#Texture2D] getDefaultAlphaPixelFormat -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- js ctor -- @function [parent=#Texture2D] Texture2D -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextureCache.lua b/cocos/scripting/lua-bindings/auto/api/TextureCache.lua index fbcaadd1ac..bcbc70498f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextureCache.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextureCache.lua @@ -5,30 +5,48 @@ -- @parent_module cc -------------------------------- +-- Reload texture from the image file
+-- If the file image hasn't loaded before, load it.
+-- Otherwise the texture will be reloaded from the file image.
+-- The "filenName" parameter is the related/absolute path of the file image.
+-- Return true if the reloading is succeed, otherwise return false. -- @function [parent=#TextureCache] reloadTexture -- @param self --- @param #string str +-- @param #string fileName -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextureCache] unbindAllImageAsync -- @param self -------------------------------- +-- Deletes a texture from the cache given a its key name
+-- since v0.99.4 -- @function [parent=#TextureCache] removeTextureForKey -- @param self --- @param #string str +-- @param #string key -------------------------------- +-- Purges the dictionary of loaded textures.
+-- Call this method if you receive the "Memory Warning"
+-- In the short term: it will free some resources preventing your app from being killed
+-- In the medium term: it will allocate more resources
+-- In the long term: it will be the same -- @function [parent=#TextureCache] removeAllTextures -- @param self -------------------------------- +-- js NA
+-- lua NA -- @function [parent=#TextureCache] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Output to CCLOG the current contents of this TextureCache
+-- This will attempt to calculate the size of each texture, and the total texture memory in use
+-- since v1.0 -- @function [parent=#TextureCache] getCachedTextureInfo -- @param self -- @return string#string ret (return value: string) @@ -39,34 +57,44 @@ -- @function [parent=#TextureCache] addImage -- @param self -- @param #cc.Image image --- @param #string str +-- @param #string key -- @return Texture2D#Texture2D ret (retunr value: cc.Texture2D) -------------------------------- +-- -- @function [parent=#TextureCache] unbindImageAsync -- @param self --- @param #string str +-- @param #string filename -------------------------------- +-- Returns an already created texture. Returns nil if the texture doesn't exist.
+-- since v0.99.5 -- @function [parent=#TextureCache] getTextureForKey -- @param self --- @param #string str +-- @param #string key -- @return Texture2D#Texture2D ret (return value: cc.Texture2D) -------------------------------- +-- Removes unused textures
+-- Textures that have a retain count of 1 will be deleted
+-- It is convenient to call this method after when starting a new Scene
+-- since v0.8 -- @function [parent=#TextureCache] removeUnusedTextures -- @param self -------------------------------- +-- Deletes a texture from the cache given a texture -- @function [parent=#TextureCache] removeTexture -- @param self --- @param #cc.Texture2D texture2d +-- @param #cc.Texture2D texture -------------------------------- +-- -- @function [parent=#TextureCache] waitForQuit -- @param self -------------------------------- +-- js ctor -- @function [parent=#TextureCache] TextureCache -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextureData.lua b/cocos/scripting/lua-bindings/auto/api/TextureData.lua index 5f1ea092e6..75e2950598 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextureData.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextureData.lua @@ -5,27 +5,32 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#TextureData] getContourData -- @param self --- @param #int int +-- @param #int index -- @return ContourData#ContourData ret (return value: ccs.ContourData) -------------------------------- +-- -- @function [parent=#TextureData] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#TextureData] addContourData -- @param self --- @param #ccs.ContourData contourdata +-- @param #ccs.ContourData contourData -------------------------------- +-- -- @function [parent=#TextureData] create -- @param self -- @return TextureData#TextureData ret (return value: ccs.TextureData) -------------------------------- +-- js ctor -- @function [parent=#TextureData] TextureData -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua b/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua index 32222d5bae..77b400ece7 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextureFrame.lua @@ -5,31 +5,37 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#TextureFrame] getTextureName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#TextureFrame] setNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#TextureFrame] setTextureName -- @param self --- @param #string str +-- @param #string textureName -------------------------------- +-- -- @function [parent=#TextureFrame] create -- @param self -- @return TextureFrame#TextureFrame ret (return value: ccs.TextureFrame) -------------------------------- +-- -- @function [parent=#TextureFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#TextureFrame] TextureFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua b/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua index 4ea1ba0663..02831ff73f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua +++ b/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua @@ -5,40 +5,50 @@ -- @parent_module cc -------------------------------- +-- initializes a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points.
+-- The file will be loaded using the TextureMgr. -- @function [parent=#TileMapAtlas] initWithTileFile -- @param self --- @param #string str --- @param #string str --- @param #int int --- @param #int int +-- @param #string tile +-- @param #string mapFile +-- @param #int tileWidth +-- @param #int tileHeight -- @return bool#bool ret (return value: bool) -------------------------------- +-- dealloc the map from memory -- @function [parent=#TileMapAtlas] releaseMap -- @param self -------------------------------- +-- returns a tile from position x,y.
+-- For the moment only channel R is used -- @function [parent=#TileMapAtlas] getTileAt -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- +-- sets a tile at position x,y.
+-- For the moment only channel R is used -- @function [parent=#TileMapAtlas] setTile -- @param self --- @param #color3b_table color3b --- @param #vec2_table vec2 +-- @param #color3b_table tile +-- @param #vec2_table position -------------------------------- +-- creates a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points.
+-- The tile file will be loaded using the TextureMgr. -- @function [parent=#TileMapAtlas] create -- @param self --- @param #string str --- @param #string str --- @param #int int --- @param #int int +-- @param #string tile +-- @param #string mapFile +-- @param #int tileWidth +-- @param #int tileHeight -- @return TileMapAtlas#TileMapAtlas ret (return value: cc.TileMapAtlas) -------------------------------- +-- js ctor -- @function [parent=#TileMapAtlas] TileMapAtlas -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua b/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua index 53ad06354a..2d459cac13 100644 --- a/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua @@ -9,24 +9,28 @@ -- @overload self, size_table, cc.Texture2D, bool -- @function [parent=#TiledGrid3D] create -- @param self --- @param #size_table size --- @param #cc.Texture2D texture2d --- @param #bool bool +-- @param #size_table gridSize +-- @param #cc.Texture2D texture +-- @param #bool flipped -- @return TiledGrid3D#TiledGrid3D ret (retunr value: cc.TiledGrid3D) -------------------------------- +-- -- @function [parent=#TiledGrid3D] calculateVertexPoints -- @param self -------------------------------- +-- -- @function [parent=#TiledGrid3D] blit -- @param self -------------------------------- +-- -- @function [parent=#TiledGrid3D] reuse -- @param self -------------------------------- +-- js ctor -- @function [parent=#TiledGrid3D] TiledGrid3D -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua b/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua index 638777d75d..41ef90697f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua +++ b/cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua @@ -5,11 +5,13 @@ -- @parent_module cc -------------------------------- +-- returns the grid -- @function [parent=#TiledGrid3DAction] getGrid -- @param self -- @return GridBase#GridBase ret (return value: cc.GridBase) -------------------------------- +-- -- @function [parent=#TiledGrid3DAction] clone -- @param self -- @return TiledGrid3DAction#TiledGrid3DAction ret (return value: cc.TiledGrid3DAction) diff --git a/cocos/scripting/lua-bindings/auto/api/Timeline.lua b/cocos/scripting/lua-bindings/auto/api/Timeline.lua index e469f6528e..a22a39f028 100644 --- a/cocos/scripting/lua-bindings/auto/api/Timeline.lua +++ b/cocos/scripting/lua-bindings/auto/api/Timeline.lua @@ -5,77 +5,92 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#Timeline] clone -- @param self -- @return Timeline#Timeline ret (return value: ccs.Timeline) -------------------------------- +-- -- @function [parent=#Timeline] gotoFrame -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- -- @function [parent=#Timeline] setNode -- @param self -- @param #cc.Node node -------------------------------- +-- -- @function [parent=#Timeline] getActionTimeline -- @param self -- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline) -------------------------------- +-- -- @function [parent=#Timeline] insertFrame -- @param self -- @param #ccs.Frame frame --- @param #int int +-- @param #int index -------------------------------- +-- -- @function [parent=#Timeline] setActionTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- -- @function [parent=#Timeline] addFrame -- @param self -- @param #ccs.Frame frame -------------------------------- +-- -- @function [parent=#Timeline] getFrames -- @param self -- @return array_table#array_table ret (return value: array_table) -------------------------------- +-- -- @function [parent=#Timeline] getActionTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Timeline] getNode -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- -- @function [parent=#Timeline] removeFrame -- @param self -- @param #ccs.Frame frame -------------------------------- +-- -- @function [parent=#Timeline] setActionTimeline -- @param self --- @param #ccs.ActionTimeline actiontimeline +-- @param #ccs.ActionTimeline action -------------------------------- +-- -- @function [parent=#Timeline] stepToFrame -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- -- @function [parent=#Timeline] create -- @param self -- @return Timeline#Timeline ret (return value: ccs.Timeline) -------------------------------- +-- -- @function [parent=#Timeline] Timeline -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Timer.lua b/cocos/scripting/lua-bindings/auto/api/Timer.lua index 2e44e70281..eed23459cd 100644 --- a/cocos/scripting/lua-bindings/auto/api/Timer.lua +++ b/cocos/scripting/lua-bindings/auto/api/Timer.lua @@ -5,32 +5,38 @@ -- @parent_module cc -------------------------------- +-- get interval in seconds -- @function [parent=#Timer] getInterval -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Timer] setupTimerWithInterval -- @param self --- @param #float float --- @param #unsigned int int --- @param #float float +-- @param #float seconds +-- @param #unsigned int repeat +-- @param #float delay -------------------------------- +-- set interval in seconds -- @function [parent=#Timer] setInterval -- @param self --- @param #float float +-- @param #float interval -------------------------------- +-- triggers the timer -- @function [parent=#Timer] update -- @param self --- @param #float float +-- @param #float dt -------------------------------- +-- -- @function [parent=#Timer] trigger -- @param self -------------------------------- +-- -- @function [parent=#Timer] cancel -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TintBy.lua b/cocos/scripting/lua-bindings/auto/api/TintBy.lua index 4eba544dc5..f86cbde3c1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TintBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/TintBy.lua @@ -5,32 +5,37 @@ -- @parent_module cc -------------------------------- +-- creates an action with duration and color -- @function [parent=#TintBy] create -- @param self --- @param #float float --- @param #short short --- @param #short short --- @param #short short +-- @param #float duration +-- @param #short deltaRed +-- @param #short deltaGreen +-- @param #short deltaBlue -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- +-- -- @function [parent=#TintBy] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#TintBy] clone -- @param self -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- +-- -- @function [parent=#TintBy] reverse -- @param self -- @return TintBy#TintBy ret (return value: cc.TintBy) -------------------------------- +-- -- @function [parent=#TintBy] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TintTo.lua b/cocos/scripting/lua-bindings/auto/api/TintTo.lua index 25a5fe6a09..ec78c9aaa2 100644 --- a/cocos/scripting/lua-bindings/auto/api/TintTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/TintTo.lua @@ -5,32 +5,37 @@ -- @parent_module cc -------------------------------- +-- creates an action with duration and color -- @function [parent=#TintTo] create -- @param self --- @param #float float --- @param #unsigned char char --- @param #unsigned char char --- @param #unsigned char char +-- @param #float duration +-- @param #unsigned char red +-- @param #unsigned char green +-- @param #unsigned char blue -- @return TintTo#TintTo ret (return value: cc.TintTo) -------------------------------- +-- -- @function [parent=#TintTo] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#TintTo] clone -- @param self -- @return TintTo#TintTo ret (return value: cc.TintTo) -------------------------------- +-- -- @function [parent=#TintTo] reverse -- @param self -- @return TintTo#TintTo ret (return value: cc.TintTo) -------------------------------- +-- -- @function [parent=#TintTo] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua b/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua index 21307c0a00..8898cdff27 100644 --- a/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua +++ b/cocos/scripting/lua-bindings/auto/api/ToggleVisibility.lua @@ -5,21 +5,25 @@ -- @parent_module cc -------------------------------- +-- Allocates and initializes the action -- @function [parent=#ToggleVisibility] create -- @param self -- @return ToggleVisibility#ToggleVisibility ret (return value: cc.ToggleVisibility) -------------------------------- +-- -- @function [parent=#ToggleVisibility] clone -- @param self -- @return ToggleVisibility#ToggleVisibility ret (return value: cc.ToggleVisibility) -------------------------------- +-- -- @function [parent=#ToggleVisibility] update -- @param self --- @param #float float +-- @param #float time -------------------------------- +-- -- @function [parent=#ToggleVisibility] reverse -- @param self -- @return ToggleVisibility#ToggleVisibility ret (return value: cc.ToggleVisibility) diff --git a/cocos/scripting/lua-bindings/auto/api/Touch.lua b/cocos/scripting/lua-bindings/auto/api/Touch.lua index d56df32267..0f2b51afcd 100644 --- a/cocos/scripting/lua-bindings/auto/api/Touch.lua +++ b/cocos/scripting/lua-bindings/auto/api/Touch.lua @@ -5,53 +5,64 @@ -- @parent_module cc -------------------------------- +-- returns the previous touch location in screen coordinates -- @function [parent=#Touch] getPreviousLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the current touch location in OpenGL coordinates -- @function [parent=#Touch] getLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the delta of 2 current touches locations in screen coordinates -- @function [parent=#Touch] getDelta -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the start touch location in screen coordinates -- @function [parent=#Touch] getStartLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the start touch location in OpenGL coordinates -- @function [parent=#Touch] getStartLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- js getId
+-- lua getId -- @function [parent=#Touch] getID -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Touch] setTouchInfo -- @param self --- @param #int int --- @param #float float --- @param #float float +-- @param #int id +-- @param #float x +-- @param #float y -------------------------------- +-- returns the current touch location in screen coordinates -- @function [parent=#Touch] getLocationInView -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- returns the previous touch location in OpenGL coordinates -- @function [parent=#Touch] getPreviousLocation -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- -- @function [parent=#Touch] Touch -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua b/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua index e39e8adec7..5d03d65da6 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua @@ -5,17 +5,20 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionCrossFade] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionCrossFade#TransitionCrossFade ret (return value: cc.TransitionCrossFade) -------------------------------- +-- js NA
+-- lua NA -- @function [parent=#TransitionCrossFade] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua b/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua index 4afd77786d..2fe8fe717c 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionEaseScene.lua @@ -4,9 +4,11 @@ -- @parent_module cc -------------------------------- +-- returns the Ease action that will be performed on a linear action.
+-- since v0.8.2 -- @function [parent=#TransitionEaseScene] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua index 73bd19113b..7e98445787 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, color3b_table -- @function [parent=#TransitionFade] create -- @param self --- @param #float float +-- @param #float duration -- @param #cc.Scene scene --- @param #color3b_table color3b +-- @param #color3b_table color -- @return TransitionFade#TransitionFade ret (retunr value: cc.TransitionFade) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua index de2a9b5079..6412b19e34 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeBL.lua @@ -5,13 +5,15 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionFadeBL] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionFadeBL#TransitionFadeBL ret (return value: cc.TransitionFadeBL) -------------------------------- +-- -- @function [parent=#TransitionFadeBL] actionWithSize -- @param self -- @param #size_table size diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua index dbcb62a2e9..435efe63a8 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeDown.lua @@ -5,13 +5,15 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionFadeDown] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionFadeDown#TransitionFadeDown ret (return value: cc.TransitionFadeDown) -------------------------------- +-- -- @function [parent=#TransitionFadeDown] actionWithSize -- @param self -- @param #size_table size diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua index 3e7160fd6b..cb1e539ea4 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua @@ -5,29 +5,33 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionFadeTR] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionFadeTR] actionWithSize -- @param self -- @param #size_table size -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionFadeTR] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionFadeTR#TransitionFadeTR ret (return value: cc.TransitionFadeTR) -------------------------------- +-- -- @function [parent=#TransitionFadeTR] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua index 9e3bc4ac28..19c7b91167 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeUp.lua @@ -5,13 +5,15 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionFadeUp] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionFadeUp#TransitionFadeUp ret (return value: cc.TransitionFadeUp) -------------------------------- +-- -- @function [parent=#TransitionFadeUp] actionWithSize -- @param self -- @param #size_table size diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua index e8be2f3f92..9765783694 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionFlipAngular] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionFlipAngular#TransitionFlipAngular ret (retunr value: cc.TransitionFlipAngular) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua index bd3d3d3660..b27aa235b0 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionFlipX] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionFlipX#TransitionFlipX ret (retunr value: cc.TransitionFlipX) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua index eebe6b56bc..5973c5b1f1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionFlipY] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionFlipY#TransitionFlipY ret (retunr value: cc.TransitionFlipY) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua b/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua index 915c89cfa0..3bb200c538 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionJumpZoom.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionJumpZoom] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionJumpZoom#TransitionJumpZoom ret (return value: cc.TransitionJumpZoom) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua index 799212f087..7da02d0375 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInB.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionMoveInB] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionMoveInB#TransitionMoveInB ret (return value: cc.TransitionMoveInB) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua index dced884285..834ccdf1f2 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInL.lua @@ -5,20 +5,23 @@ -- @parent_module cc -------------------------------- +-- returns the action that will be performed -- @function [parent=#TransitionMoveInL] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionMoveInL] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionMoveInL] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionMoveInL#TransitionMoveInL ret (return value: cc.TransitionMoveInL) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua index 2b67b9a3e4..adc3bd97a4 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInR.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionMoveInR] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionMoveInR#TransitionMoveInR ret (return value: cc.TransitionMoveInR) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua index 40030fdda8..b71c1de3bb 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionMoveInT.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionMoveInT] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionMoveInT#TransitionMoveInT ret (return value: cc.TransitionMoveInT) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua b/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua index 1c655d6fab..65982e0145 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua @@ -5,32 +5,40 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionPageTurn] actionWithSize -- @param self --- @param #size_table size +-- @param #size_table vector -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- Creates a base transition with duration and incoming scene.
+-- If back is true then the effect is reversed to appear as if the incoming
+-- scene is being turned from left over the outgoing scene. -- @function [parent=#TransitionPageTurn] initWithDuration -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene --- @param #bool bool +-- @param #bool backwards -- @return bool#bool ret (return value: bool) -------------------------------- +-- Creates a base transition with duration and incoming scene.
+-- If back is true then the effect is reversed to appear as if the incoming
+-- scene is being turned from left over the outgoing scene. -- @function [parent=#TransitionPageTurn] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene --- @param #bool bool +-- @param #bool backwards -- @return TransitionPageTurn#TransitionPageTurn ret (return value: cc.TransitionPageTurn) -------------------------------- +-- -- @function [parent=#TransitionPageTurn] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua index d05379f82b..6b4ee9c9b3 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgress.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgress] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgress#TransitionProgress ret (return value: cc.TransitionProgress) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua index 917c7be032..2de10c764d 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressHorizontal.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressHorizontal] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressHorizontal#TransitionProgressHorizontal ret (return value: cc.TransitionProgressHorizontal) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua index d60be89302..24a1e3ee1c 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressInOut.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressInOut] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressInOut#TransitionProgressInOut ret (return value: cc.TransitionProgressInOut) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua index c5f4e9fe18..5df3e5b9f1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressOutIn.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressOutIn] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressOutIn#TransitionProgressOutIn ret (return value: cc.TransitionProgressOutIn) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua index cf95079265..9886d6ebfe 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCCW.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressRadialCCW] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressRadialCCW#TransitionProgressRadialCCW ret (return value: cc.TransitionProgressRadialCCW) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua index 83c2370933..795e2047ab 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressRadialCW.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressRadialCW] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressRadialCW#TransitionProgressRadialCW ret (return value: cc.TransitionProgressRadialCW) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua b/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua index 7874cd3a6f..b2d75100bf 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionProgressVertical.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionProgressVertical] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionProgressVertical#TransitionProgressVertical ret (return value: cc.TransitionProgressVertical) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua b/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua index b6d5f70e6f..388ff0b06f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionRotoZoom.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionRotoZoom] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionRotoZoom#TransitionRotoZoom ret (return value: cc.TransitionRotoZoom) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua b/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua index 1a03e181d9..4b5f3be37a 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua @@ -5,28 +5,33 @@ -- @parent_module cc -------------------------------- +-- called after the transition finishes -- @function [parent=#TransitionScene] finish -- @param self -------------------------------- +-- used by some transitions to hide the outer scene -- @function [parent=#TransitionScene] hideOutShowIn -- @param self -------------------------------- +-- creates a base transition with duration and incoming scene -- @function [parent=#TransitionScene] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionScene#TransitionScene ret (return value: cc.TransitionScene) -------------------------------- +-- -- @function [parent=#TransitionScene] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#TransitionScene] cleanup -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua index 965126e682..d34be6be7e 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSceneOriented.lua @@ -5,9 +5,10 @@ -- @parent_module cc -------------------------------- +-- creates a base transition with duration and incoming scene -- @function [parent=#TransitionSceneOriented] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @param #int orientation -- @return TransitionSceneOriented#TransitionSceneOriented ret (return value: cc.TransitionSceneOriented) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua b/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua index 28493ed5f2..2a9835a35e 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionShrinkGrow.lua @@ -5,15 +5,17 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionShrinkGrow] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionShrinkGrow] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionShrinkGrow#TransitionShrinkGrow ret (return value: cc.TransitionShrinkGrow) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua index 511ac8c25b..0cc097f834 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInB.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInB] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSlideInB] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSlideInB#TransitionSlideInB ret (return value: cc.TransitionSlideInB) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua index dce81f4ece..ab682254c8 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInL.lua @@ -5,20 +5,23 @@ -- @parent_module cc -------------------------------- +-- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInL] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSlideInL] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSlideInL] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSlideInL#TransitionSlideInL ret (return value: cc.TransitionSlideInL) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua index 10c78150b1..3de6ed9172 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInR.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInR] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSlideInR] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSlideInR#TransitionSlideInR ret (return value: cc.TransitionSlideInR) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua index 57dfa51ce4..c04116778f 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSlideInT.lua @@ -5,14 +5,16 @@ -- @parent_module cc -------------------------------- +-- returns the action that will be performed by the incoming and outgoing scene -- @function [parent=#TransitionSlideInT] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSlideInT] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSlideInT#TransitionSlideInT ret (return value: cc.TransitionSlideInT) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua index a421599f70..6242195882 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua @@ -5,28 +5,32 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionSplitCols] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSplitCols] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionSplitCols] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSplitCols#TransitionSplitCols ret (return value: cc.TransitionSplitCols) -------------------------------- +-- -- @function [parent=#TransitionSplitCols] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua index fdcbaf1feb..0c9ccd61b1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSplitRows.lua @@ -5,13 +5,15 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionSplitRows] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionSplitRows#TransitionSplitRows ret (return value: cc.TransitionSplitRows) -------------------------------- +-- -- @function [parent=#TransitionSplitRows] action -- @param self -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua b/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua index e9a4d6fc81..a3523d3c10 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua @@ -5,23 +5,26 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TransitionTurnOffTiles] easeActionWithAction -- @param self --- @param #cc.ActionInterval actioninterval +-- @param #cc.ActionInterval action -- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval) -------------------------------- +-- -- @function [parent=#TransitionTurnOffTiles] create -- @param self --- @param #float float +-- @param #float t -- @param #cc.Scene scene -- @return TransitionTurnOffTiles#TransitionTurnOffTiles ret (return value: cc.TransitionTurnOffTiles) -------------------------------- +-- -- @function [parent=#TransitionTurnOffTiles] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua index 10360d5cf8..d726097c07 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionZoomFlipAngular] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionZoomFlipAngular#TransitionZoomFlipAngular ret (retunr value: cc.TransitionZoomFlipAngular) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua index fa6ed5fd29..0da39fdee8 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionZoomFlipX] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionZoomFlipX#TransitionZoomFlipX ret (retunr value: cc.TransitionZoomFlipX) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua index d137a545e9..397e989ffd 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua @@ -9,9 +9,9 @@ -- @overload self, float, cc.Scene, int -- @function [parent=#TransitionZoomFlipY] create -- @param self --- @param #float float --- @param #cc.Scene scene --- @param #int orientation +-- @param #float t +-- @param #cc.Scene s +-- @param #int o -- @return TransitionZoomFlipY#TransitionZoomFlipY ret (retunr value: cc.TransitionZoomFlipY) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua b/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua index c7ffd3d8f4..7798a1f952 100644 --- a/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua @@ -5,38 +5,43 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#TurnOffTiles] turnOnTile -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#TurnOffTiles] turnOffTile -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- -- @overload self, float, size_table, unsigned int -- @overload self, float, size_table -- @function [parent=#TurnOffTiles] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int seed -- @return TurnOffTiles#TurnOffTiles ret (retunr value: cc.TurnOffTiles) -------------------------------- +-- -- @function [parent=#TurnOffTiles] startWithTarget -- @param self --- @param #cc.Node node +-- @param #cc.Node target -------------------------------- +-- -- @function [parent=#TurnOffTiles] clone -- @param self -- @return TurnOffTiles#TurnOffTiles ret (return value: cc.TurnOffTiles) -------------------------------- +-- -- @function [parent=#TurnOffTiles] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Tween.lua b/cocos/scripting/lua-bindings/auto/api/Tween.lua index e4791051a9..923aef489d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Tween.lua +++ b/cocos/scripting/lua-bindings/auto/api/Tween.lua @@ -5,47 +5,70 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#Tween] getAnimation -- @param self -- @return ArmatureAnimation#ArmatureAnimation ret (return value: ccs.ArmatureAnimation) -------------------------------- +-- -- @function [parent=#Tween] gotoAndPause -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- Start the Process
+-- param movementBoneData the MovementBoneData include all FrameData
+-- param durationTo the number of frames changing to this animation needs.
+-- param durationTween the number of frames this animation actual last.
+-- param loop whether the animation is loop
+-- loop < 0 : use the value from MovementData get from Action Editor
+-- loop = 0 : this animation is not loop
+-- loop > 0 : this animation is loop
+-- param tweenEasing tween easing is used for calculate easing effect
+-- TWEEN_EASING_MAX : use the value from MovementData get from Action Editor
+-- -1 : fade out
+-- 0 : line
+-- 1 : fade in
+-- 2 : fade in and out -- @function [parent=#Tween] play -- @param self --- @param #ccs.MovementBoneData movementbonedata --- @param #int int --- @param #int int --- @param #int int --- @param #int int +-- @param #ccs.MovementBoneData movementBoneData +-- @param #int durationTo +-- @param #int durationTween +-- @param #int loop +-- @param #int tweenEasing -------------------------------- +-- -- @function [parent=#Tween] gotoAndPlay -- @param self --- @param #int int +-- @param #int frameIndex -------------------------------- +-- Init with a Bone
+-- param bone the Bone Tween will bind to -- @function [parent=#Tween] init -- @param self -- @param #ccs.Bone bone -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Tween] setAnimation -- @param self --- @param #ccs.ArmatureAnimation armatureanimation +-- @param #ccs.ArmatureAnimation animation -------------------------------- +-- Create with a Bone
+-- param bone the Bone Tween will bind to -- @function [parent=#Tween] create -- @param self -- @param #ccs.Bone bone -- @return Tween#Tween ret (return value: ccs.Tween) -------------------------------- +-- -- @function [parent=#Tween] Tween -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Twirl.lua b/cocos/scripting/lua-bindings/auto/api/Twirl.lua index cfb9105cde..8b3574ae80 100644 --- a/cocos/scripting/lua-bindings/auto/api/Twirl.lua +++ b/cocos/scripting/lua-bindings/auto/api/Twirl.lua @@ -5,53 +5,62 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Twirl] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- -- @function [parent=#Twirl] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Twirl] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- -- @function [parent=#Twirl] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- set twirl center -- @function [parent=#Twirl] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table position -------------------------------- +-- get twirl center -- @function [parent=#Twirl] getPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- creates the action with center position, number of twirls, amplitude, a grid size and duration -- @function [parent=#Twirl] create -- @param self --- @param #float float --- @param #size_table size --- @param #vec2_table vec2 --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #vec2_table position +-- @param #unsigned int twirls +-- @param #float amplitude -- @return Twirl#Twirl ret (return value: cc.Twirl) -------------------------------- +-- -- @function [parent=#Twirl] clone -- @param self -- @return Twirl#Twirl ret (return value: cc.Twirl) -------------------------------- +-- -- @function [parent=#Twirl] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua index 173263c472..3b80444050 100644 --- a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua +++ b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua @@ -4,18 +4,20 @@ -- @parent_module cc -------------------------------- +-- brief Set integer value by key.
+-- js NA -- @function [parent=#UserDefault] setIntegerForKey -- @param self --- @param #char char --- @param #int int +-- @param #char pKey +-- @param #int value -------------------------------- -- @overload self, char, float -- @overload self, char -- @function [parent=#UserDefault] getFloatForKey -- @param self --- @param #char char --- @param #float float +-- @param #char pKey +-- @param #float defaultValue -- @return float#float ret (retunr value: float) -------------------------------- @@ -23,38 +25,46 @@ -- @overload self, char -- @function [parent=#UserDefault] getBoolForKey -- @param self --- @param #char char --- @param #bool bool +-- @param #char pKey +-- @param #bool defaultValue -- @return bool#bool ret (retunr value: bool) -------------------------------- +-- brief Set double value by key.
+-- js NA -- @function [parent=#UserDefault] setDoubleForKey -- @param self --- @param #char char --- @param #double double +-- @param #char pKey +-- @param #double value -------------------------------- +-- brief Set float value by key.
+-- js NA -- @function [parent=#UserDefault] setFloatForKey -- @param self --- @param #char char --- @param #float float +-- @param #char pKey +-- @param #float value -------------------------------- -- @overload self, char, string -- @overload self, char -- @function [parent=#UserDefault] getStringForKey -- @param self --- @param #char char --- @param #string str +-- @param #char pKey +-- @param #string defaultValue -- @return string#string ret (retunr value: string) -------------------------------- +-- brief Set string value by key.
+-- js NA -- @function [parent=#UserDefault] setStringForKey -- @param self --- @param #char char --- @param #string str +-- @param #char pKey +-- @param #string value -------------------------------- +-- brief Save content to xml file
+-- js NA -- @function [parent=#UserDefault] flush -- @param self @@ -63,8 +73,8 @@ -- @overload self, char -- @function [parent=#UserDefault] getIntegerForKey -- @param self --- @param #char char --- @param #int int +-- @param #char pKey +-- @param #int defaultValue -- @return int#int ret (retunr value: int) -------------------------------- @@ -72,26 +82,31 @@ -- @overload self, char -- @function [parent=#UserDefault] getDoubleForKey -- @param self --- @param #char char --- @param #double double +-- @param #char pKey +-- @param #double defaultValue -- @return double#double ret (retunr value: double) -------------------------------- +-- brief Set bool value by key.
+-- js NA -- @function [parent=#UserDefault] setBoolForKey -- @param self --- @param #char char --- @param #bool bool +-- @param #char pKey +-- @param #bool value -------------------------------- +-- js NA -- @function [parent=#UserDefault] destroyInstance -- @param self -------------------------------- +-- js NA -- @function [parent=#UserDefault] getXMLFilePath -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- js NA -- @function [parent=#UserDefault] isXMLFileExist -- @param self -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/VBox.lua b/cocos/scripting/lua-bindings/auto/api/VBox.lua index 0955ae7c9e..4f94fe822e 100644 --- a/cocos/scripting/lua-bindings/auto/api/VBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/VBox.lua @@ -13,6 +13,7 @@ -- @return VBox#VBox ret (retunr value: ccui.VBox) -------------------------------- +-- Default constructor -- @function [parent=#VBox] VBox -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua b/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua index 36954f071d..4812de8cee 100644 --- a/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua +++ b/cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua @@ -5,91 +5,109 @@ -- @parent_module ccexp -------------------------------- +-- -- @function [parent=#VideoPlayer] getFileName -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#VideoPlayer] getURL -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- -- @function [parent=#VideoPlayer] play -- @param self -------------------------------- +-- -- @function [parent=#VideoPlayer] pause -- @param self -------------------------------- +-- -- @function [parent=#VideoPlayer] setKeepAspectRatioEnabled -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#VideoPlayer] resume -- @param self -------------------------------- +-- -- @function [parent=#VideoPlayer] stop -- @param self -------------------------------- +-- -- @function [parent=#VideoPlayer] setFullScreenEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#VideoPlayer] setFileName -- @param self --- @param #string str +-- @param #string videoPath -------------------------------- +-- -- @function [parent=#VideoPlayer] setURL -- @param self --- @param #string str +-- @param #string _videoURL -------------------------------- +-- -- @function [parent=#VideoPlayer] isKeepAspectRatioEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#VideoPlayer] onPlayEvent -- @param self --- @param #int int +-- @param #int event -------------------------------- +-- -- @function [parent=#VideoPlayer] isFullScreenEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#VideoPlayer] isPlaying -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#VideoPlayer] seekTo -- @param self --- @param #float float +-- @param #float sec -------------------------------- +-- -- @function [parent=#VideoPlayer] create -- @param self -- @return experimental::ui::VideoPlayer#experimental::ui::VideoPlayer ret (return value: cc.experimental::ui::VideoPlayer) -------------------------------- +-- -- @function [parent=#VideoPlayer] draw -- @param self -- @param #cc.Renderer renderer --- @param #mat4_table mat4 --- @param #unsigned int int +-- @param #mat4_table transform +-- @param #unsigned int flags -------------------------------- +-- -- @function [parent=#VideoPlayer] setVisible -- @param self --- @param #bool bool +-- @param #bool visible return nil diff --git a/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua b/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua index 2ca2917585..3d7b5e1115 100644 --- a/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua @@ -5,26 +5,31 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#VisibleFrame] isVisible -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#VisibleFrame] setVisible -- @param self --- @param #bool bool +-- @param #bool visible -------------------------------- +-- -- @function [parent=#VisibleFrame] create -- @param self -- @return VisibleFrame#VisibleFrame ret (return value: ccs.VisibleFrame) -------------------------------- +-- -- @function [parent=#VisibleFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#VisibleFrame] VisibleFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Waves.lua b/cocos/scripting/lua-bindings/auto/api/Waves.lua index e8de3e0b5c..53569100b4 100644 --- a/cocos/scripting/lua-bindings/auto/api/Waves.lua +++ b/cocos/scripting/lua-bindings/auto/api/Waves.lua @@ -5,44 +5,51 @@ -- @parent_module cc -------------------------------- +-- -- @function [parent=#Waves] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#Waves] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- -- @function [parent=#Waves] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- -- @function [parent=#Waves] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration -- @function [parent=#Waves] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int --- @param #float float --- @param #bool bool --- @param #bool bool +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int waves +-- @param #float amplitude +-- @param #bool horizontal +-- @param #bool vertical -- @return Waves#Waves ret (return value: cc.Waves) -------------------------------- +-- -- @function [parent=#Waves] clone -- @param self -- @return Waves#Waves ret (return value: cc.Waves) -------------------------------- +-- -- @function [parent=#Waves] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Waves3D.lua b/cocos/scripting/lua-bindings/auto/api/Waves3D.lua index 6eb07c8021..7ffc9ed324 100644 --- a/cocos/scripting/lua-bindings/auto/api/Waves3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Waves3D.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- returns the amplitude rate -- @function [parent=#Waves3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- sets the amplitude to the effect -- @function [parent=#Waves3D] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- sets the ampliture rate -- @function [parent=#Waves3D] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- returns the amplitude of the effect -- @function [parent=#Waves3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- creates an action with duration, grid size, waves and amplitude -- @function [parent=#Waves3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int waves +-- @param #float amplitude -- @return Waves3D#Waves3D ret (return value: cc.Waves3D) -------------------------------- +-- -- @function [parent=#Waves3D] clone -- @param self -- @return Waves3D#Waves3D ret (return value: cc.Waves3D) -------------------------------- +-- -- @function [parent=#Waves3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua b/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua index 35c8de579e..14e5255895 100644 --- a/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua @@ -5,42 +5,49 @@ -- @parent_module cc -------------------------------- +-- waves amplitude rate -- @function [parent=#WavesTiles3D] getAmplitudeRate -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- -- @function [parent=#WavesTiles3D] setAmplitude -- @param self --- @param #float float +-- @param #float amplitude -------------------------------- +-- -- @function [parent=#WavesTiles3D] setAmplitudeRate -- @param self --- @param #float float +-- @param #float amplitudeRate -------------------------------- +-- waves amplitude -- @function [parent=#WavesTiles3D] getAmplitude -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- creates the action with a number of waves, the waves amplitude, the grid size and the duration -- @function [parent=#WavesTiles3D] create -- @param self --- @param #float float --- @param #size_table size --- @param #unsigned int int --- @param #float float +-- @param #float duration +-- @param #size_table gridSize +-- @param #unsigned int waves +-- @param #float amplitude -- @return WavesTiles3D#WavesTiles3D ret (return value: cc.WavesTiles3D) -------------------------------- +-- -- @function [parent=#WavesTiles3D] clone -- @param self -- @return WavesTiles3D#WavesTiles3D ret (return value: cc.WavesTiles3D) -------------------------------- +-- -- @function [parent=#WavesTiles3D] update -- @param self --- @param #float float +-- @param #float time return nil diff --git a/cocos/scripting/lua-bindings/auto/api/Widget.lua b/cocos/scripting/lua-bindings/auto/api/Widget.lua index b473cb3332..e840a16900 100644 --- a/cocos/scripting/lua-bindings/auto/api/Widget.lua +++ b/cocos/scripting/lua-bindings/auto/api/Widget.lua @@ -5,219 +5,304 @@ -- @parent_module ccui -------------------------------- +-- Changes the percent that is widget's percent size
+-- param percent that is widget's percent size -- @function [parent=#Widget] setSizePercent -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table percent -------------------------------- +-- -- @function [parent=#Widget] getCustomSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- -- @function [parent=#Widget] getLeftBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Sets whether the widget should be flipped horizontally or not.
+-- param bFlippedX true if the widget should be flipped horizaontally, false otherwise. -- @function [parent=#Widget] setFlippedX -- @param self --- @param #bool bool +-- @param #bool flippedX -------------------------------- +-- Gets the Virtual Renderer of widget.
+-- For example, a button's Virtual Renderer is it's texture renderer.
+-- return Node pointer. -- @function [parent=#Widget] getVirtualRenderer -- @param self -- @return Node#Node ret (return value: cc.Node) -------------------------------- +-- brief Allow widget touch events to propagate to its parents. Set false will disable propagation -- @function [parent=#Widget] setPropagateTouchEvents -- @param self --- @param #bool bool +-- @param #bool isPropagate -------------------------------- +-- Returns size percent of widget
+-- return size percent -- @function [parent=#Widget] getSizePercent -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Set the percent(x,y) of the widget in OpenGL coordinates
+-- param percent The percent (x,y) of the widget in OpenGL coordinates -- @function [parent=#Widget] setPositionPercent -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table percent -------------------------------- +-- brief Specify widget to swallow touches or not -- @function [parent=#Widget] setSwallowTouches -- @param self --- @param #bool bool +-- @param #bool swallow -------------------------------- +-- -- @function [parent=#Widget] getLayoutSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Sets whether the widget is hilighted
+-- The default value is false, a widget is default to not hilighted
+-- param hilight true if the widget is hilighted, false if the widget is not hilighted. -- @function [parent=#Widget] setHighlighted -- @param self --- @param #bool bool +-- @param #bool hilight -------------------------------- +-- Changes the position type of the widget
+-- see PositionType
+-- param type the position type of widget -- @function [parent=#Widget] setPositionType -- @param self --- @param #int positiontype +-- @param #int type -------------------------------- +-- Query whether the widget ignores user deinfed content size or not
+-- return bool -- @function [parent=#Widget] isIgnoreContentAdaptWithSize -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] getVirtualRendererSize -- @param self -- @return size_table#size_table ret (return value: size_table) -------------------------------- +-- Determines if the widget is highlighted
+-- return true if the widget is highlighted, false if the widget is not hignlighted . -- @function [parent=#Widget] isHighlighted -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets LayoutParameter of widget.
+-- see LayoutParameter
+-- param type Relative or Linear
+-- return LayoutParameter -- @function [parent=#Widget] getLayoutParameter -- @param self -- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter) -------------------------------- +-- Checks a point if is in widget's space
+-- param point
+-- return true if the point is in widget's space, flase otherwise. -- @function [parent=#Widget] hitTest -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pt -- @return bool#bool ret (return value: bool) -------------------------------- +-- Gets the position type of the widget
+-- see PositionType
+-- return type the position type of widget -- @function [parent=#Widget] getPositionType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Widget] getTopBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Note: when you set _ignoreSize to true, no matther you call setContentSize or not,
+-- the widget size is always equal to the return value of the member function getVirtualRendererSize.
+-- param ignore, set member variabl _ignoreSize to ignore -- @function [parent=#Widget] ignoreContentAdaptWithSize -- @param self --- @param #bool bool +-- @param #bool ignore -------------------------------- +-- When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
+-- If the widget is not in a layout, it will return itself
+-- param dir the direction to look for the next focused widget in a layout
+-- param current the current focused widget
+-- return the next focused widget in a layout -- @function [parent=#Widget] findNextFocusedWidget -- @param self --- @param #int focusdirection --- @param #ccui.Widget widget +-- @param #int direction +-- @param #ccui.Widget current -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- Determines if the widget is enabled
+-- return true if the widget is enabled, false if the widget is disabled. -- @function [parent=#Widget] isEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- return whether the widget is focused or not -- @function [parent=#Widget] isFocused -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] getTouchBeganPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Determines if the widget is touch enabled
+-- return true if the widget is touch enabled, false if the widget is touch disabled. -- @function [parent=#Widget] isTouchEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] getActionTag -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- Gets world position of widget.
+-- return world position of widget. -- @function [parent=#Widget] getWorldPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- return true represent the widget could accept focus, false represent the widget couldn't accept focus -- @function [parent=#Widget] isFocusEnabled -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- param focus pass true to let the widget get focus or pass false to let the widget lose focus
+-- return void -- @function [parent=#Widget] setFocused -- @param self --- @param #bool bool +-- @param #bool focus -------------------------------- +-- -- @function [parent=#Widget] setActionTag -- @param self --- @param #int int +-- @param #int tag -------------------------------- +-- Sets whether the widget is touch enabled
+-- The default value is false, a widget is default to touch disabled
+-- param visible true if the widget is touch enabled, false if the widget is touch disabled. -- @function [parent=#Widget] setTouchEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- Sets whether the widget should be flipped vertically or not.
+-- param bFlippedY true if the widget should be flipped vertically, flase otherwise. -- @function [parent=#Widget] setFlippedY -- @param self --- @param #bool bool +-- @param #bool flippedY -------------------------------- +-- Sets whether the widget is enabled
+-- true if the widget is enabled, widget may be touched , false if the widget is disabled, widget cannot be touched.
+-- The default value is true, a widget is default to enabled
+-- param enabled -- @function [parent=#Widget] setEnabled -- @param self --- @param #bool bool +-- @param #bool enabled -------------------------------- +-- -- @function [parent=#Widget] getRightBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- To set the bright style of widget.
+-- see BrightStyle
+-- param style BrightStyle::NORMAL means the widget is in normal state, BrightStyle::HIGHLIGHT means the widget is in highlight state. -- @function [parent=#Widget] setBrightStyle -- @param self --- @param #int brightstyle +-- @param #int style -------------------------------- +-- Sets a LayoutParameter to widget.
+-- see LayoutParameter
+-- param LayoutParameter pointer
+-- param type Relative or Linear -- @function [parent=#Widget] setLayoutParameter -- @param self --- @param #ccui.LayoutParameter layoutparameter +-- @param #ccui.LayoutParameter parameter -------------------------------- +-- -- @function [parent=#Widget] clone -- @param self -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- param enable pass true/false to enable/disable the focus ability of a widget
+-- return void -- @function [parent=#Widget] setFocusEnabled -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- -- @function [parent=#Widget] getBottomBoundary -- @param self -- @return float#float ret (return value: float) -------------------------------- +-- Determines if the widget is bright
+-- return true if the widget is bright, false if the widget is dark. -- @function [parent=#Widget] isBright -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] isPropagateTouchEvents -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] getCurrentFocusedWidget -- @param self -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- when a widget calls this method, it will get focus immediately. -- @function [parent=#Widget] requestFocus -- @param self @@ -226,95 +311,134 @@ -- @overload self -- @function [parent=#Widget] updateSizeAndPosition -- @param self --- @param #size_table size +-- @param #size_table parentSize -------------------------------- +-- -- @function [parent=#Widget] getTouchMovePosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Gets the size type of widget.
+-- see SizeType
+-- param type that is widget's size type -- @function [parent=#Widget] getSizeType -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#Widget] addTouchEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- -- @function [parent=#Widget] getTouchEndPosition -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Gets the percent (x,y) of the widget in OpenGL coordinates
+-- see setPosition(const Vec2&)
+-- return The percent (x,y) of the widget in OpenGL coordinates -- @function [parent=#Widget] getPositionPercent -- @param self -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- +-- Set a click event handler to the widget -- @function [parent=#Widget] addClickEventListener -- @param self --- @param #function func +-- @param #function callback -------------------------------- +-- Returns the flag which indicates whether the widget is flipped horizontally or not.
+-- It only flips the texture of the widget, and not the texture of the widget's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- widget->setScaleX(sprite->getScaleX() * -1);
+-- return true if the widget is flipped horizaontally, false otherwise. -- @function [parent=#Widget] isFlippedX -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- Return the flag which indicates whether the widget is flipped vertically or not.
+-- It only flips the texture of the widget, and not the texture of the widget's children.
+-- Also, flipping the texture doesn't alter the anchorPoint.
+-- If you want to flip the anchorPoint too, and/or to flip the children too use:
+-- widget->setScaleY(widget->getScaleY() * -1);
+-- return true if the widget is flipped vertically, flase otherwise. -- @function [parent=#Widget] isFlippedY -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] isClippingParentContainsPoint -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pt -- @return bool#bool ret (return value: bool) -------------------------------- +-- Changes the size type of widget.
+-- see SizeType
+-- param type that is widget's size type -- @function [parent=#Widget] setSizeType -- @param self --- @param #int sizetype +-- @param #int type -------------------------------- +-- Sets whether the widget is bright
+-- The default value is true, a widget is default to bright
+-- param visible true if the widget is bright, false if the widget is dark. -- @function [parent=#Widget] setBright -- @param self --- @param #bool bool +-- @param #bool bright -------------------------------- +-- -- @function [parent=#Widget] isSwallowTouches -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- +-- -- @function [parent=#Widget] enableDpadNavigation -- @param self --- @param #bool bool +-- @param #bool enable -------------------------------- +-- Allocates and initializes a widget. -- @function [parent=#Widget] create -- @param self -- @return Widget#Widget ret (return value: ccui.Widget) -------------------------------- +-- Returns the "class name" of widget. -- @function [parent=#Widget] getDescription -- @param self -- @return string#string ret (return value: string) -------------------------------- +-- Changes the position (x,y) of the widget in OpenGL coordinates
+-- Usually we use p(x,y) to compose Vec2 object.
+-- The original point (0,0) is at the left-bottom corner of screen.
+-- param position The position (x,y) of the widget in OpenGL coordinates -- @function [parent=#Widget] setPosition -- @param self --- @param #vec2_table vec2 +-- @param #vec2_table pos -------------------------------- +-- -- @function [parent=#Widget] setContentSize -- @param self --- @param #size_table size +-- @param #size_table contentSize -------------------------------- +-- Default constructor -- @function [parent=#Widget] Widget -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua b/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua index aa0999498e..6a89744ead 100644 --- a/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua @@ -5,26 +5,31 @@ -- @parent_module ccs -------------------------------- +-- -- @function [parent=#ZOrderFrame] getZOrder -- @param self -- @return int#int ret (return value: int) -------------------------------- +-- -- @function [parent=#ZOrderFrame] setZOrder -- @param self --- @param #int int +-- @param #int zorder -------------------------------- +-- -- @function [parent=#ZOrderFrame] create -- @param self -- @return ZOrderFrame#ZOrderFrame ret (return value: ccs.ZOrderFrame) -------------------------------- +-- -- @function [parent=#ZOrderFrame] clone -- @param self -- @return Frame#Frame ret (return value: ccs.Frame) -------------------------------- +-- -- @function [parent=#ZOrderFrame] ZOrderFrame -- @param self diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 77190063f7..312a5dfe3e 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -522,7 +522,8 @@ int lua_cocos2dx_3d_Sprite3D_setBlendFunc(lua_State* tolua_S) { cocos2d::BlendFunc arg0; - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc + ok = false; if(!ok) return 0; cobj->setBlendFunc(arg0); @@ -1289,7 +1290,8 @@ int lua_cocos2dx_3d_Mesh_setBlendFunc(lua_State* tolua_S) { cocos2d::BlendFunc arg0; - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc + ok = false; if(!ok) return 0; cobj->setBlendFunc(arg0); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 3f90a87db1..74a9ae1232 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -10539,7 +10539,8 @@ int lua_cocos2dx_GLView_setGLContextAttrs(lua_State* tolua_S) if (argc == 1) { GLContextAttrs arg0; - #pragma warning NO CONVERSION TO NATIVE FOR GLContextAttrs; + #pragma warning NO CONVERSION TO NATIVE FOR GLContextAttrs + ok = false; if(!ok) return 0; cocos2d::GLView::setGLContextAttrs(arg0); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp index e9a0cc19d0..8d94bee826 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_spine_auto.cpp @@ -78,7 +78,8 @@ int lua_cocos2dx_spine_Skeleton_setBlendFunc(lua_State* tolua_S) { cocos2d::BlendFunc arg0; - #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc; + #pragma warning NO CONVERSION TO NATIVE FOR BlendFunc + ok = false; if(!ok) return 0; cobj->setBlendFunc(arg0); From 2deeee2109b535d0203153e659dc80afe5594204 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 2 Sep 2014 01:11:50 -0700 Subject: [PATCH 59/74] remove extension luabindings --- tools/tolua/cocos2dx_extension.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/tolua/cocos2dx_extension.ini b/tools/tolua/cocos2dx_extension.ini index 03e0829edb..3b474c792f 100644 --- a/tools/tolua/cocos2dx_extension.ini +++ b/tools/tolua/cocos2dx_extension.ini @@ -27,7 +27,7 @@ headers = %(cocosdir)s/extensions/cocos-ext.h # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^Menu*$". -classes = AssetsManager.* Scale9Sprite Control.* ControlButton.* EditBox$ ScrollView$ TableView$ TableViewCell$ +classes = AssetsManager.* Control.* ControlButton.* ScrollView$ TableView$ TableViewCell$ # what should we skip? in the format ClassName::[function function] # ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also @@ -39,7 +39,6 @@ classes = AssetsManager.* Scale9Sprite Control.* ControlButton.* EditBox$ Scroll skip = .*Delegate::[*], .*Loader.*::[*], *::[^visit$ copyWith.* onEnter.* onExit.* ^description$ getObjectType (g|s)etDelegate .*HSV], - EditBox::[(g|s)etDelegate ^keyboard.* touchDownAction getScriptEditBoxHandler registerScriptEditBoxHandler unregisterScriptEditBoxHandler], AssetsManager::[(g|s)etDelegate], AssetsManagerDelegateProtocol::[*], Control::[removeHandleOfControlEvent addHandleOfControlEvent], From a0c28e49ac592adf223a68a7dec467fd7361a956 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 2 Sep 2014 16:14:07 +0800 Subject: [PATCH 60/74] remove exteion edtibox --- extensions/CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index b3c609beb5..427452a0b0 100644 --- a/extensions/CMakeLists.txt +++ b/extensions/CMakeLists.txt @@ -11,11 +11,6 @@ set(EXTENSIONS_SRC GUI/CCControlExtension/CCControlSwitch.cpp GUI/CCControlExtension/CCControlUtils.cpp GUI/CCControlExtension/CCInvocation.cpp - GUI/CCControlExtension/CCScale9Sprite.cpp - GUI/CCEditBox/CCEditBox.cpp - GUI/CCEditBox/CCEditBoxImplAndroid.cpp - GUI/CCEditBox/CCEditBoxImplNone.cpp - GUI/CCEditBox/CCEditBoxImplWin.cpp GUI/CCScrollView/CCScrollView.cpp GUI/CCScrollView/CCTableView.cpp GUI/CCScrollView/CCTableViewCell.cpp From 51e160beffc08d16ef56c35c7b402232291605b8 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 2 Sep 2014 17:37:55 +0800 Subject: [PATCH 61/74] fix EditBox lua compile error --- cocos/ui/UIEditBox/UIEditBox.cpp | 9 +++++---- cocos/ui/UIEditBox/UIEditBox.h | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cocos/ui/UIEditBox/UIEditBox.cpp b/cocos/ui/UIEditBox/UIEditBox.cpp index b5eed33b68..27e4ccc95b 100644 --- a/cocos/ui/UIEditBox/UIEditBox.cpp +++ b/cocos/ui/UIEditBox/UIEditBox.cpp @@ -68,12 +68,12 @@ void EditBox::touchDownAction(Ref *sender, TouchEventType controlEvent) } EditBox* EditBox::create(const Size& size, - const std::string& pNormal9SpriteBg, + const std::string& normalSprite, TextureResType texType /*= TextureResType::LOCAL*/) { EditBox* pRet = new EditBox(); - if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, pNormal9SpriteBg, texType)) + if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, normalSprite, texType)) { pRet->autorelease(); } @@ -85,11 +85,12 @@ EditBox* EditBox::create(const Size& size, return pRet; } -EditBox* EditBox::create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *pNormal9SpriteBg) + +EditBox* EditBox::create(const cocos2d::Size &size, cocos2d::ui::Scale9Sprite *normalSprite, ui::Scale9Sprite *pressedSprite, Scale9Sprite* disabledSprite) { EditBox* pRet = new (std::nothrow) EditBox(); - if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, pNormal9SpriteBg)) + if (pRet != nullptr && pRet->initWithSizeAndBackgroundSprite(size, normalSprite)) { pRet->autorelease(); } diff --git a/cocos/ui/UIEditBox/UIEditBox.h b/cocos/ui/UIEditBox/UIEditBox.h index 61bbeab965..72af4a2627 100644 --- a/cocos/ui/UIEditBox/UIEditBox.h +++ b/cocos/ui/UIEditBox/UIEditBox.h @@ -190,7 +190,10 @@ namespace ui { * @return An autorelease pointer of EditBox, you don't need to release it only if you retain it again. */ static EditBox* create(const Size& size, - Scale9Sprite* pNormal9SpriteBg); + Scale9Sprite* normalSprite, + Scale9Sprite* pressedSprite = nullptr, + Scale9Sprite* disabledSprite = nullptr); + /** * create a edit box with size. From a429959e65b90b32a92eee85bd3195942ac30e83 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 2 Sep 2014 01:31:02 -0700 Subject: [PATCH 62/74] fix lua compile error --- .../manual/extension/lua_cocos2dx_extension_manual.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.cpp b/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.cpp index b2f2e1c8a8..80498ab073 100644 --- a/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/extension/lua_cocos2dx_extension_manual.cpp @@ -1045,7 +1045,7 @@ static void extendTableView(lua_State* L) int register_all_cocos2dx_extension_manual(lua_State* tolua_S) { extendControl(tolua_S); - extendEditBox(tolua_S); + /* extendEditBox(tolua_S); */ extendAssetsManager(tolua_S); extendScrollView(tolua_S); extendTableView(tolua_S); From fadfa87afd18a705771738af183a32f4c1b67eb4 Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 2 Sep 2014 14:35:13 +0800 Subject: [PATCH 63/74] fix vs2013 compile error --- cocos/2d/libcocos2d.vcxproj | 2 +- cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj | 2 +- tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj | 2 +- tests/cpp-tests/proj.win32/cpp-tests.vcxproj | 2 +- tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj | 2 +- tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index 9fdc34eb21..d1ee7086bd 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -33,7 +33,7 @@ v110 v110_xp v120 - v120_xp + v110_xp diff --git a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj index a627dd490e..d26a1461d3 100644 --- a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj +++ b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj @@ -217,7 +217,7 @@ v110 v110_xp v120 - v120_xp + v110_xp diff --git a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj index 38b48664c1..c207cef4bf 100644 --- a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj +++ b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj @@ -33,7 +33,7 @@ v110 v110_xp v120 - v120_xp + v110_xp diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index 6cce146e18..ed3ce32401 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -33,7 +33,7 @@ v110 v110_xp v120 - v120_xp + v110_xp diff --git a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj index a504628f28..949cac0972 100644 --- a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj +++ b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj @@ -31,7 +31,7 @@ v110 v110_xp v120 - v120_xp + v110_xp diff --git a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj index 51add38ae6..930fedabb6 100644 --- a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj +++ b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj @@ -23,7 +23,7 @@ v110 v110_xp v120 - v120_xp + v110_xp Application From dafbf28283e7ce2f538a1abc0dcfa65dee0bf29f Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 2 Sep 2014 16:35:41 +0800 Subject: [PATCH 64/74] fix release mode compile error --- cocos/2d/libcocos2d.vcxproj | 2 +- cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj | 2 +- tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj | 2 +- tests/cpp-tests/proj.win32/cpp-tests.vcxproj | 4 +--- .../lua-empty-test/project/proj.win32/lua-empty-test.vcxproj | 2 +- tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cocos/2d/libcocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj index d1ee7086bd..108b9bc422 100644 --- a/cocos/2d/libcocos2d.vcxproj +++ b/cocos/2d/libcocos2d.vcxproj @@ -24,7 +24,7 @@ v110 v110_xp v120 - v120_xp + v110_xp DynamicLibrary diff --git a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj index d26a1461d3..e84501f6f1 100644 --- a/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj +++ b/cocos/scripting/lua-bindings/proj.win32/libluacocos2d.vcxproj @@ -208,7 +208,7 @@ v110 v110_xp v120 - v120_xp + v110_xp StaticLibrary diff --git a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj index c207cef4bf..4bc89fa9de 100644 --- a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj +++ b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj @@ -24,7 +24,7 @@ v110 v110_xp v120 - v120_xp + v110_xp Application diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index ed3ce32401..1fa1eec21b 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -24,7 +24,7 @@ v110 v110_xp v120 - v120_xp + v110_xp Application @@ -109,8 +109,6 @@ WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreadedDLL true - - Level3 OldStyle 4267;4251;4244;%(DisableSpecificWarnings) diff --git a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj index 949cac0972..7d24ad16dc 100644 --- a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj +++ b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj @@ -22,7 +22,7 @@ v110 v110_xp v120 - v120_xp + v110_xp Application diff --git a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj index 930fedabb6..f4592847dd 100644 --- a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj +++ b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj @@ -33,7 +33,7 @@ v110 v110_xp v120 - v120_xp + v110_xp From 2dea7c3a18d2db122d178cf0d12af2b91acf7ba3 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 3 Sep 2014 03:26:30 +0000 Subject: [PATCH 65/74] [AUTO][ci skip]: updating cocos2dx_files.json --- templates/cocos2dx_files.json | 36 +++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 25d6d414cb..2bd52dde25 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -997,6 +997,20 @@ "cocos/ui/UICheckBox.h", "cocos/ui/UIDeprecated.cpp", "cocos/ui/UIDeprecated.h", + "cocos/ui/UIEditBox/UIEditBox.cpp", + "cocos/ui/UIEditBox/UIEditBox.h", + "cocos/ui/UIEditBox/UIEditBoxImpl.h", + "cocos/ui/UIEditBox/UIEditBoxImplAndroid.cpp", + "cocos/ui/UIEditBox/UIEditBoxImplAndroid.h", + "cocos/ui/UIEditBox/UIEditBoxImplIOS.h", + "cocos/ui/UIEditBox/UIEditBoxImplIOS.mm", + "cocos/ui/UIEditBox/UIEditBoxImplMac.h", + "cocos/ui/UIEditBox/UIEditBoxImplMac.mm", + "cocos/ui/UIEditBox/UIEditBoxImplNone.cpp", + "cocos/ui/UIEditBox/UIEditBoxImplWin.cpp", + "cocos/ui/UIEditBox/UIEditBoxImplWin.h", + "cocos/ui/UIEditBox/UIEditBoxImplWp8.cpp", + "cocos/ui/UIEditBox/UIEditBoxImplWp8.h", "cocos/ui/UIHBox.cpp", "cocos/ui/UIHBox.h", "cocos/ui/UIHelper.cpp", @@ -1048,6 +1062,10 @@ "cocos/ui/UIWebViewImpl_iOS.mm", "cocos/ui/UIWidget.cpp", "cocos/ui/UIWidget.h", + "cocos/ui/proj.win32/Win32InputBox.cpp", + "cocos/ui/proj.win32/Win32InputBox.h", + "cocos/ui/proj.win32/libui.vcxproj", + "cocos/ui/proj.win32/libui.vcxproj.filters", "cocos/ui/proj.wp8/libGUI.vcxproj", "cocos/ui/proj.wp8/libGUI.vcxproj.filters", "docs/CODING_STYLE.md", @@ -1059,6 +1077,8 @@ "download-deps.py", "extensions/Android.mk", "extensions/CMakeLists.txt", + "extensions/ExtensionDeprecated.cpp", + "extensions/ExtensionDeprecated.h", "extensions/ExtensionExport.h", "extensions/ExtensionMacros.h", "extensions/GUI/CCControlExtension/CCControl.cpp", @@ -1084,22 +1104,6 @@ "extensions/GUI/CCControlExtension/CCControlUtils.h", "extensions/GUI/CCControlExtension/CCInvocation.cpp", "extensions/GUI/CCControlExtension/CCInvocation.h", - "extensions/GUI/CCControlExtension/CCScale9Sprite.cpp", - "extensions/GUI/CCControlExtension/CCScale9Sprite.h", - "extensions/GUI/CCEditBox/CCEditBox.cpp", - "extensions/GUI/CCEditBox/CCEditBox.h", - "extensions/GUI/CCEditBox/CCEditBoxImpl.h", - "extensions/GUI/CCEditBox/CCEditBoxImplAndroid.cpp", - "extensions/GUI/CCEditBox/CCEditBoxImplAndroid.h", - "extensions/GUI/CCEditBox/CCEditBoxImplIOS.h", - "extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm", - "extensions/GUI/CCEditBox/CCEditBoxImplMac.h", - "extensions/GUI/CCEditBox/CCEditBoxImplMac.mm", - "extensions/GUI/CCEditBox/CCEditBoxImplNone.cpp", - "extensions/GUI/CCEditBox/CCEditBoxImplWin.cpp", - "extensions/GUI/CCEditBox/CCEditBoxImplWin.h", - "extensions/GUI/CCEditBox/CCEditBoxImplWp8.cpp", - "extensions/GUI/CCEditBox/CCEditBoxImplWp8.h", "extensions/GUI/CCScrollView/CCScrollView.cpp", "extensions/GUI/CCScrollView/CCScrollView.h", "extensions/GUI/CCScrollView/CCTableView.cpp", From 8fd8ba97db837d8e35288084378ac3a3a5433a00 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 3 Sep 2014 11:27:45 +0800 Subject: [PATCH 66/74] [ci skip] --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 78a3a19328..bfe066429f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ cocos2d-x-3.3?? ?? [NEW] Node: added stopAllActionsByTag() [NEW] UI: added `WebView` on iOS and Android + [FIX] EditBox: moved to ui:EditBox [FIX] Node: create unneeded temple `Vec2` object in `setPosition(int, int)`, `setPositionX()` and `setPositionY()` [FIX] Node: skew effect is wrong [FIX] TextureAtlas: may crash if only drawing part of it From ffb36d577eeac703ff3e726595d0f6253f0c7a1a Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 3 Sep 2014 03:29:43 +0000 Subject: [PATCH 67/74] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/ControlButton.lua | 12 +- .../lua-bindings/auto/api/EditBox.lua | 182 -- .../api/lua_cocos2dx_extension_auto_api.lua | 10 - .../auto/lua_cocos2dx_extension_auto.cpp | 2343 +---------------- .../auto/lua_cocos2dx_extension_auto.hpp | 47 - 5 files changed, 21 insertions(+), 2573 deletions(-) delete mode 100644 cocos/scripting/lua-bindings/auto/api/EditBox.lua diff --git a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua index 1d965170ff..5d757d9b16 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua @@ -122,7 +122,7 @@ -- @function [parent=#ControlButton] getBackgroundSpriteForState -- @param self -- @param #int state --- @return Scale9Sprite#Scale9Sprite ret (return value: cc.Scale9Sprite) +-- @return Scale9Sprite#Scale9Sprite ret (return value: ccui.Scale9Sprite) -------------------------------- -- @@ -159,7 +159,7 @@ -- -- @function [parent=#ControlButton] getBackgroundSprite -- @param self --- @return Scale9Sprite#Scale9Sprite ret (return value: cc.Scale9Sprite) +-- @return Scale9Sprite#Scale9Sprite ret (return value: ccui.Scale9Sprite) -------------------------------- -- Returns the title color used for a state.
@@ -205,7 +205,7 @@ -- in "CCControlState". -- @function [parent=#ControlButton] setBackgroundSpriteForState -- @param self --- @param #cc.Scale9Sprite sprite +-- @param #ccui.Scale9Sprite sprite -- @param #int state -------------------------------- @@ -218,7 +218,7 @@ -- -- @function [parent=#ControlButton] setBackgroundSprite -- @param self --- @param #cc.Scale9Sprite var +-- @param #ccui.Scale9Sprite var -------------------------------- -- @@ -288,9 +288,9 @@ -- @return string#string ret (return value: string) -------------------------------- --- @overload self, cc.Scale9Sprite +-- @overload self, ccui.Scale9Sprite -- @overload self --- @overload self, cc.Node, cc.Scale9Sprite +-- @overload self, cc.Node, ccui.Scale9Sprite -- @overload self, string, string, float -- @function [parent=#ControlButton] create -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/EditBox.lua b/cocos/scripting/lua-bindings/auto/api/EditBox.lua deleted file mode 100644 index 7aae0b17ee..0000000000 --- a/cocos/scripting/lua-bindings/auto/api/EditBox.lua +++ /dev/null @@ -1,182 +0,0 @@ - --------------------------------- --- @module EditBox --- @extend ControlButton,IMEDelegate --- @parent_module cc - --------------------------------- --- 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) - --------------------------------- --- 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 - --------------------------------- --- 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 - --------------------------------- --- 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 - --------------------------------- --- 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 - --------------------------------- --- Init edit box with specified size. This method should be invoked right after constructor.
--- param size The size of edit box. --- @function [parent=#EditBox] initWithSizeAndBackgroundSprite --- @param self --- @param #size_table size --- @param #cc.Scale9Sprite pNormal9SpriteBg --- @return bool#bool ret (return 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 - --------------------------------- --- create a edit box with size.
--- return An autorelease pointer of EditBox, you don't need to release it only if you retain it again. --- @function [parent=#EditBox] create --- @param self --- @param #size_table size --- @param #cc.Scale9Sprite pNormal9SpriteBg --- @param #cc.Scale9Sprite pPressed9SpriteBg --- @param #cc.Scale9Sprite pDisabled9SpriteBg --- @return EditBox#EditBox ret (return value: cc.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_extension_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua index 6798a0b06d..99a0edbd12 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua @@ -1,11 +1,6 @@ -------------------------------- -- @module cc --------------------------------------------------------- --- the cc Scale9Sprite --- @field [parent=#cc] Scale9Sprite#Scale9Sprite Scale9Sprite preloaded module - - -------------------------------------------------------- -- the cc Control -- @field [parent=#cc] Control#Control Control preloaded module @@ -66,11 +61,6 @@ -- @field [parent=#cc] TableView#TableView TableView preloaded module --------------------------------------------------------- --- the cc EditBox --- @field [parent=#cc] EditBox#EditBox EditBox preloaded module - - -------------------------------------------------------- -- the cc AssetsManager -- @field [parent=#cc] AssetsManager#AssetsManager AssetsManager preloaded module diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp index 81f1c26626..6958a28aa3 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp @@ -5,1347 +5,6 @@ -int lua_cocos2dx_extension_Scale9Sprite_resizableSpriteWithCapInsets(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_resizableSpriteWithCapInsets'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Rect arg0; - - ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Scale9Sprite:resizableSpriteWithCapInsets"); - if(!ok) - return 0; - cocos2d::extension::Scale9Sprite* ret = cobj->resizableSpriteWithCapInsets(arg0); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:resizableSpriteWithCapInsets",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_resizableSpriteWithCapInsets'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_setInsetBottom(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_setInsetBottom'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Scale9Sprite:setInsetBottom"); - if(!ok) - return 0; - cobj->setInsetBottom(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:setInsetBottom",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_setInsetBottom'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_initWithSpriteFrameName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_initWithSpriteFrameName'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Scale9Sprite:initWithSpriteFrameName"); - - if (!ok) { break; } - bool ret = cobj->initWithSpriteFrameName(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Scale9Sprite:initWithSpriteFrameName"); - - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:initWithSpriteFrameName"); - - if (!ok) { break; } - bool ret = cobj->initWithSpriteFrameName(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:initWithSpriteFrameName",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_initWithSpriteFrameName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_setInsetTop(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_setInsetTop'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Scale9Sprite:setInsetTop"); - if(!ok) - return 0; - cobj->setInsetTop(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:setInsetTop",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_setInsetTop'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_init(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_init'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->init(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:init",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_init'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_setPreferredSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_setPreferredSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Size arg0; - - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.Scale9Sprite:setPreferredSize"); - if(!ok) - return 0; - cobj->setPreferredSize(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:setPreferredSize",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_setPreferredSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_setSpriteFrame(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_setSpriteFrame'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::SpriteFrame* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); - if(!ok) - return 0; - cobj->setSpriteFrame(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:setSpriteFrame",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_setSpriteFrame'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_initWithBatchNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_initWithBatchNode'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 3) { - cocos2d::SpriteBatchNode* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteBatchNode",&arg0); - - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:initWithBatchNode"); - - if (!ok) { break; } - cocos2d::Rect arg2; - ok &= luaval_to_rect(tolua_S, 4, &arg2, "cc.Scale9Sprite:initWithBatchNode"); - - if (!ok) { break; } - bool ret = cobj->initWithBatchNode(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 4) { - cocos2d::SpriteBatchNode* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteBatchNode",&arg0); - - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:initWithBatchNode"); - - if (!ok) { break; } - bool arg2; - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.Scale9Sprite:initWithBatchNode"); - - if (!ok) { break; } - cocos2d::Rect arg3; - ok &= luaval_to_rect(tolua_S, 5, &arg3, "cc.Scale9Sprite:initWithBatchNode"); - - if (!ok) { break; } - bool ret = cobj->initWithBatchNode(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:initWithBatchNode",argc, 4); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_initWithBatchNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_getInsetBottom(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_getInsetBottom'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getInsetBottom(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:getInsetBottom",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_getInsetBottom'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_getCapInsets(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_getCapInsets'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Rect ret = cobj->getCapInsets(); - rect_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:getCapInsets",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_getCapInsets'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_updateWithBatchNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_updateWithBatchNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 4) - { - cocos2d::SpriteBatchNode* arg0; - cocos2d::Rect arg1; - bool arg2; - cocos2d::Rect arg3; - - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteBatchNode",&arg0); - - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:updateWithBatchNode"); - - ok &= luaval_to_boolean(tolua_S, 4,&arg2, "cc.Scale9Sprite:updateWithBatchNode"); - - ok &= luaval_to_rect(tolua_S, 5, &arg3, "cc.Scale9Sprite:updateWithBatchNode"); - if(!ok) - return 0; - bool ret = cobj->updateWithBatchNode(arg0, arg1, arg2, arg3); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:updateWithBatchNode",argc, 4); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_updateWithBatchNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_getInsetRight(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_getInsetRight'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getInsetRight(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:getInsetRight",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_getInsetRight'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_getOriginalSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_getOriginalSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Size ret = cobj->getOriginalSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:getOriginalSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_getOriginalSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_initWithFile(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_initWithFile'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Scale9Sprite:initWithFile"); - - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:initWithFile"); - - if (!ok) { break; } - bool ret = cobj->initWithFile(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 3) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Scale9Sprite:initWithFile"); - - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:initWithFile"); - - if (!ok) { break; } - cocos2d::Rect arg2; - ok &= luaval_to_rect(tolua_S, 4, &arg2, "cc.Scale9Sprite:initWithFile"); - - if (!ok) { break; } - bool ret = cobj->initWithFile(arg0, arg1, arg2); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - cocos2d::Rect arg0; - ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Scale9Sprite:initWithFile"); - - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Scale9Sprite:initWithFile"); - - if (!ok) { break; } - bool ret = cobj->initWithFile(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Scale9Sprite:initWithFile"); - - if (!ok) { break; } - bool ret = cobj->initWithFile(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:initWithFile",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_initWithFile'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_getInsetTop(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_getInsetTop'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getInsetTop(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:getInsetTop",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_getInsetTop'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_setInsetLeft(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_setInsetLeft'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Scale9Sprite:setInsetLeft"); - if(!ok) - return 0; - cobj->setInsetLeft(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:setInsetLeft",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_setInsetLeft'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_initWithSpriteFrame(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_initWithSpriteFrame'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); - - if (!ok) { break; } - bool ret = cobj->initWithSpriteFrame(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 2) { - cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); - - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:initWithSpriteFrame"); - - if (!ok) { break; } - bool ret = cobj->initWithSpriteFrame(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:initWithSpriteFrame",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_initWithSpriteFrame'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_getPreferredSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_getPreferredSize'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Size ret = cobj->getPreferredSize(); - size_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:getPreferredSize",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_getPreferredSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_setCapInsets(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_setCapInsets'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Rect arg0; - - ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Scale9Sprite:setCapInsets"); - if(!ok) - return 0; - cobj->setCapInsets(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:setCapInsets",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_setCapInsets'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_getInsetLeft(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_getInsetLeft'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - double ret = cobj->getInsetLeft(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:getInsetLeft",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_getInsetLeft'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_setInsetRight(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::Scale9Sprite*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_Scale9Sprite_setInsetRight'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - double arg0; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Scale9Sprite:setInsetRight"); - if(!ok) - return 0; - cobj->setInsetRight(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:setInsetRight",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_setInsetRight'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_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,"cc.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 3) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Scale9Sprite:create"); - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:create"); - if (!ok) { break; } - cocos2d::Rect arg2; - ok &= luaval_to_rect(tolua_S, 4, &arg2, "cc.Scale9Sprite:create"); - if (!ok) { break; } - cocos2d::extension::Scale9Sprite* ret = cocos2d::extension::Scale9Sprite::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 0) - { - cocos2d::extension::Scale9Sprite* ret = cocos2d::extension::Scale9Sprite::create(); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - cocos2d::Rect arg0; - ok &= luaval_to_rect(tolua_S, 2, &arg0, "cc.Scale9Sprite:create"); - if (!ok) { break; } - std::string arg1; - ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.Scale9Sprite:create"); - if (!ok) { break; } - cocos2d::extension::Scale9Sprite* ret = cocos2d::extension::Scale9Sprite::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Scale9Sprite:create"); - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:create"); - if (!ok) { break; } - cocos2d::extension::Scale9Sprite* ret = cocos2d::extension::Scale9Sprite::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Scale9Sprite:create"); - if (!ok) { break; } - cocos2d::extension::Scale9Sprite* ret = cocos2d::extension::Scale9Sprite::create(arg0); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); - return 1; - } - } while (0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Scale9Sprite:create",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_createWithSpriteFrameName(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,"cc.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Scale9Sprite:createWithSpriteFrameName"); - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:createWithSpriteFrameName"); - if (!ok) { break; } - cocos2d::extension::Scale9Sprite* ret = cocos2d::extension::Scale9Sprite::createWithSpriteFrameName(arg0, arg1); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - std::string arg0; - ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.Scale9Sprite:createWithSpriteFrameName"); - if (!ok) { break; } - cocos2d::extension::Scale9Sprite* ret = cocos2d::extension::Scale9Sprite::createWithSpriteFrameName(arg0); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); - return 1; - } - } while (0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Scale9Sprite:createWithSpriteFrameName",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_createWithSpriteFrameName'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_createWithSpriteFrame(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,"cc.Scale9Sprite",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 2) - { - cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); - if (!ok) { break; } - cocos2d::Rect arg1; - ok &= luaval_to_rect(tolua_S, 3, &arg1, "cc.Scale9Sprite:createWithSpriteFrame"); - if (!ok) { break; } - cocos2d::extension::Scale9Sprite* ret = cocos2d::extension::Scale9Sprite::createWithSpriteFrame(arg0, arg1); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 1) - { - cocos2d::SpriteFrame* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.SpriteFrame",&arg0); - if (!ok) { break; } - cocos2d::extension::Scale9Sprite* ret = cocos2d::extension::Scale9Sprite::createWithSpriteFrame(arg0); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); - return 1; - } - } while (0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d", "cc.Scale9Sprite:createWithSpriteFrame",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_createWithSpriteFrame'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_extension_Scale9Sprite_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::Scale9Sprite* 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::extension::Scale9Sprite(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.Scale9Sprite"); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scale9Sprite:Scale9Sprite",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_Scale9Sprite_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_extension_Scale9Sprite_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (Scale9Sprite)"); - return 0; -} - -int lua_register_cocos2dx_extension_Scale9Sprite(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.Scale9Sprite"); - tolua_cclass(tolua_S,"Scale9Sprite","cc.Scale9Sprite","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"Scale9Sprite"); - tolua_function(tolua_S,"new",lua_cocos2dx_extension_Scale9Sprite_constructor); - tolua_function(tolua_S,"resizableSpriteWithCapInsets",lua_cocos2dx_extension_Scale9Sprite_resizableSpriteWithCapInsets); - tolua_function(tolua_S,"setInsetBottom",lua_cocos2dx_extension_Scale9Sprite_setInsetBottom); - tolua_function(tolua_S,"initWithSpriteFrameName",lua_cocos2dx_extension_Scale9Sprite_initWithSpriteFrameName); - tolua_function(tolua_S,"setInsetTop",lua_cocos2dx_extension_Scale9Sprite_setInsetTop); - tolua_function(tolua_S,"init",lua_cocos2dx_extension_Scale9Sprite_init); - tolua_function(tolua_S,"setPreferredSize",lua_cocos2dx_extension_Scale9Sprite_setPreferredSize); - tolua_function(tolua_S,"setSpriteFrame",lua_cocos2dx_extension_Scale9Sprite_setSpriteFrame); - tolua_function(tolua_S,"initWithBatchNode",lua_cocos2dx_extension_Scale9Sprite_initWithBatchNode); - tolua_function(tolua_S,"getInsetBottom",lua_cocos2dx_extension_Scale9Sprite_getInsetBottom); - tolua_function(tolua_S,"getCapInsets",lua_cocos2dx_extension_Scale9Sprite_getCapInsets); - tolua_function(tolua_S,"updateWithBatchNode",lua_cocos2dx_extension_Scale9Sprite_updateWithBatchNode); - tolua_function(tolua_S,"getInsetRight",lua_cocos2dx_extension_Scale9Sprite_getInsetRight); - tolua_function(tolua_S,"getOriginalSize",lua_cocos2dx_extension_Scale9Sprite_getOriginalSize); - tolua_function(tolua_S,"initWithFile",lua_cocos2dx_extension_Scale9Sprite_initWithFile); - tolua_function(tolua_S,"getInsetTop",lua_cocos2dx_extension_Scale9Sprite_getInsetTop); - tolua_function(tolua_S,"setInsetLeft",lua_cocos2dx_extension_Scale9Sprite_setInsetLeft); - tolua_function(tolua_S,"initWithSpriteFrame",lua_cocos2dx_extension_Scale9Sprite_initWithSpriteFrame); - tolua_function(tolua_S,"getPreferredSize",lua_cocos2dx_extension_Scale9Sprite_getPreferredSize); - tolua_function(tolua_S,"setCapInsets",lua_cocos2dx_extension_Scale9Sprite_setCapInsets); - tolua_function(tolua_S,"getInsetLeft",lua_cocos2dx_extension_Scale9Sprite_getInsetLeft); - tolua_function(tolua_S,"setInsetRight",lua_cocos2dx_extension_Scale9Sprite_setInsetRight); - tolua_function(tolua_S,"create", lua_cocos2dx_extension_Scale9Sprite_create); - tolua_function(tolua_S,"createWithSpriteFrameName", lua_cocos2dx_extension_Scale9Sprite_createWithSpriteFrameName); - tolua_function(tolua_S,"createWithSpriteFrame", lua_cocos2dx_extension_Scale9Sprite_createWithSpriteFrame); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::extension::Scale9Sprite).name(); - g_luaType[typeName] = "cc.Scale9Sprite"; - g_typeCast["Scale9Sprite"] = "cc.Scale9Sprite"; - return 1; -} - int lua_cocos2dx_extension_Control_setEnabled(lua_State* tolua_S) { int argc = 0; @@ -2927,8 +1586,8 @@ int lua_cocos2dx_extension_ControlButton_getBackgroundSpriteForState(lua_State* ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.ControlButton:getBackgroundSpriteForState"); if(!ok) return 0; - cocos2d::extension::Scale9Sprite* ret = cobj->getBackgroundSpriteForState(arg0); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); + cocos2d::ui::Scale9Sprite* ret = cobj->getBackgroundSpriteForState(arg0); + object_to_luaval(tolua_S, "ccui.Scale9Sprite",(cocos2d::ui::Scale9Sprite*)ret); return 1; } CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ControlButton:getBackgroundSpriteForState",argc, 1); @@ -3196,8 +1855,8 @@ int lua_cocos2dx_extension_ControlButton_getBackgroundSprite(lua_State* tolua_S) { if(!ok) return 0; - cocos2d::extension::Scale9Sprite* ret = cobj->getBackgroundSprite(); - object_to_luaval(tolua_S, "cc.Scale9Sprite",(cocos2d::extension::Scale9Sprite*)ret); + cocos2d::ui::Scale9Sprite* ret = cobj->getBackgroundSprite(); + object_to_luaval(tolua_S, "ccui.Scale9Sprite",(cocos2d::ui::Scale9Sprite*)ret); return 1; } CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.ControlButton:getBackgroundSprite",argc, 0); @@ -3427,10 +2086,10 @@ int lua_cocos2dx_extension_ControlButton_setBackgroundSpriteForState(lua_State* argc = lua_gettop(tolua_S)-1; if (argc == 2) { - cocos2d::extension::Scale9Sprite* arg0; + cocos2d::ui::Scale9Sprite* arg0; cocos2d::extension::Control::State arg1; - ok &= luaval_to_object(tolua_S, 2, "cc.Scale9Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0); ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.ControlButton:setBackgroundSpriteForState"); if(!ok) @@ -3522,9 +2181,9 @@ int lua_cocos2dx_extension_ControlButton_setBackgroundSprite(lua_State* tolua_S) argc = lua_gettop(tolua_S)-1; if (argc == 1) { - cocos2d::extension::Scale9Sprite* arg0; + cocos2d::ui::Scale9Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Scale9Sprite",&arg0); + ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0); if(!ok) return 0; cobj->setBackgroundSprite(arg0); @@ -3973,8 +2632,8 @@ int lua_cocos2dx_extension_ControlButton_create(lua_State* tolua_S) { if (argc == 1) { - cocos2d::extension::Scale9Sprite* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Scale9Sprite",&arg0); + cocos2d::ui::Scale9Sprite* arg0; + ok &= luaval_to_object(tolua_S, 2, "ccui.Scale9Sprite",&arg0); if (!ok) { break; } cocos2d::extension::ControlButton* ret = cocos2d::extension::ControlButton::create(arg0); object_to_luaval(tolua_S, "cc.ControlButton",(cocos2d::extension::ControlButton*)ret); @@ -3999,8 +2658,8 @@ int lua_cocos2dx_extension_ControlButton_create(lua_State* tolua_S) cocos2d::Node* arg0; ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0); if (!ok) { break; } - cocos2d::extension::Scale9Sprite* arg1; - ok &= luaval_to_object(tolua_S, 3, "cc.Scale9Sprite",&arg1); + cocos2d::ui::Scale9Sprite* arg1; + ok &= luaval_to_object(tolua_S, 3, "ccui.Scale9Sprite",&arg1); if (!ok) { break; } cocos2d::extension::ControlButton* ret = cocos2d::extension::ControlButton::create(arg0, arg1); object_to_luaval(tolua_S, "cc.ControlButton",(cocos2d::extension::ControlButton*)ret); @@ -12160,976 +10819,6 @@ int lua_register_cocos2dx_extension_TableView(lua_State* tolua_S) return 1; } -int lua_cocos2dx_extension_EditBox_getText(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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", "cc.EditBox:getText",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_getText'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setPlaceholderFontName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.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", "cc.EditBox:setPlaceholderFontName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setPlaceholderFontName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_getPlaceHolder(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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", "cc.EditBox:getPlaceHolder",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_getPlaceHolder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setFontName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.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", "cc.EditBox:setFontName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setFontName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setPlaceholderFontSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.EditBox:setPlaceholderFontSize"); - if(!ok) - return 0; - cobj->setPlaceholderFontSize(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:setPlaceholderFontSize",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setPlaceholderFontSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setInputMode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EditBox_setInputMode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::extension::EditBox::InputMode arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.EditBox:setInputMode"); - if(!ok) - return 0; - cobj->setInputMode(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:setInputMode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setInputMode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setPlaceholderFontColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.EditBox:setPlaceholderFontColor"); - if(!ok) - return 0; - cobj->setPlaceholderFontColor(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:setPlaceholderFontColor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setPlaceholderFontColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setFontColor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.EditBox:setFontColor"); - if(!ok) - return 0; - cobj->setFontColor(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:setFontColor",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setFontColor'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setPlaceholderFont(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.EditBox:setPlaceholderFont"); arg0 = arg0_tmp.c_str(); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.EditBox:setPlaceholderFont"); - if(!ok) - return 0; - cobj->setPlaceholderFont(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:setPlaceholderFont",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setPlaceholderFont'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setFontSize(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.EditBox:setFontSize"); - if(!ok) - return 0; - cobj->setFontSize(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:setFontSize",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setFontSize'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_initWithSizeAndBackgroundSprite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EditBox_initWithSizeAndBackgroundSprite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Size arg0; - cocos2d::extension::Scale9Sprite* arg1; - - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.EditBox:initWithSizeAndBackgroundSprite"); - - ok &= luaval_to_object(tolua_S, 3, "cc.Scale9Sprite",&arg1); - if(!ok) - return 0; - bool ret = cobj->initWithSizeAndBackgroundSprite(arg0, arg1); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:initWithSizeAndBackgroundSprite",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_initWithSizeAndBackgroundSprite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setPlaceHolder(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.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", "cc.EditBox:setPlaceHolder",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setPlaceHolder'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setReturnType(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EditBox_setReturnType'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::extension::EditBox::KeyboardReturnType arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.EditBox:setReturnType"); - if(!ok) - return 0; - cobj->setReturnType(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:setReturnType",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setReturnType'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setInputFlag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_EditBox_setInputFlag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::extension::EditBox::InputFlag arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.EditBox:setInputFlag"); - if(!ok) - return 0; - cobj->setInputFlag(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:setInputFlag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setInputFlag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_getMaxLength(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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", "cc.EditBox:getMaxLength",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_getMaxLength'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setText(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.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", "cc.EditBox:setText",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setText'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setMaxLength(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.EditBox:setMaxLength"); - if(!ok) - return 0; - cobj->setMaxLength(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:setMaxLength",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setMaxLength'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_EditBox_setFont(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::extension::EditBox*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_extension_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, "cc.EditBox:setFont"); arg0 = arg0_tmp.c_str(); - - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.EditBox:setFont"); - if(!ok) - return 0; - cobj->setFont(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:setFont",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_setFont'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_extension_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,"cc.EditBox",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 2) - { - cocos2d::Size arg0; - cocos2d::extension::Scale9Sprite* arg1; - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.EditBox:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scale9Sprite",&arg1); - if(!ok) - return 0; - cocos2d::extension::EditBox* ret = cocos2d::extension::EditBox::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.EditBox",(cocos2d::extension::EditBox*)ret); - return 1; - } - if (argc == 3) - { - cocos2d::Size arg0; - cocos2d::extension::Scale9Sprite* arg1; - cocos2d::extension::Scale9Sprite* arg2; - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.EditBox:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scale9Sprite",&arg1); - ok &= luaval_to_object(tolua_S, 4, "cc.Scale9Sprite",&arg2); - if(!ok) - return 0; - cocos2d::extension::EditBox* ret = cocos2d::extension::EditBox::create(arg0, arg1, arg2); - object_to_luaval(tolua_S, "cc.EditBox",(cocos2d::extension::EditBox*)ret); - return 1; - } - if (argc == 4) - { - cocos2d::Size arg0; - cocos2d::extension::Scale9Sprite* arg1; - cocos2d::extension::Scale9Sprite* arg2; - cocos2d::extension::Scale9Sprite* arg3; - ok &= luaval_to_size(tolua_S, 2, &arg0, "cc.EditBox:create"); - ok &= luaval_to_object(tolua_S, 3, "cc.Scale9Sprite",&arg1); - ok &= luaval_to_object(tolua_S, 4, "cc.Scale9Sprite",&arg2); - ok &= luaval_to_object(tolua_S, 5, "cc.Scale9Sprite",&arg3); - if(!ok) - return 0; - cocos2d::extension::EditBox* ret = cocos2d::extension::EditBox::create(arg0, arg1, arg2, arg3); - object_to_luaval(tolua_S, "cc.EditBox",(cocos2d::extension::EditBox*)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.EditBox:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_create'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_extension_EditBox_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::extension::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::extension::EditBox(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EditBox"); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.EditBox:EditBox",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_extension_EditBox_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_extension_EditBox_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (EditBox)"); - return 0; -} - -int lua_register_cocos2dx_extension_EditBox(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.EditBox"); - tolua_cclass(tolua_S,"EditBox","cc.EditBox","cc.ControlButton",nullptr); - - tolua_beginmodule(tolua_S,"EditBox"); - tolua_function(tolua_S,"new",lua_cocos2dx_extension_EditBox_constructor); - tolua_function(tolua_S,"getText",lua_cocos2dx_extension_EditBox_getText); - tolua_function(tolua_S,"setPlaceholderFontName",lua_cocos2dx_extension_EditBox_setPlaceholderFontName); - tolua_function(tolua_S,"getPlaceHolder",lua_cocos2dx_extension_EditBox_getPlaceHolder); - tolua_function(tolua_S,"setFontName",lua_cocos2dx_extension_EditBox_setFontName); - tolua_function(tolua_S,"setPlaceholderFontSize",lua_cocos2dx_extension_EditBox_setPlaceholderFontSize); - tolua_function(tolua_S,"setInputMode",lua_cocos2dx_extension_EditBox_setInputMode); - tolua_function(tolua_S,"setPlaceholderFontColor",lua_cocos2dx_extension_EditBox_setPlaceholderFontColor); - tolua_function(tolua_S,"setFontColor",lua_cocos2dx_extension_EditBox_setFontColor); - tolua_function(tolua_S,"setPlaceholderFont",lua_cocos2dx_extension_EditBox_setPlaceholderFont); - tolua_function(tolua_S,"setFontSize",lua_cocos2dx_extension_EditBox_setFontSize); - tolua_function(tolua_S,"initWithSizeAndBackgroundSprite",lua_cocos2dx_extension_EditBox_initWithSizeAndBackgroundSprite); - tolua_function(tolua_S,"setPlaceHolder",lua_cocos2dx_extension_EditBox_setPlaceHolder); - tolua_function(tolua_S,"setReturnType",lua_cocos2dx_extension_EditBox_setReturnType); - tolua_function(tolua_S,"setInputFlag",lua_cocos2dx_extension_EditBox_setInputFlag); - tolua_function(tolua_S,"getMaxLength",lua_cocos2dx_extension_EditBox_getMaxLength); - tolua_function(tolua_S,"setText",lua_cocos2dx_extension_EditBox_setText); - tolua_function(tolua_S,"setMaxLength",lua_cocos2dx_extension_EditBox_setMaxLength); - tolua_function(tolua_S,"setFont",lua_cocos2dx_extension_EditBox_setFont); - tolua_function(tolua_S,"create", lua_cocos2dx_extension_EditBox_create); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::extension::EditBox).name(); - g_luaType[typeName] = "cc.EditBox"; - g_typeCast["EditBox"] = "cc.EditBox"; - return 1; -} - int lua_cocos2dx_extension_AssetsManager_setStoragePath(lua_State* tolua_S) { int argc = 0; @@ -13845,19 +11534,17 @@ TOLUA_API int register_all_cocos2dx_extension(lua_State* tolua_S) lua_register_cocos2dx_extension_Control(tolua_S); lua_register_cocos2dx_extension_TableViewCell(tolua_S); - lua_register_cocos2dx_extension_Scale9Sprite(tolua_S); + lua_register_cocos2dx_extension_ControlStepper(tolua_S); lua_register_cocos2dx_extension_ControlSwitch(tolua_S); lua_register_cocos2dx_extension_ScrollView(tolua_S); lua_register_cocos2dx_extension_TableView(tolua_S); - lua_register_cocos2dx_extension_AssetsManager(tolua_S); - lua_register_cocos2dx_extension_ControlButton(tolua_S); - lua_register_cocos2dx_extension_EditBox(tolua_S); lua_register_cocos2dx_extension_ControlSlider(tolua_S); - lua_register_cocos2dx_extension_ControlStepper(tolua_S); lua_register_cocos2dx_extension_ControlSaturationBrightnessPicker(tolua_S); lua_register_cocos2dx_extension_ControlColourPicker(tolua_S); lua_register_cocos2dx_extension_ControlPotentiometer(tolua_S); + lua_register_cocos2dx_extension_ControlButton(tolua_S); lua_register_cocos2dx_extension_ControlHuePicker(tolua_S); + lua_register_cocos2dx_extension_AssetsManager(tolua_S); tolua_endmodule(tolua_S); return 1; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp index ce1bfeebc3..cbd41e6a6b 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.hpp @@ -243,53 +243,6 @@ int register_all_cocos2dx_extension(lua_State* tolua_S); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From b37ef4e1c3720a798349a8513decae3275231aae Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 3 Sep 2014 11:52:19 +0800 Subject: [PATCH 68/74] remove unneeded files --- .../org/cocos2dx/lib/Cocos2dxETCLoader.java | 109 ------------------ extensions/CMakeLists.txt | 47 -------- .../proj.android/README.md | 36 ------ tests/cpp-empty-test/proj.android/README.md | 87 -------------- tests/cpp-tests/proj.android/README.md | 87 -------------- .../proj.android/README.md | 87 -------------- 6 files changed, 453 deletions(-) delete mode 100644 cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxETCLoader.java delete mode 100644 extensions/CMakeLists.txt delete mode 100644 templates/cpp-template-default/proj.android/README.md delete mode 100644 tests/cpp-empty-test/proj.android/README.md delete mode 100644 tests/cpp-tests/proj.android/README.md delete mode 100644 tests/game-controller-test/proj.android/README.md diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxETCLoader.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxETCLoader.java deleted file mode 100644 index fd4cd81954..0000000000 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxETCLoader.java +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ****************************************************************************/ -package org.cocos2dx.lib; - -import java.io.FileInputStream; -import java.io.InputStream; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - -import android.content.Context; -import android.content.res.AssetManager; -import android.opengl.ETC1Util; -import android.util.Log; - -public class Cocos2dxETCLoader { - private static final String ASSETS_PATH = "assets/"; - private static Context context; - - public static boolean loadTexture(String filePath) { - if (! ETC1Util.isETC1Supported()) { - return false; - } - - if (filePath.length() == 0) { - return false; - } - - // Create ETC1Texture - InputStream inputStream = null; - ETC1Util.ETC1Texture texture = null; - AssetManager assetManager = null; - try { - if (filePath.charAt(0) == '/') { - // absolute path - inputStream = new FileInputStream(filePath); - } else { - // remove prefix: "assets/" - if (filePath.startsWith(ASSETS_PATH)) { - filePath = filePath.substring(ASSETS_PATH.length()); - } - assetManager = context.getAssets(); - inputStream = assetManager.open(filePath); - } - - texture = ETC1Util.createTexture(inputStream); - inputStream.close(); - } catch (Exception e) { - Log.d("Cocos2dx", "Unable to create texture for " + filePath); - - texture = null; - } - - if (texture != null) { - boolean ret = true; - - try { - final int width = texture.getWidth(); - final int height = texture.getHeight(); - final int length = texture.getData().remaining(); - - final byte[] data = new byte[length]; - final ByteBuffer buf = ByteBuffer.wrap(data); - buf.order(ByteOrder.nativeOrder()); - buf.put(texture.getData()); - - nativeSetTextureInfo(width, - height, - data, - length); - } catch (Exception e) - { - Log.d("invoke native function error", e.toString()); - ret = false; - } - - return ret; - } else { - return false; - } - } - - public static void setContext(Context context) { - Cocos2dxETCLoader.context = context; - } - - private static native void nativeSetTextureInfo(final int width, final int height, final byte[] data, - final int dataLength); -} diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt deleted file mode 100644 index 427452a0b0..0000000000 --- a/extensions/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -set(EXTENSIONS_SRC - assets-manager/AssetsManager.cpp - GUI/CCControlExtension/CCControl.cpp - GUI/CCControlExtension/CCControlButton.cpp - GUI/CCControlExtension/CCControlColourPicker.cpp - GUI/CCControlExtension/CCControlHuePicker.cpp - GUI/CCControlExtension/CCControlPotentiometer.cpp - GUI/CCControlExtension/CCControlSaturationBrightnessPicker.cpp - GUI/CCControlExtension/CCControlSlider.cpp - GUI/CCControlExtension/CCControlStepper.cpp - GUI/CCControlExtension/CCControlSwitch.cpp - GUI/CCControlExtension/CCControlUtils.cpp - GUI/CCControlExtension/CCInvocation.cpp - GUI/CCScrollView/CCScrollView.cpp - GUI/CCScrollView/CCTableView.cpp - GUI/CCScrollView/CCTableViewCell.cpp - physics-nodes/CCPhysicsDebugNode.cpp - physics-nodes/CCPhysicsSprite.cpp -) - -if(WIN32) - ADD_DEFINITIONS(-DUNICODE -D_UNICODE) - - set(PLATFORM_EXTENSIONS_SRC - proj.win32/Win32InputBox.cpp - ) -elseif(APPLE) - -else() - -endif() - -include_directories( - .. -) - -add_library(extensions STATIC - ${EXTENSIONS_SRC} - ${PLATFORM_EXTENSIONS_SRC} -) - -set_target_properties(extensions - PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" -) - diff --git a/templates/cpp-template-default/proj.android/README.md b/templates/cpp-template-default/proj.android/README.md deleted file mode 100644 index ff6c44369c..0000000000 --- a/templates/cpp-template-default/proj.android/README.md +++ /dev/null @@ -1,36 +0,0 @@ -## Prerequisites: - -* Android NDK -* Android SDK **OR** Eclipse ADT Bundle -* Android AVD target installed - -## Building project - -There are two ways of building Android projects. - -1. Eclipse -2. Command Line - -### Import Project in Eclipse - -####Step 1: C/C++ Environment Variable `NDK_ROOT` - -* Eclipse->Preferences->C/C++->Build->**Environment**. -* Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. - ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) -* Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` - -####Step 2: Adding and running from Eclipse - -![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) - -1. File->New->Project->Android Project From Existing Code -2. **Browse** to your project directory and Add the project -3. Click **Run as Android Application** to run on connected device or emulator. - -That's all !!! - -### Running project from Command Line - - $ cd NEW_PROJECTS_DIR/MyGame - $ cocos run -p android -j 4 diff --git a/tests/cpp-empty-test/proj.android/README.md b/tests/cpp-empty-test/proj.android/README.md deleted file mode 100644 index 312835611a..0000000000 --- a/tests/cpp-empty-test/proj.android/README.md +++ /dev/null @@ -1,87 +0,0 @@ -## Prerequisites: - -* Android NDK -* Android SDK **OR** Eclipse ADT Bundle -* Android AVD target installed - -## Building project - -There are two ways of building Android projects. - -1. Eclipse -2. Command Line - -### Import Project in Eclipse - -#### Features: - -1. Complete workflow from Eclipse, including: - * Build C++. - * Clean C++. - * Build and Run whole project. - * Logcat view. - * Debug Java code. - * Javascript editor. - * Project management. -2. True C++ editing, including: - * Code completion. - * Jump to definition. - * Refactoring tools etc. - * Quick open C++ files. - - -#### Setup Eclipse Environment (only once) - - -**NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. - -1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) - - **OR** - - Install Eclipse with Java. Add ADT and CDT plugins. - -2. Only for Windows - 1. Install [Cygwin](http://www.cygwin.com/) with make (select make package from the list during the install). - 2. Add `Cygwin\bin` directory to system PATH variable. - 3. Add this line `none /cygdrive cygdrive binary,noacl,posix=0,user 0 0` to `Cygwin\etc\fstab` file. - -3. Set up Variables: - 1. Path Variable `COCOS2DX`: - * Eclipse->Preferences->General->Workspace->**Linked Resources** - * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. - ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) - - 2. C/C++ Environment Variable `NDK_ROOT`: - * Eclipse->Preferences->C/C++->Build->**Environment**. - * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. - ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) - * Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` - -4. Import libcocos2dx library project: - 1. File->New->Project->Android Project From Existing Code. - 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. - 3. Click **Finish** to add project. - -#### Adding and running from Eclipse - -![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) - -1. File->New->Project->Android Project From Existing Code -2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` -3. Add the project -4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. - - -### Running project from Command Line - - $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ - $ export NDK_ROOT=/path/to/ndk - $ ./build_native.sh - $ ant debug install - -If the last command results in sdk.dir missing error then do: - - $ android list target - $ android update project -p . -t (id from step 6) - $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6) diff --git a/tests/cpp-tests/proj.android/README.md b/tests/cpp-tests/proj.android/README.md deleted file mode 100644 index a4670ebabc..0000000000 --- a/tests/cpp-tests/proj.android/README.md +++ /dev/null @@ -1,87 +0,0 @@ -## Prerequisites: - -* Android NDK -* Android SDK **OR** Eclipse ADT Bundle -* Android AVD target installed - -## Building project - -There are two ways of building Android projects. - -1. Eclipse -2. Command Line - -### Import Project in Eclipse - -#### Features: - -1. Complete workflow from Eclipse, including: - * Build C++. - * Clean C++. - * Build and Run whole project. - * Logcat view. - * Debug Java code. - * Javascript editor. - * Project management. -2. True C++ editing, including: - * Code completion. - * Jump to definition. - * Refactoring tools etc. - * Quick open C++ files. - - -#### Setup Eclipse Environment (only once) - - -**NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. - -1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) - - **OR** - - Install Eclipse with Java. Add ADT and CDT plugins. - -2. Only for Windows - 1. Install [Cygwin](http://www.cygwin.com/) with make (select make package from the list during the install). - 2. Add `Cygwin\bin` directory to system PATH variable. - 3. Add this line `none /cygdrive cygdrive binary,noacl,posix=0,user 0 0` to `Cygwin\etc\fstab` file. - -3. Set up Variables: - 1. Path Variable `COCOS2DX`: - * Eclipse->Preferences->General->Workspace->**Linked Resources** - * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. - ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) - - 2. C/C++ Environment Variable `NDK_ROOT`: - * Eclipse->Preferences->C/C++->Build->**Environment**. - * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. - ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) - * Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` - -4. Import libcocos2dx library project: - 1. File->New->Project->Android Project From Existing Code. - 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. - 3. Click **Finish** to add project. - -#### Adding and running from Eclipse - -![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) - -1. File->New->Project->Android Project From Existing Code -2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/CppTests/proj.android/` -3. Add the project -4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. - - -### Running project from Command Line - - $ cd cocos2d-x/samples/Cpp/CppTests/proj.android/ - $ export NDK_ROOT=/path/to/ndk - $ ./build_native.sh - $ ant debug install - -If the last command results in sdk.dir missing error then do: - - $ android list target - $ android update project -p . -t (id from step 6) - $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6) diff --git a/tests/game-controller-test/proj.android/README.md b/tests/game-controller-test/proj.android/README.md deleted file mode 100644 index 312835611a..0000000000 --- a/tests/game-controller-test/proj.android/README.md +++ /dev/null @@ -1,87 +0,0 @@ -## Prerequisites: - -* Android NDK -* Android SDK **OR** Eclipse ADT Bundle -* Android AVD target installed - -## Building project - -There are two ways of building Android projects. - -1. Eclipse -2. Command Line - -### Import Project in Eclipse - -#### Features: - -1. Complete workflow from Eclipse, including: - * Build C++. - * Clean C++. - * Build and Run whole project. - * Logcat view. - * Debug Java code. - * Javascript editor. - * Project management. -2. True C++ editing, including: - * Code completion. - * Jump to definition. - * Refactoring tools etc. - * Quick open C++ files. - - -#### Setup Eclipse Environment (only once) - - -**NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. - -1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) - - **OR** - - Install Eclipse with Java. Add ADT and CDT plugins. - -2. Only for Windows - 1. Install [Cygwin](http://www.cygwin.com/) with make (select make package from the list during the install). - 2. Add `Cygwin\bin` directory to system PATH variable. - 3. Add this line `none /cygdrive cygdrive binary,noacl,posix=0,user 0 0` to `Cygwin\etc\fstab` file. - -3. Set up Variables: - 1. Path Variable `COCOS2DX`: - * Eclipse->Preferences->General->Workspace->**Linked Resources** - * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. - ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) - - 2. C/C++ Environment Variable `NDK_ROOT`: - * Eclipse->Preferences->C/C++->Build->**Environment**. - * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. - ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) - * Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` - -4. Import libcocos2dx library project: - 1. File->New->Project->Android Project From Existing Code. - 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. - 3. Click **Finish** to add project. - -#### Adding and running from Eclipse - -![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) - -1. File->New->Project->Android Project From Existing Code -2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` -3. Add the project -4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. - - -### Running project from Command Line - - $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ - $ export NDK_ROOT=/path/to/ndk - $ ./build_native.sh - $ ant debug install - -If the last command results in sdk.dir missing error then do: - - $ android list target - $ android update project -p . -t (id from step 6) - $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6) From 61a3c80cb98d1967e9dad7b44afbe4c124f45570 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 3 Sep 2014 04:05:23 +0000 Subject: [PATCH 69/74] [AUTO][ci skip]: updating cocos2dx_files.json --- templates/cocos2dx_files.json | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 2bd52dde25..9cfac4e648 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -3698,7 +3698,6 @@ "cocos/scripting/lua-bindings/auto/api/EaseSineIn.lua", "cocos/scripting/lua-bindings/auto/api/EaseSineInOut.lua", "cocos/scripting/lua-bindings/auto/api/EaseSineOut.lua", - "cocos/scripting/lua-bindings/auto/api/EditBox.lua", "cocos/scripting/lua-bindings/auto/api/Event.lua", "cocos/scripting/lua-bindings/auto/api/EventAcceleration.lua", "cocos/scripting/lua-bindings/auto/api/EventController.lua", From 1ec993304558d3c69e2c01d4ac255850b034de19 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Wed, 3 Sep 2014 05:37:45 +0000 Subject: [PATCH 70/74] [AUTO][ci skip]: updating cocos2dx_files.json --- templates/cocos2dx_files.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 9cfac4e648..ff4f386aa0 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -764,7 +764,6 @@ "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxAccelerometer.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxBitmap.java", - "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxETCLoader.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxEditBoxDialog.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxEditText.java", "cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java", @@ -1076,7 +1075,6 @@ "docs/doxygen.config", "download-deps.py", "extensions/Android.mk", - "extensions/CMakeLists.txt", "extensions/ExtensionDeprecated.cpp", "extensions/ExtensionDeprecated.h", "extensions/ExtensionExport.h", From 7493c7bf3e2a0104a1dba6a177d9f8edc9095ae2 Mon Sep 17 00:00:00 2001 From: andyque Date: Wed, 3 Sep 2014 14:47:04 +0800 Subject: [PATCH 71/74] fxi compile warning --- .../GUI/CCControlExtension/CCControlButton.cpp | 18 +++++++++--------- .../GUI/CCControlExtension/CCControlButton.h | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/extensions/GUI/CCControlExtension/CCControlButton.cpp b/extensions/GUI/CCControlExtension/CCControlButton.cpp index 91599ae386..9a69de517e 100644 --- a/extensions/GUI/CCControlExtension/CCControlButton.cpp +++ b/extensions/GUI/CCControlExtension/CCControlButton.cpp @@ -63,10 +63,10 @@ ControlButton::~ControlButton() bool ControlButton::init() { - return this->initWithLabelAndBackgroundSprite(Label::createWithSystemFont("", "Helvetica", 12), Scale9Sprite::create()); + return this->initWithLabelAndBackgroundSprite(Label::createWithSystemFont("", "Helvetica", 12), cocos2d::ui::Scale9Sprite::create()); } -bool ControlButton::initWithLabelAndBackgroundSprite(Node* node, Scale9Sprite* backgroundSprite) +bool ControlButton::initWithLabelAndBackgroundSprite(Node* node, ui::Scale9Sprite* backgroundSprite) { if (Control::init()) { @@ -120,7 +120,7 @@ bool ControlButton::initWithLabelAndBackgroundSprite(Node* node, Scale9Sprite* b } } -ControlButton* ControlButton::create(Node* label, Scale9Sprite* backgroundSprite) +ControlButton* ControlButton::create(Node* label, cocos2d::ui::Scale9Sprite* backgroundSprite) { ControlButton *pRet = new (std::nothrow) ControlButton(); pRet->initWithLabelAndBackgroundSprite(label, backgroundSprite); @@ -130,7 +130,7 @@ ControlButton* ControlButton::create(Node* label, Scale9Sprite* backgroundSprite bool ControlButton::initWithTitleAndFontNameAndFontSize(const std::string& title, const std::string& fontName, float fontSize) { - return initWithLabelAndBackgroundSprite(Label::createWithSystemFont(title, fontName, fontSize), Scale9Sprite::create()); + return initWithLabelAndBackgroundSprite(Label::createWithSystemFont(title, fontName, fontSize), cocos2d::ui::Scale9Sprite::create()); } ControlButton* ControlButton::create(const std::string& title, const std::string& fontName, float fontSize) @@ -141,13 +141,13 @@ ControlButton* ControlButton::create(const std::string& title, const std::string return pRet; } -bool ControlButton::initWithBackgroundSprite(Scale9Sprite* sprite) +bool ControlButton::initWithBackgroundSprite(cocos2d::ui::Scale9Sprite* sprite) { Label *label = Label::createWithSystemFont("", "Arial", 30);// return initWithLabelAndBackgroundSprite(label, sprite); } -ControlButton* ControlButton::create(Scale9Sprite* sprite) +ControlButton* ControlButton::create(cocos2d::ui::Scale9Sprite* sprite) { ControlButton *pRet = new (std::nothrow) ControlButton(); pRet->initWithBackgroundSprite(sprite); @@ -422,7 +422,7 @@ const std::string& ControlButton::getTitleBMFontForState(State state) } -Scale9Sprite* ControlButton::getBackgroundSpriteForState(State state) +ui::Scale9Sprite* ControlButton::getBackgroundSpriteForState(State state) { auto backgroundSprite = _backgroundSpriteDispatchTable.at((int)state); if (backgroundSprite) @@ -433,7 +433,7 @@ Scale9Sprite* ControlButton::getBackgroundSpriteForState(State state) } -void ControlButton::setBackgroundSpriteForState(Scale9Sprite* sprite, State state) +void ControlButton::setBackgroundSpriteForState(ui::Scale9Sprite* sprite, State state) { Size oldPreferredSize = _preferredSize; @@ -469,7 +469,7 @@ void ControlButton::setBackgroundSpriteForState(Scale9Sprite* sprite, State stat void ControlButton::setBackgroundSpriteFrameForState(SpriteFrame * spriteFrame, State state) { - Scale9Sprite * sprite = Scale9Sprite::createWithSpriteFrame(spriteFrame); + ui::Scale9Sprite * sprite = ui::Scale9Sprite::createWithSpriteFrame(spriteFrame); this->setBackgroundSpriteForState(sprite, state); } diff --git a/extensions/GUI/CCControlExtension/CCControlButton.h b/extensions/GUI/CCControlExtension/CCControlButton.h index 758c61d363..2ead117306 100644 --- a/extensions/GUI/CCControlExtension/CCControlButton.h +++ b/extensions/GUI/CCControlExtension/CCControlButton.h @@ -32,8 +32,8 @@ #include "CCControl.h" #include "CCInvocation.h" -#include "extensions/ExtensionDeprecated.h" #include "base/CCMap.h" +#include "ui/UIScale9Sprite.h" NS_CC_EXT_BEGIN @@ -55,8 +55,8 @@ class CC_EX_DLL ControlButton : public Control { public: static ControlButton* create(); - static ControlButton* create(Scale9Sprite* sprite); - static ControlButton* create(Node* label, Scale9Sprite* backgroundSprite); + static ControlButton* create(cocos2d::ui::Scale9Sprite* sprite); + static ControlButton* create(Node* label, cocos2d::ui::Scale9Sprite* backgroundSprite); static ControlButton* create(const std::string& title, const std::string& fontName, float fontSize); virtual void needsLayout(void); @@ -148,7 +148,7 @@ public: * @param state The state that uses the background sprite. Possible values are * described in "CCControlState". */ - virtual Scale9Sprite* getBackgroundSpriteForState(State state); + virtual cocos2d::ui::Scale9Sprite* getBackgroundSpriteForState(State state); /** * Sets the background sprite to use for the specified button state. @@ -157,7 +157,7 @@ public: * @param state The state that uses the specified image. The values are described * in "CCControlState". */ - virtual void setBackgroundSpriteForState(Scale9Sprite* sprite, State state); + virtual void setBackgroundSpriteForState(cocos2d::ui::Scale9Sprite* sprite, State state); /** * Sets the background spriteFrame to use for the specified button state. @@ -202,8 +202,8 @@ CC_CONSTRUCTOR_ACCESS: virtual ~ControlButton(); virtual bool init() override; - virtual bool initWithLabelAndBackgroundSprite(Node* label, Scale9Sprite* backgroundSprite); - virtual bool initWithBackgroundSprite(Scale9Sprite* sprite); + virtual bool initWithLabelAndBackgroundSprite(Node* label, cocos2d::ui::Scale9Sprite* backgroundSprite); + virtual bool initWithBackgroundSprite(cocos2d::ui::Scale9Sprite* sprite); virtual bool initWithTitleAndFontNameAndFontSize(const std::string& title, const std::string& fontName, float fontSize); protected: @@ -221,7 +221,7 @@ protected: CC_SYNTHESIZE_RETAIN(Node*, _titleLabel, TitleLabel); /** The current background sprite. */ - CC_SYNTHESIZE_RETAIN(Scale9Sprite*, _backgroundSprite, BackgroundSprite); + CC_SYNTHESIZE_RETAIN(cocos2d::ui::Scale9Sprite*, _backgroundSprite, BackgroundSprite); /** The prefered size of the button, if label is larger it will be expanded. */ CC_PROPERTY_PASS_BY_REF(Size, _preferredSize, PreferredSize); @@ -237,7 +237,7 @@ protected: std::unordered_map _titleColorDispatchTable; Map _titleLabelDispatchTable; - Map _backgroundSpriteDispatchTable; + Map _backgroundSpriteDispatchTable; /* Define the button margin for Top/Bottom edge */ CC_SYNTHESIZE_READONLY(int, _marginV, VerticalMargin); From d681bdce92e82ae6434f8bc9c79fbda370e2f495 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Wed, 3 Sep 2014 14:54:58 +0800 Subject: [PATCH 72/74] Fix the crash of project which was created by the lua-template-runtime --- .../frameworks/runtime-src/Classes/AppDelegate.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp index 2bbc729319..8bd26e143a 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -65,12 +65,7 @@ bool AppDelegate::applicationDidFinishLaunching() auto engine = LuaEngine::getInstance(); ScriptEngineManager::getInstance()->setScriptEngine(engine); lua_State* L = engine->getLuaStack()->getLuaState(); - lua_getglobal(L, "_G"); - if (lua_istable(L,-1))//stack:...,_G, - { - lua_module_register(L); - } - lua_pop(L, 1);//statck:... + lua_module_register(L); LuaStack* stack = engine->getLuaStack(); stack->setXXTEAKeyAndSign("2dxLua", strlen("2dxLua"), "XXTEA", strlen("XXTEA")); From 58f219fc203fe464bee26d97cc87d601b6412f58 Mon Sep 17 00:00:00 2001 From: andyque Date: Wed, 3 Sep 2014 15:00:09 +0800 Subject: [PATCH 73/74] test extension::Scale9Sprite and remove unused file compile flags --- build/cocos2d_libs.xcodeproj/project.pbxproj | 2 +- .../CCControlButtonTest/CCControlButtonTest.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index 9482485163..dcf250b68c 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -948,7 +948,7 @@ 15AE1BC819AAE00000C27E9E /* AssetsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF5352180E3060000584C8 /* AssetsManager.h */; }; 15AE1BC919AAE01E00C27E9E /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168351807AF4E005B8026 /* CCControl.cpp */; }; 15AE1BCA19AAE01E00C27E9E /* CCControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168361807AF4E005B8026 /* CCControl.h */; }; - 15AE1BCB19AAE01E00C27E9E /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168371807AF4E005B8026 /* CCControlButton.cpp */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-checker"; }; }; + 15AE1BCB19AAE01E00C27E9E /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168371807AF4E005B8026 /* CCControlButton.cpp */; }; 15AE1BCC19AAE01E00C27E9E /* CCControlButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168381807AF4E005B8026 /* CCControlButton.h */; }; 15AE1BCD19AAE01E00C27E9E /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46A168391807AF4E005B8026 /* CCControlColourPicker.cpp */; }; 15AE1BCE19AAE01E00C27E9E /* CCControlColourPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A1683A1807AF4E005B8026 /* CCControlColourPicker.h */; }; diff --git a/tests/cpp-tests/Classes/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp index 2fef6f9aa3..6981d7c7aa 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp @@ -91,8 +91,8 @@ bool ControlButtonTest_HelloVariableSize::init() ControlButton *ControlButtonTest_HelloVariableSize::standardButtonWithTitle(const char * title) { /** Creates and return a button with a default background and title color. */ - auto backgroundButton = Scale9Sprite::create("extensions/button.png"); - auto backgroundHighlightedButton = Scale9Sprite::create("extensions/buttonHighlighted.png"); + auto backgroundButton = cocos2d::extension::Scale9Sprite::create("extensions/button.png"); + auto backgroundHighlightedButton = cocos2d::extension::Scale9Sprite::create("extensions/buttonHighlighted.png"); auto titleButton = Label::createWithTTF(title, "fonts/Marker Felt.ttf", 30); @@ -258,7 +258,7 @@ bool ControlButtonTest_Styling::init() layer->setPosition(screenSize.width / 2.0f, screenSize.height / 2.0f); // Add the black background - auto backgroundButton = Scale9Sprite::create("extensions/buttonBackground.png"); + auto backgroundButton = cocos2d::extension::Scale9Sprite::create("extensions/buttonBackground.png"); backgroundButton->setContentSize(Size(max_w + 14, max_h + 14)); backgroundButton->setPosition(screenSize.width / 2.0f, screenSize.height / 2.0f); addChild(backgroundButton); From 45f08d54cb66e9b98a274f31a0bf1140250d2a5a Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Wed, 3 Sep 2014 15:07:31 +0800 Subject: [PATCH 74/74] Fix the member name error in the `vec4_to_luaval ` --- .../lua-bindings/manual/LuaBasicConversions.cpp | 10 +++++----- .../lua-bindings/manual/LuaBasicConversions.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp index da15b71819..e8da5290ee 100644 --- a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp +++ b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp @@ -1995,23 +1995,23 @@ void vec3_to_luaval(lua_State* L,const cocos2d::Vec3& vec3) lua_rawset(L, -3); } -void vec4_to_luaval(lua_State* L,const cocos2d::Vec4& vec3) +void vec4_to_luaval(lua_State* L,const cocos2d::Vec4& vec4) { if (NULL == L) return; lua_newtable(L); /* L: table */ lua_pushstring(L, "x"); /* L: table key */ - lua_pushnumber(L, (lua_Number) vec3.x); /* L: table key value*/ + lua_pushnumber(L, (lua_Number) vec4.x); /* L: table key value*/ lua_rawset(L, -3); /* table[key] = value, L: table */ lua_pushstring(L, "y"); /* L: table key */ - lua_pushnumber(L, (lua_Number) vec3.y); /* L: table key value*/ + lua_pushnumber(L, (lua_Number) vec4.y); /* L: table key value*/ lua_rawset(L, -3); lua_pushstring(L, "z"); /* L: table key */ - lua_pushnumber(L, (lua_Number) vec3.z); /* L: table key value*/ + lua_pushnumber(L, (lua_Number) vec4.z); /* L: table key value*/ lua_rawset(L, -3); lua_pushstring(L, "w"); /* L: table key */ - lua_pushnumber(L, (lua_Number) vec3.z); /* L: table key value*/ + lua_pushnumber(L, (lua_Number) vec4.w); /* L: table key value*/ lua_rawset(L, -3); } diff --git a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h index 2d07f4a2f2..6626ecad1c 100644 --- a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h +++ b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h @@ -240,7 +240,7 @@ extern bool luaval_to_std_vector_ushort(lua_State* L, int lo, std::vector