diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj
index 1dc2263953..fd88ad719e 100644
--- a/build/cocos2d_tests.xcodeproj/project.pbxproj
+++ b/build/cocos2d_tests.xcodeproj/project.pbxproj
@@ -50,6 +50,7 @@
15AECE0F195C1FDD00907DB0 /* cocosvideo.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */; };
15AECE25195D467D00907DB0 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */; };
15B0870D195AD52000D6F62B /* ActionTimeline in Resources */ = {isa = PBXBuildFile; fileRef = 38FA2E75194AECF800FF2BE4 /* ActionTimeline */; };
+ 15B13E5219F0FD4D008A1ADC /* Manifests in Resources */ = {isa = PBXBuildFile; fileRef = 15B3709219EE5D1000ABE682 /* Manifests */; };
15B3709319EE5D1000ABE682 /* Manifests in Resources */ = {isa = PBXBuildFile; fileRef = 15B3709219EE5D1000ABE682 /* Manifests */; };
15B3709419EE5D1000ABE682 /* Manifests in Resources */ = {isa = PBXBuildFile; fileRef = 15B3709219EE5D1000ABE682 /* Manifests */; };
15B3709819EE5DBA00ABE682 /* AssetsManagerExTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15B3709619EE5DBA00ABE682 /* AssetsManagerExTest.cpp */; };
@@ -7377,6 +7378,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 15B13E5219F0FD4D008A1ADC /* Manifests in Resources */,
156EAE071977D0BD00F53709 /* ActionTimeline in Resources */,
15E66FD6192DC8C700C20A52 /* Sprite3DTest in Resources */,
3E2F27BC19D00D7200E7C490 /* audio in Resources */,
diff --git a/cocos/editor-support/cocostudio/CCArmature.cpp b/cocos/editor-support/cocostudio/CCArmature.cpp
index ba7d5e7a84..5c861191a9 100644
--- a/cocos/editor-support/cocostudio/CCArmature.cpp
+++ b/cocos/editor-support/cocostudio/CCArmature.cpp
@@ -573,7 +573,7 @@ Bone *Armature::getParentBone() const
#if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT
-void CCArmature::setColliderFilter(ColliderFilter *filter)
+void Armature::setColliderFilter(ColliderFilter *filter)
{
for (auto& element : _boneDic)
{
@@ -582,7 +582,7 @@ void CCArmature::setColliderFilter(ColliderFilter *filter)
}
#elif ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX
-void CCArmature::drawContour()
+void Armature::drawContour()
{
for(auto& element : _boneDic)
{
@@ -607,8 +607,22 @@ void CCArmature::drawContour()
points[i].x = p.x;
points[i].y = p.y;
}
+
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#elif _MSC_VER >= 1400 //vs 2005 or higher
+#pragma warning (push)
+#pragma warning (disable: 4996)
+#endif
+
DrawPrimitives::drawPoly( points, (unsigned int)length, true );
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#elif _MSC_VER >= 1400 //vs 2005 or higher
+#pragma warning (pop)
+#endif
+
delete []points;
}
}
diff --git a/cocos/editor-support/cocostudio/CCArmature.h b/cocos/editor-support/cocostudio/CCArmature.h
index 4d7fef1768..ff0de2f2da 100644
--- a/cocos/editor-support/cocostudio/CCArmature.h
+++ b/cocos/editor-support/cocostudio/CCArmature.h
@@ -195,7 +195,7 @@ public:
#if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT
virtual void setColliderFilter(ColliderFilter *filter);
#elif ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX
- virtual void drawContour();
+ CC_DEPRECATED_ATTRIBUTE virtual void drawContour();
#endif
diff --git a/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua
index 0a2637cb6c..7f90dfebe1 100644
--- a/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ActionFrame.lua
@@ -11,7 +11,7 @@
-- @param self
-- @param #float duration
-- @param #ccs.ActionFrame srcFrame
--- @return ActionInterval#ActionInterval ret (retunr value: cc.ActionInterval)
+-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
--------------------------------
-- Gets the type of action frame
diff --git a/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua b/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua
index 0be42e90d1..df0e25a32b 100644
--- a/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua
@@ -12,7 +12,7 @@
-- @param #char jsonName
-- @param #char actionName
-- @param #cc.CallFunc func
--- @return ActionObject#ActionObject ret (retunr value: ccs.ActionObject)
+-- @return ActionObject#ActionObject ret (return value: ccs.ActionObject)
--------------------------------
-- Gets an ActionObject with a name.
diff --git a/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua b/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua
index 3e1cf8fb83..47d6952749 100644
--- a/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua
@@ -18,7 +18,7 @@
-- @param self
-- @param #float duration
-- @param #ccs.ActionFrame srcFrame
--- @return ActionInterval#ActionInterval ret (retunr value: cc.ActionInterval)
+-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
--------------------------------
-- Gets the rotate action rotation.
diff --git a/cocos/scripting/lua-bindings/auto/api/Animate.lua b/cocos/scripting/lua-bindings/auto/api/Animate.lua
index f3bf16dc52..c654909182 100644
--- a/cocos/scripting/lua-bindings/auto/api/Animate.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Animate.lua
@@ -9,7 +9,7 @@
-- @overload self
-- @function [parent=#Animate] getAnimation
-- @param self
--- @return Animation#Animation ret (retunr value: cc.Animation)
+-- @return Animation#Animation ret (return value: cc.Animation)
--------------------------------
-- sets the Animation object to be animated
diff --git a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua
index 799140a2d5..20860e774f 100644
--- a/cocos/scripting/lua-bindings/auto/api/Animate3D.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Animate3D.lua
@@ -36,7 +36,7 @@
-- @param #cc.Animation3D animation
-- @param #float fromTime
-- @param #float duration
--- @return Animate3D#Animate3D ret (retunr value: cc.Animate3D)
+-- @return Animate3D#Animate3D ret (return value: cc.Animate3D)
--------------------------------
-- animate transistion time
diff --git a/cocos/scripting/lua-bindings/auto/api/Animation.lua b/cocos/scripting/lua-bindings/auto/api/Animation.lua
index 4dc9976680..1f6c3e4adb 100644
--- a/cocos/scripting/lua-bindings/auto/api/Animation.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Animation.lua
@@ -102,7 +102,7 @@
-- @param #array_table arrayOfAnimationFrameNames
-- @param #float delayPerUnit
-- @param #unsigned int loops
--- @return Animation#Animation ret (retunr value: cc.Animation)
+-- @return Animation#Animation ret (return value: cc.Animation)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua b/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua
index 8a6609349b..509bc35945 100644
--- a/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua
+++ b/cocos/scripting/lua-bindings/auto/api/AnimationFrame.lua
@@ -15,7 +15,7 @@
-- @overload self
-- @function [parent=#AnimationFrame] getUserInfo
-- @param self
--- @return map_table#map_table ret (retunr value: map_table)
+-- @return map_table#map_table ret (return value: map_table)
--------------------------------
-- Sets the units of time the frame takes
diff --git a/cocos/scripting/lua-bindings/auto/api/Armature.lua b/cocos/scripting/lua-bindings/auto/api/Armature.lua
index bed47ac8bf..9962e6e868 100644
--- a/cocos/scripting/lua-bindings/auto/api/Armature.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Armature.lua
@@ -81,7 +81,7 @@
-- @param self
-- @param #string name
-- @param #ccs.Bone parentBone
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -154,7 +154,7 @@
-- @param self
-- @param #string name
-- @param #ccs.Bone parentBone
--- @return Armature#Armature ret (retunr value: ccs.Armature)
+-- @return Armature#Armature ret (return value: ccs.Armature)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua b/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua
index 1f0afa6876..228bbf0d61 100644
--- a/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua
+++ b/cocos/scripting/lua-bindings/auto/api/AudioEngine.lua
@@ -181,6 +181,6 @@
-- @function [parent=#AudioEngine] getProfile
-- @param self
-- @param #int audioID
--- @return experimental::AudioProfile#experimental::AudioProfile ret (retunr value: cc.experimental::AudioProfile)
+-- @return experimental::AudioProfile#experimental::AudioProfile ret (return value: cc.experimental::AudioProfile)
return nil
diff --git a/cocos/scripting/lua-bindings/auto/api/BillBoard.lua b/cocos/scripting/lua-bindings/auto/api/BillBoard.lua
index 1b759c2f86..0b94022bb2 100644
--- a/cocos/scripting/lua-bindings/auto/api/BillBoard.lua
+++ b/cocos/scripting/lua-bindings/auto/api/BillBoard.lua
@@ -25,7 +25,7 @@
-- @param #string filename
-- @param #rect_table rect
-- @param #int mode
--- @return BillBoard#BillBoard ret (retunr value: cc.BillBoard)
+-- @return BillBoard#BillBoard ret (return value: cc.BillBoard)
--------------------------------
-- Creates a BillBoard with a Texture2D object.
diff --git a/cocos/scripting/lua-bindings/auto/api/Bone.lua b/cocos/scripting/lua-bindings/auto/api/Bone.lua
index 99606c4270..1085cb87ac 100644
--- a/cocos/scripting/lua-bindings/auto/api/Bone.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Bone.lua
@@ -94,7 +94,7 @@
-- @function [parent=#Bone] init
-- @param self
-- @param #string name
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
-- Set parent bone.
@@ -209,7 +209,7 @@
-- @function [parent=#Bone] create
-- @param self
-- @param #string name
--- @return Bone#Bone ret (retunr value: ccs.Bone)
+-- @return Bone#Bone ret (return value: ccs.Bone)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/Button.lua b/cocos/scripting/lua-bindings/auto/api/Button.lua
index 9ca71a4f9c..ef942e8fa4 100644
--- a/cocos/scripting/lua-bindings/auto/api/Button.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Button.lua
@@ -189,7 +189,7 @@
-- @param #string selectedImage
-- @param #string disableImage
-- @param #int texType
--- @return Button#Button ret (retunr value: ccui.Button)
+-- @return Button#Button ret (return value: ccui.Button)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/CheckBox.lua b/cocos/scripting/lua-bindings/auto/api/CheckBox.lua
index 3ef7cf5013..0ca3ebc62c 100644
--- a/cocos/scripting/lua-bindings/auto/api/CheckBox.lua
+++ b/cocos/scripting/lua-bindings/auto/api/CheckBox.lua
@@ -94,7 +94,7 @@
-- @param #string backGroundDisabled
-- @param #string frontCrossDisabled
-- @param #int texType
--- @return CheckBox#CheckBox ret (retunr value: ccui.CheckBox)
+-- @return CheckBox#CheckBox ret (return value: ccui.CheckBox)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua b/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua
index a8ac20c195..6f7f27e934 100644
--- a/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ClippingNode.lua
@@ -53,7 +53,7 @@
-- @function [parent=#ClippingNode] create
-- @param self
-- @param #cc.Node stencil
--- @return ClippingNode#ClippingNode ret (retunr value: cc.ClippingNode)
+-- @return ClippingNode#ClippingNode ret (return value: cc.ClippingNode)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/ClippingRectangleNode.lua b/cocos/scripting/lua-bindings/auto/api/ClippingRectangleNode.lua
index 3678abe33c..fc88ed44a0 100644
--- a/cocos/scripting/lua-bindings/auto/api/ClippingRectangleNode.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ClippingRectangleNode.lua
@@ -34,7 +34,7 @@
-- @function [parent=#ClippingRectangleNode] create
-- @param self
-- @param #rect_table clippingRegion
--- @return ClippingRectangleNode#ClippingRectangleNode ret (retunr value: cc.ClippingRectangleNode)
+-- @return ClippingRectangleNode#ClippingRectangleNode ret (return value: cc.ClippingRectangleNode)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/ComAudio.lua b/cocos/scripting/lua-bindings/auto/api/ComAudio.lua
index a79ab68966..4ac0e0b157 100644
--- a/cocos/scripting/lua-bindings/auto/api/ComAudio.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ComAudio.lua
@@ -101,7 +101,7 @@
-- @param self
-- @param #char pszFilePath
-- @param #bool bLoop
--- @return unsigned int#unsigned int ret (retunr value: unsigned int)
+-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/ComRender.lua b/cocos/scripting/lua-bindings/auto/api/ComRender.lua
index afc835a203..bcb87c8f0e 100644
--- a/cocos/scripting/lua-bindings/auto/api/ComRender.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ComRender.lua
@@ -23,7 +23,7 @@
-- @param self
-- @param #cc.Node node
-- @param #char comName
--- @return ComRender#ComRender ret (retunr value: ccs.ComRender)
+-- @return ComRender#ComRender ret (return value: ccs.ComRender)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua
index 5d757d9b16..617ce07ef0 100644
--- a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua
@@ -140,7 +140,7 @@
-- @overload self
-- @function [parent=#ControlButton] getCurrentTitle
-- @param self
--- @return string#string ret (retunr value: string)
+-- @return string#string ret (return value: string)
--------------------------------
--
@@ -297,7 +297,7 @@
-- @param #string title
-- @param #string fontName
-- @param #float fontSize
--- @return ControlButton#ControlButton ret (retunr value: cc.ControlButton)
+-- @return ControlButton#ControlButton ret (return value: cc.ControlButton)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua b/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua
index 33e66b6ccf..8a1521a1ef 100644
--- a/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua
@@ -103,7 +103,7 @@
-- @param #cc.Sprite progressSprite
-- @param #cc.Sprite thumbSprite
-- @param #cc.Sprite selectedThumbSprite
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -159,7 +159,7 @@
-- @param #cc.Sprite pogressSprite
-- @param #cc.Sprite thumbSprite
-- @param #cc.Sprite selectedThumbSprite
--- @return ControlSlider#ControlSlider ret (retunr value: cc.ControlSlider)
+-- @return ControlSlider#ControlSlider ret (return value: cc.ControlSlider)
--------------------------------
-- js ctor
diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua b/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua
index e7841e64f2..11f24f8ed9 100644
--- a/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua
@@ -35,7 +35,7 @@
-- @param #cc.Sprite thumbSprite
-- @param #cc.Label onLabel
-- @param #cc.Label offLabel
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -61,7 +61,7 @@
-- @param #cc.Sprite thumbSprite
-- @param #cc.Label onLabel
-- @param #cc.Label offLabel
--- @return ControlSwitch#ControlSwitch ret (retunr value: cc.ControlSwitch)
+-- @return ControlSwitch#ControlSwitch ret (return value: cc.ControlSwitch)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua b/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua
index efbcde86af..e20d0834e9 100644
--- a/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua
+++ b/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua
@@ -68,7 +68,7 @@
-- @param self
-- @param #float x
-- @param #float y
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
-- Change display by index. You can just use this method to change display in the display list.
diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua
index be975202b7..4fc1c9bc5f 100644
--- a/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua
+++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticIn.lua
@@ -11,7 +11,7 @@
-- @param self
-- @param #cc.ActionInterval action
-- @param #float period
--- @return EaseElasticIn#EaseElasticIn ret (retunr value: cc.EaseElasticIn)
+-- @return EaseElasticIn#EaseElasticIn ret (return value: cc.EaseElasticIn)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua b/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua
index cae6e19b10..cd5b7c50d0 100644
--- a/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua
+++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticInOut.lua
@@ -11,7 +11,7 @@
-- @param self
-- @param #cc.ActionInterval action
-- @param #float period
--- @return EaseElasticInOut#EaseElasticInOut ret (retunr value: cc.EaseElasticInOut)
+-- @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..18565fbf43 100644
--- a/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua
+++ b/cocos/scripting/lua-bindings/auto/api/EaseElasticOut.lua
@@ -11,7 +11,7 @@
-- @param self
-- @param #cc.ActionInterval action
-- @param #float period
--- @return EaseElasticOut#EaseElasticOut ret (retunr value: cc.EaseElasticOut)
+-- @return EaseElasticOut#EaseElasticOut ret (return value: cc.EaseElasticOut)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/EditBox.lua b/cocos/scripting/lua-bindings/auto/api/EditBox.lua
index 787fa937d7..05201dc10e 100644
--- a/cocos/scripting/lua-bindings/auto/api/EditBox.lua
+++ b/cocos/scripting/lua-bindings/auto/api/EditBox.lua
@@ -159,7 +159,7 @@
-- @param #size_table size
-- @param #string pNormal9SpriteBg
-- @param #int texType
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
-- Set a text in the edit box that acts as a placeholder when an
@@ -224,7 +224,7 @@
-- @param #ccui.Scale9Sprite normalSprite
-- @param #ccui.Scale9Sprite pressedSprite
-- @param #ccui.Scale9Sprite disabledSprite
--- @return EditBox#EditBox ret (retunr value: ccui.EditBox)
+-- @return EditBox#EditBox ret (return value: ccui.EditBox)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/Grid3D.lua b/cocos/scripting/lua-bindings/auto/api/Grid3D.lua
index c3a9acd189..84cd3deebd 100644
--- a/cocos/scripting/lua-bindings/auto/api/Grid3D.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Grid3D.lua
@@ -24,7 +24,7 @@
-- @param #size_table gridSize
-- @param #cc.Texture2D texture
-- @param #bool flipped
--- @return Grid3D#Grid3D ret (retunr value: cc.Grid3D)
+-- @return Grid3D#Grid3D ret (return value: cc.Grid3D)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/GridBase.lua b/cocos/scripting/lua-bindings/auto/api/GridBase.lua
index bf139480dd..635e3682ac 100644
--- a/cocos/scripting/lua-bindings/auto/api/GridBase.lua
+++ b/cocos/scripting/lua-bindings/auto/api/GridBase.lua
@@ -91,7 +91,7 @@
-- @param #size_table gridSize
-- @param #cc.Texture2D texture
-- @param #bool flipped
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -123,6 +123,6 @@
-- @param #size_table gridSize
-- @param #cc.Texture2D texture
-- @param #bool flipped
--- @return GridBase#GridBase ret (retunr value: cc.GridBase)
+-- @return GridBase#GridBase ret (return 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..a1157c78fd 100644
--- a/cocos/scripting/lua-bindings/auto/api/HBox.lua
+++ b/cocos/scripting/lua-bindings/auto/api/HBox.lua
@@ -10,7 +10,7 @@
-- @function [parent=#HBox] create
-- @param self
-- @param #size_table size
--- @return HBox#HBox ret (retunr value: ccui.HBox)
+-- @return HBox#HBox ret (return value: ccui.HBox)
--------------------------------
-- Default constructor
diff --git a/cocos/scripting/lua-bindings/auto/api/Helper.lua b/cocos/scripting/lua-bindings/auto/api/Helper.lua
index 1a48291492..02860c10d9 100644
--- a/cocos/scripting/lua-bindings/auto/api/Helper.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Helper.lua
@@ -18,20 +18,9 @@
--------------------------------
--
--- @function [parent=#Helper] doLayout
+-- @function [parent=#Helper] changeLayoutSystemActiveState
-- @param self
--- @param #cc.Node rootNode
-
---------------------------------
--- 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
--- @return Widget#Widget ret (return value: ccui.Widget)
+-- @param #bool bActive
--------------------------------
--
@@ -52,4 +41,21 @@
-- @param #string name
-- @return Widget#Widget ret (return value: ccui.Widget)
+--------------------------------
+-- 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
+-- @return Widget#Widget ret (return value: ccui.Widget)
+
+--------------------------------
+--
+-- @function [parent=#Helper] doLayout
+-- @param self
+-- @param #cc.Node rootNode
+
return nil
diff --git a/cocos/scripting/lua-bindings/auto/api/ImageView.lua b/cocos/scripting/lua-bindings/auto/api/ImageView.lua
index 6bfec98e56..6e61eb667c 100644
--- a/cocos/scripting/lua-bindings/auto/api/ImageView.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ImageView.lua
@@ -53,7 +53,7 @@
-- @param self
-- @param #string imageFileName
-- @param #int texType
--- @return ImageView#ImageView ret (retunr value: ccui.ImageView)
+-- @return ImageView#ImageView ret (return value: ccui.ImageView)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/Label.lua b/cocos/scripting/lua-bindings/auto/api/Label.lua
index 41505c7399..30999eeab0 100644
--- a/cocos/scripting/lua-bindings/auto/api/Label.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Label.lua
@@ -170,7 +170,7 @@
-- @param #int itemWidth
-- @param #int itemHeight
-- @param #int startCharMap
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -324,7 +324,7 @@
-- @param #int itemWidth
-- @param #int itemHeight
-- @param #int startCharMap
--- @return Label#Label ret (retunr value: cc.Label)
+-- @return Label#Label ret (return 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.
diff --git a/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua b/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua
index 53d042dc5f..55e74dfd82 100644
--- a/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua
+++ b/cocos/scripting/lua-bindings/auto/api/LabelAtlas.lua
@@ -21,7 +21,7 @@
-- @param #int itemWidth
-- @param #int itemHeight
-- @param #int startCharMap
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -45,7 +45,7 @@
-- @param #int itemWidth
-- @param #int itemHeight
-- @param #int startCharMap
--- @return LabelAtlas#LabelAtlas ret (retunr value: cc.LabelAtlas)
+-- @return LabelAtlas#LabelAtlas ret (return value: cc.LabelAtlas)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/LayerColor.lua b/cocos/scripting/lua-bindings/auto/api/LayerColor.lua
index c4cdc21e89..ecd145983e 100644
--- a/cocos/scripting/lua-bindings/auto/api/LayerColor.lua
+++ b/cocos/scripting/lua-bindings/auto/api/LayerColor.lua
@@ -33,7 +33,7 @@
-- @param #color4b_table color
-- @param #float width
-- @param #float height
--- @return LayerColor#LayerColor ret (retunr value: cc.LayerColor)
+-- @return LayerColor#LayerColor ret (return value: cc.LayerColor)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua b/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua
index fda8a00876..041c4d9d40 100644
--- a/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua
+++ b/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua
@@ -87,7 +87,7 @@
-- @param #color4b_table start
-- @param #color4b_table end
-- @param #vec2_table v
--- @return LayerGradient#LayerGradient ret (retunr value: cc.LayerGradient)
+-- @return LayerGradient#LayerGradient ret (return value: cc.LayerGradient)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua b/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua
index bb0fa5deff..535a59cbb7 100644
--- a/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua
+++ b/cocos/scripting/lua-bindings/auto/api/LoadingBar.lua
@@ -76,7 +76,7 @@
-- @param self
-- @param #string textureName
-- @param #float percentage
--- @return LoadingBar#LoadingBar ret (retunr value: ccui.LoadingBar)
+-- @return LoadingBar#LoadingBar ret (return value: ccui.LoadingBar)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua b/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua
index 63d586f109..e9ab48c0fe 100644
--- a/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua
+++ b/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua
@@ -61,7 +61,7 @@
-- @param #float stroke
-- @param #color3b_table color
-- @param #string path
--- @return MotionStreak#MotionStreak ret (retunr value: cc.MotionStreak)
+-- @return MotionStreak#MotionStreak ret (return value: cc.MotionStreak)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua
index 1b5400ed2a..98cfbcb1ae 100644
--- a/cocos/scripting/lua-bindings/auto/api/Node.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Node.lua
@@ -21,7 +21,7 @@
-- @function [parent=#Node] removeComponent
-- @param self
-- @param #string name
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
-- set the PhysicsBody that let the sprite effect with physics
@@ -68,7 +68,7 @@
-- @overload self
-- @function [parent=#Node] getChildren
-- @param self
--- @return array_table#array_table ret (retunr value: array_table)
+-- @return array_table#array_table ret (return value: array_table)
--------------------------------
--
@@ -643,7 +643,7 @@
-- @overload self
-- @function [parent=#Node] getScheduler
-- @param self
--- @return Scheduler#Scheduler ret (retunr value: cc.Scheduler)
+-- @return Scheduler#Scheduler ret (return value: cc.Scheduler)
--------------------------------
--
@@ -686,7 +686,7 @@
-- @overload self
-- @function [parent=#Node] getParent
-- @param self
--- @return Node#Node ret (retunr value: cc.Node)
+-- @return Node#Node ret (return value: cc.Node)
--------------------------------
-- Gets position Z coordinate of this node.
@@ -1038,7 +1038,7 @@
-- @overload self
-- @function [parent=#Node] getActionManager
-- @param self
--- @return ActionManager#ActionManager ret (retunr value: cc.ActionManager)
+-- @return ActionManager#ActionManager ret (return value: cc.ActionManager)
--------------------------------
-- Allocates and initializes a node.
diff --git a/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua b/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua
index 7ccb4f01c2..0fe90992ba 100644
--- a/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua
+++ b/cocos/scripting/lua-bindings/auto/api/NodeGrid.lua
@@ -15,7 +15,7 @@
-- @overload self
-- @function [parent=#NodeGrid] getGrid
-- @param self
--- @return GridBase#GridBase ret (retunr value: cc.GridBase)
+-- @return GridBase#GridBase ret (return value: cc.GridBase)
--------------------------------
-- Changes a grid object that is used when applying effects
diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua
index b4efdc78a4..3d5834f858 100644
--- a/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ParticleSystemQuad.lua
@@ -37,7 +37,7 @@
-- @function [parent=#ParticleSystemQuad] create
-- @param self
-- @param #map_table dictionary
--- @return ParticleSystemQuad#ParticleSystemQuad ret (retunr value: cc.ParticleSystemQuad)
+-- @return ParticleSystemQuad#ParticleSystemQuad ret (return value: cc.ParticleSystemQuad)
--------------------------------
-- creates a Particle Emitter with a number of particles
diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua
index 62e4933a0b..3202c50f16 100644
--- a/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua
+++ b/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua
@@ -435,7 +435,7 @@
-- @param self
-- @param #float mass
-- @param #float moment
--- @return PhysicsBody#PhysicsBody ret (retunr value: cc.PhysicsBody)
+-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
--------------------------------
-- Create a body contains a EdgeBox shape.
diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua
index 6b4a92acd8..80b7d4df7d 100644
--- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua
+++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua
@@ -63,6 +63,6 @@
-- @param #vec2_table anchr2
-- @param #float min
-- @param #float max
--- @return PhysicsJointLimit#PhysicsJointLimit ret (retunr value: cc.PhysicsJointLimit)
+-- @return PhysicsJointLimit#PhysicsJointLimit ret (return value: cc.PhysicsJointLimit)
return nil
diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua
index 8feaf87785..9600c188e7 100644
--- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua
+++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointRotaryLimit.lua
@@ -37,6 +37,6 @@
-- @param #cc.PhysicsBody b
-- @param #float min
-- @param #float max
--- @return PhysicsJointRotaryLimit#PhysicsJointRotaryLimit ret (retunr value: cc.PhysicsJointRotaryLimit)
+-- @return PhysicsJointRotaryLimit#PhysicsJointRotaryLimit ret (return value: cc.PhysicsJointRotaryLimit)
return nil
diff --git a/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua b/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua
index b919424813..a3c1e981dd 100644
--- a/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua
+++ b/cocos/scripting/lua-bindings/auto/api/RelativeBox.lua
@@ -10,7 +10,7 @@
-- @function [parent=#RelativeBox] create
-- @param self
-- @param #size_table size
--- @return RelativeBox#RelativeBox ret (retunr value: ccui.RelativeBox)
+-- @return RelativeBox#RelativeBox ret (return value: ccui.RelativeBox)
--------------------------------
-- Default constructor
diff --git a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua
index d7f705032c..92fcdaf0d0 100644
--- a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua
+++ b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua
@@ -86,7 +86,7 @@
-- @param #int format
-- @param #bool isRGBA
-- @param #function callback
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -166,7 +166,7 @@
-- @param #int h
-- @param #int format
-- @param #unsigned int depthStencilFormat
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
-- @overload self, int, int, int
@@ -178,7 +178,7 @@
-- @param #int h
-- @param #int format
-- @param #unsigned int depthStencilFormat
--- @return RenderTexture#RenderTexture ret (retunr value: cc.RenderTexture)
+-- @return RenderTexture#RenderTexture ret (return value: cc.RenderTexture)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/RotateBy.lua b/cocos/scripting/lua-bindings/auto/api/RotateBy.lua
index 05a24a7f5a..e2414fc0d2 100644
--- a/cocos/scripting/lua-bindings/auto/api/RotateBy.lua
+++ b/cocos/scripting/lua-bindings/auto/api/RotateBy.lua
@@ -13,7 +13,7 @@
-- @param #float duration
-- @param #float deltaAngleZ_X
-- @param #float deltaAngleZ_Y
--- @return RotateBy#RotateBy ret (retunr value: cc.RotateBy)
+-- @return RotateBy#RotateBy ret (return value: cc.RotateBy)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/RotateTo.lua b/cocos/scripting/lua-bindings/auto/api/RotateTo.lua
index 9a03166d87..0a6a7aecfb 100644
--- a/cocos/scripting/lua-bindings/auto/api/RotateTo.lua
+++ b/cocos/scripting/lua-bindings/auto/api/RotateTo.lua
@@ -13,7 +13,7 @@
-- @param #float duration
-- @param #float dstAngleX
-- @param #float dstAngleY
--- @return RotateTo#RotateTo ret (retunr value: cc.RotateTo)
+-- @return RotateTo#RotateTo ret (return value: cc.RotateTo)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua
index 120d1ab79f..c261634a7d 100644
--- a/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua
@@ -20,7 +20,7 @@
-- @param #vec2_table offset
-- @param #size_table originalSize
-- @param #rect_table capInsets
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
-- Returns the flag which indicates whether the widget is flipped horizontally or not.
@@ -71,7 +71,7 @@
-- @param self
-- @param #string spriteFrameName
-- @param #rect_table capInsets
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -98,7 +98,7 @@
-- @param #vec2_table offset
-- @param #size_table originalSize
-- @param #rect_table capInsets
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -164,7 +164,7 @@
-- @param #string file
-- @param #rect_table rect
-- @param #rect_table capInsets
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -185,7 +185,7 @@
-- @param self
-- @param #cc.SpriteFrame spriteFrame
-- @param #rect_table capInsets
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
--
@@ -233,7 +233,7 @@
-- @param #string file
-- @param #rect_table rect
-- @param #rect_table capInsets
--- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite)
+-- @return Scale9Sprite#Scale9Sprite ret (return value: ccui.Scale9Sprite)
--------------------------------
-- @overload self, string, rect_table
@@ -242,7 +242,7 @@
-- @param self
-- @param #string spriteFrameName
-- @param #rect_table capInsets
--- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite)
+-- @return Scale9Sprite#Scale9Sprite ret (return value: ccui.Scale9Sprite)
--------------------------------
-- @overload self, cc.SpriteFrame, rect_table
@@ -251,7 +251,7 @@
-- @param self
-- @param #cc.SpriteFrame spriteFrame
-- @param #rect_table capInsets
--- @return Scale9Sprite#Scale9Sprite ret (retunr value: ccui.Scale9Sprite)
+-- @return Scale9Sprite#Scale9Sprite ret (return value: ccui.Scale9Sprite)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua b/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua
index f7e93e6bfb..b4261674aa 100644
--- a/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ScaleBy.lua
@@ -14,7 +14,7 @@
-- @param #float sx
-- @param #float sy
-- @param #float sz
--- @return ScaleBy#ScaleBy ret (retunr value: cc.ScaleBy)
+-- @return ScaleBy#ScaleBy ret (return value: cc.ScaleBy)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua b/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua
index 7709deadf1..83f7a97a77 100644
--- a/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ScaleTo.lua
@@ -14,7 +14,7 @@
-- @param #float sx
-- @param #float sy
-- @param #float sz
--- @return ScaleTo#ScaleTo ret (retunr value: cc.ScaleTo)
+-- @return ScaleTo#ScaleTo ret (return value: cc.ScaleTo)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/ScrollView.lua b/cocos/scripting/lua-bindings/auto/api/ScrollView.lua
index 1cd19f24c4..f11f4dd0f2 100644
--- a/cocos/scripting/lua-bindings/auto/api/ScrollView.lua
+++ b/cocos/scripting/lua-bindings/auto/api/ScrollView.lua
@@ -297,7 +297,7 @@
-- @overload self
-- @function [parent=#ScrollView] getChildren
-- @param self
--- @return array_table#array_table ret (retunr value: array_table)
+-- @return array_table#array_table ret (return value: array_table)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua b/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua
index d110b1de54..8723d2a16a 100644
--- a/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua
+++ b/cocos/scripting/lua-bindings/auto/api/SkeletonRenderer.lua
@@ -88,7 +88,7 @@
-- @param #string skeletonDataFile
-- @param #spAtlas atlas
-- @param #float scale
--- @return SkeletonRenderer#SkeletonRenderer ret (retunr value: sp.SkeletonRenderer)
+-- @return SkeletonRenderer#SkeletonRenderer ret (return value: sp.SkeletonRenderer)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/Skin.lua b/cocos/scripting/lua-bindings/auto/api/Skin.lua
index c0f870f33f..8b73d20268 100644
--- a/cocos/scripting/lua-bindings/auto/api/Skin.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Skin.lua
@@ -53,7 +53,7 @@
-- @function [parent=#Skin] create
-- @param self
-- @param #string pszFileName
--- @return Skin#Skin ret (retunr value: ccs.Skin)
+-- @return Skin#Skin ret (return value: ccs.Skin)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Sprite.lua
index 1450fafc8d..a69416528e 100644
--- a/cocos/scripting/lua-bindings/auto/api/Sprite.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Sprite.lua
@@ -196,7 +196,7 @@
-- @param self
-- @param #string filename
-- @param #rect_table rect
--- @return Sprite#Sprite ret (retunr value: cc.Sprite)
+-- @return Sprite#Sprite ret (return value: cc.Sprite)
--------------------------------
-- @overload self, cc.Texture2D, rect_table, bool
@@ -206,7 +206,7 @@
-- @param #cc.Texture2D texture
-- @param #rect_table rect
-- @param #bool rotated
--- @return Sprite#Sprite ret (retunr value: cc.Sprite)
+-- @return Sprite#Sprite ret (return value: cc.Sprite)
--------------------------------
-- Creates a sprite with an sprite frame name.
diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua
index 14278931f0..5e49c2da7d 100644
--- a/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Sprite3D.lua
@@ -92,7 +92,7 @@
-- @param self
-- @param #string modelPath
-- @param #string texturePath
--- @return Sprite3D#Sprite3D ret (retunr value: cc.Sprite3D)
+-- @return Sprite3D#Sprite3D ret (return value: cc.Sprite3D)
--------------------------------
-- Returns 2d bounding-box
diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua b/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua
index b71c6eeaad..6ae07e43a5 100644
--- a/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua
+++ b/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua
@@ -116,7 +116,7 @@
-- @param #bool rotated
-- @param #vec2_table offset
-- @param #size_table originalSize
--- @return SpriteFrame#SpriteFrame ret (retunr value: cc.SpriteFrame)
+-- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame)
--------------------------------
-- @overload self, cc.Texture2D, rect_table, bool, vec2_table, size_table
@@ -128,6 +128,6 @@
-- @param #bool rotated
-- @param #vec2_table offset
-- @param #size_table originalSize
--- @return SpriteFrame#SpriteFrame ret (retunr value: cc.SpriteFrame)
+-- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame)
return nil
diff --git a/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua b/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua
index 92d5b7e46b..2dddd0bbae 100644
--- a/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua
@@ -58,7 +58,7 @@
-- @overload self
-- @function [parent=#TMXLayer] getProperties
-- @param self
--- @return map_table#map_table ret (retunr value: map_table)
+-- @return map_table#map_table ret (return value: map_table)
--------------------------------
-- Creates the tiles
diff --git a/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua b/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua
index 3a77a877b5..346c2c4520 100644
--- a/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TMXMapInfo.lua
@@ -71,14 +71,14 @@
-- @overload self
-- @function [parent=#TMXMapInfo] getLayers
-- @param self
--- @return array_table#array_table ret (retunr value: array_table)
+-- @return array_table#array_table ret (return value: array_table)
--------------------------------
-- @overload self
-- @overload self
-- @function [parent=#TMXMapInfo] getTilesets
-- @param self
--- @return array_table#array_table ret (retunr value: array_table)
+-- @return array_table#array_table ret (return value: array_table)
--------------------------------
-- / parent GID
@@ -129,7 +129,7 @@
-- @overload self
-- @function [parent=#TMXMapInfo] getObjectGroups
-- @param self
--- @return array_table#array_table ret (retunr value: array_table)
+-- @return array_table#array_table ret (return value: array_table)
--------------------------------
--
@@ -190,7 +190,7 @@
-- @overload self
-- @function [parent=#TMXMapInfo] getProperties
-- @param self
--- @return map_table#map_table ret (retunr value: map_table)
+-- @return map_table#map_table ret (return value: map_table)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua b/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua
index 3d6c1ebed2..bb774849c6 100644
--- a/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua
@@ -36,7 +36,7 @@
-- @overload self
-- @function [parent=#TMXObjectGroup] getObjects
-- @param self
--- @return array_table#array_table ret (retunr value: array_table)
+-- @return array_table#array_table ret (return value: array_table)
--------------------------------
--
@@ -49,7 +49,7 @@
-- @overload self
-- @function [parent=#TMXObjectGroup] getProperties
-- @param self
--- @return map_table#map_table ret (retunr value: map_table)
+-- @return map_table#map_table ret (return value: map_table)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua b/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua
index 1e36be8fd4..f7d9166f65 100644
--- a/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TMXTiledMap.lua
@@ -35,7 +35,7 @@
-- @overload self
-- @function [parent=#TMXTiledMap] getObjectGroups
-- @param self
--- @return array_table#array_table ret (retunr value: array_table)
+-- @return array_table#array_table ret (return value: array_table)
--------------------------------
-- the tiles's size property measured in pixels
diff --git a/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua b/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua
index 432a7b9a50..791a72d041 100644
--- a/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TargetedAction.lua
@@ -9,7 +9,7 @@
-- @overload self
-- @function [parent=#TargetedAction] getForcedTarget
-- @param self
--- @return Node#Node ret (retunr value: cc.Node)
+-- @return Node#Node ret (return value: cc.Node)
--------------------------------
-- Sets the target that the action will be forced to run with
diff --git a/cocos/scripting/lua-bindings/auto/api/Text.lua b/cocos/scripting/lua-bindings/auto/api/Text.lua
index 7b1945dc30..875866554f 100644
--- a/cocos/scripting/lua-bindings/auto/api/Text.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Text.lua
@@ -157,7 +157,7 @@
-- @param #string textContent
-- @param #string fontName
-- @param #int fontSize
--- @return Text#Text ret (retunr value: ccui.Text)
+-- @return Text#Text ret (return value: ccui.Text)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua b/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua
index 7a23761192..6b34fb8ef7 100644
--- a/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TextAtlas.lua
@@ -50,7 +50,7 @@
-- @param #int itemWidth
-- @param #int itemHeight
-- @param #string startCharMap
--- @return TextAtlas#TextAtlas ret (retunr value: ccui.TextAtlas)
+-- @return TextAtlas#TextAtlas ret (return value: ccui.TextAtlas)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua b/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua
index 7903e704e1..91a9bea412 100644
--- a/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TextBMFont.lua
@@ -38,7 +38,7 @@
-- @param self
-- @param #string text
-- @param #string filename
--- @return TextBMFont#TextBMFont ret (retunr value: ccui.TextBMFont)
+-- @return TextBMFont#TextBMFont ret (return value: ccui.TextBMFont)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/TextField.lua b/cocos/scripting/lua-bindings/auto/api/TextField.lua
index 990bf1a9dd..3a032d7e46 100644
--- a/cocos/scripting/lua-bindings/auto/api/TextField.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TextField.lua
@@ -240,7 +240,7 @@
-- @param #string placeholder
-- @param #string fontName
-- @param #int fontSize
--- @return TextField#TextField ret (retunr value: ccui.TextField)
+-- @return TextField#TextField ret (return value: ccui.TextField)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua
index 77a95a5282..e850d53a20 100644
--- a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua
@@ -24,7 +24,7 @@
-- @param self
-- @param #cc.Image image
-- @param #int format
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
-- Gets max S
@@ -57,7 +57,7 @@
-- @function [parent=#Texture2D] getBitsPerPixelForFormat
-- @param self
-- @param #int format
--- @return unsigned int#unsigned int ret (retunr value: unsigned int)
+-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
-- Gets the texture name
@@ -76,7 +76,7 @@
-- @param #size_table dimensions
-- @param #int hAlignment
-- @param #int vAlignment
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
-- Sets max T
diff --git a/cocos/scripting/lua-bindings/auto/api/TextureCache.lua b/cocos/scripting/lua-bindings/auto/api/TextureCache.lua
index bcbc70498f..fffd67bedb 100644
--- a/cocos/scripting/lua-bindings/auto/api/TextureCache.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TextureCache.lua
@@ -58,7 +58,7 @@
-- @param self
-- @param #cc.Image image
-- @param #string key
--- @return Texture2D#Texture2D ret (retunr value: cc.Texture2D)
+-- @return Texture2D#Texture2D ret (return value: cc.Texture2D)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua b/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua
index 2d459cac13..d4c01906e3 100644
--- a/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua
@@ -12,7 +12,7 @@
-- @param #size_table gridSize
-- @param #cc.Texture2D texture
-- @param #bool flipped
--- @return TiledGrid3D#TiledGrid3D ret (retunr value: cc.TiledGrid3D)
+-- @return TiledGrid3D#TiledGrid3D ret (return value: cc.TiledGrid3D)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua
index 7e98445787..64aaeb4a3f 100644
--- a/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua
@@ -12,6 +12,6 @@
-- @param #float duration
-- @param #cc.Scene scene
-- @param #color3b_table color
--- @return TransitionFade#TransitionFade ret (retunr value: cc.TransitionFade)
+-- @return TransitionFade#TransitionFade ret (return value: cc.TransitionFade)
return nil
diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua
index 9765783694..446e2d41d4 100644
--- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipAngular.lua
@@ -12,6 +12,6 @@
-- @param #float t
-- @param #cc.Scene s
-- @param #int o
--- @return TransitionFlipAngular#TransitionFlipAngular ret (retunr value: cc.TransitionFlipAngular)
+-- @return TransitionFlipAngular#TransitionFlipAngular ret (return 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..218d129a22 100644
--- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipX.lua
@@ -12,6 +12,6 @@
-- @param #float t
-- @param #cc.Scene s
-- @param #int o
--- @return TransitionFlipX#TransitionFlipX ret (retunr value: cc.TransitionFlipX)
+-- @return TransitionFlipX#TransitionFlipX ret (return 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..f91f37a721 100644
--- a/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TransitionFlipY.lua
@@ -12,6 +12,6 @@
-- @param #float t
-- @param #cc.Scene s
-- @param #int o
--- @return TransitionFlipY#TransitionFlipY ret (retunr value: cc.TransitionFlipY)
+-- @return TransitionFlipY#TransitionFlipY ret (return value: cc.TransitionFlipY)
return nil
diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua
index d726097c07..4ef5b58f02 100644
--- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipAngular.lua
@@ -12,6 +12,6 @@
-- @param #float t
-- @param #cc.Scene s
-- @param #int o
--- @return TransitionZoomFlipAngular#TransitionZoomFlipAngular ret (retunr value: cc.TransitionZoomFlipAngular)
+-- @return TransitionZoomFlipAngular#TransitionZoomFlipAngular ret (return 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..d8dea739a1 100644
--- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipX.lua
@@ -12,6 +12,6 @@
-- @param #float t
-- @param #cc.Scene s
-- @param #int o
--- @return TransitionZoomFlipX#TransitionZoomFlipX ret (retunr value: cc.TransitionZoomFlipX)
+-- @return TransitionZoomFlipX#TransitionZoomFlipX ret (return 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..f802c025f0 100644
--- a/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TransitionZoomFlipY.lua
@@ -12,6 +12,6 @@
-- @param #float t
-- @param #cc.Scene s
-- @param #int o
--- @return TransitionZoomFlipY#TransitionZoomFlipY ret (retunr value: cc.TransitionZoomFlipY)
+-- @return TransitionZoomFlipY#TransitionZoomFlipY ret (return 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..9d89d46e40 100644
--- a/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua
+++ b/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua
@@ -24,7 +24,7 @@
-- @param #float duration
-- @param #size_table gridSize
-- @param #unsigned int seed
--- @return TurnOffTiles#TurnOffTiles ret (retunr value: cc.TurnOffTiles)
+-- @return TurnOffTiles#TurnOffTiles ret (return value: cc.TurnOffTiles)
--------------------------------
--
diff --git a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua
index 3b80444050..b160317d98 100644
--- a/cocos/scripting/lua-bindings/auto/api/UserDefault.lua
+++ b/cocos/scripting/lua-bindings/auto/api/UserDefault.lua
@@ -18,7 +18,7 @@
-- @param self
-- @param #char pKey
-- @param #float defaultValue
--- @return float#float ret (retunr value: float)
+-- @return float#float ret (return value: float)
--------------------------------
-- @overload self, char, bool
@@ -27,7 +27,7 @@
-- @param self
-- @param #char pKey
-- @param #bool defaultValue
--- @return bool#bool ret (retunr value: bool)
+-- @return bool#bool ret (return value: bool)
--------------------------------
-- brief Set double value by key.
@@ -52,7 +52,7 @@
-- @param self
-- @param #char pKey
-- @param #string defaultValue
--- @return string#string ret (retunr value: string)
+-- @return string#string ret (return value: string)
--------------------------------
-- brief Set string value by key.
@@ -75,7 +75,7 @@
-- @param self
-- @param #char pKey
-- @param #int defaultValue
--- @return int#int ret (retunr value: int)
+-- @return int#int ret (return value: int)
--------------------------------
-- @overload self, char, double
@@ -84,7 +84,7 @@
-- @param self
-- @param #char pKey
-- @param #double defaultValue
--- @return double#double ret (retunr value: double)
+-- @return double#double ret (return value: double)
--------------------------------
-- brief Set bool value by key.
diff --git a/cocos/scripting/lua-bindings/auto/api/VBox.lua b/cocos/scripting/lua-bindings/auto/api/VBox.lua
index 4f94fe822e..b40f31328a 100644
--- a/cocos/scripting/lua-bindings/auto/api/VBox.lua
+++ b/cocos/scripting/lua-bindings/auto/api/VBox.lua
@@ -10,7 +10,7 @@
-- @function [parent=#VBox] create
-- @param self
-- @param #size_table size
--- @return VBox#VBox ret (retunr value: ccui.VBox)
+-- @return VBox#VBox ret (return value: ccui.VBox)
--------------------------------
-- Default constructor
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp
index 7f71237aab..d764a19a1b 100644
--- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp
+++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp
@@ -60865,7 +60865,7 @@ int lua_register_cocos2dx_SpriteFrameCache(lua_State* tolua_S)
tolua_beginmodule(tolua_S,"SpriteFrameCache");
tolua_function(tolua_S,"addSpriteFramesWithFileContent",lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFileContent);
- tolua_function(tolua_S,"addSpriteFramesWithFile",lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile);
+ tolua_function(tolua_S,"addSpriteFrames",lua_cocos2dx_SpriteFrameCache_addSpriteFramesWithFile);
tolua_function(tolua_S,"addSpriteFrame",lua_cocos2dx_SpriteFrameCache_addSpriteFrame);
tolua_function(tolua_S,"removeUnusedSpriteFrames",lua_cocos2dx_SpriteFrameCache_removeUnusedSpriteFrames);
tolua_function(tolua_S,"getSpriteFrame",lua_cocos2dx_SpriteFrameCache_getSpriteFrameByName);
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp
index ee293c5b6c..a518d984d3 100644
--- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp
+++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp
@@ -16600,7 +16600,7 @@ int lua_cocos2dx_ui_Helper_getSubStringOfUTF8String(lua_State* tolua_S)
#endif
return 0;
}
-int lua_cocos2dx_ui_Helper_doLayout(lua_State* tolua_S)
+int lua_cocos2dx_ui_Helper_changeLayoutSystemActiveState(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
@@ -16617,53 +16617,18 @@ int lua_cocos2dx_ui_Helper_doLayout(lua_State* tolua_S)
if (argc == 1)
{
- cocos2d::Node* arg0;
- ok &= luaval_to_object(tolua_S, 2, "cc.Node",&arg0);
+ bool arg0;
+ ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccui.Helper:changeLayoutSystemActiveState");
if(!ok)
return 0;
- cocos2d::ui::Helper::doLayout(arg0);
+ cocos2d::ui::Helper::changeLayoutSystemActiveState(arg0);
return 0;
}
- CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccui.Helper:doLayout",argc, 1);
+ CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccui.Helper:changeLayoutSystemActiveState",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Helper_doLayout'.",&tolua_err);
-#endif
- return 0;
-}
-int lua_cocos2dx_ui_Helper_seekWidgetByTag(lua_State* tolua_S)
-{
- int argc = 0;
- bool ok = true;
-
-#if COCOS2D_DEBUG >= 1
- tolua_Error tolua_err;
-#endif
-
-#if COCOS2D_DEBUG >= 1
- if (!tolua_isusertable(tolua_S,1,"ccui.Helper",0,&tolua_err)) goto tolua_lerror;
-#endif
-
- argc = lua_gettop(tolua_S) - 1;
-
- if (argc == 2)
- {
- cocos2d::ui::Widget* arg0;
- int arg1;
- ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0);
- ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.Helper:seekWidgetByTag");
- if(!ok)
- return 0;
- cocos2d::ui::Widget* ret = cocos2d::ui::Helper::seekWidgetByTag(arg0, arg1);
- object_to_luaval(tolua_S, "ccui.Widget",(cocos2d::ui::Widget*)ret);
- return 1;
- }
- CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccui.Helper:seekWidgetByTag",argc, 2);
- return 0;
-#if COCOS2D_DEBUG >= 1
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Helper_seekWidgetByTag'.",&tolua_err);
+ tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Helper_changeLayoutSystemActiveState'.",&tolua_err);
#endif
return 0;
}
@@ -16737,6 +16702,73 @@ int lua_cocos2dx_ui_Helper_seekWidgetByName(lua_State* tolua_S)
#endif
return 0;
}
+int lua_cocos2dx_ui_Helper_seekWidgetByTag(lua_State* tolua_S)
+{
+ int argc = 0;
+ bool ok = true;
+
+#if COCOS2D_DEBUG >= 1
+ tolua_Error tolua_err;
+#endif
+
+#if COCOS2D_DEBUG >= 1
+ if (!tolua_isusertable(tolua_S,1,"ccui.Helper",0,&tolua_err)) goto tolua_lerror;
+#endif
+
+ argc = lua_gettop(tolua_S) - 1;
+
+ if (argc == 2)
+ {
+ cocos2d::ui::Widget* arg0;
+ int arg1;
+ ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0);
+ ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "ccui.Helper:seekWidgetByTag");
+ if(!ok)
+ return 0;
+ cocos2d::ui::Widget* ret = cocos2d::ui::Helper::seekWidgetByTag(arg0, arg1);
+ object_to_luaval(tolua_S, "ccui.Widget",(cocos2d::ui::Widget*)ret);
+ return 1;
+ }
+ CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccui.Helper:seekWidgetByTag",argc, 2);
+ return 0;
+#if COCOS2D_DEBUG >= 1
+ tolua_lerror:
+ tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Helper_seekWidgetByTag'.",&tolua_err);
+#endif
+ return 0;
+}
+int lua_cocos2dx_ui_Helper_doLayout(lua_State* tolua_S)
+{
+ int argc = 0;
+ bool ok = true;
+
+#if COCOS2D_DEBUG >= 1
+ tolua_Error tolua_err;
+#endif
+
+#if COCOS2D_DEBUG >= 1
+ if (!tolua_isusertable(tolua_S,1,"ccui.Helper",0,&tolua_err)) goto tolua_lerror;
+#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;
+ cocos2d::ui::Helper::doLayout(arg0);
+ return 0;
+ }
+ CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "ccui.Helper:doLayout",argc, 1);
+ return 0;
+#if COCOS2D_DEBUG >= 1
+ tolua_lerror:
+ tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Helper_doLayout'.",&tolua_err);
+#endif
+ return 0;
+}
static int lua_cocos2dx_ui_Helper_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (Helper)");
@@ -16750,10 +16782,11 @@ int lua_register_cocos2dx_ui_Helper(lua_State* tolua_S)
tolua_beginmodule(tolua_S,"Helper");
tolua_function(tolua_S,"getSubStringOfUTF8String", lua_cocos2dx_ui_Helper_getSubStringOfUTF8String);
- tolua_function(tolua_S,"doLayout", lua_cocos2dx_ui_Helper_doLayout);
- tolua_function(tolua_S,"seekWidgetByTag", lua_cocos2dx_ui_Helper_seekWidgetByTag);
+ tolua_function(tolua_S,"changeLayoutSystemActiveState", lua_cocos2dx_ui_Helper_changeLayoutSystemActiveState);
tolua_function(tolua_S,"seekActionWidgetByActionTag", lua_cocos2dx_ui_Helper_seekActionWidgetByActionTag);
tolua_function(tolua_S,"seekWidgetByName", lua_cocos2dx_ui_Helper_seekWidgetByName);
+ tolua_function(tolua_S,"seekWidgetByTag", lua_cocos2dx_ui_Helper_seekWidgetByTag);
+ tolua_function(tolua_S,"doLayout", lua_cocos2dx_ui_Helper_doLayout);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::ui::Helper).name();
g_luaType[typeName] = "ccui.Helper";
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp
index 0c7fde0158..6af9d4f7b5 100644
--- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp
+++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp
@@ -480,6 +480,7 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);
+
#endif // __cocos2dx_ui_h__
diff --git a/cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua b/cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua
index ea41e6f5c4..641ac22a0d 100644
--- a/cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua
+++ b/cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua
@@ -576,3 +576,31 @@ cc.MATRIX_STACK_TYPE =
PROJECTION = 1,
TEXTURE = 2,
}
+
+cc.LightType =
+{
+ DIRECTIONAL = 0,
+ POINT = 1,
+ SPOT = 2,
+ AMBIENT = 3,
+}
+
+cc.LightFlag =
+{
+ LIGHT0 = math.pow(2,0),
+ LIGHT1 = math.pow(2,1),
+ LIGHT2 = math.pow(2,2),
+ LIGHT3 = math.pow(2,3),
+ LIGHT4 = math.pow(2,4),
+ LIGHT5 = math.pow(2,5),
+ LIGHT6 = math.pow(2,6),
+ LIGHT7 = math.pow(2,7),
+ LIGHT8 = math.pow(2,8),
+ LIGHT9 = math.pow(2,9),
+ LIGHT10 = math.pow(2,10),
+ LIGHT11 = math.pow(2,11),
+ LIGHT12 = math.pow(2,12),
+ LIGHT13 = math.pow(2,13),
+ LIGHT14 = math.pow(2,14),
+ LIGHT15 = math.pow(2,15),
+}
diff --git a/cocos/ui/UIHelper.cpp b/cocos/ui/UIHelper.cpp
index 579a9cff5e..67eba0490c 100644
--- a/cocos/ui/UIHelper.cpp
+++ b/cocos/ui/UIHelper.cpp
@@ -30,6 +30,8 @@ NS_CC_BEGIN
namespace ui {
+static bool _activeLayout = true;
+
Widget* Helper::seekWidgetByTag(Widget* root, int tag)
{
if (!root)
@@ -147,37 +149,40 @@ std::string Helper::getSubStringOfUTF8String(const std::string& str, std::string
return str.substr(min,max);
}
- void Helper::doLayout(cocos2d::Node *rootNode)
- {
- for(auto& node : rootNode->getChildren())
+void Helper::changeLayoutSystemActiveState(bool bActive)
+{
+ _activeLayout = bActive;
+}
+void Helper::doLayout(cocos2d::Node *rootNode)
+{
+ if(!_activeLayout)
+ {
+ return;
+ }
+
+ for(auto& node : rootNode->getChildren())
+ {
+ auto com = node->getComponent(__LAYOUT_COMPONENT_NAME);
+ Node *parent = node->getParent();
+ if (nullptr != com && nullptr != parent) {
+ LayoutComponent* layoutComponent = (LayoutComponent*)com;
+
+ if (layoutComponent->isUsingPercentPosition())
{
- auto com = node->getComponent(__LAYOUT_COMPONENT_NAME);
- Node *parent = node->getParent();
- if (nullptr != com && nullptr != parent) {
- LayoutComponent* layoutComponent = (LayoutComponent*)com;
+ layoutComponent->setPercentPosition(layoutComponent->getPercentPosition());
+ }
+ else if (layoutComponent->getReferencePoint() != LayoutComponent::ReferencePoint::BOTTOM_LEFT)
+ {
+ layoutComponent->setRelativePosition(layoutComponent->getRelativePosition());
+ }
- if (layoutComponent->isUsingPercentPosition())
- {
- layoutComponent->RefreshLayoutPosition(LayoutComponent::PositionType::PreRelativePosition,layoutComponent->getPercentPosition());
- }
- else if (layoutComponent->getReferencePoint() != LayoutComponent::ReferencePoint::BOTTOM_LEFT)
- {
- layoutComponent->RefreshLayoutPosition(LayoutComponent::PositionType::RelativePosition,layoutComponent->getRelativePosition());
- }
-
- if (layoutComponent->isUsingPercentContentSize())
- {
- layoutComponent->RefreshLayoutSize(LayoutComponent::SizeType::PreSize,layoutComponent->getPercentContentSize());
- }
-
- Widget* uiWidget = dynamic_cast(node);
- if ( nullptr == uiWidget )
- {
- doLayout(node);
- }
- }
+ if (layoutComponent->isUsingPercentContentSize())
+ {
+ layoutComponent->setPercentContentSize(layoutComponent->getPercentContentSize());
}
}
+ }
+}
}
NS_CC_END
diff --git a/cocos/ui/UIHelper.h b/cocos/ui/UIHelper.h
index 5d78a59fb1..072fcc79e8 100644
--- a/cocos/ui/UIHelper.h
+++ b/cocos/ui/UIHelper.h
@@ -81,6 +81,7 @@ public:
static void doLayout(Node *rootNode);
+ static void changeLayoutSystemActiveState(bool bActive);
};
}
diff --git a/cocos/ui/UILayoutComponent.cpp b/cocos/ui/UILayoutComponent.cpp
index 0dd4d3b5ef..61c0681ece 100644
--- a/cocos/ui/UILayoutComponent.cpp
+++ b/cocos/ui/UILayoutComponent.cpp
@@ -66,9 +66,24 @@ namespace ui {
{
return this->getOwner()->getContentSize();
}
- void LayoutComponent::setOwnerContentSize(const Vec2& percent)
+ void LayoutComponent::setOwnerContentSize(const Vec2& size)
{
- this->RefreshLayoutSize(SizeType::Size,percent);
+ this->getOwner()->setContentSize(Size(size.x,size.y));
+
+ Node* parentNode = this->getOwner()->getParent();
+ if (parentNode != NULL && _actived)
+ {
+ Size parentSize = parentNode->getContentSize();
+
+ if (parentSize.width != 0 && parentSize.height != 0)
+ {
+ _percentContentSize = Point(size.x/parentSize.width,size.y/parentSize.height);
+ }
+ else
+ {
+ _percentContentSize = Point(0,0);
+ }
+ }
}
const Vec2& LayoutComponent::getPercentContentSize()const
@@ -78,7 +93,17 @@ namespace ui {
void LayoutComponent::setPercentContentSize(const Vec2& percent)
{
- this->RefreshLayoutSize(SizeType::PreSize,percent);
+ _percentContentSize = percent;
+
+ Node* parentNode = this->getOwner()->getParent();
+ if (parentNode != NULL && _actived)
+ {
+ Size parentSize = parentNode->getContentSize();
+ if (_usingPercentContentSize)
+ {
+ this->getOwner()->setContentSize(Size(percent.x*parentSize.width,percent.y*parentSize.height));
+ }
+ }
}
bool LayoutComponent::isUsingPercentContentSize()
@@ -89,79 +114,35 @@ namespace ui {
void LayoutComponent::setUsingPercentContentSize(bool flag)
{
_usingPercentContentSize = flag;
- this->RefreshLayoutSize(SizeType::PreSizeEnable,Vec2(0,0));
- }
- void LayoutComponent::RefreshLayoutSize(SizeType sType, const Vec2& size)
- {
Node* parentNode = this->getOwner()->getParent();
if (parentNode != NULL && _actived)
{
Size parentSize = parentNode->getContentSize();
-
- switch (sType)
+ if (_usingPercentContentSize)
{
- case SizeType::Size:
- if (parentSize.width != 0 && parentSize.height != 0)
+ Size baseSize = this->getOwner()->getContentSize();
+ if (parentSize.width != 0)
{
- _percentContentSize = Point(size.x/parentSize.width,size.y/parentSize.height);
+ _percentContentSize.x = baseSize.width/parentSize.width;
}
else
{
- _percentContentSize = Point(0,0);
+ _percentContentSize.x = 0;
+ baseSize.width = 0;
}
- this->getOwner()->setContentSize(Size(size.x,size.y));
- break;
- case SizeType::PreSize:
- _percentContentSize = size;
- if (_usingPercentContentSize)
- {
- this->getOwner()->setContentSize(Size(size.x*parentSize.width,size.y*parentSize.height));
- }
- break;
- case SizeType::PreSizeEnable:
- if (_usingPercentContentSize)
- {
- Size baseSize = this->getOwner()->getContentSize();
- if (parentSize.width != 0)
- {
- _percentContentSize.x = baseSize.width/parentSize.width;
- }
- else
- {
- _percentContentSize.x = 0;
- baseSize.width = 0;
- }
- if (parentSize.height != 0)
- {
- _percentContentSize.y = baseSize.height/parentSize.height;
- }
- else
- {
- _percentContentSize.y = 0;
- baseSize.height = 0;
- }
-
- this->getOwner()->setContentSize(baseSize);
+ if (parentSize.height != 0)
+ {
+ _percentContentSize.y = baseSize.height/parentSize.height;
}
- break;
- default:
- break;
- }
- }
- else
- {
- switch (sType)
- {
- case SizeType::Size:
- this->getOwner()->setContentSize(Size(size.x,size.y));
- break;
- case SizeType::PreSize:
- _percentContentSize = size;
- break;
- default:
- break;
+ else
+ {
+ _percentContentSize.y = 0;
+ baseSize.height = 0;
+ }
+
+ this->getOwner()->setContentSize(baseSize);
}
}
}
@@ -174,7 +155,38 @@ namespace ui {
void LayoutComponent::setUsingPercentPosition(bool flag)
{
_usingPercentPosition = flag;
- this->RefreshLayoutPosition(PositionType::PreRelativePositionEnable,Vec2(0,0));
+
+ Node* parentNode = this->getOwner()->getParent();
+ if (parentNode != NULL && _actived)
+ {
+ Size parentSize = parentNode->getContentSize();
+
+ if (_usingPercentPosition)
+ {
+ if (parentSize.width != 0)
+ {
+ _percentPosition.x = _relativePosition.x/parentSize.width;
+ }
+ else
+ {
+ _percentPosition.x = 0;
+ _relativePosition.x = 0;
+ }
+
+ if (parentSize.height != 0)
+ {
+ _percentPosition.y = _relativePosition.y/parentSize.height;
+ }
+ else
+ {
+ _percentPosition.y = 0;
+ _relativePosition.y = 0;
+ }
+ }
+
+ Point inversePoint = this->converPointWithReferencePointAndSize(_relativePosition,parentSize);
+ this->getOwner()->setPosition(inversePoint);
+ }
}
const Vec2& LayoutComponent::getPercentPosition()
@@ -183,7 +195,16 @@ namespace ui {
}
void LayoutComponent::setPercentPosition(const Vec2& percent)
{
- this->RefreshLayoutPosition(PositionType::PreRelativePosition,percent);
+ _percentPosition = percent;
+
+ Node* parentNode = this->getOwner()->getParent();
+ if (parentNode != NULL && _actived)
+ {
+ Size parentSize = parentNode->getContentSize();
+ _relativePosition = Point(_percentPosition.x*parentSize.width,_percentPosition.y*parentSize.height);
+ Point inversePoint = this->converPointWithReferencePointAndSize(_relativePosition,parentSize);
+ this->getOwner()->setPosition(inversePoint);
+ }
}
const Vec2& LayoutComponent::getOwnerPosition()const
@@ -192,7 +213,32 @@ namespace ui {
}
void LayoutComponent::setOwnerPosition(const Vec2& point)
{
- this->RefreshLayoutPosition(PositionType::Position,point);
+ Node* parentNode = this->getOwner()->getParent();
+ if (parentNode != NULL && _actived)
+ {
+ Size parentSize = parentNode->getContentSize();
+
+ Point inversePoint = this->converPointWithReferencePointAndSize(point,parentSize);
+ this->getOwner()->setPosition(point);
+ _relativePosition = inversePoint;
+ if (parentSize.width != 0 && parentSize.height != 0)
+ {
+ _percentPosition = Point(_relativePosition.x/parentSize.width,_relativePosition.y/parentSize.height);
+ }
+ else
+ {
+ _percentPosition = Point(0,0);
+ }
+ }
+ else
+ {
+ this->getOwner()->setPosition(point);
+ if (_referencePoint == ReferencePoint::BOTTOM_LEFT)
+ {
+ _relativePosition = point;
+ }
+ }
+
}
const Vec2& LayoutComponent::getRelativePosition()
@@ -201,7 +247,24 @@ namespace ui {
}
void LayoutComponent::setRelativePosition(const Vec2& position)
{
- this->RefreshLayoutPosition(PositionType::RelativePosition,position);
+ _relativePosition = position;
+
+ Node* parentNode = this->getOwner()->getParent();
+ if (parentNode != NULL && _actived)
+ {
+ Size parentSize = parentNode->getContentSize();
+
+ Point inversePoint = this->converPointWithReferencePointAndSize(_relativePosition,parentSize);
+ this->getOwner()->setPosition(inversePoint);
+ if (parentSize.width != 0 && parentSize.height != 0)
+ {
+ _percentPosition = Point(_relativePosition.x/parentSize.width,_relativePosition.y/parentSize.height);
+ }
+ else
+ {
+ _percentPosition = Point(0,0);
+ }
+ }
}
LayoutComponent::ReferencePoint LayoutComponent::getReferencePoint()
@@ -211,131 +274,34 @@ namespace ui {
void LayoutComponent::setReferencePoint(ReferencePoint point)
{
_referencePoint = point;
- this->RefreshLayoutPosition(PositionType::RelativePosition,_relativePosition);
+ this->setRelativePosition(_relativePosition);
}
- void LayoutComponent::RefreshLayoutPosition(PositionType pType,const Vec2& point)
- {
- Node* parentNode = this->getOwner()->getParent();
- Point basePoint = point;
- if (parentNode != NULL && _actived)
- {
- Size parentSize = parentNode->getContentSize();
-
- if ( pType == PositionType::PreRelativePosition)
- {
- _percentPosition = point;
- basePoint = Point(_percentPosition.x*parentSize.width,_percentPosition.y*parentSize.height);
- }
- else if(pType == PositionType::PreRelativePositionEnable)
- {
- if (_usingPercentPosition)
- {
- if (parentSize.width != 0)
- {
- _percentPosition.x = _relativePosition.x/parentSize.width;
- }
- else
- {
- _percentPosition.x = 0;
- _relativePosition.x = 0;
- }
-
- if (parentSize.height != 0)
- {
- _percentPosition.y = _relativePosition.y/parentSize.height;
- }
- else
- {
- _percentPosition.y = 0;
- _relativePosition.y = 0;
- }
- }
- basePoint = _relativePosition;
- }
-
- Point inversePoint = basePoint;
- switch (_referencePoint)
- {
- case ReferencePoint::TOP_LEFT:
- inversePoint.y = parentSize.height - inversePoint.y;
- break;
- case ReferencePoint::BOTTOM_RIGHT:
- inversePoint.x = parentSize.width - inversePoint.x;
- break;
- case ReferencePoint::TOP_RIGHT:
- inversePoint.x = parentSize.width - inversePoint.x;
- inversePoint.y = parentSize.height - inversePoint.y;
- break;
- default:
- break;
- }
-
- switch (pType)
- {
- case PositionType::Position:
- this->getOwner()->setPosition(basePoint);
- _relativePosition = inversePoint;
- if (parentSize.width != 0 && parentSize.height != 0)
- {
- _percentPosition = Point(_relativePosition.x/parentSize.width,_relativePosition.y/parentSize.height);
- }
- else
- {
- _percentPosition = Point(0,0);
- }
- break;
- case PositionType::RelativePosition:
- this->getOwner()->setPosition(inversePoint);
- _relativePosition = basePoint;
- if (parentSize.width != 0 && parentSize.height != 0)
- {
- _percentPosition = Point(_relativePosition.x/parentSize.width,_relativePosition.y/parentSize.height);
- }
- else
- {
- _percentPosition = Point(0,0);
- }
- break;
- case PositionType::PreRelativePosition:
- this->getOwner()->setPosition(inversePoint);
- _relativePosition = basePoint;
- break;
- case PositionType::PreRelativePositionEnable:
- this->getOwner()->setPosition(inversePoint);
- _relativePosition = basePoint;
- break;
- default:
- break;
- }
- }
- else
- {
- switch (pType)
- {
- case PositionType::Position:
- this->getOwner()->setPosition(basePoint);
- if (_referencePoint == ReferencePoint::BOTTOM_LEFT)
- {
- _relativePosition = basePoint;
- }
- break;
- case PositionType::RelativePosition:
- _relativePosition = basePoint;
- break;
- case PositionType::PreRelativePosition:
- _percentPosition = basePoint;
- break;
- default:
- break;
- }
- }
- }
-
- void LayoutComponent::SetActiveEnable(bool enable)
+ void LayoutComponent::setActiveEnable(bool enable)
{
_actived = enable;
}
+
+ Vec2 LayoutComponent::converPointWithReferencePointAndSize(const Vec2& point,const Size& size)
+ {
+ Point inversePoint = point;
+ switch (_referencePoint)
+ {
+ case ReferencePoint::TOP_LEFT:
+ inversePoint.y = size.height - inversePoint.y;
+ break;
+ case ReferencePoint::BOTTOM_RIGHT:
+ inversePoint.x = size.width - inversePoint.x;
+ break;
+ case ReferencePoint::TOP_RIGHT:
+ inversePoint.x = size.width - inversePoint.x;
+ inversePoint.y = size.height - inversePoint.y;
+ break;
+ default:
+ break;
+ }
+ return inversePoint;
+ }
}
NS_CC_END
\ No newline at end of file
diff --git a/cocos/ui/UILayoutComponent.h b/cocos/ui/UILayoutComponent.h
index 83c142b9a0..1c16bfc966 100644
--- a/cocos/ui/UILayoutComponent.h
+++ b/cocos/ui/UILayoutComponent.h
@@ -53,21 +53,6 @@ NS_CC_BEGIN
TOP_RIGHT
};
- enum class PositionType
- {
- Position,
- RelativePosition,
- PreRelativePosition,
- PreRelativePositionEnable
- };
-
- enum class SizeType
- {
- Size,
- PreSize,
- PreSizeEnable
- };
-
bool isUsingPercentPosition();
void setUsingPercentPosition(bool flag);
@@ -83,10 +68,8 @@ NS_CC_BEGIN
const Vec2& getOwnerPosition()const;
void setOwnerPosition(const Vec2& point);
- void RefreshLayoutPosition(PositionType pType,const Vec2& point);
-
const Vec2& getOwnerContentSize()const;
- void setOwnerContentSize(const Vec2& percent);
+ void setOwnerContentSize(const Vec2& size);
const Vec2& getPercentContentSize()const;
void setPercentContentSize(const Vec2& percent);
@@ -94,9 +77,9 @@ NS_CC_BEGIN
bool isUsingPercentContentSize();
void setUsingPercentContentSize(bool flag);
- void RefreshLayoutSize(SizeType sType, const Vec2& size);
-
- void SetActiveEnable(bool enable);
+ void setActiveEnable(bool enable);
+ private:
+ Vec2 converPointWithReferencePointAndSize(const Vec2& point,const Size& size);
private:
Vec2 _percentContentSize;
diff --git a/cocos/ui/UIWidget.cpp b/cocos/ui/UIWidget.cpp
index 4ccdba0db0..c5a8275cd9 100644
--- a/cocos/ui/UIWidget.cpp
+++ b/cocos/ui/UIWidget.cpp
@@ -219,13 +219,8 @@ bool Widget::init()
void Widget::onEnter()
{
+ updateSizeAndPosition();
ProtectedNode::onEnter();
- if (_positionType == PositionType::PERCENT
- || _sizeType == SizeType::PERCENT) {
- if (_parent) {
- Helper::doLayout(_parent);
- }
- }
}
void Widget::onExit()
@@ -283,7 +278,30 @@ void Widget::setContentSize(const cocos2d::Size &contentSize)
{
_contentSize = getVirtualRendererSize();
}
-
+ if (_running)
+ {
+ Widget* widgetParent = getWidgetParent();
+ Size pSize;
+ if (widgetParent)
+ {
+ pSize = widgetParent->getContentSize();
+ }
+ else
+ {
+ pSize = _parent->getContentSize();
+ }
+ float spx = 0.0f;
+ float spy = 0.0f;
+ if (pSize.width > 0.0f)
+ {
+ spx = _customSize.width / pSize.width;
+ }
+ if (pSize.height > 0.0f)
+ {
+ spy = _customSize.height / pSize.height;
+ }
+ _sizePercent = Vec2(spx, spy);
+ }
onSizeChanged();
}
@@ -294,15 +312,29 @@ void Widget::setSize(const Size &size)
void Widget::setSizePercent(const Vec2 &percent)
{
-
- auto component = this->getOrCreateLayoutComponent();
- component->setUsingPercentContentSize(true);
- component->setPercentContentSize(percent);
-
- if (nullptr != _parent)
+ _sizePercent = percent;
+ Size cSize = _customSize;
+ if (_running)
{
- Helper::doLayout(_parent);
+ Widget* widgetParent = getWidgetParent();
+ if (widgetParent)
+ {
+ cSize = Size(widgetParent->getContentSize().width * percent.x , widgetParent->getContentSize().height * percent.y);
+ }
+ else
+ {
+ cSize = Size(_parent->getContentSize().width * percent.x , _parent->getContentSize().height * percent.y);
+ }
}
+ if (_ignoreSize)
+ {
+ this->setContentSize(getVirtualRendererSize());
+ }
+ else
+ {
+ this->setContentSize(cSize);
+ }
+ _customSize = cSize;
}
void Widget::updateSizeAndPosition()
@@ -387,17 +419,6 @@ void Widget::updateSizeAndPosition(const cocos2d::Size &parentSize)
void Widget::setSizeType(SizeType type)
{
_sizeType = type;
-
- auto component = this->getOrCreateLayoutComponent();
-
- if (_sizeType == Widget::SizeType::PERCENT)
- {
- component->setUsingPercentContentSize(true);
- }
- else
- {
- component->setUsingPercentContentSize(false);
- }
}
Widget::SizeType Widget::getSizeType() const
@@ -445,9 +466,7 @@ const Size& Widget::getCustomSize() const
const Vec2& Widget::getSizePercent()
{
- auto component = this->getOrCreateLayoutComponent();
-
- return component->getPercentContentSize();
+ return _sizePercent;
}
Vec2 Widget::getWorldPosition()const
@@ -462,7 +481,14 @@ Node* Widget::getVirtualRenderer()
void Widget::onSizeChanged()
{
- Helper::doLayout(this);
+ for (auto& child : getChildren())
+ {
+ Widget* widgetChild = dynamic_cast(child);
+ if (widgetChild)
+ {
+ widgetChild->updateSizeAndPosition();
+ }
+ }
}
Size Widget::getVirtualRendererSize() const
@@ -914,36 +940,47 @@ void Widget::interceptTouchEvent(cocos2d::ui::Widget::TouchEventType event, coco
void Widget::setPosition(const Vec2 &pos)
{
+ if (_running)
+ {
+ Widget* widgetParent = getWidgetParent();
+ if (widgetParent)
+ {
+ Size pSize = widgetParent->getContentSize();
+ if (pSize.width <= 0.0f || pSize.height <= 0.0f)
+ {
+ _positionPercent = Vec2::ZERO;
+ }
+ else
+ {
+ _positionPercent = Vec2(pos.x / pSize.width, pos.y / pSize.height);
+ }
+ }
+ }
ProtectedNode::setPosition(pos);
- _positionType = PositionType::ABSOLUTE;
-
}
void Widget::setPositionPercent(const Vec2 &percent)
{
- this->setNormalizedPosition(percent);
- _positionType = PositionType::PERCENT;
+ _positionPercent = percent;
+ if (_running)
+ {
+ Widget* widgetParent = getWidgetParent();
+ if (widgetParent)
+ {
+ Size parentSize = widgetParent->getContentSize();
+ Vec2 absPos = Vec2(parentSize.width * _positionPercent.x, parentSize.height * _positionPercent.y);
+ setPosition(absPos);
+ }
+ }
}
const Vec2& Widget::getPositionPercent()const{
- return this->getNormalizedPosition();
+ return _positionPercent;
}
void Widget::setPositionType(PositionType type)
{
_positionType = type;
- if (type == Widget::PositionType::ABSOLUTE)
- {
- Vec2 oldPosition = this->getPosition();
- this->setPosition(this->getPosition() + Vec2(10,0));
- this->setPosition(oldPosition);
- }
- else
- {
- Vec2 oldNormalizedPosition = this->getNormalizedPosition();
- this->setNormalizedPosition(oldNormalizedPosition + Vec2(0.2,0.1));
- this->setNormalizedPosition(oldNormalizedPosition);
- }
}
Widget::PositionType Widget::getPositionType() const
diff --git a/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj b/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj
index 9834bed23e..88992337df 100644
--- a/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj
+++ b/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj
@@ -18,8 +18,6 @@
46880B7C19C43A67006E1F66 /* CloseNormal.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7619C43A67006E1F66 /* CloseNormal.png */; };
46880B7D19C43A67006E1F66 /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7719C43A67006E1F66 /* CloseSelected.png */; };
46880B7E19C43A67006E1F66 /* CloseSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7719C43A67006E1F66 /* CloseSelected.png */; };
- 46880B7F19C43A67006E1F66 /* Marker Felt.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7919C43A67006E1F66 /* Marker Felt.ttf */; };
- 46880B8019C43A67006E1F66 /* Marker Felt.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7919C43A67006E1F66 /* Marker Felt.ttf */; };
46880B8119C43A67006E1F66 /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7A19C43A67006E1F66 /* HelloWorld.png */; };
46880B8219C43A67006E1F66 /* HelloWorld.png in Resources */ = {isa = PBXBuildFile; fileRef = 46880B7A19C43A67006E1F66 /* HelloWorld.png */; };
46880B8819C43A87006E1F66 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46880B8419C43A87006E1F66 /* AppDelegate.cpp */; };
@@ -59,6 +57,8 @@
50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 50EF62A117ECD613001EB2F8 /* Icon-50.png */; };
521A8E6419F0C34300D177D7 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6219F0C34300D177D7 /* Default-667h@2x.png */; };
521A8E6519F0C34300D177D7 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 521A8E6319F0C34300D177D7 /* Default-736h@3x.png */; };
+ 521A8EA919F11F5000D177D7 /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = 521A8EA819F11F5000D177D7 /* fonts */; };
+ 521A8EAA19F11F5000D177D7 /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = 521A8EA819F11F5000D177D7 /* fonts */; };
BF171245129291EC00B8313A /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB012928DE900B8313A /* OpenGLES.framework */; };
BF1712471292920000B8313A /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = BF170DB412928DE900B8313A /* libz.dylib */; };
BF1C47F01293687400B63C5D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1C47EA1293683800B63C5D /* QuartzCore.framework */; };
@@ -109,7 +109,6 @@
3EACC98E19EE6D4300EB3C5E /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "res"; sourceTree = ""; };
46880B7619C43A67006E1F66 /* CloseNormal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseNormal.png; sourceTree = ""; };
46880B7719C43A67006E1F66 /* CloseSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CloseSelected.png; sourceTree = ""; };
- 46880B7919C43A67006E1F66 /* Marker Felt.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Marker Felt.ttf"; sourceTree = ""; };
46880B7A19C43A67006E1F66 /* HelloWorld.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = HelloWorld.png; sourceTree = ""; };
46880B8419C43A87006E1F66 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = ""; };
46880B8519C43A87006E1F66 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
@@ -149,6 +148,7 @@
50EF62A117ECD613001EB2F8 /* Icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-50.png"; sourceTree = ""; };
521A8E6219F0C34300D177D7 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; };
521A8E6319F0C34300D177D7 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; };
+ 521A8EA819F11F5000D177D7 /* fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; path = fonts; sourceTree = ""; };
BF170DB012928DE900B8313A /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
BF170DB412928DE900B8313A /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
BF1C47EA1293683800B63C5D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
@@ -270,24 +270,16 @@
46880B7519C43A67006E1F66 /* Resources */ = {
isa = PBXGroup;
children = (
+ 521A8EA819F11F5000D177D7 /* fonts */,
3EACC98E19EE6D4300EB3C5E /* res */,
46880B7619C43A67006E1F66 /* CloseNormal.png */,
46880B7719C43A67006E1F66 /* CloseSelected.png */,
- 46880B7819C43A67006E1F66 /* fonts */,
46880B7A19C43A67006E1F66 /* HelloWorld.png */,
);
name = Resources;
path = ../Resources;
sourceTree = "";
};
- 46880B7819C43A67006E1F66 /* fonts */ = {
- isa = PBXGroup;
- children = (
- 46880B7919C43A67006E1F66 /* Marker Felt.ttf */,
- );
- path = fonts;
- sourceTree = "";
- };
46880B8319C43A87006E1F66 /* Classes */ = {
isa = PBXGroup;
children = (
@@ -457,9 +449,9 @@
5087E77D17EB970100C73F5D /* Default-568h@2x.png in Resources */,
5087E78517EB970100C73F5D /* Icon-72.png in Resources */,
521A8E6519F0C34300D177D7 /* Default-736h@3x.png in Resources */,
+ 521A8EA919F11F5000D177D7 /* fonts in Resources */,
50EF62A317ECD613001EB2F8 /* Icon-50.png in Resources */,
5087E78017EB970100C73F5D /* Icon-114.png in Resources */,
- 46880B7F19C43A67006E1F66 /* Marker Felt.ttf in Resources */,
50EF62A217ECD613001EB2F8 /* Icon-29.png in Resources */,
50EF629617ECD46A001EB2F8 /* Icon-40.png in Resources */,
5087E78217EB970100C73F5D /* Icon-144.png in Resources */,
@@ -478,9 +470,9 @@
buildActionMask = 2147483647;
files = (
46880B8219C43A67006E1F66 /* HelloWorld.png in Resources */,
- 46880B8019C43A67006E1F66 /* Marker Felt.ttf in Resources */,
503AE0F817EB97AB00D1A890 /* Icon.icns in Resources */,
3EACC99019EE6D4300EB3C5E /* res in Resources */,
+ 521A8EAA19F11F5000D177D7 /* fonts in Resources */,
46880B7C19C43A67006E1F66 /* CloseNormal.png in Resources */,
46880B7E19C43A67006E1F66 /* CloseSelected.png in Resources */,
);
diff --git a/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp b/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp
index 0f7054be65..2552a677c3 100644
--- a/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp
+++ b/tests/cpp-tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp
@@ -979,12 +979,16 @@ std::string ClippingToRenderTextureTest::subtitle() const
void ClippingToRenderTextureTest::setup()
{
auto button = MenuItemFont::create("Reproduce bug", [&](Ref *sender) {
+ std::vector nodes;
enumerateChildren("remove me [0-9]", [&](Node *node) {
- this->removeChild(node);
- this->reproduceBug();
+ nodes.push_back(node);
return false;
+ });
+ for (auto node : nodes)
+ {
+ this->removeChild(node);
}
- );
+ this->reproduceBug();
});
auto s = Director::getInstance()->getWinSize();
diff --git a/tests/lua-tests/src/CocoStudioTest/CocoStudioActionTimelineTest/CocoStudioActionTimelineTest.lua b/tests/lua-tests/src/CocoStudioTest/CocoStudioActionTimelineTest/CocoStudioActionTimelineTest.lua
index bf5e1e3e6b..d02fdfa330 100644
--- a/tests/lua-tests/src/CocoStudioTest/CocoStudioActionTimelineTest/CocoStudioActionTimelineTest.lua
+++ b/tests/lua-tests/src/CocoStudioTest/CocoStudioActionTimelineTest/CocoStudioActionTimelineTest.lua
@@ -186,7 +186,7 @@ function TestActionTimeline.extend(target)
end
function TestActionTimeline:onEnter()
- cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png")
+ cc.SpriteFrameCache:getInstance():addSpriteFrames("armature/Cowboy0.plist", "armature/Cowboy0.png")
local node = cc.CSLoader:createNode("ActionTimeline/boy_1.csb")
local action = cc.CSLoader:createTimeline("ActionTimeline/boy_1.csb")
@@ -239,7 +239,7 @@ function TestChangePlaySection.extend(target)
end
function TestChangePlaySection:onEnter()
- cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png")
+ cc.SpriteFrameCache:getInstance():addSpriteFrames("armature/Cowboy0.plist", "armature/Cowboy0.png")
local node = cc.CSLoader:createNode("ActionTimeline/boy_1.csb")
local action = cc.CSLoader:createTimeline("ActionTimeline/boy_1.csb")
@@ -306,7 +306,7 @@ function TestTimelineFrameEvent.extend(target)
end
function TestTimelineFrameEvent:onEnter()
- cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png")
+ cc.SpriteFrameCache:getInstance():addSpriteFrames("armature/Cowboy0.plist", "armature/Cowboy0.png")
local node = cc.CSLoader:createNode("ActionTimeline/boy_1.csb")
local action = cc.CSLoader:createTimeline("ActionTimeline/boy_1.csb")
@@ -374,7 +374,7 @@ function TestTimelinePerformance.extend(target)
end
function TestTimelinePerformance:onEnter()
- cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png")
+ cc.SpriteFrameCache:getInstance():addSpriteFrames("armature/Cowboy0.plist", "armature/Cowboy0.png")
for i = 1,100 do
local node = cc.CSLoader:createNode("ActionTimeline/boy_1.csb")
diff --git a/tests/lua-tests/src/CocoStudioTest/CocoStudioUIEditorTest/CocoStudioUIEditorTest.lua b/tests/lua-tests/src/CocoStudioTest/CocoStudioUIEditorTest/CocoStudioUIEditorTest.lua
index cd3e6d62a0..456c26c571 100644
--- a/tests/lua-tests/src/CocoStudioTest/CocoStudioUIEditorTest/CocoStudioUIEditorTest.lua
+++ b/tests/lua-tests/src/CocoStudioTest/CocoStudioUIEditorTest/CocoStudioUIEditorTest.lua
@@ -93,7 +93,7 @@ end
function UIButtonTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIButton_Editor/UIButton_Editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIButton_Editor/windows_UIButton_Editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
@@ -161,7 +161,7 @@ end
function UICheckBoxEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UICheckBox_Editor/ui_checkbox_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UICheckBox_Editor/windows_ui_checkbox_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
@@ -233,7 +233,7 @@ end
function UISliderEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UISlider_Editor/ui_slider_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UISlider_Editor/windows_ui_slider_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
@@ -289,7 +289,7 @@ end
function UIImageViewEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIImageView_Editor/ui_ImageView_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIImageView_Editor/windows_ui_ImageView_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
end
@@ -343,7 +343,7 @@ end
function LoadingBarEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UILoadingBar_Editor/ui_loadingbar_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UILoadingBar_Editor/windows_ui_loadingbar_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
@@ -410,7 +410,7 @@ end
function LabelAtalsEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UILabelAtlas_Editor/ui_labelatlas_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UILabelAtlas_Editor/windows_ui_labelatlas_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
end
@@ -458,7 +458,7 @@ end
function LabelEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UILabel_Editor/ui_label_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UILabel_Editor/windows_ui_label_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
end
@@ -506,7 +506,7 @@ end
function LabelBMFontEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UILabelBMFont_Editor/ui_labelbmfont_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UILabelBMFont_Editor/windows_ui_labelbmfont_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
end
@@ -575,7 +575,7 @@ end
function TextFieldEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UITextField_Editor/ui_textfield_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UITextField_Editor/windows_ui_textfield_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
@@ -632,7 +632,7 @@ end
function LayoutEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UILayout_Editor/UILayout_Editor/ui_layout_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UILayout_Editor/UILayout_Editor/windows_ui_layout_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
end
@@ -680,7 +680,7 @@ end
function ScrollViewEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIScrollView_Editor/UIScrollView_Vertical_Editor/ui_scrollview_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIScrollView_Editor/UIScrollView_Vertical_Editor/windows_ui_scrollview_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
end
@@ -728,7 +728,7 @@ end
function PageViewEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIPageView_Editor/ui_pageview_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIPageView_Editor/windows_ui_pageview_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
end
@@ -781,7 +781,7 @@ end
function ListViewEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIListView_Editor/UIListView_Vertical_Editor/ui_listview_editor_1.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIListView_Editor/UIListView_Vertical_Editor/windows_ui_listview_editor_1.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
end
@@ -838,7 +838,7 @@ end
function WidgetAddNodeEditorTest:initExtend()
self:init()
- self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIWidgetAddNode_Editor/ui_widget_add_node_editor.csb")
+ self._layout = ccs.GUIReader:getInstance():widgetFromBinaryFile("cocosui/UIEditorTest/UIWidgetAddNode_Editor/windows_ui_widget_add_node_editor.csb")
self._uiLayer:addChild(self._layout)
self:configureGUIScene()
end
diff --git a/tests/lua-tests/src/LightTest/LightTest.lua b/tests/lua-tests/src/LightTest/LightTest.lua
new file mode 100644
index 0000000000..f088189672
--- /dev/null
+++ b/tests/lua-tests/src/LightTest/LightTest.lua
@@ -0,0 +1,241 @@
+local LightTest = class("LightTest",function()
+ return cc.Layer:create()
+end)
+
+function LightTest:ctor()
+
+ local function onNodeEvent(event)
+ if event == "enter" then
+ self:init()
+ elseif event == "exit" then
+ self:unscheduleUpdate()
+ end
+ end
+
+ self:registerScriptHandler(onNodeEvent)
+end
+
+function LightTest:init()
+
+ self:addSprite()
+ self:addLights()
+
+ local s = cc.Director:getInstance():getWinSize()
+ local camera = cc.Camera:createPerspective(60, s.width/s.height, 1.0, 1000.0)
+ camera:setCameraFlag(cc.CameraFlag.USER1)
+ camera:setPosition3D(cc.vec3(0.0, 100, 100))
+ camera:lookAt(cc.vec3(0.0, 0.0, 0.0), cc.vec3(0.0, 1.0, 0.0))
+ self:addChild(camera)
+
+ local ttfConfig = {}
+ ttfConfig.fontFilePath = "fonts/arial.ttf"
+ ttfConfig.fontSize = 15
+
+ local ambientLightLabel = cc.Label:createWithTTF(ttfConfig,"Ambient Light ON")
+ local menuItem0 = cc.MenuItemLabel:create(ambientLightLabel)
+ menuItem0:registerScriptTapHandler(function (tag, sender)
+ local str = nil
+ local isON = not self._ambientLight:isEnabled()
+ if isON then
+ str = "Ambient Light ON"
+ else
+ str = "Ambient Light OFF"
+ end
+ self._ambientLight:setEnabled(isON)
+ menuItem0:setString(str)
+ end)
+
+
+ local directionalLightLabel = cc.Label:createWithTTF(ttfConfig,"Directional Light OFF")
+ local menuItem1 = cc.MenuItemLabel:create(directionalLightLabel)
+ menuItem1:registerScriptTapHandler(function (tag, sender)
+ local str = nil
+ local isON = not self._directionalLight:isEnabled()
+ if isON then
+ str = "Directional Light ON"
+ else
+ str = "Directional Light OFF"
+ end
+ self._directionalLight:setEnabled(isON)
+ menuItem1:setString(str)
+ end)
+
+
+ local pointLightLabel = cc.Label:createWithTTF(ttfConfig,"Point Light OFF")
+ local menuItem2 = cc.MenuItemLabel:create(pointLightLabel)
+ menuItem2:registerScriptTapHandler(function (tag, sender)
+ local str = nil
+ local isON = not self._pointLight:isEnabled()
+ if isON then
+ str = "Point Light ON"
+ else
+ str = "Point Light OFF"
+ end
+ self._pointLight:setEnabled(isON)
+ menuItem2:setString(str)
+ end)
+
+ local spotLightLabel = cc.Label:createWithTTF(ttfConfig,"Spot Light OFF")
+ local menuItem3 = cc.MenuItemLabel:create(spotLightLabel)
+ menuItem3:registerScriptTapHandler(function (tag, sender)
+ local str = nil
+ local isON = not self._spotLight:isEnabled()
+ if isON then
+ str = "Spot Light ON"
+ else
+ str = "Spot Light OFF"
+ end
+ self._spotLight:setEnabled(isON)
+ menuItem3:setString(str)
+ end)
+
+
+ local menu = cc.Menu:create(menuItem0, menuItem1, menuItem2, menuItem3)
+ menu:setPosition(cc.p(0, 0))
+ menuItem0:setAnchorPoint(cc.p(0.0 ,1.0))
+ menuItem0:setPosition( cc.p(VisibleRect:left().x, VisibleRect:top().y-50) )
+ menuItem1:setAnchorPoint(cc.p(0.0, 1.0))
+ menuItem1:setPosition( cc.p(VisibleRect:left().x, VisibleRect:top().y-100) )
+ menuItem2:setAnchorPoint(cc.p(0.0, 1.0))
+ menuItem2:setPosition( cc.p(VisibleRect:left().x, VisibleRect:top().y -150))
+ menuItem3:setAnchorPoint(cc.p(0.0, 1.0))
+ menuItem3:setPosition( cc.p(VisibleRect:left().x, VisibleRect:top().y -200))
+ self:addChild(menu)
+
+ local angleDelta = 0.0
+ local function update(delta)
+ if nil ~= self._directionalLight then
+ self._directionalLight:setRotation3D(cc.vec3(-45.0, -angleDelta * 57.29577951, 0.0))
+ end
+
+ if nil ~= self._pointLight then
+ self._pointLight:setPositionX(100.0 * math.cos(angleDelta + 2.0 * delta))
+ self._pointLight:setPositionY(100.0)
+ self._pointLight:setPositionZ(100.0 * math.sin(angleDelta + 2.0 * delta))
+ end
+
+ if nil ~= self._spotLight then
+ self._spotLight:setPositionX(100.0 * math.cos(angleDelta + 4.0 * delta))
+ self._spotLight:setPositionY(100.0)
+ self._spotLight:setPositionZ(100.0 * math.sin(angleDelta + 4.0 * delta))
+ self._spotLight:setDirection(cc.vec3(-math.cos(angleDelta + 4.0 * delta), -1.0, -math.sin(angleDelta + 4.0 * delta)))
+ end
+
+ angleDelta = angleDelta + delta
+ end
+
+ self:scheduleUpdateWithPriorityLua(update,0)
+end
+
+function LightTest:addSprite()
+ local s = cc.Director:getInstance():getWinSize()
+
+ local fileName = "Sprite3DTest/orc.c3b"
+ local sprite1 = cc.Sprite3D:create(fileName)
+ sprite1:setRotation3D(cc.vec3(0.0, 180.0, 0.0))
+ sprite1:setPosition(cc.p(0.0, 0.0))
+ sprite1:setScale(2.0)
+ local sp = cc.Sprite3D:create("Sprite3DTest/axe.c3b")
+ sprite1:getAttachNode("Bip001 R Hand"):addChild(sp)
+ local animation = cc.Animation3D:create(fileName)
+ if nil ~=animation then
+ local animate = cc.Animate3D:create(animation)
+ sprite1:runAction(cc.RepeatForever:create(animate))
+ end
+ self:addChild(sprite1)
+ sprite1:setCameraMask(2)
+
+ local fileName = "Sprite3DTest/sphere.c3b"
+ local sprite2 = cc.Sprite3D:create(fileName)
+ sprite2:setPosition(cc.p(30.0, 0.0))
+ self:addChild(sprite2)
+ sprite2:setCameraMask(2)
+
+
+ local fileName = "Sprite3DTest/sphere.c3b"
+ local sprite3 = cc.Sprite3D:create(fileName)
+ sprite3:setScale(0.5)
+ sprite3:setPosition(cc.p(-50.0, 0.0))
+ self:addChild(sprite3)
+ sprite3:setCameraMask(2)
+
+ local fileName = "Sprite3DTest/sphere.c3b"
+ local sprite4 = cc.Sprite3D:create(fileName)
+ sprite4:setScale(0.5)
+ sprite4:setPosition(cc.p(-30.0, 10.0))
+ self:addChild(sprite4)
+ sprite4:setCameraMask(2)
+end
+
+function LightTest:addLights()
+ local s = cc.Director:getInstance():getWinSize()
+ self._ambientLight = cc.AmbientLight:create(cc.c3b(200, 200, 200))
+ self._ambientLight:setEnabled(true)
+ self:addChild(self._ambientLight)
+ self._ambientLight:setCameraMask(2)
+
+ self._directionalLight = cc.DirectionLight:create(cc.vec3(-1.0, -1.0, 0.0), cc.c3b(200, 200, 200))
+ self._directionalLight:setEnabled(false)
+ self:addChild(self._directionalLight)
+ self._directionalLight:setCameraMask(2)
+
+ self._pointLight = cc.PointLight:create(cc.vec3(0.0, 0.0, 0.0), cc.c3b(200, 200, 200), 10000.0)
+ self._pointLight:setEnabled(false)
+ self:addChild(self._pointLight)
+ self._pointLight:setCameraMask(2)
+
+ self._spotLight = cc.SpotLight:create(cc.vec3(-1.0, -1.0, 0.0), cc.vec3(0.0, 0.0, 0.0), cc.c3b(200, 200, 200), 0.0, 0.5, 10000.0)
+ self._spotLight:setEnabled(false)
+ self:addChild(self._spotLight)
+ self._spotLight:setCameraMask(2)
+
+ local tintto1 = cc.TintTo:create(4, 0, 0, 255)
+ local tintto2 = cc.TintTo:create(4, 0, 255, 0)
+ local tintto3 = cc.TintTo:create(4, 255, 0, 0)
+ local tintto4 = cc.TintTo:create(4, 255, 255, 255)
+ local seq = cc.Sequence:create(tintto1,tintto2, tintto3, tintto4)
+ self._ambientLight:runAction(cc.RepeatForever:create(seq))
+
+ tintto1 = cc.TintTo:create(4, 255, 0, 0)
+ tintto2 = cc.TintTo:create(4, 0, 255, 0)
+ tintto3 = cc.TintTo:create(4, 0, 0, 255)
+ tintto4 = cc.TintTo:create(4, 255, 255, 255)
+ seq = cc.Sequence:create(tintto1,tintto2, tintto3, tintto4)
+ self._directionalLight:runAction(cc.RepeatForever:create(seq))
+
+
+ tintto1 = cc.TintTo:create(4, 255, 0, 0)
+ tintto2 = cc.TintTo:create(4, 0, 255, 0)
+ tintto3 = cc.TintTo:create(4, 0, 0, 255)
+ tintto4 = cc.TintTo:create(4, 255, 255, 255)
+ seq = cc.Sequence:create(tintto2, tintto1, tintto3, tintto4)
+ self._pointLight:runAction(cc.RepeatForever:create(seq))
+
+ tintto1 = cc.TintTo:create(4, 255, 0, 0)
+ tintto2 = cc.TintTo:create(4, 0, 255, 0)
+ tintto3 = cc.TintTo:create(4, 0, 0, 255)
+ tintto4 = cc.TintTo:create(4, 255, 255, 255)
+ seq = cc.Sequence:create(tintto3, tintto2, tintto1, tintto4)
+ self._spotLight:runAction(cc.RepeatForever:create(seq))
+end
+
+function LightTest.create( ... )
+ local layer = LightTest.new()
+ Helper.initWithLayer(layer)
+ Helper.titleLabel:setString("Light Test")
+ return layer
+end
+
+function LightTestMain()
+ cclog("LightTestMain")
+ local scene = cc.Scene:create()
+
+ Helper.createFunctionTable =
+ {
+ LightTest.create,
+ }
+
+ scene:addChild(LightTest.create(), 0)
+ scene:addChild(CreateBackMenuItem())
+ return scene
+end
diff --git a/tests/lua-tests/src/mainMenu.lua b/tests/lua-tests/src/mainMenu.lua
index 31ba5cd10d..a943e6683e 100644
--- a/tests/lua-tests/src/mainMenu.lua
+++ b/tests/lua-tests/src/mainMenu.lua
@@ -27,6 +27,7 @@ require "KeypadTest/KeypadTest"
require "LabelTest/LabelTest"
require "LabelTestNew/LabelTestNew"
require "LayerTest/LayerTest"
+require "LightTest/LightTest"
require "MenuTest/MenuTest"
require "MotionStreakTest/MotionStreakTest"
require "NewEventDispatcherTest/NewEventDispatcherTest"
@@ -99,6 +100,7 @@ local _allTests = {
{ isSupported = true, name = "LabelTest" , create_func = LabelTest },
{ isSupported = true, name = "LabelTestNew" , create_func = LabelTestNew },
{ isSupported = true, name = "LayerTest" , create_func = LayerTestMain },
+ { isSupported = true, name = "LightTest" , create_func = LightTestMain },
{ isSupported = true, name = "LuaBridgeTest" , create_func = LuaBridgeMainTest },
{ isSupported = true, name = "MenuTest" , create_func = MenuTestMain },
{ isSupported = true, name = "MotionStreakTest" , create_func = MotionStreakTest },
diff --git a/tools/tolua/cocos2dx.ini b/tools/tolua/cocos2dx.ini
index 5c4f65805d..c08bc1d43f 100644
--- a/tools/tolua/cocos2dx.ini
+++ b/tools/tolua/cocos2dx.ini
@@ -26,7 +26,7 @@ headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/2d/CCProtectedNode.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 = New.* Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* .*TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak ^Ref$ UserDefault GLViewImpl GLView Image Event(?!.*(Physics).*).* Component ProtectedNode Console GLProgramCache GLProgramState Device CSLoader ClippingRectangleNode
+classes = New.* Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.* Rotate.* Blink.* Tint.* Sequence Repeat.* Fade.* Ease.* Scale.* Transition.* Spawn Animat.* Flip.* Delay.* Skew.* Jump.* Place.* Show.* Progress.* PointArray ToggleVisibility.* RemoveSelf Hide Particle.* Label.* Atlas.* TextureCache.* Texture2D Cardinal.* CatmullRom.* ParallaxNode TileMap.* .*TMX.* CallFunc RenderTexture GridAction Grid3DAction GridBase$ .+Grid Shaky3D Waves3D FlipX3D FlipY3D Speed ActionManager Set Scheduler Timer Orbit.* Follow.* Bezier.* CardinalSpline.* Camera.* DrawNode .*3D$ Liquid$ Waves$ ShuffleTiles$ TurnOffTiles$ Split.* Twirl$ FileUtils$ GLProgram ShaderCache Application ClippingNode MotionStreak ^Ref$ UserDefault GLViewImpl GLView Image Event(?!.*(Physics).*).* Component ProtectedNode Console GLProgramCache GLProgramState Device CSLoader ClippingRectangleNode .*Light$
# 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