diff --git a/CHANGELOG b/CHANGELOG index 7a738ec4dc..1b2a57f71d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,16 @@ cocos2d-x-3.1-alpha1 May.8 2014 + [NEW] UI: add navigation support + [NEW] UI: add a widget to play video + [NEW] VS: support VS 2013 + + [FIX] Audio: pause sound automatically when go to background on Android [FIX] Label: label is unsharp if it's created by system font with small size on iOS & Mac OS X - [FIX] ParticleSystem: Particles can be created without a texture + [FIX] Label: Label created with system font is still visible when its opacity is 0 + [FIX] Label: Label created with system font havs black border on WP8/WINRT [FIX] Lua: A potential crash in the bindings of sp.SkeletonAnimation.setAnimation + [FIX] Lua: Lua template should fail to launch on lua error + [FIX] ParticleSystem: Particles can be created without a texture + cocos2d-x-3.1-alpha0 May.1 2014 [NEW] Android: Adds support for get response when Activity's onActivityResult is triggered diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj b/build/cocos2d_libs.xcodeproj/project.pbxproj index d9fa6f4268..878c1a95f8 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj @@ -1093,6 +1093,14 @@ 2905FA8D18CF08D100240AA3 /* UIWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA1318CF08D100240AA3 /* UIWidget.cpp */; }; 2905FA8E18CF08D100240AA3 /* UIWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1418CF08D100240AA3 /* UIWidget.h */; }; 2905FA8F18CF08D100240AA3 /* UIWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1418CF08D100240AA3 /* UIWidget.h */; }; + 296CAD221915EC8000C64FBF /* CCEventFocus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 296CAD201915EC8000C64FBF /* CCEventFocus.cpp */; }; + 296CAD231915EC8000C64FBF /* CCEventFocus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 296CAD201915EC8000C64FBF /* CCEventFocus.cpp */; }; + 296CAD241915EC8000C64FBF /* CCEventFocus.h in Headers */ = {isa = PBXBuildFile; fileRef = 296CAD211915EC8000C64FBF /* CCEventFocus.h */; }; + 296CAD251915EC8000C64FBF /* CCEventFocus.h in Headers */ = {isa = PBXBuildFile; fileRef = 296CAD211915EC8000C64FBF /* CCEventFocus.h */; }; + 296CAD281915EC9900C64FBF /* CCEventListenerFocus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 296CAD261915EC9900C64FBF /* CCEventListenerFocus.cpp */; }; + 296CAD291915EC9900C64FBF /* CCEventListenerFocus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 296CAD261915EC9900C64FBF /* CCEventListenerFocus.cpp */; }; + 296CAD2A1915EC9900C64FBF /* CCEventListenerFocus.h in Headers */ = {isa = PBXBuildFile; fileRef = 296CAD271915EC9900C64FBF /* CCEventListenerFocus.h */; }; + 296CAD2B1915EC9900C64FBF /* CCEventListenerFocus.h in Headers */ = {isa = PBXBuildFile; fileRef = 296CAD271915EC9900C64FBF /* CCEventListenerFocus.h */; }; 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; }; 2AC795DB1862870F005EC8E1 /* SkeletonBounds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D918628689005EC8E1 /* SkeletonBounds.cpp */; }; 2AC795DC1862870F005EC8E1 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D51862867D005EC8E1 /* Event.cpp */; }; @@ -1115,10 +1123,8 @@ 3E26D40518ACB5D100834404 /* CCImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E26D40418ACB5D100834404 /* CCImage.cpp */; }; 3E26D40618ACB5D100834404 /* CCImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E26D40418ACB5D100834404 /* CCImage.cpp */; }; 3E26D40818ACB63900834404 /* CCDevice.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3E26D40718ACB63900834404 /* CCDevice.mm */; }; - 3E9D30DF19195B22008EB309 /* CCVertexAttribBind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9D30DD19195B22008EB309 /* CCVertexAttribBind.cpp */; }; - 3E9D30E019195B22008EB309 /* CCVertexAttribBind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9D30DD19195B22008EB309 /* CCVertexAttribBind.cpp */; }; - 3E9D30E119195B22008EB309 /* CCVertexAttribBind.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9D30DE19195B22008EB309 /* CCVertexAttribBind.h */; }; - 3E9D30E219195B22008EB309 /* CCVertexAttribBind.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9D30DE19195B22008EB309 /* CCVertexAttribBind.h */; }; + 3EA0FB5B191B92CC00B170C8 /* UIVideoWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA0FB59191B92CC00B170C8 /* UIVideoWidget.h */; }; + 3EA0FB5C191B92CC00B170C8 /* UIVideoWidgetIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB5A191B92CC00B170C8 /* UIVideoWidgetIOS.mm */; }; 460E468118080832000CDD6D /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A167D21807AF4D005B8026 /* cocos-ext.h */; }; 460E468218080836000CDD6D /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A167D21807AF4D005B8026 /* cocos-ext.h */; }; 460E477B180808F5000CDD6D /* ExtensionMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168321807AF4E005B8026 /* ExtensionMacros.h */; }; @@ -1604,10 +1610,14 @@ 500DC9BD19106E89007B91BF /* CCProfiling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 500DC9BA19106E89007B91BF /* CCProfiling.cpp */; }; 500DC9BE19106E89007B91BF /* CCProfiling.h in Headers */ = {isa = PBXBuildFile; fileRef = 500DC9BB19106E89007B91BF /* CCProfiling.h */; }; 500DC9BF19106E89007B91BF /* CCProfiling.h in Headers */ = {isa = PBXBuildFile; fileRef = 500DC9BB19106E89007B91BF /* CCProfiling.h */; }; - 500DC9D9191B0175007B91BF /* CCGLProgramState.h in Headers */ = {isa = PBXBuildFile; fileRef = 500DC9D7191B0175007B91BF /* CCGLProgramState.h */; }; - 500DC9DA191B0175007B91BF /* CCGLProgramState.h in Headers */ = {isa = PBXBuildFile; fileRef = 500DC9D7191B0175007B91BF /* CCGLProgramState.h */; }; - 500DC9DB191B0175007B91BF /* CCGLProgramState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 500DC9D8191B0175007B91BF /* CCGLProgramState.cpp */; }; - 500DC9DC191B0175007B91BF /* CCGLProgramState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 500DC9D8191B0175007B91BF /* CCGLProgramState.cpp */; }; + 500DC9E5191BF301007B91BF /* CCVertexAttribBind.h in Headers */ = {isa = PBXBuildFile; fileRef = 500DC9E1191BF301007B91BF /* CCVertexAttribBind.h */; }; + 500DC9E6191BF301007B91BF /* CCVertexAttribBind.h in Headers */ = {isa = PBXBuildFile; fileRef = 500DC9E1191BF301007B91BF /* CCVertexAttribBind.h */; }; + 500DC9E7191BF301007B91BF /* CCVertexAttribBind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 500DC9E2191BF301007B91BF /* CCVertexAttribBind.cpp */; }; + 500DC9E8191BF301007B91BF /* CCVertexAttribBind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 500DC9E2191BF301007B91BF /* CCVertexAttribBind.cpp */; }; + 500DC9E9191BF301007B91BF /* CCGLProgramState.h in Headers */ = {isa = PBXBuildFile; fileRef = 500DC9E3191BF301007B91BF /* CCGLProgramState.h */; }; + 500DC9EA191BF301007B91BF /* CCGLProgramState.h in Headers */ = {isa = PBXBuildFile; fileRef = 500DC9E3191BF301007B91BF /* CCGLProgramState.h */; }; + 500DC9EB191BF301007B91BF /* CCGLProgramState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 500DC9E4191BF301007B91BF /* CCGLProgramState.cpp */; }; + 500DC9EC191BF301007B91BF /* CCGLProgramState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 500DC9E4191BF301007B91BF /* CCGLProgramState.cpp */; }; 5027253A190BF1B900AAF4ED /* cocos2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 50272538190BF1B900AAF4ED /* cocos2d.h */; }; 5027253B190BF1B900AAF4ED /* cocos2d.h in Headers */ = {isa = PBXBuildFile; fileRef = 50272538190BF1B900AAF4ED /* cocos2d.h */; }; 5027253C190BF1B900AAF4ED /* cocos2d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 50272539190BF1B900AAF4ED /* cocos2d.cpp */; }; @@ -2287,6 +2297,10 @@ 2905FA1218CF08D100240AA3 /* UITextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextField.h; sourceTree = ""; }; 2905FA1318CF08D100240AA3 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = ""; }; 2905FA1418CF08D100240AA3 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = ""; }; + 296CAD201915EC8000C64FBF /* CCEventFocus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCEventFocus.cpp; path = ../base/CCEventFocus.cpp; sourceTree = ""; }; + 296CAD211915EC8000C64FBF /* CCEventFocus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCEventFocus.h; path = ../base/CCEventFocus.h; sourceTree = ""; }; + 296CAD261915EC9900C64FBF /* CCEventListenerFocus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCEventListenerFocus.cpp; path = ../base/CCEventListenerFocus.cpp; sourceTree = ""; }; + 296CAD271915EC9900C64FBF /* CCEventListenerFocus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCEventListenerFocus.h; path = ../base/CCEventListenerFocus.h; sourceTree = ""; }; 2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = ""; }; 2986667918B1B079000E39CA /* CCTweenFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTweenFunction.h; sourceTree = ""; }; 2AC795D318628672005EC8E1 /* BoundingBoxAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoundingBoxAttachment.cpp; sourceTree = ""; }; @@ -2310,8 +2324,8 @@ 37936A3E1869B76800E974DD /* writer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = writer.h; sourceTree = ""; }; 3E26D40418ACB5D100834404 /* CCImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCImage.cpp; sourceTree = ""; }; 3E26D40718ACB63900834404 /* CCDevice.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCDevice.mm; sourceTree = ""; }; - 3E9D30DD19195B22008EB309 /* CCVertexAttribBind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVertexAttribBind.cpp; sourceTree = ""; }; - 3E9D30DE19195B22008EB309 /* CCVertexAttribBind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVertexAttribBind.h; sourceTree = ""; }; + 3EA0FB59191B92CC00B170C8 /* UIVideoWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVideoWidget.h; sourceTree = ""; }; + 3EA0FB5A191B92CC00B170C8 /* UIVideoWidgetIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIVideoWidgetIOS.mm; sourceTree = ""; }; 46A15FCC1807A544005B8026 /* AUTHORS */ = {isa = PBXFileReference; lastKnownFileType = text; name = AUTHORS; path = ../AUTHORS; sourceTree = ""; }; 46A15FCE1807A544005B8026 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = ""; }; 46A15FE11807A56F005B8026 /* Export.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = ""; }; @@ -2686,8 +2700,10 @@ 500DC9B519106E6D007B91BF /* TransformUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformUtils.h; sourceTree = ""; }; 500DC9BA19106E89007B91BF /* CCProfiling.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCProfiling.cpp; path = ../base/CCProfiling.cpp; sourceTree = ""; }; 500DC9BB19106E89007B91BF /* CCProfiling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCProfiling.h; path = ../base/CCProfiling.h; sourceTree = ""; }; - 500DC9D7191B0175007B91BF /* CCGLProgramState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGLProgramState.h; sourceTree = ""; }; - 500DC9D8191B0175007B91BF /* CCGLProgramState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCGLProgramState.cpp; sourceTree = ""; }; + 500DC9E1191BF301007B91BF /* CCVertexAttribBind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCVertexAttribBind.h; sourceTree = ""; }; + 500DC9E2191BF301007B91BF /* CCVertexAttribBind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCVertexAttribBind.cpp; sourceTree = ""; }; + 500DC9E3191BF301007B91BF /* CCGLProgramState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCGLProgramState.h; sourceTree = ""; }; + 500DC9E4191BF301007B91BF /* CCGLProgramState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCGLProgramState.cpp; sourceTree = ""; }; 50272538190BF1B900AAF4ED /* cocos2d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cocos2d.h; path = ../cocos/cocos2d.h; sourceTree = ""; }; 50272539190BF1B900AAF4ED /* cocos2d.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cocos2d.cpp; path = ../cocos/cocos2d.cpp; sourceTree = ""; }; 50DC5180187B817900A9C23F /* RELEASE_NOTES.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = RELEASE_NOTES.md; path = ../docs/RELEASE_NOTES.md; sourceTree = ""; }; @@ -3110,6 +3126,10 @@ 500DC92719106300007B91BF /* s3tc.h */, 500DC92819106300007B91BF /* ZipUtils.cpp */, 500DC92919106300007B91BF /* ZipUtils.h */, + 296CAD201915EC8000C64FBF /* CCEventFocus.cpp */, + 296CAD211915EC8000C64FBF /* CCEventFocus.h */, + 296CAD261915EC9900C64FBF /* CCEventListenerFocus.cpp */, + 296CAD271915EC9900C64FBF /* CCEventListenerFocus.h */, ); name = base; path = ../cocos/2d; @@ -3238,10 +3258,10 @@ 1A570238180BCC580088DEC7 /* shaders */ = { isa = PBXGroup; children = ( - 500DC9D7191B0175007B91BF /* CCGLProgramState.h */, - 500DC9D8191B0175007B91BF /* CCGLProgramState.cpp */, - 3E9D30DD19195B22008EB309 /* CCVertexAttribBind.cpp */, - 3E9D30DE19195B22008EB309 /* CCVertexAttribBind.h */, + 500DC9E1191BF301007B91BF /* CCVertexAttribBind.h */, + 500DC9E2191BF301007B91BF /* CCVertexAttribBind.cpp */, + 500DC9E3191BF301007B91BF /* CCGLProgramState.h */, + 500DC9E4191BF301007B91BF /* CCGLProgramState.cpp */, 1A57052F180BD9500088DEC7 /* CCGLProgram.cpp */, 1A570530180BD9500088DEC7 /* CCGLProgram.h */, 1A570531180BD9500088DEC7 /* ccGLStateCache.cpp */, @@ -3973,6 +3993,8 @@ 2905F9E618CF08D000240AA3 /* ui */ = { isa = PBXGroup; children = ( + 3EA0FB59191B92CC00B170C8 /* UIVideoWidget.h */, + 3EA0FB5A191B92CC00B170C8 /* UIVideoWidgetIOS.mm */, 2905F9E918CF08D000240AA3 /* CocosGUI.cpp */, 2905F9EA18CF08D000240AA3 /* CocosGUI.h */, 2905F9EB18CF08D000240AA3 /* GUIDefine.h */, @@ -4929,7 +4951,6 @@ 500DC98C19106300007B91BF /* CCPlatformMacros.h in Headers */, 46A170131807CBFC005B8026 /* CCFileUtilsApple.h in Headers */, 46A1701F1807CBFC005B8026 /* CCImage.h in Headers */, - 500DC9D9191B0175007B91BF /* CCGLProgramState.h in Headers */, 46A170181807CBFC005B8026 /* CCApplicationProtocol.h in Headers */, 1A570063180BC5A10088DEC7 /* CCAction.h in Headers */, 1A570067180BC5A10088DEC7 /* CCActionCamera.h in Headers */, @@ -4945,8 +4966,8 @@ 500DC94E19106300007B91BF /* CCEvent.h in Headers */, 1A57007F180BC5A10088DEC7 /* CCActionInterval.h in Headers */, 1A01C69A18F57BE800EFE3A6 /* CCSet.h in Headers */, + 296CAD2A1915EC9900C64FBF /* CCEventListenerFocus.h in Headers */, A023FA36185198C800E10CD1 /* ccShader_PositionTextureColor_noMVP_vert.h in Headers */, - 3E9D30E119195B22008EB309 /* CCVertexAttribBind.h in Headers */, 1A570083180BC5A10088DEC7 /* CCActionManager.h in Headers */, 1A570087180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */, ED9C6A9618599AD8000A5232 /* CCNodeGrid.h in Headers */, @@ -5010,6 +5031,7 @@ 1A01C6A618F58F7500EFE3A6 /* CCNotificationCenter.h in Headers */, 1A57020A180BCBDF0088DEC7 /* CCMotionStreak.h in Headers */, 1A570212180BCBF40088DEC7 /* CCProgressTimer.h in Headers */, + 500DC9E9191BF301007B91BF /* CCGLProgramState.h in Headers */, 1A570216180BCBF40088DEC7 /* CCRenderTexture.h in Headers */, 500DC95219106300007B91BF /* CCEventAcceleration.h in Headers */, 500DC99E19106300007B91BF /* CCValue.h in Headers */, @@ -5020,6 +5042,7 @@ 1A57022F180BCC1A0088DEC7 /* CCParticleSystemQuad.h in Headers */, 500DC96A19106300007B91BF /* CCEventListenerCustom.h in Headers */, B2AF2F9718EBAEAE00C5807C /* MathUtil.h in Headers */, + 500DC9E5191BF301007B91BF /* CCVertexAttribBind.h in Headers */, 1A570236180BCC4D0088DEC7 /* CCScriptSupport.h in Headers */, 1A57024D180BCC6F0088DEC7 /* ccShader_Position_uColor_frag.h in Headers */, 1A57024F180BCC6F0088DEC7 /* ccShader_Position_uColor_vert.h in Headers */, @@ -5096,6 +5119,7 @@ 1A570356180BD0B00088DEC7 /* ioapi.h in Headers */, 500DC99619106300007B91BF /* CCScheduler.h in Headers */, 1A57035A180BD0B00088DEC7 /* unzip.h in Headers */, + 296CAD241915EC8000C64FBF /* CCEventFocus.h in Headers */, 1A570535180BD9500088DEC7 /* CCGLProgram.h in Headers */, 1AA95FE018EBB8EF00AE7485 /* ccShader_Label_frag_df.h in Headers */, 500DC98819106300007B91BF /* CCNS.h in Headers */, @@ -5426,7 +5450,6 @@ 500DC9AD19106300007B91BF /* ZipUtils.h in Headers */, 50FCEBC218C72017004AD434 /* TextFieldReader.h in Headers */, 1A570068180BC5A10088DEC7 /* CCActionCamera.h in Headers */, - 500DC9DA191B0175007B91BF /* CCGLProgramState.h in Headers */, 1A57006C180BC5A10088DEC7 /* CCActionCatmullRom.h in Headers */, 1A570070180BC5A10088DEC7 /* CCActionEase.h in Headers */, 1A570074180BC5A10088DEC7 /* CCActionGrid.h in Headers */, @@ -5469,6 +5492,7 @@ 1A5701A0180BCB590088DEC7 /* CCFont.h in Headers */, 1A5701A4180BCB590088DEC7 /* CCFontAtlas.h in Headers */, 1A5701A8180BCB590088DEC7 /* CCFontAtlasCache.h in Headers */, + 3EA0FB5B191B92CC00B170C8 /* UIVideoWidget.h in Headers */, 500DC98919106300007B91BF /* CCNS.h in Headers */, 1A5701B4180BCB590088DEC7 /* CCFontFNT.h in Headers */, 1A5701B8180BCB5A0088DEC7 /* CCFontFreeType.h in Headers */, @@ -5482,6 +5506,7 @@ 2905FA7B18CF08D100240AA3 /* UISlider.h in Headers */, 1AA95FE318EBB8EF00AE7485 /* ccShader_Label_frag_normal.h in Headers */, 1A5701CE180BCB5A0088DEC7 /* CCLabelTTF.h in Headers */, + 296CAD251915EC8000C64FBF /* CCEventFocus.h in Headers */, 50FCEBCA18C72017004AD434 /* WidgetReader.h in Headers */, 1A5701E1180BCB8C0088DEC7 /* CCLayer.h in Headers */, 1A5701E5180BCB8C0088DEC7 /* CCScene.h in Headers */, @@ -5520,7 +5545,6 @@ 50FCEBA618C72017004AD434 /* ListViewReader.h in Headers */, 1A57025A180BCC6F0088DEC7 /* ccShader_PositionTexture_frag.h in Headers */, 500DC9B919106E6D007B91BF /* TransformUtils.h in Headers */, - 3E9D30E219195B22008EB309 /* CCVertexAttribBind.h in Headers */, 1A57025C180BCC6F0088DEC7 /* ccShader_PositionTexture_uColor_frag.h in Headers */, 1A57025E180BCC6F0088DEC7 /* ccShader_PositionTexture_uColor_vert.h in Headers */, 1A570260180BCC6F0088DEC7 /* ccShader_PositionTexture_vert.h in Headers */, @@ -5629,6 +5653,7 @@ 1AD71EAC180E26E600808F54 /* Attachment.h in Headers */, 500DC94719106300007B91BF /* CCDataVisitor.h in Headers */, 2905FA4918CF08D100240AA3 /* UIButton.h in Headers */, + 500DC9E6191BF301007B91BF /* CCVertexAttribBind.h in Headers */, 500DC96719106300007B91BF /* CCEventListenerAcceleration.h in Headers */, 1AD71EB0180E26E600808F54 /* AttachmentLoader.h in Headers */, 1AD71EB4180E26E600808F54 /* Bone.h in Headers */, @@ -5662,11 +5687,13 @@ 1A9DCA26180E6955007A3AD4 /* ccFPSImages.h in Headers */, 1A9DCA2A180E6955007A3AD4 /* CCGLBufferedNode.h in Headers */, 1A0DB7321823827C0025743D /* CCGL.h in Headers */, + 500DC9EA191BF301007B91BF /* CCGLProgramState.h in Headers */, 1A9DCA2E180E6955007A3AD4 /* CCProtocols.h in Headers */, 500DC96B19106300007B91BF /* CCEventListenerCustom.h in Headers */, 1A9DCA3C180E6955007A3AD4 /* firePngData.h in Headers */, 1AA95FDF18EBB8EF00AE7485 /* ccShader_Label_frag_df_glow.h in Headers */, 1A01C69F18F57BE800EFE3A6 /* CCString.h in Headers */, + 296CAD2B1915EC9900C64FBF /* CCEventListenerFocus.h in Headers */, 1A01C69118F57BE800EFE3A6 /* CCDictionary.h in Headers */, 500DC99B19106300007B91BF /* ccTypes.h in Headers */, 1A8C598E180E930E00EF57C3 /* CCActionFrame.h in Headers */, @@ -6130,6 +6157,7 @@ 1A570081180BC5A10088DEC7 /* CCActionManager.cpp in Sources */, 1A570085180BC5A10088DEC7 /* CCActionPageTurn3D.cpp in Sources */, 1A570089180BC5A10088DEC7 /* CCActionProgressTimer.cpp in Sources */, + 296CAD281915EC9900C64FBF /* CCEventListenerFocus.cpp in Sources */, 1A57008D180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */, 1A570091180BC5A10088DEC7 /* CCActionTween.cpp in Sources */, B2AF2F9918EBAEAE00C5807C /* Matrix.cpp in Sources */, @@ -6188,6 +6216,7 @@ 1A570225180BCC1A0088DEC7 /* CCParticleExamples.cpp in Sources */, 1A570229180BCC1A0088DEC7 /* CCParticleSystem.cpp in Sources */, 1A57022D180BCC1A0088DEC7 /* CCParticleSystemQuad.cpp in Sources */, + 500DC9E7191BF301007B91BF /* CCVertexAttribBind.cpp in Sources */, 500DC9B01910633C007B91BF /* CCTouch.cpp in Sources */, 50FCEB9B18C72017004AD434 /* ImageViewReader.cpp in Sources */, 500DC9AA19106300007B91BF /* ZipUtils.cpp in Sources */, @@ -6223,11 +6252,11 @@ 1A5702FA180BCE750088DEC7 /* CCTMXXMLParser.cpp in Sources */, 1A570300180BCE890088DEC7 /* CCParallaxNode.cpp in Sources */, 1A570305180BCED90088DEC7 /* ccUtils.cpp in Sources */, - 500DC9DB191B0175007B91BF /* CCGLProgramState.cpp in Sources */, 1A57030C180BCF190088DEC7 /* CCComponent.cpp in Sources */, 500DC96019106300007B91BF /* CCEventListener.cpp in Sources */, 1A570310180BCF190088DEC7 /* CCComponentContainer.cpp in Sources */, 1A570319180BCF430088DEC7 /* ccCArray.cpp in Sources */, + 500DC9EB191BF301007B91BF /* CCGLProgramState.cpp in Sources */, B37510711823AC9F00B3BA6A /* CCPhysicsBodyInfo_chipmunk.cpp in Sources */, 1A570324180BCF660088DEC7 /* TGAlib.cpp in Sources */, 1A01C69C18F57BE800EFE3A6 /* CCString.cpp in Sources */, @@ -6299,6 +6328,7 @@ 1AD71ECD180E26E600808F54 /* Skeleton.cpp in Sources */, 1AD71ED1180E26E600808F54 /* SkeletonData.cpp in Sources */, 1AD71ED5180E26E600808F54 /* SkeletonJson.cpp in Sources */, + 296CAD221915EC8000C64FBF /* CCEventFocus.cpp in Sources */, 1AD71ED9180E26E600808F54 /* Skin.cpp in Sources */, 1AD71EDD180E26E600808F54 /* Slot.cpp in Sources */, 1AD71EE1180E26E600808F54 /* SlotData.cpp in Sources */, @@ -6332,7 +6362,6 @@ 1A8C59B3180E930E00EF57C3 /* CCBone.cpp in Sources */, 1A8C59B7180E930E00EF57C3 /* CCColliderDetector.cpp in Sources */, 1A8C59BB180E930E00EF57C3 /* CCComAttribute.cpp in Sources */, - 3E9D30DF19195B22008EB309 /* CCVertexAttribBind.cpp in Sources */, 1A8C59BF180E930E00EF57C3 /* CCComAudio.cpp in Sources */, 1A8C59C3180E930E00EF57C3 /* CCComController.cpp in Sources */, 2905FA5218CF08D100240AA3 /* UIImageView.cpp in Sources */, @@ -6506,6 +6535,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 296CAD291915EC9900C64FBF /* CCEventListenerFocus.cpp in Sources */, 1A01C69918F57BE800EFE3A6 /* CCSet.cpp in Sources */, 1A01C69D18F57BE800EFE3A6 /* CCString.cpp in Sources */, 2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */, @@ -6536,7 +6566,6 @@ 1A01C68F18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */, 06CAAACC186AD7F50012A414 /* TriggerMng.cpp in Sources */, 46A1703D1807CC07005B8026 /* CCCommon.mm in Sources */, - 500DC9DC191B0175007B91BF /* CCGLProgramState.cpp in Sources */, 50FCEBC818C72017004AD434 /* WidgetReader.cpp in Sources */, 46A1702F1807CBFE005B8026 /* CCGLViewProtocol.cpp in Sources */, 46A170FC1807CECB005B8026 /* CCPhysicsBody.cpp in Sources */, @@ -6557,6 +6586,7 @@ 50FCEB9818C72017004AD434 /* CheckBoxReader.cpp in Sources */, 1A570076180BC5A10088DEC7 /* CCActionGrid3D.cpp in Sources */, 500DC99D19106300007B91BF /* CCValue.cpp in Sources */, + 3EA0FB5C191B92CC00B170C8 /* UIVideoWidgetIOS.mm in Sources */, B37510851823ACA100B3BA6A /* CCPhysicsWorldInfo_chipmunk.cpp in Sources */, 1A57007A180BC5A10088DEC7 /* CCActionInstant.cpp in Sources */, 1A57007E180BC5A10088DEC7 /* CCActionInterval.cpp in Sources */, @@ -6654,6 +6684,7 @@ 1A570306180BCED90088DEC7 /* ccUtils.cpp in Sources */, 1A57030D180BCF190088DEC7 /* CCComponent.cpp in Sources */, 1A570311180BCF190088DEC7 /* CCComponentContainer.cpp in Sources */, + 296CAD231915EC8000C64FBF /* CCEventFocus.cpp in Sources */, 1A57031A180BCF430088DEC7 /* ccCArray.cpp in Sources */, B375107C1823ACA100B3BA6A /* CCPhysicsBodyInfo_chipmunk.cpp in Sources */, 50FCEBB418C72017004AD434 /* SliderReader.cpp in Sources */, @@ -6711,11 +6742,11 @@ 1AD71EB6180E26E600808F54 /* BoneData.cpp in Sources */, 500DC8D619105F7D007B91BF /* CCGeometry.cpp in Sources */, 50FCEB9C18C72017004AD434 /* ImageViewReader.cpp in Sources */, + 500DC9EC191BF301007B91BF /* CCGLProgramState.cpp in Sources */, 1AD71EBA180E26E600808F54 /* CCSkeleton.cpp in Sources */, 1A01C68B18F57BE800EFE3A6 /* CCDeprecated.cpp in Sources */, 1AD71EBE180E26E600808F54 /* CCSkeletonAnimation.cpp in Sources */, 500DC94119106300007B91BF /* CCData.cpp in Sources */, - 3E9D30E019195B22008EB309 /* CCVertexAttribBind.cpp in Sources */, 50FCEBBC18C72017004AD434 /* TextBMFontReader.cpp in Sources */, 500DC8BB19105D41007B91BF /* CCQuadCommand.cpp in Sources */, 1AD71EC2180E26E600808F54 /* extension.cpp in Sources */, @@ -6743,6 +6774,7 @@ 1AAF5854180E40B9000584C8 /* LocalStorageAndroid.cpp in Sources */, 1A9DCA24180E6955007A3AD4 /* ccFPSImages.c in Sources */, 1A9DCA28180E6955007A3AD4 /* CCGLBufferedNode.cpp in Sources */, + 500DC9E8191BF301007B91BF /* CCVertexAttribBind.cpp in Sources */, 50FCEBA018C72017004AD434 /* LayoutReader.cpp in Sources */, 50E6D33518E174130051CA34 /* UIHBox.cpp in Sources */, 500DC98F19106300007B91BF /* CCRef.cpp in Sources */, diff --git a/build/cocos2d_tests.xcodeproj/project.pbxproj b/build/cocos2d_tests.xcodeproj/project.pbxproj index 76a473bf11..8042d5055b 100644 --- a/build/cocos2d_tests.xcodeproj/project.pbxproj +++ b/build/cocos2d_tests.xcodeproj/project.pbxproj @@ -177,6 +177,8 @@ 1A0EE57D18CDFBBE004CD58F /* Opengl.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1ABCA37518CD9E180087CE3A /* Opengl.lua */; }; 1A0EE57E18CDFBBE004CD58F /* OpenglConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1ABCA37618CD9E180087CE3A /* OpenglConstants.lua */; }; 1A0EE57F18CDFBBE004CD58F /* StudioConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1ABCA37718CD9E180087CE3A /* StudioConstants.lua */; }; + 1A1645A6191B6281008C7C7F /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; }; + 1A1645A9191B6283008C7C7F /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; }; 1A221C9C191771E300FD2BE4 /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; }; 1A221C9D191771E400FD2BE4 /* ccs-res in Resources */ = {isa = PBXBuildFile; fileRef = 1A221C9B191771E300FD2BE4 /* ccs-res */; }; 1A9F808D177E98A600D9A1CB /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9F808C177E98A600D9A1CB /* libcurl.dylib */; }; @@ -391,94 +393,6 @@ 1AC35B8018CECF0C00F37B72 /* ProjectileController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359E818CECF0B00F37B72 /* ProjectileController.cpp */; }; 1AC35B8118CECF0C00F37B72 /* SceneController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359EA18CECF0B00F37B72 /* SceneController.cpp */; }; 1AC35B8218CECF0C00F37B72 /* SceneController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359EA18CECF0B00F37B72 /* SceneController.cpp */; }; - 1AC35B8318CECF0C00F37B72 /* CocosGUIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359ED18CECF0B00F37B72 /* CocosGUIScene.cpp */; }; - 1AC35B8418CECF0C00F37B72 /* CocosGUIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359ED18CECF0B00F37B72 /* CocosGUIScene.cpp */; }; - 1AC35B8518CECF0C00F37B72 /* CocoStudioGUITest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359EF18CECF0B00F37B72 /* CocoStudioGUITest.cpp */; }; - 1AC35B8618CECF0C00F37B72 /* CocoStudioGUITest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359EF18CECF0B00F37B72 /* CocoStudioGUITest.cpp */; }; - 1AC35B8718CECF0C00F37B72 /* CustomGUIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359F118CECF0B00F37B72 /* CustomGUIScene.cpp */; }; - 1AC35B8818CECF0C00F37B72 /* CustomGUIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359F118CECF0B00F37B72 /* CustomGUIScene.cpp */; }; - 1AC35B8918CECF0C00F37B72 /* CustomImageTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359F518CECF0B00F37B72 /* CustomImageTest.cpp */; }; - 1AC35B8A18CECF0C00F37B72 /* CustomImageTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359F518CECF0B00F37B72 /* CustomImageTest.cpp */; }; - 1AC35B8B18CECF0C00F37B72 /* CustomParticleWidgetTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359F818CECF0B00F37B72 /* CustomParticleWidgetTest.cpp */; }; - 1AC35B8C18CECF0C00F37B72 /* CustomParticleWidgetTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359F818CECF0B00F37B72 /* CustomParticleWidgetTest.cpp */; }; - 1AC35B8D18CECF0C00F37B72 /* CustomImageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359FB18CECF0B00F37B72 /* CustomImageView.cpp */; }; - 1AC35B8E18CECF0C00F37B72 /* CustomImageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359FB18CECF0B00F37B72 /* CustomImageView.cpp */; }; - 1AC35B8F18CECF0C00F37B72 /* CustomImageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359FD18CECF0B00F37B72 /* CustomImageViewReader.cpp */; }; - 1AC35B9018CECF0C00F37B72 /* CustomImageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359FD18CECF0B00F37B72 /* CustomImageViewReader.cpp */; }; - 1AC35B9118CECF0C00F37B72 /* CustomParticleWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359FF18CECF0B00F37B72 /* CustomParticleWidget.cpp */; }; - 1AC35B9218CECF0C00F37B72 /* CustomParticleWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC359FF18CECF0B00F37B72 /* CustomParticleWidget.cpp */; }; - 1AC35B9318CECF0C00F37B72 /* CustomParticleWidgetReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0118CECF0B00F37B72 /* CustomParticleWidgetReader.cpp */; }; - 1AC35B9418CECF0C00F37B72 /* CustomParticleWidgetReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0118CECF0B00F37B72 /* CustomParticleWidgetReader.cpp */; }; - 1AC35B9518CECF0C00F37B72 /* CustomReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0318CECF0B00F37B72 /* CustomReader.cpp */; }; - 1AC35B9618CECF0C00F37B72 /* CustomReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0318CECF0B00F37B72 /* CustomReader.cpp */; }; - 1AC35B9718CECF0C00F37B72 /* GUIEditorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0518CECF0B00F37B72 /* GUIEditorTest.cpp */; }; - 1AC35B9818CECF0C00F37B72 /* GUIEditorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0518CECF0B00F37B72 /* GUIEditorTest.cpp */; }; - 1AC35B9918CECF0C00F37B72 /* UIButtonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0818CECF0B00F37B72 /* UIButtonTest.cpp */; }; - 1AC35B9A18CECF0C00F37B72 /* UIButtonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0818CECF0B00F37B72 /* UIButtonTest.cpp */; }; - 1AC35B9B18CECF0C00F37B72 /* UIButtonTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0A18CECF0B00F37B72 /* UIButtonTest_Editor.cpp */; }; - 1AC35B9C18CECF0C00F37B72 /* UIButtonTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0A18CECF0B00F37B72 /* UIButtonTest_Editor.cpp */; }; - 1AC35B9D18CECF0C00F37B72 /* UICheckBoxTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0D18CECF0B00F37B72 /* UICheckBoxTest.cpp */; }; - 1AC35B9E18CECF0C00F37B72 /* UICheckBoxTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0D18CECF0B00F37B72 /* UICheckBoxTest.cpp */; }; - 1AC35B9F18CECF0C00F37B72 /* UICheckBoxTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0F18CECF0B00F37B72 /* UICheckBoxTest_Editor.cpp */; }; - 1AC35BA018CECF0C00F37B72 /* UICheckBoxTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A0F18CECF0B00F37B72 /* UICheckBoxTest_Editor.cpp */; }; - 1AC35BA118CECF0C00F37B72 /* UIImageViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1218CECF0B00F37B72 /* UIImageViewTest.cpp */; }; - 1AC35BA218CECF0C00F37B72 /* UIImageViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1218CECF0B00F37B72 /* UIImageViewTest.cpp */; }; - 1AC35BA318CECF0C00F37B72 /* UIImageViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1418CECF0B00F37B72 /* UIImageViewTest_Editor.cpp */; }; - 1AC35BA418CECF0C00F37B72 /* UIImageViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1418CECF0B00F37B72 /* UIImageViewTest_Editor.cpp */; }; - 1AC35BA518CECF0C00F37B72 /* UILayoutTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1718CECF0B00F37B72 /* UILayoutTest.cpp */; }; - 1AC35BA618CECF0C00F37B72 /* UILayoutTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1718CECF0B00F37B72 /* UILayoutTest.cpp */; }; - 1AC35BA718CECF0C00F37B72 /* UILayoutTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1918CECF0B00F37B72 /* UILayoutTest_Editor.cpp */; }; - 1AC35BA818CECF0C00F37B72 /* UILayoutTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1918CECF0B00F37B72 /* UILayoutTest_Editor.cpp */; }; - 1AC35BA918CECF0C00F37B72 /* UIListViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1C18CECF0B00F37B72 /* UIListViewTest.cpp */; }; - 1AC35BAA18CECF0C00F37B72 /* UIListViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1C18CECF0B00F37B72 /* UIListViewTest.cpp */; }; - 1AC35BAB18CECF0C00F37B72 /* UIListViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1E18CECF0B00F37B72 /* UIListViewTest_Editor.cpp */; }; - 1AC35BAC18CECF0C00F37B72 /* UIListViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A1E18CECF0B00F37B72 /* UIListViewTest_Editor.cpp */; }; - 1AC35BAD18CECF0C00F37B72 /* UILoadingBarTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2118CECF0B00F37B72 /* UILoadingBarTest.cpp */; }; - 1AC35BAE18CECF0C00F37B72 /* UILoadingBarTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2118CECF0B00F37B72 /* UILoadingBarTest.cpp */; }; - 1AC35BAF18CECF0C00F37B72 /* UILoadingBarTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2318CECF0B00F37B72 /* UILoadingBarTest_Editor.cpp */; }; - 1AC35BB018CECF0C00F37B72 /* UILoadingBarTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2318CECF0B00F37B72 /* UILoadingBarTest_Editor.cpp */; }; - 1AC35BB118CECF0C00F37B72 /* UIPageViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2618CECF0B00F37B72 /* UIPageViewTest.cpp */; }; - 1AC35BB218CECF0C00F37B72 /* UIPageViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2618CECF0B00F37B72 /* UIPageViewTest.cpp */; }; - 1AC35BB318CECF0C00F37B72 /* UIPageViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2818CECF0B00F37B72 /* UIPageViewTest_Editor.cpp */; }; - 1AC35BB418CECF0C00F37B72 /* UIPageViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2818CECF0B00F37B72 /* UIPageViewTest_Editor.cpp */; }; - 1AC35BB518CECF0C00F37B72 /* UIRichTextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2B18CECF0B00F37B72 /* UIRichTextTest.cpp */; }; - 1AC35BB618CECF0C00F37B72 /* UIRichTextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2B18CECF0B00F37B72 /* UIRichTextTest.cpp */; }; - 1AC35BB718CECF0C00F37B72 /* UIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2D18CECF0B00F37B72 /* UIScene.cpp */; }; - 1AC35BB818CECF0C00F37B72 /* UIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2D18CECF0B00F37B72 /* UIScene.cpp */; }; - 1AC35BB918CECF0C00F37B72 /* UIScene_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2F18CECF0B00F37B72 /* UIScene_Editor.cpp */; }; - 1AC35BBA18CECF0C00F37B72 /* UIScene_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A2F18CECF0B00F37B72 /* UIScene_Editor.cpp */; }; - 1AC35BBB18CECF0C00F37B72 /* UISceneManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3118CECF0B00F37B72 /* UISceneManager.cpp */; }; - 1AC35BBC18CECF0C00F37B72 /* UISceneManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3118CECF0B00F37B72 /* UISceneManager.cpp */; }; - 1AC35BBD18CECF0C00F37B72 /* UISceneManager_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3318CECF0B00F37B72 /* UISceneManager_Editor.cpp */; }; - 1AC35BBE18CECF0C00F37B72 /* UISceneManager_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3318CECF0B00F37B72 /* UISceneManager_Editor.cpp */; }; - 1AC35BBF18CECF0C00F37B72 /* UIScrollViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3618CECF0B00F37B72 /* UIScrollViewTest.cpp */; }; - 1AC35BC018CECF0C00F37B72 /* UIScrollViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3618CECF0B00F37B72 /* UIScrollViewTest.cpp */; }; - 1AC35BC118CECF0C00F37B72 /* UIScrollViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3818CECF0B00F37B72 /* UIScrollViewTest_Editor.cpp */; }; - 1AC35BC218CECF0C00F37B72 /* UIScrollViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3818CECF0B00F37B72 /* UIScrollViewTest_Editor.cpp */; }; - 1AC35BC318CECF0C00F37B72 /* UISliderTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3B18CECF0B00F37B72 /* UISliderTest.cpp */; }; - 1AC35BC418CECF0C00F37B72 /* UISliderTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3B18CECF0B00F37B72 /* UISliderTest.cpp */; }; - 1AC35BC518CECF0C00F37B72 /* UISliderTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3D18CECF0B00F37B72 /* UISliderTest_Editor.cpp */; }; - 1AC35BC618CECF0C00F37B72 /* UISliderTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A3D18CECF0B00F37B72 /* UISliderTest_Editor.cpp */; }; - 1AC35BC718CECF0C00F37B72 /* UITextAtlasTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4018CECF0B00F37B72 /* UITextAtlasTest.cpp */; }; - 1AC35BC818CECF0C00F37B72 /* UITextAtlasTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4018CECF0B00F37B72 /* UITextAtlasTest.cpp */; }; - 1AC35BC918CECF0C00F37B72 /* UITextAtlasTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4218CECF0B00F37B72 /* UITextAtlasTest_Editor.cpp */; }; - 1AC35BCA18CECF0C00F37B72 /* UITextAtlasTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4218CECF0B00F37B72 /* UITextAtlasTest_Editor.cpp */; }; - 1AC35BCB18CECF0C00F37B72 /* UITextBMFontTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4518CECF0B00F37B72 /* UITextBMFontTest.cpp */; }; - 1AC35BCC18CECF0C00F37B72 /* UITextBMFontTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4518CECF0B00F37B72 /* UITextBMFontTest.cpp */; }; - 1AC35BCD18CECF0C00F37B72 /* UITextBMFontTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4718CECF0B00F37B72 /* UITextBMFontTest_Editor.cpp */; }; - 1AC35BCE18CECF0C00F37B72 /* UITextBMFontTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4718CECF0B00F37B72 /* UITextBMFontTest_Editor.cpp */; }; - 1AC35BCF18CECF0C00F37B72 /* UITextFieldTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4A18CECF0B00F37B72 /* UITextFieldTest.cpp */; }; - 1AC35BD018CECF0C00F37B72 /* UITextFieldTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4A18CECF0B00F37B72 /* UITextFieldTest.cpp */; }; - 1AC35BD118CECF0C00F37B72 /* UITextFieldTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4C18CECF0B00F37B72 /* UITextFieldTest_Editor.cpp */; }; - 1AC35BD218CECF0C00F37B72 /* UITextFieldTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4C18CECF0B00F37B72 /* UITextFieldTest_Editor.cpp */; }; - 1AC35BD318CECF0C00F37B72 /* UITextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4F18CECF0B00F37B72 /* UITextTest.cpp */; }; - 1AC35BD418CECF0C00F37B72 /* UITextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A4F18CECF0B00F37B72 /* UITextTest.cpp */; }; - 1AC35BD518CECF0C00F37B72 /* UITextTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A5118CECF0B00F37B72 /* UITextTest_Editor.cpp */; }; - 1AC35BD618CECF0C00F37B72 /* UITextTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A5118CECF0B00F37B72 /* UITextTest_Editor.cpp */; }; - 1AC35BD718CECF0C00F37B72 /* UIWidgetAddNodeTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A5418CECF0B00F37B72 /* UIWidgetAddNodeTest.cpp */; }; - 1AC35BD818CECF0C00F37B72 /* UIWidgetAddNodeTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A5418CECF0B00F37B72 /* UIWidgetAddNodeTest.cpp */; }; - 1AC35BD918CECF0C00F37B72 /* UIWidgetAddNodeTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A5618CECF0B00F37B72 /* UIWidgetAddNodeTest_Editor.cpp */; }; - 1AC35BDA18CECF0C00F37B72 /* UIWidgetAddNodeTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A5618CECF0B00F37B72 /* UIWidgetAddNodeTest_Editor.cpp */; }; 1AC35BDB18CECF0C00F37B72 /* SceneEditorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A5918CECF0B00F37B72 /* SceneEditorTest.cpp */; }; 1AC35BDC18CECF0C00F37B72 /* SceneEditorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A5918CECF0B00F37B72 /* SceneEditorTest.cpp */; }; 1AC35BDD18CECF0C00F37B72 /* acts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC35A5C18CECF0B00F37B72 /* acts.cpp */; }; @@ -806,6 +720,101 @@ 1AF152DA18FD252A00A52F3D /* PerformanceCallbackTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AF152D718FD252A00A52F3D /* PerformanceCallbackTest.cpp */; }; 1F33634F18E37E840074764D /* RefPtrTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F33634D18E37E840074764D /* RefPtrTest.cpp */; }; 1F33635018E37E840074764D /* RefPtrTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1F33634D18E37E840074764D /* RefPtrTest.cpp */; }; + 29080D1C191B574B0066F8DF /* UITest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D1A191B574B0066F8DF /* UITest.cpp */; }; + 29080D1D191B574B0066F8DF /* UITest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D1A191B574B0066F8DF /* UITest.cpp */; }; + 29080D8D191B595E0066F8DF /* CocosGUIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */; }; + 29080D8E191B595E0066F8DF /* CocosGUIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */; }; + 29080D8F191B595E0066F8DF /* CocoStudioGUITest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D21191B595E0066F8DF /* CocoStudioGUITest.cpp */; }; + 29080D90191B595E0066F8DF /* CocoStudioGUITest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D21191B595E0066F8DF /* CocoStudioGUITest.cpp */; }; + 29080D91191B595E0066F8DF /* CustomGUIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D23191B595E0066F8DF /* CustomGUIScene.cpp */; }; + 29080D92191B595E0066F8DF /* CustomGUIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D23191B595E0066F8DF /* CustomGUIScene.cpp */; }; + 29080D93191B595E0066F8DF /* CustomImageTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D27191B595E0066F8DF /* CustomImageTest.cpp */; }; + 29080D94191B595E0066F8DF /* CustomImageTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D27191B595E0066F8DF /* CustomImageTest.cpp */; }; + 29080D95191B595E0066F8DF /* CustomParticleWidgetTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D2A191B595E0066F8DF /* CustomParticleWidgetTest.cpp */; }; + 29080D96191B595E0066F8DF /* CustomParticleWidgetTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D2A191B595E0066F8DF /* CustomParticleWidgetTest.cpp */; }; + 29080D97191B595E0066F8DF /* CustomImageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D2D191B595E0066F8DF /* CustomImageView.cpp */; }; + 29080D98191B595E0066F8DF /* CustomImageView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D2D191B595E0066F8DF /* CustomImageView.cpp */; }; + 29080D99191B595E0066F8DF /* CustomImageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D2F191B595E0066F8DF /* CustomImageViewReader.cpp */; }; + 29080D9A191B595E0066F8DF /* CustomImageViewReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D2F191B595E0066F8DF /* CustomImageViewReader.cpp */; }; + 29080D9B191B595E0066F8DF /* CustomParticleWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D31191B595E0066F8DF /* CustomParticleWidget.cpp */; }; + 29080D9C191B595E0066F8DF /* CustomParticleWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D31191B595E0066F8DF /* CustomParticleWidget.cpp */; }; + 29080D9D191B595E0066F8DF /* CustomParticleWidgetReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D33191B595E0066F8DF /* CustomParticleWidgetReader.cpp */; }; + 29080D9E191B595E0066F8DF /* CustomParticleWidgetReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D33191B595E0066F8DF /* CustomParticleWidgetReader.cpp */; }; + 29080D9F191B595E0066F8DF /* CustomReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D35191B595E0066F8DF /* CustomReader.cpp */; }; + 29080DA0191B595E0066F8DF /* CustomReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D35191B595E0066F8DF /* CustomReader.cpp */; }; + 29080DA1191B595E0066F8DF /* GUIEditorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D37191B595E0066F8DF /* GUIEditorTest.cpp */; }; + 29080DA2191B595E0066F8DF /* GUIEditorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D37191B595E0066F8DF /* GUIEditorTest.cpp */; }; + 29080DA3191B595E0066F8DF /* UIButtonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D3A191B595E0066F8DF /* UIButtonTest.cpp */; }; + 29080DA4191B595E0066F8DF /* UIButtonTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D3A191B595E0066F8DF /* UIButtonTest.cpp */; }; + 29080DA5191B595E0066F8DF /* UIButtonTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D3C191B595E0066F8DF /* UIButtonTest_Editor.cpp */; }; + 29080DA6191B595E0066F8DF /* UIButtonTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D3C191B595E0066F8DF /* UIButtonTest_Editor.cpp */; }; + 29080DA7191B595E0066F8DF /* UICheckBoxTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D3F191B595E0066F8DF /* UICheckBoxTest.cpp */; }; + 29080DA8191B595E0066F8DF /* UICheckBoxTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D3F191B595E0066F8DF /* UICheckBoxTest.cpp */; }; + 29080DA9191B595E0066F8DF /* UICheckBoxTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D41191B595E0066F8DF /* UICheckBoxTest_Editor.cpp */; }; + 29080DAA191B595E0066F8DF /* UICheckBoxTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D41191B595E0066F8DF /* UICheckBoxTest_Editor.cpp */; }; + 29080DAB191B595E0066F8DF /* UIFocusTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D44191B595E0066F8DF /* UIFocusTest.cpp */; }; + 29080DAC191B595E0066F8DF /* UIFocusTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D44191B595E0066F8DF /* UIFocusTest.cpp */; }; + 29080DAD191B595E0066F8DF /* UIImageViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D47191B595E0066F8DF /* UIImageViewTest.cpp */; }; + 29080DAE191B595E0066F8DF /* UIImageViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D47191B595E0066F8DF /* UIImageViewTest.cpp */; }; + 29080DAF191B595E0066F8DF /* UIImageViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D49191B595E0066F8DF /* UIImageViewTest_Editor.cpp */; }; + 29080DB0191B595E0066F8DF /* UIImageViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D49191B595E0066F8DF /* UIImageViewTest_Editor.cpp */; }; + 29080DB1191B595E0066F8DF /* UILayoutTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D4C191B595E0066F8DF /* UILayoutTest.cpp */; }; + 29080DB2191B595E0066F8DF /* UILayoutTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D4C191B595E0066F8DF /* UILayoutTest.cpp */; }; + 29080DB3191B595E0066F8DF /* UILayoutTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D4E191B595E0066F8DF /* UILayoutTest_Editor.cpp */; }; + 29080DB4191B595E0066F8DF /* UILayoutTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D4E191B595E0066F8DF /* UILayoutTest_Editor.cpp */; }; + 29080DB5191B595E0066F8DF /* UIListViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D51191B595E0066F8DF /* UIListViewTest.cpp */; }; + 29080DB6191B595E0066F8DF /* UIListViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D51191B595E0066F8DF /* UIListViewTest.cpp */; }; + 29080DB7191B595E0066F8DF /* UIListViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D53191B595E0066F8DF /* UIListViewTest_Editor.cpp */; }; + 29080DB8191B595E0066F8DF /* UIListViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D53191B595E0066F8DF /* UIListViewTest_Editor.cpp */; }; + 29080DB9191B595E0066F8DF /* UILoadingBarTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D56191B595E0066F8DF /* UILoadingBarTest.cpp */; }; + 29080DBA191B595E0066F8DF /* UILoadingBarTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D56191B595E0066F8DF /* UILoadingBarTest.cpp */; }; + 29080DBB191B595E0066F8DF /* UILoadingBarTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D58191B595E0066F8DF /* UILoadingBarTest_Editor.cpp */; }; + 29080DBC191B595E0066F8DF /* UILoadingBarTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D58191B595E0066F8DF /* UILoadingBarTest_Editor.cpp */; }; + 29080DBD191B595E0066F8DF /* UIPageViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D5B191B595E0066F8DF /* UIPageViewTest.cpp */; }; + 29080DBE191B595E0066F8DF /* UIPageViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D5B191B595E0066F8DF /* UIPageViewTest.cpp */; }; + 29080DBF191B595E0066F8DF /* UIPageViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D5D191B595E0066F8DF /* UIPageViewTest_Editor.cpp */; }; + 29080DC0191B595E0066F8DF /* UIPageViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D5D191B595E0066F8DF /* UIPageViewTest_Editor.cpp */; }; + 29080DC1191B595E0066F8DF /* UIRichTextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D60191B595E0066F8DF /* UIRichTextTest.cpp */; }; + 29080DC2191B595E0066F8DF /* UIRichTextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D60191B595E0066F8DF /* UIRichTextTest.cpp */; }; + 29080DC3191B595E0066F8DF /* UIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D62191B595E0066F8DF /* UIScene.cpp */; }; + 29080DC4191B595E0066F8DF /* UIScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D62191B595E0066F8DF /* UIScene.cpp */; }; + 29080DC5191B595E0066F8DF /* UIScene_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D64191B595E0066F8DF /* UIScene_Editor.cpp */; }; + 29080DC6191B595E0066F8DF /* UIScene_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D64191B595E0066F8DF /* UIScene_Editor.cpp */; }; + 29080DC7191B595E0066F8DF /* UISceneManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D66191B595E0066F8DF /* UISceneManager.cpp */; }; + 29080DC8191B595E0066F8DF /* UISceneManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D66191B595E0066F8DF /* UISceneManager.cpp */; }; + 29080DC9191B595E0066F8DF /* UISceneManager_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D68191B595E0066F8DF /* UISceneManager_Editor.cpp */; }; + 29080DCA191B595E0066F8DF /* UISceneManager_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D68191B595E0066F8DF /* UISceneManager_Editor.cpp */; }; + 29080DCB191B595E0066F8DF /* UIScrollViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D6B191B595E0066F8DF /* UIScrollViewTest.cpp */; }; + 29080DCC191B595E0066F8DF /* UIScrollViewTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D6B191B595E0066F8DF /* UIScrollViewTest.cpp */; }; + 29080DCD191B595E0066F8DF /* UIScrollViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D6D191B595E0066F8DF /* UIScrollViewTest_Editor.cpp */; }; + 29080DCE191B595E0066F8DF /* UIScrollViewTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D6D191B595E0066F8DF /* UIScrollViewTest_Editor.cpp */; }; + 29080DCF191B595E0066F8DF /* UISliderTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D70191B595E0066F8DF /* UISliderTest.cpp */; }; + 29080DD0191B595E0066F8DF /* UISliderTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D70191B595E0066F8DF /* UISliderTest.cpp */; }; + 29080DD1191B595E0066F8DF /* UISliderTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D72191B595E0066F8DF /* UISliderTest_Editor.cpp */; }; + 29080DD2191B595E0066F8DF /* UISliderTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D72191B595E0066F8DF /* UISliderTest_Editor.cpp */; }; + 29080DD3191B595E0066F8DF /* UITextAtlasTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D75191B595E0066F8DF /* UITextAtlasTest.cpp */; }; + 29080DD4191B595E0066F8DF /* UITextAtlasTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D75191B595E0066F8DF /* UITextAtlasTest.cpp */; }; + 29080DD5191B595E0066F8DF /* UITextAtlasTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D77191B595E0066F8DF /* UITextAtlasTest_Editor.cpp */; }; + 29080DD6191B595E0066F8DF /* UITextAtlasTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D77191B595E0066F8DF /* UITextAtlasTest_Editor.cpp */; }; + 29080DD7191B595E0066F8DF /* UITextBMFontTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D7A191B595E0066F8DF /* UITextBMFontTest.cpp */; }; + 29080DD8191B595E0066F8DF /* UITextBMFontTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D7A191B595E0066F8DF /* UITextBMFontTest.cpp */; }; + 29080DD9191B595E0066F8DF /* UITextBMFontTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D7C191B595E0066F8DF /* UITextBMFontTest_Editor.cpp */; }; + 29080DDA191B595E0066F8DF /* UITextBMFontTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D7C191B595E0066F8DF /* UITextBMFontTest_Editor.cpp */; }; + 29080DDB191B595E0066F8DF /* UITextFieldTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D7F191B595E0066F8DF /* UITextFieldTest.cpp */; }; + 29080DDC191B595E0066F8DF /* UITextFieldTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D7F191B595E0066F8DF /* UITextFieldTest.cpp */; }; + 29080DDD191B595E0066F8DF /* UITextFieldTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D81191B595E0066F8DF /* UITextFieldTest_Editor.cpp */; }; + 29080DDE191B595E0066F8DF /* UITextFieldTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D81191B595E0066F8DF /* UITextFieldTest_Editor.cpp */; }; + 29080DDF191B595E0066F8DF /* UITextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D84191B595E0066F8DF /* UITextTest.cpp */; }; + 29080DE0191B595E0066F8DF /* UITextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D84191B595E0066F8DF /* UITextTest.cpp */; }; + 29080DE1191B595E0066F8DF /* UITextTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D86191B595E0066F8DF /* UITextTest_Editor.cpp */; }; + 29080DE2191B595E0066F8DF /* UITextTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D86191B595E0066F8DF /* UITextTest_Editor.cpp */; }; + 29080DE3191B595E0066F8DF /* UIWidgetAddNodeTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D89191B595E0066F8DF /* UIWidgetAddNodeTest.cpp */; }; + 29080DE4191B595E0066F8DF /* UIWidgetAddNodeTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D89191B595E0066F8DF /* UIWidgetAddNodeTest.cpp */; }; + 29080DE5191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D8B191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp */; }; + 29080DE6191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29080D8B191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp */; }; + 3EA0FB5E191B92F100B170C8 /* cocosvideo.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */; }; + 3EA0FB64191B931500B170C8 /* UIVideoWidgetTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB62191B931500B170C8 /* UIVideoWidgetTest.cpp */; }; + 3EA0FB66191B933000B170C8 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */; }; A05FCACA177C124500BE600E /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64822165F391E007D4F18 /* Cocoa.framework */; }; A07A521E1783A1D20073F6A7 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C6482E165F399D007D4F18 /* libz.dylib */; }; A07A521F1783A1D20073F6A7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64832165F3AFD007D4F18 /* Foundation.framework */; }; @@ -1481,94 +1490,6 @@ 1AC359E918CECF0B00F37B72 /* ProjectileController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectileController.h; sourceTree = ""; }; 1AC359EA18CECF0B00F37B72 /* SceneController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SceneController.cpp; sourceTree = ""; }; 1AC359EB18CECF0B00F37B72 /* SceneController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneController.h; sourceTree = ""; }; - 1AC359ED18CECF0B00F37B72 /* CocosGUIScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocosGUIScene.cpp; sourceTree = ""; }; - 1AC359EE18CECF0B00F37B72 /* CocosGUIScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosGUIScene.h; sourceTree = ""; }; - 1AC359EF18CECF0B00F37B72 /* CocoStudioGUITest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocoStudioGUITest.cpp; sourceTree = ""; }; - 1AC359F018CECF0B00F37B72 /* CocoStudioGUITest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoStudioGUITest.h; sourceTree = ""; }; - 1AC359F118CECF0B00F37B72 /* CustomGUIScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomGUIScene.cpp; sourceTree = ""; }; - 1AC359F218CECF0B00F37B72 /* CustomGUIScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomGUIScene.h; sourceTree = ""; }; - 1AC359F518CECF0B00F37B72 /* CustomImageTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomImageTest.cpp; sourceTree = ""; }; - 1AC359F618CECF0B00F37B72 /* CustomImageTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomImageTest.h; sourceTree = ""; }; - 1AC359F818CECF0B00F37B72 /* CustomParticleWidgetTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomParticleWidgetTest.cpp; sourceTree = ""; }; - 1AC359F918CECF0B00F37B72 /* CustomParticleWidgetTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomParticleWidgetTest.h; sourceTree = ""; }; - 1AC359FB18CECF0B00F37B72 /* CustomImageView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomImageView.cpp; sourceTree = ""; }; - 1AC359FC18CECF0B00F37B72 /* CustomImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomImageView.h; sourceTree = ""; }; - 1AC359FD18CECF0B00F37B72 /* CustomImageViewReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomImageViewReader.cpp; sourceTree = ""; }; - 1AC359FE18CECF0B00F37B72 /* CustomImageViewReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomImageViewReader.h; sourceTree = ""; }; - 1AC359FF18CECF0B00F37B72 /* CustomParticleWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomParticleWidget.cpp; sourceTree = ""; }; - 1AC35A0018CECF0B00F37B72 /* CustomParticleWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomParticleWidget.h; sourceTree = ""; }; - 1AC35A0118CECF0B00F37B72 /* CustomParticleWidgetReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomParticleWidgetReader.cpp; sourceTree = ""; }; - 1AC35A0218CECF0B00F37B72 /* CustomParticleWidgetReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomParticleWidgetReader.h; sourceTree = ""; }; - 1AC35A0318CECF0B00F37B72 /* CustomReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomReader.cpp; sourceTree = ""; }; - 1AC35A0418CECF0B00F37B72 /* CustomReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomReader.h; sourceTree = ""; }; - 1AC35A0518CECF0B00F37B72 /* GUIEditorTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIEditorTest.cpp; sourceTree = ""; }; - 1AC35A0618CECF0B00F37B72 /* GUIEditorTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIEditorTest.h; sourceTree = ""; }; - 1AC35A0818CECF0B00F37B72 /* UIButtonTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIButtonTest.cpp; sourceTree = ""; }; - 1AC35A0918CECF0B00F37B72 /* UIButtonTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIButtonTest.h; sourceTree = ""; }; - 1AC35A0A18CECF0B00F37B72 /* UIButtonTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIButtonTest_Editor.cpp; sourceTree = ""; }; - 1AC35A0B18CECF0B00F37B72 /* UIButtonTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIButtonTest_Editor.h; sourceTree = ""; }; - 1AC35A0D18CECF0B00F37B72 /* UICheckBoxTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UICheckBoxTest.cpp; sourceTree = ""; }; - 1AC35A0E18CECF0B00F37B72 /* UICheckBoxTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICheckBoxTest.h; sourceTree = ""; }; - 1AC35A0F18CECF0B00F37B72 /* UICheckBoxTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UICheckBoxTest_Editor.cpp; sourceTree = ""; }; - 1AC35A1018CECF0B00F37B72 /* UICheckBoxTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICheckBoxTest_Editor.h; sourceTree = ""; }; - 1AC35A1218CECF0B00F37B72 /* UIImageViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIImageViewTest.cpp; sourceTree = ""; }; - 1AC35A1318CECF0B00F37B72 /* UIImageViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIImageViewTest.h; sourceTree = ""; }; - 1AC35A1418CECF0B00F37B72 /* UIImageViewTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIImageViewTest_Editor.cpp; sourceTree = ""; }; - 1AC35A1518CECF0B00F37B72 /* UIImageViewTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIImageViewTest_Editor.h; sourceTree = ""; }; - 1AC35A1718CECF0B00F37B72 /* UILayoutTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutTest.cpp; sourceTree = ""; }; - 1AC35A1818CECF0B00F37B72 /* UILayoutTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutTest.h; sourceTree = ""; }; - 1AC35A1918CECF0B00F37B72 /* UILayoutTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutTest_Editor.cpp; sourceTree = ""; }; - 1AC35A1A18CECF0B00F37B72 /* UILayoutTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutTest_Editor.h; sourceTree = ""; }; - 1AC35A1C18CECF0B00F37B72 /* UIListViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIListViewTest.cpp; sourceTree = ""; }; - 1AC35A1D18CECF0B00F37B72 /* UIListViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIListViewTest.h; sourceTree = ""; }; - 1AC35A1E18CECF0B00F37B72 /* UIListViewTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIListViewTest_Editor.cpp; sourceTree = ""; }; - 1AC35A1F18CECF0B00F37B72 /* UIListViewTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIListViewTest_Editor.h; sourceTree = ""; }; - 1AC35A2118CECF0B00F37B72 /* UILoadingBarTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILoadingBarTest.cpp; sourceTree = ""; }; - 1AC35A2218CECF0B00F37B72 /* UILoadingBarTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILoadingBarTest.h; sourceTree = ""; }; - 1AC35A2318CECF0B00F37B72 /* UILoadingBarTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILoadingBarTest_Editor.cpp; sourceTree = ""; }; - 1AC35A2418CECF0B00F37B72 /* UILoadingBarTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILoadingBarTest_Editor.h; sourceTree = ""; }; - 1AC35A2618CECF0B00F37B72 /* UIPageViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIPageViewTest.cpp; sourceTree = ""; }; - 1AC35A2718CECF0B00F37B72 /* UIPageViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPageViewTest.h; sourceTree = ""; }; - 1AC35A2818CECF0B00F37B72 /* UIPageViewTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIPageViewTest_Editor.cpp; sourceTree = ""; }; - 1AC35A2918CECF0B00F37B72 /* UIPageViewTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPageViewTest_Editor.h; sourceTree = ""; }; - 1AC35A2B18CECF0B00F37B72 /* UIRichTextTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIRichTextTest.cpp; sourceTree = ""; }; - 1AC35A2C18CECF0B00F37B72 /* UIRichTextTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRichTextTest.h; sourceTree = ""; }; - 1AC35A2D18CECF0B00F37B72 /* UIScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScene.cpp; sourceTree = ""; }; - 1AC35A2E18CECF0B00F37B72 /* UIScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScene.h; sourceTree = ""; }; - 1AC35A2F18CECF0B00F37B72 /* UIScene_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScene_Editor.cpp; sourceTree = ""; }; - 1AC35A3018CECF0B00F37B72 /* UIScene_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScene_Editor.h; sourceTree = ""; }; - 1AC35A3118CECF0B00F37B72 /* UISceneManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UISceneManager.cpp; sourceTree = ""; }; - 1AC35A3218CECF0B00F37B72 /* UISceneManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISceneManager.h; sourceTree = ""; }; - 1AC35A3318CECF0B00F37B72 /* UISceneManager_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UISceneManager_Editor.cpp; sourceTree = ""; }; - 1AC35A3418CECF0B00F37B72 /* UISceneManager_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISceneManager_Editor.h; sourceTree = ""; }; - 1AC35A3618CECF0B00F37B72 /* UIScrollViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScrollViewTest.cpp; sourceTree = ""; }; - 1AC35A3718CECF0B00F37B72 /* UIScrollViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScrollViewTest.h; sourceTree = ""; }; - 1AC35A3818CECF0B00F37B72 /* UIScrollViewTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScrollViewTest_Editor.cpp; sourceTree = ""; }; - 1AC35A3918CECF0B00F37B72 /* UIScrollViewTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScrollViewTest_Editor.h; sourceTree = ""; }; - 1AC35A3B18CECF0B00F37B72 /* UISliderTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UISliderTest.cpp; sourceTree = ""; }; - 1AC35A3C18CECF0B00F37B72 /* UISliderTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISliderTest.h; sourceTree = ""; }; - 1AC35A3D18CECF0B00F37B72 /* UISliderTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UISliderTest_Editor.cpp; sourceTree = ""; }; - 1AC35A3E18CECF0B00F37B72 /* UISliderTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISliderTest_Editor.h; sourceTree = ""; }; - 1AC35A4018CECF0B00F37B72 /* UITextAtlasTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextAtlasTest.cpp; sourceTree = ""; }; - 1AC35A4118CECF0B00F37B72 /* UITextAtlasTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextAtlasTest.h; sourceTree = ""; }; - 1AC35A4218CECF0B00F37B72 /* UITextAtlasTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextAtlasTest_Editor.cpp; sourceTree = ""; }; - 1AC35A4318CECF0B00F37B72 /* UITextAtlasTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextAtlasTest_Editor.h; sourceTree = ""; }; - 1AC35A4518CECF0B00F37B72 /* UITextBMFontTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextBMFontTest.cpp; sourceTree = ""; }; - 1AC35A4618CECF0B00F37B72 /* UITextBMFontTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextBMFontTest.h; sourceTree = ""; }; - 1AC35A4718CECF0B00F37B72 /* UITextBMFontTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextBMFontTest_Editor.cpp; sourceTree = ""; }; - 1AC35A4818CECF0B00F37B72 /* UITextBMFontTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextBMFontTest_Editor.h; sourceTree = ""; }; - 1AC35A4A18CECF0B00F37B72 /* UITextFieldTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextFieldTest.cpp; sourceTree = ""; }; - 1AC35A4B18CECF0B00F37B72 /* UITextFieldTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextFieldTest.h; sourceTree = ""; }; - 1AC35A4C18CECF0B00F37B72 /* UITextFieldTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextFieldTest_Editor.cpp; sourceTree = ""; }; - 1AC35A4D18CECF0B00F37B72 /* UITextFieldTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextFieldTest_Editor.h; sourceTree = ""; }; - 1AC35A4F18CECF0B00F37B72 /* UITextTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextTest.cpp; sourceTree = ""; }; - 1AC35A5018CECF0B00F37B72 /* UITextTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextTest.h; sourceTree = ""; }; - 1AC35A5118CECF0B00F37B72 /* UITextTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextTest_Editor.cpp; sourceTree = ""; }; - 1AC35A5218CECF0B00F37B72 /* UITextTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextTest_Editor.h; sourceTree = ""; }; - 1AC35A5418CECF0B00F37B72 /* UIWidgetAddNodeTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidgetAddNodeTest.cpp; sourceTree = ""; }; - 1AC35A5518CECF0B00F37B72 /* UIWidgetAddNodeTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidgetAddNodeTest.h; sourceTree = ""; }; - 1AC35A5618CECF0B00F37B72 /* UIWidgetAddNodeTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidgetAddNodeTest_Editor.cpp; sourceTree = ""; }; - 1AC35A5718CECF0B00F37B72 /* UIWidgetAddNodeTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidgetAddNodeTest_Editor.h; sourceTree = ""; }; 1AC35A5918CECF0B00F37B72 /* SceneEditorTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SceneEditorTest.cpp; sourceTree = ""; }; 1AC35A5A18CECF0B00F37B72 /* SceneEditorTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneEditorTest.h; sourceTree = ""; }; 1AC35A5C18CECF0B00F37B72 /* acts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = acts.cpp; sourceTree = ""; }; @@ -1834,6 +1755,102 @@ 1D6058910D05DD3D006BFB54 /* cpp-tests Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "cpp-tests Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 1F33634D18E37E840074764D /* RefPtrTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RefPtrTest.cpp; sourceTree = ""; }; 1F33634E18E37E840074764D /* RefPtrTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefPtrTest.h; sourceTree = ""; }; + 29080D1A191B574B0066F8DF /* UITest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UITest.cpp; path = UITest/UITest.cpp; sourceTree = ""; }; + 29080D1B191B574B0066F8DF /* UITest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UITest.h; path = UITest/UITest.h; sourceTree = ""; }; + 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocosGUIScene.cpp; sourceTree = ""; }; + 29080D20191B595E0066F8DF /* CocosGUIScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosGUIScene.h; sourceTree = ""; }; + 29080D21191B595E0066F8DF /* CocoStudioGUITest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CocoStudioGUITest.cpp; sourceTree = ""; }; + 29080D22191B595E0066F8DF /* CocoStudioGUITest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocoStudioGUITest.h; sourceTree = ""; }; + 29080D23191B595E0066F8DF /* CustomGUIScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomGUIScene.cpp; sourceTree = ""; }; + 29080D24191B595E0066F8DF /* CustomGUIScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomGUIScene.h; sourceTree = ""; }; + 29080D27191B595E0066F8DF /* CustomImageTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomImageTest.cpp; sourceTree = ""; }; + 29080D28191B595E0066F8DF /* CustomImageTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomImageTest.h; sourceTree = ""; }; + 29080D2A191B595E0066F8DF /* CustomParticleWidgetTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomParticleWidgetTest.cpp; sourceTree = ""; }; + 29080D2B191B595E0066F8DF /* CustomParticleWidgetTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomParticleWidgetTest.h; sourceTree = ""; }; + 29080D2D191B595E0066F8DF /* CustomImageView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomImageView.cpp; sourceTree = ""; }; + 29080D2E191B595E0066F8DF /* CustomImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomImageView.h; sourceTree = ""; }; + 29080D2F191B595E0066F8DF /* CustomImageViewReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomImageViewReader.cpp; sourceTree = ""; }; + 29080D30191B595E0066F8DF /* CustomImageViewReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomImageViewReader.h; sourceTree = ""; }; + 29080D31191B595E0066F8DF /* CustomParticleWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomParticleWidget.cpp; sourceTree = ""; }; + 29080D32191B595E0066F8DF /* CustomParticleWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomParticleWidget.h; sourceTree = ""; }; + 29080D33191B595E0066F8DF /* CustomParticleWidgetReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomParticleWidgetReader.cpp; sourceTree = ""; }; + 29080D34191B595E0066F8DF /* CustomParticleWidgetReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomParticleWidgetReader.h; sourceTree = ""; }; + 29080D35191B595E0066F8DF /* CustomReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomReader.cpp; sourceTree = ""; }; + 29080D36191B595E0066F8DF /* CustomReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomReader.h; sourceTree = ""; }; + 29080D37191B595E0066F8DF /* GUIEditorTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIEditorTest.cpp; sourceTree = ""; }; + 29080D38191B595E0066F8DF /* GUIEditorTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIEditorTest.h; sourceTree = ""; }; + 29080D3A191B595E0066F8DF /* UIButtonTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIButtonTest.cpp; sourceTree = ""; }; + 29080D3B191B595E0066F8DF /* UIButtonTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIButtonTest.h; sourceTree = ""; }; + 29080D3C191B595E0066F8DF /* UIButtonTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIButtonTest_Editor.cpp; sourceTree = ""; }; + 29080D3D191B595E0066F8DF /* UIButtonTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIButtonTest_Editor.h; sourceTree = ""; }; + 29080D3F191B595E0066F8DF /* UICheckBoxTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UICheckBoxTest.cpp; sourceTree = ""; }; + 29080D40191B595E0066F8DF /* UICheckBoxTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICheckBoxTest.h; sourceTree = ""; }; + 29080D41191B595E0066F8DF /* UICheckBoxTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UICheckBoxTest_Editor.cpp; sourceTree = ""; }; + 29080D42191B595E0066F8DF /* UICheckBoxTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICheckBoxTest_Editor.h; sourceTree = ""; }; + 29080D44191B595E0066F8DF /* UIFocusTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIFocusTest.cpp; sourceTree = ""; }; + 29080D45191B595E0066F8DF /* UIFocusTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIFocusTest.h; sourceTree = ""; }; + 29080D47191B595E0066F8DF /* UIImageViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIImageViewTest.cpp; sourceTree = ""; }; + 29080D48191B595E0066F8DF /* UIImageViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIImageViewTest.h; sourceTree = ""; }; + 29080D49191B595E0066F8DF /* UIImageViewTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIImageViewTest_Editor.cpp; sourceTree = ""; }; + 29080D4A191B595E0066F8DF /* UIImageViewTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIImageViewTest_Editor.h; sourceTree = ""; }; + 29080D4C191B595E0066F8DF /* UILayoutTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutTest.cpp; sourceTree = ""; }; + 29080D4D191B595E0066F8DF /* UILayoutTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutTest.h; sourceTree = ""; }; + 29080D4E191B595E0066F8DF /* UILayoutTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILayoutTest_Editor.cpp; sourceTree = ""; }; + 29080D4F191B595E0066F8DF /* UILayoutTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILayoutTest_Editor.h; sourceTree = ""; }; + 29080D51191B595E0066F8DF /* UIListViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIListViewTest.cpp; sourceTree = ""; }; + 29080D52191B595E0066F8DF /* UIListViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIListViewTest.h; sourceTree = ""; }; + 29080D53191B595E0066F8DF /* UIListViewTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIListViewTest_Editor.cpp; sourceTree = ""; }; + 29080D54191B595E0066F8DF /* UIListViewTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIListViewTest_Editor.h; sourceTree = ""; }; + 29080D56191B595E0066F8DF /* UILoadingBarTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILoadingBarTest.cpp; sourceTree = ""; }; + 29080D57191B595E0066F8DF /* UILoadingBarTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILoadingBarTest.h; sourceTree = ""; }; + 29080D58191B595E0066F8DF /* UILoadingBarTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UILoadingBarTest_Editor.cpp; sourceTree = ""; }; + 29080D59191B595E0066F8DF /* UILoadingBarTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UILoadingBarTest_Editor.h; sourceTree = ""; }; + 29080D5B191B595E0066F8DF /* UIPageViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIPageViewTest.cpp; sourceTree = ""; }; + 29080D5C191B595E0066F8DF /* UIPageViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPageViewTest.h; sourceTree = ""; }; + 29080D5D191B595E0066F8DF /* UIPageViewTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIPageViewTest_Editor.cpp; sourceTree = ""; }; + 29080D5E191B595E0066F8DF /* UIPageViewTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIPageViewTest_Editor.h; sourceTree = ""; }; + 29080D60191B595E0066F8DF /* UIRichTextTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIRichTextTest.cpp; sourceTree = ""; }; + 29080D61191B595E0066F8DF /* UIRichTextTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIRichTextTest.h; sourceTree = ""; }; + 29080D62191B595E0066F8DF /* UIScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScene.cpp; sourceTree = ""; }; + 29080D63191B595E0066F8DF /* UIScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScene.h; sourceTree = ""; }; + 29080D64191B595E0066F8DF /* UIScene_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScene_Editor.cpp; sourceTree = ""; }; + 29080D65191B595E0066F8DF /* UIScene_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScene_Editor.h; sourceTree = ""; }; + 29080D66191B595E0066F8DF /* UISceneManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UISceneManager.cpp; sourceTree = ""; }; + 29080D67191B595E0066F8DF /* UISceneManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISceneManager.h; sourceTree = ""; }; + 29080D68191B595E0066F8DF /* UISceneManager_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UISceneManager_Editor.cpp; sourceTree = ""; }; + 29080D69191B595E0066F8DF /* UISceneManager_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISceneManager_Editor.h; sourceTree = ""; }; + 29080D6B191B595E0066F8DF /* UIScrollViewTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScrollViewTest.cpp; sourceTree = ""; }; + 29080D6C191B595E0066F8DF /* UIScrollViewTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScrollViewTest.h; sourceTree = ""; }; + 29080D6D191B595E0066F8DF /* UIScrollViewTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIScrollViewTest_Editor.cpp; sourceTree = ""; }; + 29080D6E191B595E0066F8DF /* UIScrollViewTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIScrollViewTest_Editor.h; sourceTree = ""; }; + 29080D70191B595E0066F8DF /* UISliderTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UISliderTest.cpp; sourceTree = ""; }; + 29080D71191B595E0066F8DF /* UISliderTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISliderTest.h; sourceTree = ""; }; + 29080D72191B595E0066F8DF /* UISliderTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UISliderTest_Editor.cpp; sourceTree = ""; }; + 29080D73191B595E0066F8DF /* UISliderTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UISliderTest_Editor.h; sourceTree = ""; }; + 29080D75191B595E0066F8DF /* UITextAtlasTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextAtlasTest.cpp; sourceTree = ""; }; + 29080D76191B595E0066F8DF /* UITextAtlasTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextAtlasTest.h; sourceTree = ""; }; + 29080D77191B595E0066F8DF /* UITextAtlasTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextAtlasTest_Editor.cpp; sourceTree = ""; }; + 29080D78191B595E0066F8DF /* UITextAtlasTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextAtlasTest_Editor.h; sourceTree = ""; }; + 29080D7A191B595E0066F8DF /* UITextBMFontTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextBMFontTest.cpp; sourceTree = ""; }; + 29080D7B191B595E0066F8DF /* UITextBMFontTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextBMFontTest.h; sourceTree = ""; }; + 29080D7C191B595E0066F8DF /* UITextBMFontTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextBMFontTest_Editor.cpp; sourceTree = ""; }; + 29080D7D191B595E0066F8DF /* UITextBMFontTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextBMFontTest_Editor.h; sourceTree = ""; }; + 29080D7F191B595E0066F8DF /* UITextFieldTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextFieldTest.cpp; sourceTree = ""; }; + 29080D80191B595E0066F8DF /* UITextFieldTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextFieldTest.h; sourceTree = ""; }; + 29080D81191B595E0066F8DF /* UITextFieldTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextFieldTest_Editor.cpp; sourceTree = ""; }; + 29080D82191B595E0066F8DF /* UITextFieldTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextFieldTest_Editor.h; sourceTree = ""; }; + 29080D84191B595E0066F8DF /* UITextTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextTest.cpp; sourceTree = ""; }; + 29080D85191B595E0066F8DF /* UITextTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextTest.h; sourceTree = ""; }; + 29080D86191B595E0066F8DF /* UITextTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UITextTest_Editor.cpp; sourceTree = ""; }; + 29080D87191B595E0066F8DF /* UITextTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextTest_Editor.h; sourceTree = ""; }; + 29080D89191B595E0066F8DF /* UIWidgetAddNodeTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidgetAddNodeTest.cpp; sourceTree = ""; }; + 29080D8A191B595E0066F8DF /* UIWidgetAddNodeTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidgetAddNodeTest.h; sourceTree = ""; }; + 29080D8B191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidgetAddNodeTest_Editor.cpp; sourceTree = ""; }; + 29080D8C191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidgetAddNodeTest_Editor.h; sourceTree = ""; }; + 3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; name = cocosvideo.mp4; path = "../tests/cpp-tests/Resources/cocosvideo.mp4"; sourceTree = ""; }; + 3EA0FB62191B931500B170C8 /* UIVideoWidgetTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIVideoWidgetTest.cpp; sourceTree = ""; }; + 3EA0FB63191B931500B170C8 /* UIVideoWidgetTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVideoWidgetTest.h; sourceTree = ""; }; + 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/MediaPlayer.framework; sourceTree = DEVELOPER_DIR; }; 46A15F9C1807A4F8005B8026 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = cocos2d_libs.xcodeproj; sourceTree = ""; }; A035A71117822E9E00987F6C /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; A07A52291783A1D20073F6A7 /* cpp-tests iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "cpp-tests iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -2001,6 +2018,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 3EA0FB66191B933000B170C8 /* MediaPlayer.framework in Frameworks */, 1AAF53FE180E39D4000584C8 /* libbox2d iOS.a in Frameworks */, 1AAF53FF180E39D4000584C8 /* libchipmunk iOS.a in Frameworks */, 1AAF5400180E39D4000584C8 /* libcocos2dx iOS.a in Frameworks */, @@ -2246,6 +2264,7 @@ 1AC35B0718CECF0C00F37B72 /* TileMapTest */, 1AC35B0A18CECF0C00F37B72 /* TouchesTest */, 1AC35B1118CECF0C00F37B72 /* TransitionsTest */, + 29080D17191B571F0066F8DF /* UITest */, 1AC35B1418CECF0C00F37B72 /* UnitTest */, 1AC35B1718CECF0C00F37B72 /* UserDefaultTest */, 1AC35B1A18CECF0C00F37B72 /* VisibleRect.cpp */, @@ -2533,7 +2552,6 @@ 1AC359B518CECF0B00F37B72 /* CocosBuilderTest */, 1AC359DC18CECF0B00F37B72 /* CocoStudioArmatureTest */, 1AC359DF18CECF0B00F37B72 /* CocoStudioComponentsTest */, - 1AC359EC18CECF0B00F37B72 /* CocoStudioGUITest */, 1AC35A5818CECF0B00F37B72 /* CocoStudioSceneTest */, 1AC35A6118CECF0B00F37B72 /* ControlExtensionTest */, 1AC35A7818CECF0B00F37B72 /* EditBoxTest */, @@ -2690,253 +2708,6 @@ path = CocoStudioComponentsTest; sourceTree = ""; }; - 1AC359EC18CECF0B00F37B72 /* CocoStudioGUITest */ = { - isa = PBXGroup; - children = ( - 1AC359ED18CECF0B00F37B72 /* CocosGUIScene.cpp */, - 1AC359EE18CECF0B00F37B72 /* CocosGUIScene.h */, - 1AC359EF18CECF0B00F37B72 /* CocoStudioGUITest.cpp */, - 1AC359F018CECF0B00F37B72 /* CocoStudioGUITest.h */, - 1AC359F118CECF0B00F37B72 /* CustomGUIScene.cpp */, - 1AC359F218CECF0B00F37B72 /* CustomGUIScene.h */, - 1AC359F318CECF0B00F37B72 /* CustomTest */, - 1AC359FA18CECF0B00F37B72 /* CustomWidget */, - 1AC35A0518CECF0B00F37B72 /* GUIEditorTest.cpp */, - 1AC35A0618CECF0B00F37B72 /* GUIEditorTest.h */, - 1AC35A0718CECF0B00F37B72 /* UIButtonTest */, - 1AC35A0C18CECF0B00F37B72 /* UICheckBoxTest */, - 1AC35A1118CECF0B00F37B72 /* UIImageViewTest */, - 1AC35A1618CECF0B00F37B72 /* UILayoutTest */, - 1AC35A1B18CECF0B00F37B72 /* UIListViewTest */, - 1AC35A2018CECF0B00F37B72 /* UILoadingBarTest */, - 1AC35A2518CECF0B00F37B72 /* UIPageViewTest */, - 1AC35A2A18CECF0B00F37B72 /* UIRichTextTest */, - 1AC35A2D18CECF0B00F37B72 /* UIScene.cpp */, - 1AC35A2E18CECF0B00F37B72 /* UIScene.h */, - 1AC35A2F18CECF0B00F37B72 /* UIScene_Editor.cpp */, - 1AC35A3018CECF0B00F37B72 /* UIScene_Editor.h */, - 1AC35A3118CECF0B00F37B72 /* UISceneManager.cpp */, - 1AC35A3218CECF0B00F37B72 /* UISceneManager.h */, - 1AC35A3318CECF0B00F37B72 /* UISceneManager_Editor.cpp */, - 1AC35A3418CECF0B00F37B72 /* UISceneManager_Editor.h */, - 1AC35A3518CECF0B00F37B72 /* UIScrollViewTest */, - 1AC35A3A18CECF0B00F37B72 /* UISliderTest */, - 1AC35A3F18CECF0B00F37B72 /* UITextAtlasTest */, - 1AC35A4418CECF0B00F37B72 /* UITextBMFontTest */, - 1AC35A4918CECF0B00F37B72 /* UITextFieldTest */, - 1AC35A4E18CECF0B00F37B72 /* UITextTest */, - 1AC35A5318CECF0B00F37B72 /* UIWidgetAddNodeTest */, - ); - path = CocoStudioGUITest; - sourceTree = ""; - }; - 1AC359F318CECF0B00F37B72 /* CustomTest */ = { - isa = PBXGroup; - children = ( - 1AC359F418CECF0B00F37B72 /* CustomImageTest */, - 1AC359F718CECF0B00F37B72 /* CustomParticleWidgetTest */, - ); - path = CustomTest; - sourceTree = ""; - }; - 1AC359F418CECF0B00F37B72 /* CustomImageTest */ = { - isa = PBXGroup; - children = ( - 1AC359F518CECF0B00F37B72 /* CustomImageTest.cpp */, - 1AC359F618CECF0B00F37B72 /* CustomImageTest.h */, - ); - path = CustomImageTest; - sourceTree = ""; - }; - 1AC359F718CECF0B00F37B72 /* CustomParticleWidgetTest */ = { - isa = PBXGroup; - children = ( - 1AC359F818CECF0B00F37B72 /* CustomParticleWidgetTest.cpp */, - 1AC359F918CECF0B00F37B72 /* CustomParticleWidgetTest.h */, - ); - path = CustomParticleWidgetTest; - sourceTree = ""; - }; - 1AC359FA18CECF0B00F37B72 /* CustomWidget */ = { - isa = PBXGroup; - children = ( - 1AC359FB18CECF0B00F37B72 /* CustomImageView.cpp */, - 1AC359FC18CECF0B00F37B72 /* CustomImageView.h */, - 1AC359FD18CECF0B00F37B72 /* CustomImageViewReader.cpp */, - 1AC359FE18CECF0B00F37B72 /* CustomImageViewReader.h */, - 1AC359FF18CECF0B00F37B72 /* CustomParticleWidget.cpp */, - 1AC35A0018CECF0B00F37B72 /* CustomParticleWidget.h */, - 1AC35A0118CECF0B00F37B72 /* CustomParticleWidgetReader.cpp */, - 1AC35A0218CECF0B00F37B72 /* CustomParticleWidgetReader.h */, - 1AC35A0318CECF0B00F37B72 /* CustomReader.cpp */, - 1AC35A0418CECF0B00F37B72 /* CustomReader.h */, - ); - path = CustomWidget; - sourceTree = ""; - }; - 1AC35A0718CECF0B00F37B72 /* UIButtonTest */ = { - isa = PBXGroup; - children = ( - 1AC35A0818CECF0B00F37B72 /* UIButtonTest.cpp */, - 1AC35A0918CECF0B00F37B72 /* UIButtonTest.h */, - 1AC35A0A18CECF0B00F37B72 /* UIButtonTest_Editor.cpp */, - 1AC35A0B18CECF0B00F37B72 /* UIButtonTest_Editor.h */, - ); - path = UIButtonTest; - sourceTree = ""; - }; - 1AC35A0C18CECF0B00F37B72 /* UICheckBoxTest */ = { - isa = PBXGroup; - children = ( - 1AC35A0D18CECF0B00F37B72 /* UICheckBoxTest.cpp */, - 1AC35A0E18CECF0B00F37B72 /* UICheckBoxTest.h */, - 1AC35A0F18CECF0B00F37B72 /* UICheckBoxTest_Editor.cpp */, - 1AC35A1018CECF0B00F37B72 /* UICheckBoxTest_Editor.h */, - ); - path = UICheckBoxTest; - sourceTree = ""; - }; - 1AC35A1118CECF0B00F37B72 /* UIImageViewTest */ = { - isa = PBXGroup; - children = ( - 1AC35A1218CECF0B00F37B72 /* UIImageViewTest.cpp */, - 1AC35A1318CECF0B00F37B72 /* UIImageViewTest.h */, - 1AC35A1418CECF0B00F37B72 /* UIImageViewTest_Editor.cpp */, - 1AC35A1518CECF0B00F37B72 /* UIImageViewTest_Editor.h */, - ); - path = UIImageViewTest; - sourceTree = ""; - }; - 1AC35A1618CECF0B00F37B72 /* UILayoutTest */ = { - isa = PBXGroup; - children = ( - 1AC35A1718CECF0B00F37B72 /* UILayoutTest.cpp */, - 1AC35A1818CECF0B00F37B72 /* UILayoutTest.h */, - 1AC35A1918CECF0B00F37B72 /* UILayoutTest_Editor.cpp */, - 1AC35A1A18CECF0B00F37B72 /* UILayoutTest_Editor.h */, - ); - path = UILayoutTest; - sourceTree = ""; - }; - 1AC35A1B18CECF0B00F37B72 /* UIListViewTest */ = { - isa = PBXGroup; - children = ( - 1AC35A1C18CECF0B00F37B72 /* UIListViewTest.cpp */, - 1AC35A1D18CECF0B00F37B72 /* UIListViewTest.h */, - 1AC35A1E18CECF0B00F37B72 /* UIListViewTest_Editor.cpp */, - 1AC35A1F18CECF0B00F37B72 /* UIListViewTest_Editor.h */, - ); - path = UIListViewTest; - sourceTree = ""; - }; - 1AC35A2018CECF0B00F37B72 /* UILoadingBarTest */ = { - isa = PBXGroup; - children = ( - 1AC35A2118CECF0B00F37B72 /* UILoadingBarTest.cpp */, - 1AC35A2218CECF0B00F37B72 /* UILoadingBarTest.h */, - 1AC35A2318CECF0B00F37B72 /* UILoadingBarTest_Editor.cpp */, - 1AC35A2418CECF0B00F37B72 /* UILoadingBarTest_Editor.h */, - ); - path = UILoadingBarTest; - sourceTree = ""; - }; - 1AC35A2518CECF0B00F37B72 /* UIPageViewTest */ = { - isa = PBXGroup; - children = ( - 1AC35A2618CECF0B00F37B72 /* UIPageViewTest.cpp */, - 1AC35A2718CECF0B00F37B72 /* UIPageViewTest.h */, - 1AC35A2818CECF0B00F37B72 /* UIPageViewTest_Editor.cpp */, - 1AC35A2918CECF0B00F37B72 /* UIPageViewTest_Editor.h */, - ); - path = UIPageViewTest; - sourceTree = ""; - }; - 1AC35A2A18CECF0B00F37B72 /* UIRichTextTest */ = { - isa = PBXGroup; - children = ( - 1AC35A2B18CECF0B00F37B72 /* UIRichTextTest.cpp */, - 1AC35A2C18CECF0B00F37B72 /* UIRichTextTest.h */, - ); - path = UIRichTextTest; - sourceTree = ""; - }; - 1AC35A3518CECF0B00F37B72 /* UIScrollViewTest */ = { - isa = PBXGroup; - children = ( - 1AC35A3618CECF0B00F37B72 /* UIScrollViewTest.cpp */, - 1AC35A3718CECF0B00F37B72 /* UIScrollViewTest.h */, - 1AC35A3818CECF0B00F37B72 /* UIScrollViewTest_Editor.cpp */, - 1AC35A3918CECF0B00F37B72 /* UIScrollViewTest_Editor.h */, - ); - path = UIScrollViewTest; - sourceTree = ""; - }; - 1AC35A3A18CECF0B00F37B72 /* UISliderTest */ = { - isa = PBXGroup; - children = ( - 1AC35A3B18CECF0B00F37B72 /* UISliderTest.cpp */, - 1AC35A3C18CECF0B00F37B72 /* UISliderTest.h */, - 1AC35A3D18CECF0B00F37B72 /* UISliderTest_Editor.cpp */, - 1AC35A3E18CECF0B00F37B72 /* UISliderTest_Editor.h */, - ); - path = UISliderTest; - sourceTree = ""; - }; - 1AC35A3F18CECF0B00F37B72 /* UITextAtlasTest */ = { - isa = PBXGroup; - children = ( - 1AC35A4018CECF0B00F37B72 /* UITextAtlasTest.cpp */, - 1AC35A4118CECF0B00F37B72 /* UITextAtlasTest.h */, - 1AC35A4218CECF0B00F37B72 /* UITextAtlasTest_Editor.cpp */, - 1AC35A4318CECF0B00F37B72 /* UITextAtlasTest_Editor.h */, - ); - path = UITextAtlasTest; - sourceTree = ""; - }; - 1AC35A4418CECF0B00F37B72 /* UITextBMFontTest */ = { - isa = PBXGroup; - children = ( - 1AC35A4518CECF0B00F37B72 /* UITextBMFontTest.cpp */, - 1AC35A4618CECF0B00F37B72 /* UITextBMFontTest.h */, - 1AC35A4718CECF0B00F37B72 /* UITextBMFontTest_Editor.cpp */, - 1AC35A4818CECF0B00F37B72 /* UITextBMFontTest_Editor.h */, - ); - path = UITextBMFontTest; - sourceTree = ""; - }; - 1AC35A4918CECF0B00F37B72 /* UITextFieldTest */ = { - isa = PBXGroup; - children = ( - 1AC35A4A18CECF0B00F37B72 /* UITextFieldTest.cpp */, - 1AC35A4B18CECF0B00F37B72 /* UITextFieldTest.h */, - 1AC35A4C18CECF0B00F37B72 /* UITextFieldTest_Editor.cpp */, - 1AC35A4D18CECF0B00F37B72 /* UITextFieldTest_Editor.h */, - ); - path = UITextFieldTest; - sourceTree = ""; - }; - 1AC35A4E18CECF0B00F37B72 /* UITextTest */ = { - isa = PBXGroup; - children = ( - 1AC35A4F18CECF0B00F37B72 /* UITextTest.cpp */, - 1AC35A5018CECF0B00F37B72 /* UITextTest.h */, - 1AC35A5118CECF0B00F37B72 /* UITextTest_Editor.cpp */, - 1AC35A5218CECF0B00F37B72 /* UITextTest_Editor.h */, - ); - path = UITextTest; - sourceTree = ""; - }; - 1AC35A5318CECF0B00F37B72 /* UIWidgetAddNodeTest */ = { - isa = PBXGroup; - children = ( - 1AC35A5418CECF0B00F37B72 /* UIWidgetAddNodeTest.cpp */, - 1AC35A5518CECF0B00F37B72 /* UIWidgetAddNodeTest.h */, - 1AC35A5618CECF0B00F37B72 /* UIWidgetAddNodeTest_Editor.cpp */, - 1AC35A5718CECF0B00F37B72 /* UIWidgetAddNodeTest_Editor.h */, - ); - path = UIWidgetAddNodeTest; - sourceTree = ""; - }; 1AC35A5818CECF0B00F37B72 /* CocoStudioSceneTest */ = { isa = PBXGroup; children = ( @@ -3493,6 +3264,7 @@ 1AC35CA818CED83500F37B72 /* Resources */ = { isa = PBXGroup; children = ( + 3EA0FB5D191B92F100B170C8 /* cocosvideo.mp4 */, 1AC35CA918CED84500F37B72 /* animations */, 1AC35CAE18CED84500F37B72 /* ccb */, 1A221C9B191771E300FD2BE4 /* ccs-res */, @@ -3686,6 +3458,275 @@ name = tests; sourceTree = ""; }; + 29080D17191B571F0066F8DF /* UITest */ = { + isa = PBXGroup; + children = ( + 29080D1E191B595E0066F8DF /* CocoStudioGUITest */, + 29080D1A191B574B0066F8DF /* UITest.cpp */, + 29080D1B191B574B0066F8DF /* UITest.h */, + ); + name = UITest; + sourceTree = ""; + }; + 29080D1E191B595E0066F8DF /* CocoStudioGUITest */ = { + isa = PBXGroup; + children = ( + 3EA0FB61191B931500B170C8 /* UIVideoWidgetTest */, + 29080D1F191B595E0066F8DF /* CocosGUIScene.cpp */, + 29080D20191B595E0066F8DF /* CocosGUIScene.h */, + 29080D21191B595E0066F8DF /* CocoStudioGUITest.cpp */, + 29080D22191B595E0066F8DF /* CocoStudioGUITest.h */, + 29080D23191B595E0066F8DF /* CustomGUIScene.cpp */, + 29080D24191B595E0066F8DF /* CustomGUIScene.h */, + 29080D25191B595E0066F8DF /* CustomTest */, + 29080D2C191B595E0066F8DF /* CustomWidget */, + 29080D37191B595E0066F8DF /* GUIEditorTest.cpp */, + 29080D38191B595E0066F8DF /* GUIEditorTest.h */, + 29080D39191B595E0066F8DF /* UIButtonTest */, + 29080D3E191B595E0066F8DF /* UICheckBoxTest */, + 29080D43191B595E0066F8DF /* UIFocusTest */, + 29080D46191B595E0066F8DF /* UIImageViewTest */, + 29080D4B191B595E0066F8DF /* UILayoutTest */, + 29080D50191B595E0066F8DF /* UIListViewTest */, + 29080D55191B595E0066F8DF /* UILoadingBarTest */, + 29080D5A191B595E0066F8DF /* UIPageViewTest */, + 29080D5F191B595E0066F8DF /* UIRichTextTest */, + 29080D62191B595E0066F8DF /* UIScene.cpp */, + 29080D63191B595E0066F8DF /* UIScene.h */, + 29080D64191B595E0066F8DF /* UIScene_Editor.cpp */, + 29080D65191B595E0066F8DF /* UIScene_Editor.h */, + 29080D66191B595E0066F8DF /* UISceneManager.cpp */, + 29080D67191B595E0066F8DF /* UISceneManager.h */, + 29080D68191B595E0066F8DF /* UISceneManager_Editor.cpp */, + 29080D69191B595E0066F8DF /* UISceneManager_Editor.h */, + 29080D6A191B595E0066F8DF /* UIScrollViewTest */, + 29080D6F191B595E0066F8DF /* UISliderTest */, + 29080D74191B595E0066F8DF /* UITextAtlasTest */, + 29080D79191B595E0066F8DF /* UITextBMFontTest */, + 29080D7E191B595E0066F8DF /* UITextFieldTest */, + 29080D83191B595E0066F8DF /* UITextTest */, + 29080D88191B595E0066F8DF /* UIWidgetAddNodeTest */, + ); + name = CocoStudioGUITest; + path = UITest/CocoStudioGUITest; + sourceTree = ""; + }; + 29080D25191B595E0066F8DF /* CustomTest */ = { + isa = PBXGroup; + children = ( + 29080D26191B595E0066F8DF /* CustomImageTest */, + 29080D29191B595E0066F8DF /* CustomParticleWidgetTest */, + ); + path = CustomTest; + sourceTree = ""; + }; + 29080D26191B595E0066F8DF /* CustomImageTest */ = { + isa = PBXGroup; + children = ( + 29080D27191B595E0066F8DF /* CustomImageTest.cpp */, + 29080D28191B595E0066F8DF /* CustomImageTest.h */, + ); + path = CustomImageTest; + sourceTree = ""; + }; + 29080D29191B595E0066F8DF /* CustomParticleWidgetTest */ = { + isa = PBXGroup; + children = ( + 29080D2A191B595E0066F8DF /* CustomParticleWidgetTest.cpp */, + 29080D2B191B595E0066F8DF /* CustomParticleWidgetTest.h */, + ); + path = CustomParticleWidgetTest; + sourceTree = ""; + }; + 29080D2C191B595E0066F8DF /* CustomWidget */ = { + isa = PBXGroup; + children = ( + 29080D2D191B595E0066F8DF /* CustomImageView.cpp */, + 29080D2E191B595E0066F8DF /* CustomImageView.h */, + 29080D2F191B595E0066F8DF /* CustomImageViewReader.cpp */, + 29080D30191B595E0066F8DF /* CustomImageViewReader.h */, + 29080D31191B595E0066F8DF /* CustomParticleWidget.cpp */, + 29080D32191B595E0066F8DF /* CustomParticleWidget.h */, + 29080D33191B595E0066F8DF /* CustomParticleWidgetReader.cpp */, + 29080D34191B595E0066F8DF /* CustomParticleWidgetReader.h */, + 29080D35191B595E0066F8DF /* CustomReader.cpp */, + 29080D36191B595E0066F8DF /* CustomReader.h */, + ); + path = CustomWidget; + sourceTree = ""; + }; + 29080D39191B595E0066F8DF /* UIButtonTest */ = { + isa = PBXGroup; + children = ( + 29080D3A191B595E0066F8DF /* UIButtonTest.cpp */, + 29080D3B191B595E0066F8DF /* UIButtonTest.h */, + 29080D3C191B595E0066F8DF /* UIButtonTest_Editor.cpp */, + 29080D3D191B595E0066F8DF /* UIButtonTest_Editor.h */, + ); + path = UIButtonTest; + sourceTree = ""; + }; + 29080D3E191B595E0066F8DF /* UICheckBoxTest */ = { + isa = PBXGroup; + children = ( + 29080D3F191B595E0066F8DF /* UICheckBoxTest.cpp */, + 29080D40191B595E0066F8DF /* UICheckBoxTest.h */, + 29080D41191B595E0066F8DF /* UICheckBoxTest_Editor.cpp */, + 29080D42191B595E0066F8DF /* UICheckBoxTest_Editor.h */, + ); + path = UICheckBoxTest; + sourceTree = ""; + }; + 29080D43191B595E0066F8DF /* UIFocusTest */ = { + isa = PBXGroup; + children = ( + 29080D44191B595E0066F8DF /* UIFocusTest.cpp */, + 29080D45191B595E0066F8DF /* UIFocusTest.h */, + ); + path = UIFocusTest; + sourceTree = ""; + }; + 29080D46191B595E0066F8DF /* UIImageViewTest */ = { + isa = PBXGroup; + children = ( + 29080D47191B595E0066F8DF /* UIImageViewTest.cpp */, + 29080D48191B595E0066F8DF /* UIImageViewTest.h */, + 29080D49191B595E0066F8DF /* UIImageViewTest_Editor.cpp */, + 29080D4A191B595E0066F8DF /* UIImageViewTest_Editor.h */, + ); + path = UIImageViewTest; + sourceTree = ""; + }; + 29080D4B191B595E0066F8DF /* UILayoutTest */ = { + isa = PBXGroup; + children = ( + 29080D4C191B595E0066F8DF /* UILayoutTest.cpp */, + 29080D4D191B595E0066F8DF /* UILayoutTest.h */, + 29080D4E191B595E0066F8DF /* UILayoutTest_Editor.cpp */, + 29080D4F191B595E0066F8DF /* UILayoutTest_Editor.h */, + ); + path = UILayoutTest; + sourceTree = ""; + }; + 29080D50191B595E0066F8DF /* UIListViewTest */ = { + isa = PBXGroup; + children = ( + 29080D51191B595E0066F8DF /* UIListViewTest.cpp */, + 29080D52191B595E0066F8DF /* UIListViewTest.h */, + 29080D53191B595E0066F8DF /* UIListViewTest_Editor.cpp */, + 29080D54191B595E0066F8DF /* UIListViewTest_Editor.h */, + ); + path = UIListViewTest; + sourceTree = ""; + }; + 29080D55191B595E0066F8DF /* UILoadingBarTest */ = { + isa = PBXGroup; + children = ( + 29080D56191B595E0066F8DF /* UILoadingBarTest.cpp */, + 29080D57191B595E0066F8DF /* UILoadingBarTest.h */, + 29080D58191B595E0066F8DF /* UILoadingBarTest_Editor.cpp */, + 29080D59191B595E0066F8DF /* UILoadingBarTest_Editor.h */, + ); + path = UILoadingBarTest; + sourceTree = ""; + }; + 29080D5A191B595E0066F8DF /* UIPageViewTest */ = { + isa = PBXGroup; + children = ( + 29080D5B191B595E0066F8DF /* UIPageViewTest.cpp */, + 29080D5C191B595E0066F8DF /* UIPageViewTest.h */, + 29080D5D191B595E0066F8DF /* UIPageViewTest_Editor.cpp */, + 29080D5E191B595E0066F8DF /* UIPageViewTest_Editor.h */, + ); + path = UIPageViewTest; + sourceTree = ""; + }; + 29080D5F191B595E0066F8DF /* UIRichTextTest */ = { + isa = PBXGroup; + children = ( + 29080D60191B595E0066F8DF /* UIRichTextTest.cpp */, + 29080D61191B595E0066F8DF /* UIRichTextTest.h */, + ); + path = UIRichTextTest; + sourceTree = ""; + }; + 29080D6A191B595E0066F8DF /* UIScrollViewTest */ = { + isa = PBXGroup; + children = ( + 29080D6B191B595E0066F8DF /* UIScrollViewTest.cpp */, + 29080D6C191B595E0066F8DF /* UIScrollViewTest.h */, + 29080D6D191B595E0066F8DF /* UIScrollViewTest_Editor.cpp */, + 29080D6E191B595E0066F8DF /* UIScrollViewTest_Editor.h */, + ); + path = UIScrollViewTest; + sourceTree = ""; + }; + 29080D6F191B595E0066F8DF /* UISliderTest */ = { + isa = PBXGroup; + children = ( + 29080D70191B595E0066F8DF /* UISliderTest.cpp */, + 29080D71191B595E0066F8DF /* UISliderTest.h */, + 29080D72191B595E0066F8DF /* UISliderTest_Editor.cpp */, + 29080D73191B595E0066F8DF /* UISliderTest_Editor.h */, + ); + path = UISliderTest; + sourceTree = ""; + }; + 29080D74191B595E0066F8DF /* UITextAtlasTest */ = { + isa = PBXGroup; + children = ( + 29080D75191B595E0066F8DF /* UITextAtlasTest.cpp */, + 29080D76191B595E0066F8DF /* UITextAtlasTest.h */, + 29080D77191B595E0066F8DF /* UITextAtlasTest_Editor.cpp */, + 29080D78191B595E0066F8DF /* UITextAtlasTest_Editor.h */, + ); + path = UITextAtlasTest; + sourceTree = ""; + }; + 29080D79191B595E0066F8DF /* UITextBMFontTest */ = { + isa = PBXGroup; + children = ( + 29080D7A191B595E0066F8DF /* UITextBMFontTest.cpp */, + 29080D7B191B595E0066F8DF /* UITextBMFontTest.h */, + 29080D7C191B595E0066F8DF /* UITextBMFontTest_Editor.cpp */, + 29080D7D191B595E0066F8DF /* UITextBMFontTest_Editor.h */, + ); + path = UITextBMFontTest; + sourceTree = ""; + }; + 29080D7E191B595E0066F8DF /* UITextFieldTest */ = { + isa = PBXGroup; + children = ( + 29080D7F191B595E0066F8DF /* UITextFieldTest.cpp */, + 29080D80191B595E0066F8DF /* UITextFieldTest.h */, + 29080D81191B595E0066F8DF /* UITextFieldTest_Editor.cpp */, + 29080D82191B595E0066F8DF /* UITextFieldTest_Editor.h */, + ); + path = UITextFieldTest; + sourceTree = ""; + }; + 29080D83191B595E0066F8DF /* UITextTest */ = { + isa = PBXGroup; + children = ( + 29080D84191B595E0066F8DF /* UITextTest.cpp */, + 29080D85191B595E0066F8DF /* UITextTest.h */, + 29080D86191B595E0066F8DF /* UITextTest_Editor.cpp */, + 29080D87191B595E0066F8DF /* UITextTest_Editor.h */, + ); + path = UITextTest; + sourceTree = ""; + }; + 29080D88191B595E0066F8DF /* UIWidgetAddNodeTest */ = { + isa = PBXGroup; + children = ( + 29080D89191B595E0066F8DF /* UIWidgetAddNodeTest.cpp */, + 29080D8A191B595E0066F8DF /* UIWidgetAddNodeTest.h */, + 29080D8B191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp */, + 29080D8C191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.h */, + ); + path = UIWidgetAddNodeTest; + sourceTree = ""; + }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( @@ -3702,6 +3743,7 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */, 1ABCA3AF18CDA06D0087CE3A /* libz.dylib */, 1ABCA3A818CD9F130087CE3A /* AudioToolbox.framework */, 1ABCA3A618CD9F0D0087CE3A /* OpenAL.framework */, @@ -3738,6 +3780,15 @@ name = Frameworks; sourceTree = ""; }; + 3EA0FB61191B931500B170C8 /* UIVideoWidgetTest */ = { + isa = PBXGroup; + children = ( + 3EA0FB62191B931500B170C8 /* UIVideoWidgetTest.cpp */, + 3EA0FB63191B931500B170C8 /* UIVideoWidgetTest.h */, + ); + path = UIVideoWidgetTest; + sourceTree = ""; + }; 46A15F9D1807A4F8005B8026 /* Products */ = { isa = PBXGroup; children = ( @@ -4228,6 +4279,7 @@ 1AC35DDF18CEE65900F37B72 /* music.mid in Resources */, 1AC35D7518CEE58500F37B72 /* src in Resources */, 1AC35DE018CEE65900F37B72 /* background.mp3 in Resources */, + 1A1645A6191B6281008C7C7F /* ccs-res in Resources */, C08689C218D370C90093E810 /* background.caf in Resources */, 15C90B4918E66C2A00D69802 /* tp.lua in Resources */, 1AC35DE918CEE65900F37B72 /* effect1.wav in Resources */, @@ -4313,6 +4365,7 @@ 1AC35DEB18CEE65B00F37B72 /* CocosBuilderExample.ccbproj in Resources */, 1AC35DF518CEE65B00F37B72 /* commonly_used_words.txt in Resources */, 1AC35DCA18CEE65200F37B72 /* animations in Resources */, + 1A1645A9191B6283008C7C7F /* ccs-res in Resources */, 1AC35DA118CEE5D100F37B72 /* Icon-72.png in Resources */, 15C90B4018E66C0D00D69802 /* ltn12.lua in Resources */, 1AC35DA218CEE5D100F37B72 /* Icon-76.png in Resources */, @@ -4407,6 +4460,7 @@ 1AC35D0518CED84500F37B72 /* Shaders in Resources */, 1AC35CD318CED84500F37B72 /* background.ogg in Resources */, 1AC35CCB18CED84500F37B72 /* animations in Resources */, + 3EA0FB5E191B92F100B170C8 /* cocosvideo.mp4 in Resources */, 1AC35C8C18CECF1400F37B72 /* Icon-114.png in Resources */, 1AC35CF118CED84500F37B72 /* hd in Resources */, 1AC35C9318CECF1400F37B72 /* Icon-57.png in Resources */, @@ -4503,163 +4557,163 @@ buildActionMask = 2147483647; files = ( 1AC35B3118CECF0C00F37B72 /* GLES-Render.cpp in Sources */, - 1AC35B8F18CECF0C00F37B72 /* CustomImageViewReader.cpp in Sources */, + 29080DE1191B595E0066F8DF /* UITextTest_Editor.cpp in Sources */, 1AC35C5318CECF0C00F37B72 /* TextInputTest.cpp in Sources */, 1AC35B4518CECF0C00F37B72 /* Bug-886.cpp in Sources */, + 29080DCB191B595E0066F8DF /* UIScrollViewTest.cpp in Sources */, 1AC35BE118CECF0C00F37B72 /* CCControlButtonTest.cpp in Sources */, 1AC35BEB18CECF0C00F37B72 /* CCControlSliderTest.cpp in Sources */, 1AC35C4D18CECF0C00F37B72 /* SpineTest.cpp in Sources */, 1AC35C1D18CECF0C00F37B72 /* NewRendererTest.cpp in Sources */, 1AC35B6718CECF0C00F37B72 /* AnimationsTestLayer.cpp in Sources */, - 1AC35B8518CECF0C00F37B72 /* CocoStudioGUITest.cpp in Sources */, + 29080DB7191B595E0066F8DF /* UIListViewTest_Editor.cpp in Sources */, 1AC35BF918CECF0C00F37B72 /* WebSocketTest.cpp in Sources */, 1AC35BF118CECF0C00F37B72 /* EditBoxTest.cpp in Sources */, 1AC35B3918CECF0C00F37B72 /* Bug-1174.cpp in Sources */, 1AC35B1F18CECF0C00F37B72 /* AccelerometerTest.cpp in Sources */, 1AC35BE318CECF0C00F37B72 /* CCControlColourPickerTest.cpp in Sources */, - 1AC35BBD18CECF0C00F37B72 /* UISceneManager_Editor.cpp in Sources */, + 29080DB1191B595E0066F8DF /* UILayoutTest.cpp in Sources */, 1AC35B2318CECF0C00F37B72 /* ActionsEaseTest.cpp in Sources */, + 29080DE5191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp in Sources */, 1AC35C1918CECF0C00F37B72 /* MutiTouchTest.cpp in Sources */, - 1AC35B9D18CECF0C00F37B72 /* UICheckBoxTest.cpp in Sources */, + 29080DBD191B595E0066F8DF /* UIPageViewTest.cpp in Sources */, 1AC35B2918CECF0C00F37B72 /* AppDelegate.cpp in Sources */, - 1AC35BB318CECF0C00F37B72 /* UIPageViewTest_Editor.cpp in Sources */, - 1AC35BBF18CECF0C00F37B72 /* UIScrollViewTest.cpp in Sources */, - 1AC35BC318CECF0C00F37B72 /* UISliderTest.cpp in Sources */, + 29080DA1191B595E0066F8DF /* GUIEditorTest.cpp in Sources */, 1AC35B3718CECF0C00F37B72 /* Bug-1159.cpp in Sources */, - 1AC35B9318CECF0C00F37B72 /* CustomParticleWidgetReader.cpp in Sources */, + 29080D1C191B574B0066F8DF /* UITest.cpp in Sources */, 1AC35C3118CECF0C00F37B72 /* PerformanceRendererTest.cpp in Sources */, 1AC35C4518CECF0C00F37B72 /* SceneTest.cpp in Sources */, - 1AC35B9118CECF0C00F37B72 /* CustomParticleWidget.cpp in Sources */, 1AC35B6F18CECF0C00F37B72 /* MenuTestLayer.cpp in Sources */, + 29080DCD191B595E0066F8DF /* UIScrollViewTest_Editor.cpp in Sources */, 1AC35B5118CECF0C00F37B72 /* ClippingNodeTest.cpp in Sources */, 1AC35C1318CECF0C00F37B72 /* LayerTest.cpp in Sources */, + 29080D97191B595E0066F8DF /* CustomImageView.cpp in Sources */, 1AC35C1F18CECF0C00F37B72 /* NodeTest.cpp in Sources */, + 29080D95191B595E0066F8DF /* CustomParticleWidgetTest.cpp in Sources */, 1AC35C4118CECF0C00F37B72 /* RenderTextureTest.cpp in Sources */, - 1AC35BC518CECF0C00F37B72 /* UISliderTest_Editor.cpp in Sources */, + 29080DE3191B595E0066F8DF /* UIWidgetAddNodeTest.cpp in Sources */, + 29080DBB191B595E0066F8DF /* UILoadingBarTest_Editor.cpp in Sources */, 1AC35C1518CECF0C00F37B72 /* MenuTest.cpp in Sources */, 1AC35C6718CECF0C00F37B72 /* UserDefaultTest.cpp in Sources */, 1AC35C2118CECF0C00F37B72 /* ParallaxTest.cpp in Sources */, 1AC35C6B18CECF0C00F37B72 /* ZwoptexTest.cpp in Sources */, - 1AC35BD918CECF0C00F37B72 /* UIWidgetAddNodeTest_Editor.cpp in Sources */, 1AC35B7718CECF0C00F37B72 /* ComponentsTestScene.cpp in Sources */, - 1AC35BA918CECF0C00F37B72 /* UIListViewTest.cpp in Sources */, - 1AC35BD718CECF0C00F37B72 /* UIWidgetAddNodeTest.cpp in Sources */, - 1AC35B9518CECF0C00F37B72 /* CustomReader.cpp in Sources */, - 1AC35BD518CECF0C00F37B72 /* UITextTest_Editor.cpp in Sources */, - 1AC35BCB18CECF0C00F37B72 /* UITextBMFontTest.cpp in Sources */, + 29080DC7191B595E0066F8DF /* UISceneManager.cpp in Sources */, 1AC35C2F18CECF0C00F37B72 /* PerformanceParticleTest.cpp in Sources */, - 1AC35BA518CECF0C00F37B72 /* UILayoutTest.cpp in Sources */, 1AC35B4918CECF0C00F37B72 /* Bug-914.cpp in Sources */, - 1AC35BC718CECF0C00F37B72 /* UITextAtlasTest.cpp in Sources */, 1AC35B6318CECF0C00F37B72 /* EffectsAdvancedTest.cpp in Sources */, 1AC35C5F18CECF0C00F37B72 /* Paddle.cpp in Sources */, 1AC35BDB18CECF0C00F37B72 /* SceneEditorTest.cpp in Sources */, - 1AC35B8718CECF0C00F37B72 /* CustomGUIScene.cpp in Sources */, 1AC35B4B18CECF0C00F37B72 /* BugsTest.cpp in Sources */, 1AC35C5118CECF0C00F37B72 /* testBasic.cpp in Sources */, 1AC35B7918CECF0C00F37B72 /* EnemyController.cpp in Sources */, 1AC35B6B18CECF0C00F37B72 /* CocosBuilderTest.cpp in Sources */, 1AC35B4118CECF0C00F37B72 /* QuestionContainerSprite.cpp in Sources */, - 1AC35BB918CECF0C00F37B72 /* UIScene_Editor.cpp in Sources */, 1AC35B6118CECF0C00F37B72 /* DrawPrimitivesTest.cpp in Sources */, 1AC35C1718CECF0C00F37B72 /* MotionStreakTest.cpp in Sources */, 1AC35C0518CECF0C00F37B72 /* FontTest.cpp in Sources */, 1AC35C3718CECF0C00F37B72 /* PerformanceTest.cpp in Sources */, + 29080D99191B595E0066F8DF /* CustomImageViewReader.cpp in Sources */, + 29080DD1191B595E0066F8DF /* UISliderTest_Editor.cpp in Sources */, 1AC35B2718CECF0C00F37B72 /* ActionsTest.cpp in Sources */, 1AC35C4918CECF0C00F37B72 /* ShaderTest.cpp in Sources */, 1AC35BFD18CECF0C00F37B72 /* Scale9SpriteTest.cpp in Sources */, 1AC35B4318CECF0C00F37B72 /* Bug-624.cpp in Sources */, 1AC35BF718CECF0C00F37B72 /* SocketIOTest.cpp in Sources */, 1AC35C4F18CECF0C00F37B72 /* SpriteTest.cpp in Sources */, + 29080D9D191B595E0066F8DF /* CustomParticleWidgetReader.cpp in Sources */, 1AC35C0318CECF0C00F37B72 /* FileUtilsTest.cpp in Sources */, 1AC35B5B18CECF0C00F37B72 /* CurlTest.cpp in Sources */, + 29080DD5191B595E0066F8DF /* UITextAtlasTest_Editor.cpp in Sources */, 1AC35BFF18CECF0C00F37B72 /* CustomTableViewCell.cpp in Sources */, + 29080DDF191B595E0066F8DF /* UITextTest.cpp in Sources */, 1AC35C2718CECF0C00F37B72 /* PerformanceContainerTest.cpp in Sources */, 1AC35BEF18CECF0C00F37B72 /* CCControlSwitchTest.cpp in Sources */, + 29080D91191B595E0066F8DF /* CustomGUIScene.cpp in Sources */, 1AC35C0D18CECF0C00F37B72 /* KeypadTest.cpp in Sources */, - 1AC35BAD18CECF0C00F37B72 /* UILoadingBarTest.cpp in Sources */, + 29080DC1191B595E0066F8DF /* UIRichTextTest.cpp in Sources */, 1AC35B2B18CECF0C00F37B72 /* BaseTest.cpp in Sources */, 1AC35B7D18CECF0C00F37B72 /* PlayerController.cpp in Sources */, - 1AC35BB718CECF0C00F37B72 /* UIScene.cpp in Sources */, + 29080D9F191B595E0066F8DF /* CustomReader.cpp in Sources */, 1AC35BE718CECF0C00F37B72 /* CCControlScene.cpp in Sources */, + 29080DBF191B595E0066F8DF /* UIPageViewTest_Editor.cpp in Sources */, 1AC35B5F18CECF0C00F37B72 /* DataVisitorTest.cpp in Sources */, 1AC35B5D18CECF0C00F37B72 /* CurrentLanguageTest.cpp in Sources */, 1AC35B3B18CECF0C00F37B72 /* Bug-350.cpp in Sources */, 1AC35C4718CECF0C00F37B72 /* SchedulerTest.cpp in Sources */, 1AF152D918FD252A00A52F3D /* PerformanceCallbackTest.cpp in Sources */, + 29080DA3191B595E0066F8DF /* UIButtonTest.cpp in Sources */, 1AC35C5518CECF0C00F37B72 /* Texture2dTest.cpp in Sources */, 1AC35C0718CECF0C00F37B72 /* MouseTest.cpp in Sources */, - 1AC35BA718CECF0C00F37B72 /* UILayoutTest_Editor.cpp in Sources */, 1AC35C5D18CECF0C00F37B72 /* Ball.cpp in Sources */, 1AC35B7B18CECF0C00F37B72 /* GameOverScene.cpp in Sources */, - 1AC35BA118CECF0C00F37B72 /* UIImageViewTest.cpp in Sources */, 1AC35BF318CECF0C00F37B72 /* ExtensionsTest.cpp in Sources */, - 1AC35BC118CECF0C00F37B72 /* UIScrollViewTest_Editor.cpp in Sources */, - 1AC35BB118CECF0C00F37B72 /* UIPageViewTest.cpp in Sources */, 1AC35B3518CECF0C00F37B72 /* TestEntries.cpp in Sources */, 1AC35B2D18CECF0C00F37B72 /* Box2dTest.cpp in Sources */, + 29080DDB191B595E0066F8DF /* UITextFieldTest.cpp in Sources */, 1AC35C1118CECF0C00F37B72 /* LabelTestNew.cpp in Sources */, 1AC35B4D18CECF0C00F37B72 /* ChipmunkTest.cpp in Sources */, - 1AC35BBB18CECF0C00F37B72 /* UISceneManager.cpp in Sources */, - 1AC35BD318CECF0C00F37B72 /* UITextTest.cpp in Sources */, - 1AC35BD118CECF0C00F37B72 /* UITextFieldTest_Editor.cpp in Sources */, 1AC35BDF18CECF0C00F37B72 /* cons.cpp in Sources */, 1AC35B5718CECF0C00F37B72 /* ConsoleTest.cpp in Sources */, + 29080DA7191B595E0066F8DF /* UICheckBoxTest.cpp in Sources */, + 29080DDD191B595E0066F8DF /* UITextFieldTest_Editor.cpp in Sources */, 1AC35C0918CECF0C00F37B72 /* IntervalTest.cpp in Sources */, - 1AC35BAF18CECF0C00F37B72 /* UILoadingBarTest_Editor.cpp in Sources */, + 29080DA5191B595E0066F8DF /* UIButtonTest_Editor.cpp in Sources */, + 29080DC3191B595E0066F8DF /* UIScene.cpp in Sources */, + 29080D9B191B595E0066F8DF /* CustomParticleWidget.cpp in Sources */, + 29080D8D191B595E0066F8DF /* CocosGUIScene.cpp in Sources */, 1AC35BED18CECF0C00F37B72 /* CCControlStepperTest.cpp in Sources */, 1AC35C3318CECF0C00F37B72 /* PerformanceScenarioTest.cpp in Sources */, 1AC35C5918CECF0C00F37B72 /* TextureAtlasEncryptionTest.cpp in Sources */, + 29080DA9191B595E0066F8DF /* UICheckBoxTest_Editor.cpp in Sources */, 1AC35B5518CECF0C00F37B72 /* ConfigurationTest.cpp in Sources */, - 1AC35B9718CECF0C00F37B72 /* GUIEditorTest.cpp in Sources */, - 1AC35B9F18CECF0C00F37B72 /* UICheckBoxTest_Editor.cpp in Sources */, - 1AC35BAB18CECF0C00F37B72 /* UIListViewTest_Editor.cpp in Sources */, 1AC35BE518CECF0C00F37B72 /* CCControlPotentiometerTest.cpp in Sources */, 1AC35C5B18CECF0C00F37B72 /* TileMapTest.cpp in Sources */, 1AC35B4718CECF0C00F37B72 /* Bug-899.cpp in Sources */, 1AC35C1B18CECF0C00F37B72 /* NewEventDispatcherTest.cpp in Sources */, - 1AC35B8318CECF0C00F37B72 /* CocosGUIScene.cpp in Sources */, 1AC35C2D18CECF0C00F37B72 /* PerformanceNodeChildrenTest.cpp in Sources */, + 29080DC5191B595E0066F8DF /* UIScene_Editor.cpp in Sources */, 1AC35BDD18CECF0C00F37B72 /* acts.cpp in Sources */, 1AC35B7518CECF0C00F37B72 /* ArmatureScene.cpp in Sources */, - 1AC35B8D18CECF0C00F37B72 /* CustomImageView.cpp in Sources */, 1AC35B8118CECF0C00F37B72 /* SceneController.cpp in Sources */, 1AC35B3318CECF0C00F37B72 /* Test.cpp in Sources */, 1AC35C2318CECF0C00F37B72 /* ParticleTest.cpp in Sources */, 1AC35C6118CECF0C00F37B72 /* TouchesTest.cpp in Sources */, 1AC35C6318CECF0C00F37B72 /* TransitionsTest.cpp in Sources */, + 29080DB3191B595E0066F8DF /* UILayoutTest_Editor.cpp in Sources */, + 29080DB9191B595E0066F8DF /* UILoadingBarTest.cpp in Sources */, + 29080DAF191B595E0066F8DF /* UIImageViewTest_Editor.cpp in Sources */, 1AC35C4318CECF0C00F37B72 /* RotateWorldTest.cpp in Sources */, + 29080DD7191B595E0066F8DF /* UITextBMFontTest.cpp in Sources */, 1AC35B2518CECF0C00F37B72 /* ActionsProgressTest.cpp in Sources */, 1AC35B6518CECF0C00F37B72 /* EffectsTest.cpp in Sources */, 1AC35B7118CECF0C00F37B72 /* TestHeaderLayer.cpp in Sources */, + 29080D93191B595E0066F8DF /* CustomImageTest.cpp in Sources */, 1AC35B2118CECF0C00F37B72 /* ActionManagerTest.cpp in Sources */, - 1AC35BA318CECF0C00F37B72 /* UIImageViewTest_Editor.cpp in Sources */, - 1AC35BCF18CECF0C00F37B72 /* UITextFieldTest.cpp in Sources */, - 1AC35B9B18CECF0C00F37B72 /* UIButtonTest_Editor.cpp in Sources */, 1AC35C3D18CECF0C00F37B72 /* PhysicsTest.cpp in Sources */, + 29080DAD191B595E0066F8DF /* UIImageViewTest.cpp in Sources */, 1AC35B6918CECF0C00F37B72 /* ButtonTestLayer.cpp in Sources */, 1AC35B2F18CECF0C00F37B72 /* Box2dView.cpp in Sources */, 1AC35C0F18CECF0C00F37B72 /* LabelTest.cpp in Sources */, - 1AC35BB518CECF0C00F37B72 /* UIRichTextTest.cpp in Sources */, - 1AC35BCD18CECF0C00F37B72 /* UITextBMFontTest_Editor.cpp in Sources */, 1AC35C6918CECF0C00F37B72 /* VisibleRect.cpp in Sources */, 1F33634F18E37E840074764D /* RefPtrTest.cpp in Sources */, 1AC35C3F18CECF0C00F37B72 /* ReleasePoolTest.cpp in Sources */, 1AC35C5718CECF0C00F37B72 /* TextureCacheTest.cpp in Sources */, 1AC35B6D18CECF0C00F37B72 /* HelloCocosBuilderLayer.cpp in Sources */, 1AC35C2B18CECF0C00F37B72 /* PerformanceLabelTest.cpp in Sources */, - 1AC35B8B18CECF0C00F37B72 /* CustomParticleWidgetTest.cpp in Sources */, 1AC35C0118CECF0C00F37B72 /* TableViewTestScene.cpp in Sources */, - 1AC35B8918CECF0C00F37B72 /* CustomImageTest.cpp in Sources */, 1AC35C4B18CECF0C00F37B72 /* ShaderTest2.cpp in Sources */, 1AC35C6518CECF0C00F37B72 /* UnitTest.cpp in Sources */, + 29080DC9191B595E0066F8DF /* UISceneManager_Editor.cpp in Sources */, 1AC35B3F18CECF0C00F37B72 /* Bug-458.cpp in Sources */, 1AC35C3918CECF0C00F37B72 /* PerformanceTextureTest.cpp in Sources */, - 1AC35B9918CECF0C00F37B72 /* UIButtonTest.cpp in Sources */, 1AC35B5318CECF0C00F37B72 /* CocosDenshionTest.cpp in Sources */, + 29080DD3191B595E0066F8DF /* UITextAtlasTest.cpp in Sources */, 1AC35B7F18CECF0C00F37B72 /* ProjectileController.cpp in Sources */, + 29080DB5191B595E0066F8DF /* UIListViewTest.cpp in Sources */, 1AC35C2518CECF0C00F37B72 /* PerformanceAllocTest.cpp in Sources */, - 1AC35BC918CECF0C00F37B72 /* UITextAtlasTest_Editor.cpp in Sources */, + 29080DAB191B595E0066F8DF /* UIFocusTest.cpp in Sources */, + 29080DD9191B595E0066F8DF /* UITextBMFontTest_Editor.cpp in Sources */, 1AC35B5918CECF0C00F37B72 /* controller.cpp in Sources */, 1AC35C2918CECF0C00F37B72 /* PerformanceEventDispatcherTest.cpp in Sources */, 1AC35CA618CECF1E00F37B72 /* main.cpp in Sources */, @@ -4668,10 +4722,12 @@ 1AC35BFB18CECF0C00F37B72 /* NotificationCenterTest.cpp in Sources */, 1AC35C3518CECF0C00F37B72 /* PerformanceSpriteTest.cpp in Sources */, 1AC35C3B18CECF0C00F37B72 /* PerformanceTouchesTest.cpp in Sources */, + 29080D8F191B595E0066F8DF /* CocoStudioGUITest.cpp in Sources */, 1AC35B3D18CECF0C00F37B72 /* Bug-422.cpp in Sources */, 1AC35C0B18CECF0C00F37B72 /* KeyboardTest.cpp in Sources */, 1AC35BF518CECF0C00F37B72 /* HttpClientTest.cpp in Sources */, 1AC35B4F18CECF0C00F37B72 /* ClickAndMoveTest.cpp in Sources */, + 29080DCF191B595E0066F8DF /* UISliderTest.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4680,67 +4736,66 @@ buildActionMask = 2147483647; files = ( 1AC35B3218CECF0C00F37B72 /* GLES-Render.cpp in Sources */, - 1AC35B9018CECF0C00F37B72 /* CustomImageViewReader.cpp in Sources */, 1AC35C5418CECF0C00F37B72 /* TextInputTest.cpp in Sources */, 1AC35B4618CECF0C00F37B72 /* Bug-886.cpp in Sources */, 1AC35BE218CECF0C00F37B72 /* CCControlButtonTest.cpp in Sources */, 1AC35BEC18CECF0C00F37B72 /* CCControlSliderTest.cpp in Sources */, + 29080DB4191B595E0066F8DF /* UILayoutTest_Editor.cpp in Sources */, 1AC35C4E18CECF0C00F37B72 /* SpineTest.cpp in Sources */, 1AC35C1E18CECF0C00F37B72 /* NewRendererTest.cpp in Sources */, 1AC35B6818CECF0C00F37B72 /* AnimationsTestLayer.cpp in Sources */, - 1AC35B8618CECF0C00F37B72 /* CocoStudioGUITest.cpp in Sources */, + 29080D8E191B595E0066F8DF /* CocosGUIScene.cpp in Sources */, 1AC35BFA18CECF0C00F37B72 /* WebSocketTest.cpp in Sources */, 1AC35BF218CECF0C00F37B72 /* EditBoxTest.cpp in Sources */, 1AC35B3A18CECF0C00F37B72 /* Bug-1174.cpp in Sources */, 1AC35B2018CECF0C00F37B72 /* AccelerometerTest.cpp in Sources */, 1AC35BE418CECF0C00F37B72 /* CCControlColourPickerTest.cpp in Sources */, - 1AC35BBE18CECF0C00F37B72 /* UISceneManager_Editor.cpp in Sources */, + 29080DD4191B595E0066F8DF /* UITextAtlasTest.cpp in Sources */, 1AC35B2418CECF0C00F37B72 /* ActionsEaseTest.cpp in Sources */, 1AC35C1A18CECF0C00F37B72 /* MutiTouchTest.cpp in Sources */, + 29080DB8191B595E0066F8DF /* UIListViewTest_Editor.cpp in Sources */, + 29080DBC191B595E0066F8DF /* UILoadingBarTest_Editor.cpp in Sources */, 1AC35C8718CECF1400F37B72 /* testsAppDelegate.mm in Sources */, - 1AC35B9E18CECF0C00F37B72 /* UICheckBoxTest.cpp in Sources */, + 29080D98191B595E0066F8DF /* CustomImageView.cpp in Sources */, 1AC35B2A18CECF0C00F37B72 /* AppDelegate.cpp in Sources */, - 1AC35BB418CECF0C00F37B72 /* UIPageViewTest_Editor.cpp in Sources */, - 1AC35BC018CECF0C00F37B72 /* UIScrollViewTest.cpp in Sources */, - 1AC35BC418CECF0C00F37B72 /* UISliderTest.cpp in Sources */, 1AC35B3818CECF0C00F37B72 /* Bug-1159.cpp in Sources */, - 1AC35B9418CECF0C00F37B72 /* CustomParticleWidgetReader.cpp in Sources */, + 29080DBA191B595E0066F8DF /* UILoadingBarTest.cpp in Sources */, + 29080D9C191B595E0066F8DF /* CustomParticleWidget.cpp in Sources */, 1AC35C3218CECF0C00F37B72 /* PerformanceRendererTest.cpp in Sources */, 1AC35C4618CECF0C00F37B72 /* SceneTest.cpp in Sources */, - 1AC35B9218CECF0C00F37B72 /* CustomParticleWidget.cpp in Sources */, + 29080D9A191B595E0066F8DF /* CustomImageViewReader.cpp in Sources */, + 29080DD6191B595E0066F8DF /* UITextAtlasTest_Editor.cpp in Sources */, 1AC35B7018CECF0C00F37B72 /* MenuTestLayer.cpp in Sources */, 1AC35B5218CECF0C00F37B72 /* ClippingNodeTest.cpp in Sources */, 1AC35C1418CECF0C00F37B72 /* LayerTest.cpp in Sources */, + 29080DD8191B595E0066F8DF /* UITextBMFontTest.cpp in Sources */, 1AC35C2018CECF0C00F37B72 /* NodeTest.cpp in Sources */, + 29080DE4191B595E0066F8DF /* UIWidgetAddNodeTest.cpp in Sources */, 1AC35C4218CECF0C00F37B72 /* RenderTextureTest.cpp in Sources */, - 1AC35BC618CECF0C00F37B72 /* UISliderTest_Editor.cpp in Sources */, 1AC35C1618CECF0C00F37B72 /* MenuTest.cpp in Sources */, 1AC35C6818CECF0C00F37B72 /* UserDefaultTest.cpp in Sources */, + 29080D1D191B574B0066F8DF /* UITest.cpp in Sources */, 1AF152DA18FD252A00A52F3D /* PerformanceCallbackTest.cpp in Sources */, + 29080DA0191B595E0066F8DF /* CustomReader.cpp in Sources */, 1AC35C2218CECF0C00F37B72 /* ParallaxTest.cpp in Sources */, 1AC35C6C18CECF0C00F37B72 /* ZwoptexTest.cpp in Sources */, - 1AC35BDA18CECF0C00F37B72 /* UIWidgetAddNodeTest_Editor.cpp in Sources */, 1AC35B7818CECF0C00F37B72 /* ComponentsTestScene.cpp in Sources */, - 1AC35BAA18CECF0C00F37B72 /* UIListViewTest.cpp in Sources */, - 1AC35BD818CECF0C00F37B72 /* UIWidgetAddNodeTest.cpp in Sources */, - 1AC35B9618CECF0C00F37B72 /* CustomReader.cpp in Sources */, - 1AC35BD618CECF0C00F37B72 /* UITextTest_Editor.cpp in Sources */, - 1AC35BCC18CECF0C00F37B72 /* UITextBMFontTest.cpp in Sources */, 1AC35C3018CECF0C00F37B72 /* PerformanceParticleTest.cpp in Sources */, - 1AC35BA618CECF0C00F37B72 /* UILayoutTest.cpp in Sources */, 1AC35B4A18CECF0C00F37B72 /* Bug-914.cpp in Sources */, - 1AC35BC818CECF0C00F37B72 /* UITextAtlasTest.cpp in Sources */, 1AC35B6418CECF0C00F37B72 /* EffectsAdvancedTest.cpp in Sources */, 1AC35C6018CECF0C00F37B72 /* Paddle.cpp in Sources */, + 29080DBE191B595E0066F8DF /* UIPageViewTest.cpp in Sources */, 1AC35BDC18CECF0C00F37B72 /* SceneEditorTest.cpp in Sources */, - 1AC35B8818CECF0C00F37B72 /* CustomGUIScene.cpp in Sources */, 1AC35B4C18CECF0C00F37B72 /* BugsTest.cpp in Sources */, 1AC35C5218CECF0C00F37B72 /* testBasic.cpp in Sources */, 1AC35B7A18CECF0C00F37B72 /* EnemyController.cpp in Sources */, + 29080DE6191B595E0066F8DF /* UIWidgetAddNodeTest_Editor.cpp in Sources */, 1AC35B6C18CECF0C00F37B72 /* CocosBuilderTest.cpp in Sources */, + 29080DDE191B595E0066F8DF /* UITextFieldTest_Editor.cpp in Sources */, 1AC35B4218CECF0C00F37B72 /* QuestionContainerSprite.cpp in Sources */, - 1AC35BBA18CECF0C00F37B72 /* UIScene_Editor.cpp in Sources */, 1AC35B6218CECF0C00F37B72 /* DrawPrimitivesTest.cpp in Sources */, + 29080DDC191B595E0066F8DF /* UITextFieldTest.cpp in Sources */, + 3EA0FB64191B931500B170C8 /* UIVideoWidgetTest.cpp in Sources */, 1AC35C1818CECF0C00F37B72 /* MotionStreakTest.cpp in Sources */, 1AC35C0618CECF0C00F37B72 /* FontTest.cpp in Sources */, 1AC35C3818CECF0C00F37B72 /* PerformanceTest.cpp in Sources */, @@ -4754,102 +4809,106 @@ 1AC35C0418CECF0C00F37B72 /* FileUtilsTest.cpp in Sources */, 1AC35B5C18CECF0C00F37B72 /* CurlTest.cpp in Sources */, 1AC35C0018CECF0C00F37B72 /* CustomTableViewCell.cpp in Sources */, + 29080D92191B595E0066F8DF /* CustomGUIScene.cpp in Sources */, 1AC35C2818CECF0C00F37B72 /* PerformanceContainerTest.cpp in Sources */, 1AC35BF018CECF0C00F37B72 /* CCControlSwitchTest.cpp in Sources */, 1AC35C0E18CECF0C00F37B72 /* KeypadTest.cpp in Sources */, - 1AC35BAE18CECF0C00F37B72 /* UILoadingBarTest.cpp in Sources */, 1AC35B2C18CECF0C00F37B72 /* BaseTest.cpp in Sources */, 1AC35B7E18CECF0C00F37B72 /* PlayerController.cpp in Sources */, - 1AC35BB818CECF0C00F37B72 /* UIScene.cpp in Sources */, 1AC35C9818CECF1400F37B72 /* main.m in Sources */, + 29080DCC191B595E0066F8DF /* UIScrollViewTest.cpp in Sources */, 1AC35BE818CECF0C00F37B72 /* CCControlScene.cpp in Sources */, + 29080DAA191B595E0066F8DF /* UICheckBoxTest_Editor.cpp in Sources */, 1AC35B6018CECF0C00F37B72 /* DataVisitorTest.cpp in Sources */, 1AC35B5E18CECF0C00F37B72 /* CurrentLanguageTest.cpp in Sources */, + 29080DE2191B595E0066F8DF /* UITextTest_Editor.cpp in Sources */, + 29080DA8191B595E0066F8DF /* UICheckBoxTest.cpp in Sources */, 1AC35B3C18CECF0C00F37B72 /* Bug-350.cpp in Sources */, + 29080DDA191B595E0066F8DF /* UITextBMFontTest_Editor.cpp in Sources */, 1AC35C4818CECF0C00F37B72 /* SchedulerTest.cpp in Sources */, 1AC35C5618CECF0C00F37B72 /* Texture2dTest.cpp in Sources */, 1AC35C0818CECF0C00F37B72 /* MouseTest.cpp in Sources */, - 1AC35BA818CECF0C00F37B72 /* UILayoutTest_Editor.cpp in Sources */, 1AC35C5E18CECF0C00F37B72 /* Ball.cpp in Sources */, 1AC35B7C18CECF0C00F37B72 /* GameOverScene.cpp in Sources */, - 1AC35BA218CECF0C00F37B72 /* UIImageViewTest.cpp in Sources */, 1AC35BF418CECF0C00F37B72 /* ExtensionsTest.cpp in Sources */, - 1AC35BC218CECF0C00F37B72 /* UIScrollViewTest_Editor.cpp in Sources */, - 1AC35BB218CECF0C00F37B72 /* UIPageViewTest.cpp in Sources */, 1AC35B3618CECF0C00F37B72 /* TestEntries.cpp in Sources */, 1AC35B2E18CECF0C00F37B72 /* Box2dTest.cpp in Sources */, + 29080DCA191B595E0066F8DF /* UISceneManager_Editor.cpp in Sources */, 1AC35C1218CECF0C00F37B72 /* LabelTestNew.cpp in Sources */, 1AC35B4E18CECF0C00F37B72 /* ChipmunkTest.cpp in Sources */, - 1AC35BBC18CECF0C00F37B72 /* UISceneManager.cpp in Sources */, - 1AC35BD418CECF0C00F37B72 /* UITextTest.cpp in Sources */, - 1AC35BD218CECF0C00F37B72 /* UITextFieldTest_Editor.cpp in Sources */, 1AC35BE018CECF0C00F37B72 /* cons.cpp in Sources */, 1AC35B5818CECF0C00F37B72 /* ConsoleTest.cpp in Sources */, 1AC35C0A18CECF0C00F37B72 /* IntervalTest.cpp in Sources */, - 1AC35BB018CECF0C00F37B72 /* UILoadingBarTest_Editor.cpp in Sources */, + 29080DD0191B595E0066F8DF /* UISliderTest.cpp in Sources */, 1AC35BEE18CECF0C00F37B72 /* CCControlStepperTest.cpp in Sources */, 1AC35C3418CECF0C00F37B72 /* PerformanceScenarioTest.cpp in Sources */, + 29080DA4191B595E0066F8DF /* UIButtonTest.cpp in Sources */, 1AC35C5A18CECF0C00F37B72 /* TextureAtlasEncryptionTest.cpp in Sources */, 1AC35B5618CECF0C00F37B72 /* ConfigurationTest.cpp in Sources */, - 1AC35B9818CECF0C00F37B72 /* GUIEditorTest.cpp in Sources */, - 1AC35BA018CECF0C00F37B72 /* UICheckBoxTest_Editor.cpp in Sources */, - 1AC35BAC18CECF0C00F37B72 /* UIListViewTest_Editor.cpp in Sources */, 1AC35BE618CECF0C00F37B72 /* CCControlPotentiometerTest.cpp in Sources */, 1AC35C8618CECF1400F37B72 /* RootViewController.mm in Sources */, 1AC35C5C18CECF0C00F37B72 /* TileMapTest.cpp in Sources */, + 29080DC2191B595E0066F8DF /* UIRichTextTest.cpp in Sources */, 1AC35B4818CECF0C00F37B72 /* Bug-899.cpp in Sources */, 1AC35C1C18CECF0C00F37B72 /* NewEventDispatcherTest.cpp in Sources */, - 1AC35B8418CECF0C00F37B72 /* CocosGUIScene.cpp in Sources */, 1AC35C2E18CECF0C00F37B72 /* PerformanceNodeChildrenTest.cpp in Sources */, + 29080DCE191B595E0066F8DF /* UIScrollViewTest_Editor.cpp in Sources */, 1AC35BDE18CECF0C00F37B72 /* acts.cpp in Sources */, 1AC35B7618CECF0C00F37B72 /* ArmatureScene.cpp in Sources */, - 1AC35B8E18CECF0C00F37B72 /* CustomImageView.cpp in Sources */, 1AC35B8218CECF0C00F37B72 /* SceneController.cpp in Sources */, + 29080DD2191B595E0066F8DF /* UISliderTest_Editor.cpp in Sources */, 1AC35B3418CECF0C00F37B72 /* Test.cpp in Sources */, 1AC35C2418CECF0C00F37B72 /* ParticleTest.cpp in Sources */, 1AC35C6218CECF0C00F37B72 /* TouchesTest.cpp in Sources */, + 29080DB0191B595E0066F8DF /* UIImageViewTest_Editor.cpp in Sources */, 1AC35C6418CECF0C00F37B72 /* TransitionsTest.cpp in Sources */, 1AC35C4418CECF0C00F37B72 /* RotateWorldTest.cpp in Sources */, 1AC35B2618CECF0C00F37B72 /* ActionsProgressTest.cpp in Sources */, 1AC35B6618CECF0C00F37B72 /* EffectsTest.cpp in Sources */, 1AC35B7218CECF0C00F37B72 /* TestHeaderLayer.cpp in Sources */, 1AC35B2218CECF0C00F37B72 /* ActionManagerTest.cpp in Sources */, - 1AC35BA418CECF0C00F37B72 /* UIImageViewTest_Editor.cpp in Sources */, - 1AC35BD018CECF0C00F37B72 /* UITextFieldTest.cpp in Sources */, - 1AC35B9C18CECF0C00F37B72 /* UIButtonTest_Editor.cpp in Sources */, + 29080D90191B595E0066F8DF /* CocoStudioGUITest.cpp in Sources */, 1AC35C3E18CECF0C00F37B72 /* PhysicsTest.cpp in Sources */, + 29080DC6191B595E0066F8DF /* UIScene_Editor.cpp in Sources */, + 29080DB2191B595E0066F8DF /* UILayoutTest.cpp in Sources */, 1AC35B6A18CECF0C00F37B72 /* ButtonTestLayer.cpp in Sources */, + 29080DB6191B595E0066F8DF /* UIListViewTest.cpp in Sources */, 1AC35B3018CECF0C00F37B72 /* Box2dView.cpp in Sources */, + 29080DAE191B595E0066F8DF /* UIImageViewTest.cpp in Sources */, 1AC35C1018CECF0C00F37B72 /* LabelTest.cpp in Sources */, - 1AC35BB618CECF0C00F37B72 /* UIRichTextTest.cpp in Sources */, - 1AC35BCE18CECF0C00F37B72 /* UITextBMFontTest_Editor.cpp in Sources */, + 29080DC8191B595E0066F8DF /* UISceneManager.cpp in Sources */, 1AC35C6A18CECF0C00F37B72 /* VisibleRect.cpp in Sources */, 1AC35C4018CECF0C00F37B72 /* ReleasePoolTest.cpp in Sources */, 1AC35C5818CECF0C00F37B72 /* TextureCacheTest.cpp in Sources */, 1AC35B6E18CECF0C00F37B72 /* HelloCocosBuilderLayer.cpp in Sources */, + 29080D96191B595E0066F8DF /* CustomParticleWidgetTest.cpp in Sources */, 1AC35C2C18CECF0C00F37B72 /* PerformanceLabelTest.cpp in Sources */, - 1AC35B8C18CECF0C00F37B72 /* CustomParticleWidgetTest.cpp in Sources */, + 29080DE0191B595E0066F8DF /* UITextTest.cpp in Sources */, + 29080DC0191B595E0066F8DF /* UIPageViewTest_Editor.cpp in Sources */, 1AC35C0218CECF0C00F37B72 /* TableViewTestScene.cpp in Sources */, - 1AC35B8A18CECF0C00F37B72 /* CustomImageTest.cpp in Sources */, 1AC35C4C18CECF0C00F37B72 /* ShaderTest2.cpp in Sources */, 1AC35C6618CECF0C00F37B72 /* UnitTest.cpp in Sources */, 1AC35B4018CECF0C00F37B72 /* Bug-458.cpp in Sources */, 1AC35C3A18CECF0C00F37B72 /* PerformanceTextureTest.cpp in Sources */, - 1AC35B9A18CECF0C00F37B72 /* UIButtonTest.cpp in Sources */, + 29080DC4191B595E0066F8DF /* UIScene.cpp in Sources */, 1AC35B5418CECF0C00F37B72 /* CocosDenshionTest.cpp in Sources */, 1AC35B8018CECF0C00F37B72 /* ProjectileController.cpp in Sources */, 1AC35C2618CECF0C00F37B72 /* PerformanceAllocTest.cpp in Sources */, - 1AC35BCA18CECF0C00F37B72 /* UITextAtlasTest_Editor.cpp in Sources */, 1AC35B5A18CECF0C00F37B72 /* controller.cpp in Sources */, 1AC35C2A18CECF0C00F37B72 /* PerformanceEventDispatcherTest.cpp in Sources */, 1AC35BEA18CECF0C00F37B72 /* CCControlSceneManager.cpp in Sources */, 1AC35B7418CECF0C00F37B72 /* TimelineCallbackTestLayer.cpp in Sources */, + 29080D9E191B595E0066F8DF /* CustomParticleWidgetReader.cpp in Sources */, 1AC35BFC18CECF0C00F37B72 /* NotificationCenterTest.cpp in Sources */, 1AC35C3618CECF0C00F37B72 /* PerformanceSpriteTest.cpp in Sources */, 1AC35C3C18CECF0C00F37B72 /* PerformanceTouchesTest.cpp in Sources */, + 29080DA2191B595E0066F8DF /* GUIEditorTest.cpp in Sources */, + 29080D94191B595E0066F8DF /* CustomImageTest.cpp in Sources */, 1AC35B3E18CECF0C00F37B72 /* Bug-422.cpp in Sources */, 1AC35C0C18CECF0C00F37B72 /* KeyboardTest.cpp in Sources */, + 29080DAC191B595E0066F8DF /* UIFocusTest.cpp in Sources */, 1AC35BF618CECF0C00F37B72 /* HttpClientTest.cpp in Sources */, + 29080DA6191B595E0066F8DF /* UIButtonTest_Editor.cpp in Sources */, 1AC35B5018CECF0C00F37B72 /* ClickAndMoveTest.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/cocos/2d/CCGLProgram.h b/cocos/2d/CCGLProgram.h index 525e30dbf7..9dc15166f7 100644 --- a/cocos/2d/CCGLProgram.h +++ b/cocos/2d/CCGLProgram.h @@ -285,9 +285,6 @@ public: void setUniformsForBuiltins(); void setUniformsForBuiltins(const Matrix &modelView); - void setUniformByName(const std::string& uniformName, const Uniform &value); - - // Attribute /** returns the vertexShader error log */ diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index c1def11f10..746944c579 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -934,6 +934,7 @@ void Label::createSpriteWithFontDefinition() Node::addChild(_textSprite,0,Node::INVALID_TAG); _textSprite->updateDisplayedColor(_displayedColor); + _textSprite->updateDisplayedOpacity(_displayedOpacity); } void Label::setFontDefinition(const FontDefinition& textDefinition) diff --git a/cocos/2d/cocos2d.vcxproj b/cocos/2d/cocos2d.vcxproj index c5aa08ed5a..511c5d4659 100644 --- a/cocos/2d/cocos2d.vcxproj +++ b/cocos/2d/cocos2d.vcxproj @@ -23,6 +23,8 @@ v100 v110 v110_xp + v120 + v120_xp StaticLibrary @@ -30,6 +32,8 @@ v100 v110 v110_xp + v120 + v120_xp @@ -181,10 +185,12 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou + + @@ -341,10 +347,12 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou + + diff --git a/cocos/2d/cocos2d.vcxproj.filters b/cocos/2d/cocos2d.vcxproj.filters index 3af6a6d455..f60c30a84f 100644 --- a/cocos/2d/cocos2d.vcxproj.filters +++ b/cocos/2d/cocos2d.vcxproj.filters @@ -570,6 +570,12 @@ renderer + + base + + + base + @@ -1154,6 +1160,12 @@ renderer + + base + + + base + diff --git a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java index 743e9695fa..6b645d4f4f 100644 --- a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java +++ b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java @@ -43,7 +43,7 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe // Constants // =========================================================== - private static final String TAG = Cocos2dxActivity.class.getSimpleName(); + private final static String TAG = Cocos2dxActivity.class.getSimpleName(); // =========================================================== // Fields @@ -51,7 +51,8 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe private Cocos2dxGLSurfaceView mGLSurfaceView; private Cocos2dxHandler mHandler; - private static Context sContext = null; + private static Cocos2dxActivity sContext = null; + private Cocos2dxVideoHelper mVideoHelper = null; public static Context getContext() { return sContext; @@ -80,12 +81,15 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe sContext = this; this.mHandler = new Cocos2dxHandler(this); - + + Cocos2dxHelper.init(this); + this.init(); - - Cocos2dxHelper.init(this); + if (mVideoHelper == null) { + mVideoHelper = new Cocos2dxVideoHelper(this, mFrameLayout); + } } - + // =========================================================== // Getter & Setter // =========================================================== @@ -142,6 +146,7 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe } + protected FrameLayout mFrameLayout = null; // =========================================================== // Methods // =========================================================== @@ -151,8 +156,8 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe ViewGroup.LayoutParams framelayout_params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); - FrameLayout framelayout = new FrameLayout(this); - framelayout.setLayoutParams(framelayout_params); + mFrameLayout = new FrameLayout(this); + mFrameLayout.setLayoutParams(framelayout_params); // Cocos2dxEditText layout ViewGroup.LayoutParams edittext_layout_params = @@ -162,13 +167,13 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe edittext.setLayoutParams(edittext_layout_params); // ...add to FrameLayout - framelayout.addView(edittext); + mFrameLayout.addView(edittext); // Cocos2dxGLSurfaceView this.mGLSurfaceView = this.onCreateView(); // ...add to FrameLayout - framelayout.addView(this.mGLSurfaceView); + mFrameLayout.addView(this.mGLSurfaceView); // Switch to supported OpenGL (ARGB888) mode on emulator if (isAndroidEmulator()) @@ -178,7 +183,7 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe this.mGLSurfaceView.setCocos2dxEditText(edittext); // Set framelayout as the content view - setContentView(framelayout); + setContentView(mFrameLayout); } public Cocos2dxGLSurfaceView onCreateView() { diff --git a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java index 47d6a48120..621ab88783 100644 --- a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java +++ b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java @@ -293,6 +293,13 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView { switch (pKeyCode) { case KeyEvent.KEYCODE_BACK: case KeyEvent.KEYCODE_MENU: + case KeyEvent.KEYCODE_DPAD_LEFT: + case KeyEvent.KEYCODE_DPAD_RIGHT: + case KeyEvent.KEYCODE_DPAD_UP: + case KeyEvent.KEYCODE_DPAD_DOWN: + case KeyEvent.KEYCODE_ENTER: + case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: + case KeyEvent.KEYCODE_DPAD_CENTER: this.queueEvent(new Runnable() { @Override public void run() { diff --git a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java index c746a357ce..4695317696 100644 --- a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java +++ b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java @@ -292,6 +292,16 @@ public class Cocos2dxHelper { } } + public static void onEnterBackground() { + sCocos2dSound.onEnterBackground(); + sCocos2dMusic.onEnterBackground(); + } + + public static void onEnterForeground() { + sCocos2dSound.onEnterForeground(); + sCocos2dMusic.onEnterForeground(); + } + public static void terminateProcess() { android.os.Process.killProcess(android.os.Process.myPid()); } diff --git a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxMusic.java b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxMusic.java index 41793e24a9..386a75fee4 100644 --- a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxMusic.java +++ b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxMusic.java @@ -47,7 +47,8 @@ public class Cocos2dxMusic { private MediaPlayer mBackgroundMediaPlayer; private float mLeftVolume; private float mRightVolume; - private boolean mPaused; + private boolean mPaused;// whether music is paused state. + private boolean mManualPaused = false;// whether music is paused manually before the program is switched to the background. private String mCurrentPath; // =========================================================== @@ -142,6 +143,7 @@ public class Cocos2dxMusic { if (this.mBackgroundMediaPlayer != null && this.mBackgroundMediaPlayer.isPlaying()) { this.mBackgroundMediaPlayer.pause(); this.mPaused = true; + this.mManualPaused = true; } } @@ -149,6 +151,7 @@ public class Cocos2dxMusic { if (this.mBackgroundMediaPlayer != null && this.mPaused) { this.mBackgroundMediaPlayer.start(); this.mPaused = false; + this.mManualPaused = false; } } @@ -211,6 +214,22 @@ public class Cocos2dxMusic { } } + public void onEnterBackground(){ + if (this.mBackgroundMediaPlayer != null && this.mBackgroundMediaPlayer.isPlaying()) { + this.mBackgroundMediaPlayer.pause(); + this.mPaused = true; + } + } + + public void onEnterForeground(){ + if(!this.mManualPaused){ + if (this.mBackgroundMediaPlayer != null && this.mPaused) { + this.mBackgroundMediaPlayer.start(); + this.mPaused = false; + } + } + } + private void initData() { this.mLeftVolume = 0.5f; this.mRightVolume = 0.5f; diff --git a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java index eb1d5d0853..a40d06019e 100644 --- a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java +++ b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java @@ -28,6 +28,7 @@ import javax.microedition.khronos.opengles.GL10; import android.opengl.GLSurfaceView; +import org.cocos2dx.lib.Cocos2dxHelper; public class Cocos2dxRenderer implements GLSurfaceView.Renderer { // =========================================================== // Constants @@ -144,10 +145,12 @@ public class Cocos2dxRenderer implements GLSurfaceView.Renderer { } public void handleOnPause() { + Cocos2dxHelper.onEnterBackground(); Cocos2dxRenderer.nativeOnPause(); } public void handleOnResume() { + Cocos2dxHelper.onEnterForeground(); Cocos2dxRenderer.nativeOnResume(); } diff --git a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxSound.java b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxSound.java index 48da7e8c44..297d148a86 100644 --- a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxSound.java +++ b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxSound.java @@ -129,8 +129,8 @@ public class Cocos2dxSound { // stop effects final ArrayList streamIDs = this.mPathStreamIDsMap.get(pPath); if (streamIDs != null) { - for (final Integer pStreamID : streamIDs) { - this.mSoundPool.stop(pStreamID); + for (final Integer steamID : streamIDs) { + this.mSoundPool.stop(steamID); } } this.mPathStreamIDsMap.remove(pPath); @@ -180,28 +180,36 @@ public class Cocos2dxSound { return streamID; } - public void stopEffect(final int pStreamID) { - this.mSoundPool.stop(pStreamID); + public void stopEffect(final int steamID) { + this.mSoundPool.stop(steamID); // remove record for (final String pPath : this.mPathStreamIDsMap.keySet()) { - if (this.mPathStreamIDsMap.get(pPath).contains(pStreamID)) { - this.mPathStreamIDsMap.get(pPath).remove(this.mPathStreamIDsMap.get(pPath).indexOf(pStreamID)); + if (this.mPathStreamIDsMap.get(pPath).contains(steamID)) { + this.mPathStreamIDsMap.get(pPath).remove(this.mPathStreamIDsMap.get(pPath).indexOf(steamID)); break; } } } - public void pauseEffect(final int pStreamID) { - this.mSoundPool.pause(pStreamID); + public void pauseEffect(final int steamID) { + this.mSoundPool.pause(steamID); } - public void resumeEffect(final int pStreamID) { - this.mSoundPool.resume(pStreamID); + public void resumeEffect(final int steamID) { + this.mSoundPool.resume(steamID); } public void pauseAllEffects() { - this.mSoundPool.autoPause(); + if (!this.mPathStreamIDsMap.isEmpty()) { + final Iterator>> iter = this.mPathStreamIDsMap.entrySet().iterator(); + while (iter.hasNext()) { + final Entry> entry = iter.next(); + for (final int steamID : entry.getValue()) { + this.mSoundPool.pause(steamID); + } + } + } } public void resumeAllEffects() { @@ -211,8 +219,8 @@ public class Cocos2dxSound { final Iterator>> iter = this.mPathStreamIDsMap.entrySet().iterator(); while (iter.hasNext()) { final Entry> entry = iter.next(); - for (final int pStreamID : entry.getValue()) { - this.mSoundPool.resume(pStreamID); + for (final int steamID : entry.getValue()) { + this.mSoundPool.resume(steamID); } } } @@ -225,8 +233,8 @@ public class Cocos2dxSound { final Iterator iter = this.mPathStreamIDsMap.entrySet().iterator(); while (iter.hasNext()) { final Map.Entry> entry = (Map.Entry>) iter.next(); - for (final int pStreamID : entry.getValue()) { - this.mSoundPool.stop(pStreamID); + for (final int steamID : entry.getValue()) { + this.mSoundPool.stop(steamID); } } } @@ -255,8 +263,8 @@ public class Cocos2dxSound { final Iterator>> iter = this.mPathStreamIDsMap.entrySet().iterator(); while (iter.hasNext()) { final Entry> entry = iter.next(); - for (final int pStreamID : entry.getValue()) { - this.mSoundPool.setVolume(pStreamID, this.mLeftVolume, this.mRightVolume); + for (final int steamID : entry.getValue()) { + this.mSoundPool.setVolume(steamID, this.mLeftVolume, this.mRightVolume); } } } @@ -319,6 +327,14 @@ public class Cocos2dxSound { return streamID; } + public void onEnterBackground(){ + this.mSoundPool.autoPause(); + } + + public void onEnterForeground(){ + this.mSoundPool.autoResume(); + } + // =========================================================== // Inner and Anonymous Classes // =========================================================== diff --git a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoHelper.java b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoHelper.java new file mode 100644 index 0000000000..64d1cc0adf --- /dev/null +++ b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoHelper.java @@ -0,0 +1,386 @@ +/**************************************************************************** +Copyright (c) 2014 Chukong Technologies Inc. + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + ****************************************************************************/ + +package org.cocos2dx.lib; + +import java.lang.ref.WeakReference; + +import org.cocos2dx.lib.Cocos2dxVideoView.OnVideoEventListener; + +import android.graphics.Rect; +import android.os.Handler; +import android.os.Message; +import android.util.SparseArray; +import android.view.View; +import android.widget.FrameLayout; + +public class Cocos2dxVideoHelper { + + private FrameLayout mLayout = null; + private Cocos2dxActivity mActivity = null; + private SparseArray sVideoViews = null; + private static VideoHandler mVideoHandler = null; + + Cocos2dxVideoHelper(Cocos2dxActivity activity,FrameLayout layout) + { + mActivity = activity; + mLayout = layout; + + mVideoHandler = new VideoHandler(this); + sVideoViews = new SparseArray(); + } + + private static int videoTag = 0; + private final static int VideoTaskCreate = 0; + private final static int VideoTaskRemove = 1; + private final static int VideoTaskSetSource = 2; + private final static int VideoTaskSetRect = 3; + private final static int VideoTaskStart = 4; + private final static int VideoTaskPause = 5; + private final static int VideoTaskResume = 6; + private final static int VideoTaskStop = 7; + private final static int VideoTaskSeek = 8; + private final static int VideoTaskSetVisible = 9; + private final static int VideoTaskRestart = 10; + private final static int VideoTaskKeepRatio = 11; + + static class VideoHandler extends Handler{ + WeakReference mReference; + + VideoHandler(Cocos2dxVideoHelper helper){ + mReference = new WeakReference(helper); + } + + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case VideoTaskCreate: { + Cocos2dxVideoHelper helper = mReference.get(); + helper._createVideoView(msg.arg1); + break; + } + case VideoTaskRemove: { + Cocos2dxVideoHelper helper = mReference.get(); + helper._removeVideoView(msg.arg1); + break; + } + case VideoTaskSetSource: { + Cocos2dxVideoHelper helper = mReference.get(); + helper._setVideoURL(msg.arg1, msg.arg2, (String)msg.obj); + break; + } + case VideoTaskStart: { + Cocos2dxVideoHelper helper = mReference.get(); + helper._startVideo(msg.arg1); + break; + } + case VideoTaskSetRect: { + Cocos2dxVideoHelper helper = mReference.get(); + Rect rect = (Rect)msg.obj; + helper._setVideoRect(msg.arg1, rect.left, rect.top, rect.right, rect.bottom); + break; + } + case VideoTaskPause: { + Cocos2dxVideoHelper helper = mReference.get(); + helper._pauseVideo(msg.arg1); + break; + } + case VideoTaskResume: { + Cocos2dxVideoHelper helper = mReference.get(); + helper._resumeVideo(msg.arg1); + break; + } + case VideoTaskStop: { + Cocos2dxVideoHelper helper = mReference.get(); + helper._stopVideo(msg.arg1); + break; + } + case VideoTaskSeek: { + Cocos2dxVideoHelper helper = mReference.get(); + helper._seekVideoTo(msg.arg1, msg.arg2); + break; + } + case VideoTaskSetVisible: { + Cocos2dxVideoHelper helper = mReference.get(); + if (msg.arg2 == 1) { + helper._setVideoVisible(msg.arg1, true); + } else { + helper._setVideoVisible(msg.arg1, false); + } + break; + } + case VideoTaskRestart: { + Cocos2dxVideoHelper helper = mReference.get(); + helper._restartVideo(msg.arg1); + break; + } + case VideoTaskKeepRatio: { + Cocos2dxVideoHelper helper = mReference.get(); + if (msg.arg2 == 1) { + helper._setVideoKeepRatio(msg.arg1, true); + } else { + helper._setVideoKeepRatio(msg.arg1, false); + } + break; + } + default: + break; + } + + super.handleMessage(msg); + } + } + + private class VideoEventRunnable implements Runnable + { + private int mVideoTag; + private int mVideoEvent; + + public VideoEventRunnable(int tag,int event) { + mVideoTag = tag; + mVideoEvent = event; + } + @Override + public void run() { + nativeExecuteVideoCallback(mVideoTag, mVideoEvent); + } + + } + + public static native void nativeExecuteVideoCallback(int index,int event); + + OnVideoEventListener videoEventListener = new OnVideoEventListener() { + + @Override + public void onVideoEvent(int tag,int event) { + mActivity.runOnGLThread(new VideoEventRunnable(tag, event)); + } + }; + + + public static int createVideoWidget() { + Message msg = new Message(); + msg.what = VideoTaskCreate; + msg.arg1 = videoTag; + mVideoHandler.sendMessage(msg); + + return videoTag++; + } + + private void _createVideoView(int index) { + Cocos2dxVideoView videoView = new Cocos2dxVideoView(mActivity,index); + sVideoViews.put(index, videoView); + FrameLayout.LayoutParams lParams = new FrameLayout.LayoutParams( + FrameLayout.LayoutParams.WRAP_CONTENT, + FrameLayout.LayoutParams.WRAP_CONTENT); + mLayout.addView(videoView, lParams); + videoView.setZOrderOnTop(true); + videoView.setOnCompletionListener(videoEventListener); + } + + public static void removeVideoWidget(int index){ + Message msg = new Message(); + msg.what = VideoTaskRemove; + msg.arg1 = index; + mVideoHandler.sendMessage(msg); + } + + private void _removeVideoView(int index) { + Cocos2dxVideoView view = sVideoViews.get(index); + if (view != null) { + view.stopPlayback(); + sVideoViews.remove(index); + mLayout.removeView(view); + } + } + + public static void setVideoUrl(int index,int videoSource,String videoUrl) { + Message msg = new Message(); + msg.what = VideoTaskSetSource; + msg.arg1 = index; + msg.arg2 = videoSource; + msg.obj = videoUrl; + mVideoHandler.sendMessage(msg); + } + + private void _setVideoURL(int index,int videoSource,String videoUrl) { + Cocos2dxVideoView videoView = sVideoViews.get(index); + if (videoView != null) { + switch (videoSource) { + case 0: + videoView.setVideoFileName(videoUrl); + break; + case 1: + videoView.setVideoURL(videoUrl); + break; + default: + break; + } + } + } + + public static void setVideoRect(int index,int left,int top,int maxWidth,int maxHeight) { + Message msg = new Message(); + msg.what = VideoTaskSetRect; + msg.arg1 = index; + msg.obj = new Rect(left, top, maxWidth, maxHeight); + mVideoHandler.sendMessage(msg); + } + + private void _setVideoRect(int index,int left,int top,int maxWidth,int maxHeight) { + Cocos2dxVideoView videoView = sVideoViews.get(index); + if (videoView != null) { + videoView.setVideoRect(left,top,maxWidth,maxHeight); + } + } + + public static void startVideo(int index) { + Message msg = new Message(); + msg.what = VideoTaskStart; + msg.arg1 = index; + mVideoHandler.sendMessage(msg); + } + + private void _startVideo(int index) { + Cocos2dxVideoView videoView = sVideoViews.get(index); + if (videoView != null) { + videoView.start(); + } + } + + public static void pauseVideo(int index) { + Message msg = new Message(); + msg.what = VideoTaskPause; + msg.arg1 = index; + mVideoHandler.sendMessage(msg); + } + + private void _pauseVideo(int index) { + Cocos2dxVideoView videoView = sVideoViews.get(index); + if (videoView != null) { + videoView.pause(); + } + } + + public static void resumeVideo(int index) { + Message msg = new Message(); + msg.what = VideoTaskResume; + msg.arg1 = index; + mVideoHandler.sendMessage(msg); + } + + private void _resumeVideo(int index) { + Cocos2dxVideoView videoView = sVideoViews.get(index); + if (videoView != null) { + videoView.resume(); + } + } + + public static void stopVideo(int index) { + Message msg = new Message(); + msg.what = VideoTaskStop; + msg.arg1 = index; + mVideoHandler.sendMessage(msg); + } + + private void _stopVideo(int index) { + Cocos2dxVideoView videoView = sVideoViews.get(index); + if (videoView != null) { + videoView.stop(); + } + } + + public static void restartVideo(int index) { + Message msg = new Message(); + msg.what = VideoTaskRestart; + msg.arg1 = index; + mVideoHandler.sendMessage(msg); + } + + private void _restartVideo(int index) { + Cocos2dxVideoView videoView = sVideoViews.get(index); + if (videoView != null) { + videoView.restart(); + } + } + + public static void seekVideoTo(int index,int msec) { + Message msg = new Message(); + msg.what = VideoTaskSeek; + msg.arg1 = index; + msg.arg2 = msec; + mVideoHandler.sendMessage(msg); + } + + private void _seekVideoTo(int index,int msec) { + Cocos2dxVideoView videoView = sVideoViews.get(index); + if (videoView != null) { + videoView.seekTo(msec); + } + } + + public static void setVideoVisible(int index, boolean visible) { + Message msg = new Message(); + msg.what = VideoTaskSetVisible; + msg.arg1 = index; + if (visible) { + msg.arg2 = 1; + } else { + msg.arg2 = 0; + } + + mVideoHandler.sendMessage(msg); + } + + private void _setVideoVisible(int index, boolean visible) { + Cocos2dxVideoView videoView = sVideoViews.get(index); + if (videoView != null) { + if (visible) { + videoView.fixSize(); + videoView.setVisibility(View.VISIBLE); + } else { + videoView.setVisibility(View.INVISIBLE); + } + } + } + + public static void setVideoKeepRatioEnabled(int index, boolean enable) { + Message msg = new Message(); + msg.what = VideoTaskKeepRatio; + msg.arg1 = index; + if (enable) { + msg.arg2 = 1; + } else { + msg.arg2 = 0; + } + mVideoHandler.sendMessage(msg); + } + + private void _setVideoKeepRatio(int index, boolean enable) { + Cocos2dxVideoView videoView = sVideoViews.get(index); + if (videoView != null) { + videoView.setKeepRatio(enable); + } + } +} diff --git a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoView.java b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoView.java new file mode 100644 index 0000000000..1679051a11 --- /dev/null +++ b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoView.java @@ -0,0 +1,686 @@ +/* + * Copyright (C) 2006 The Android Open Source Project + * Copyright (c) 2014 Chukong Technologies Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cocos2dx.lib; + +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.content.res.AssetFileDescriptor; +import android.content.res.Resources; +import android.media.AudioManager; +import android.media.MediaPlayer; +import android.media.MediaPlayer.OnErrorListener; +import android.net.Uri; +import android.util.AttributeSet; +import android.util.Log; +import android.view.MotionEvent; +import android.view.SurfaceHolder; +import android.view.SurfaceView; +import android.widget.FrameLayout; +import android.widget.MediaController.MediaPlayerControl; + +import java.io.IOException; +import java.util.Map; + +public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl { + private String TAG = "VideoView"; + + private Uri mUri; + private int mDuration; + + // all possible internal states + private static final int STATE_ERROR = -1; + private static final int STATE_IDLE = 0; + private static final int STATE_PREPARING = 1; + private static final int STATE_PREPARED = 2; + private static final int STATE_PLAYING = 3; + private static final int STATE_PAUSED = 4; + private static final int STATE_PLAYBACK_COMPLETED = 5; + + // mCurrentState is a VideoView object's current state. + // mTargetState is the state that a method caller intends to reach. + // For instance, regardless the VideoView object's current state, + // calling pause() intends to bring the object to a target state + // of STATE_PAUSED. + private int mCurrentState = STATE_IDLE; + private int mTargetState = STATE_IDLE; + + // All the stuff we need for playing and showing a video + private SurfaceHolder mSurfaceHolder = null; + private MediaPlayer mMediaPlayer = null; + private int mVideoWidth = 0; + private int mVideoHeight = 0; + + private OnVideoEventListener mOnVideoEventListener; + private MediaPlayer.OnPreparedListener mOnPreparedListener; + private int mCurrentBufferPercentage; + private OnErrorListener mOnErrorListener; + + // recording the seek position while preparing + private int mSeekWhenPrepared; + + protected Context mContext = null; + + protected int mViewLeft = 0; + protected int mViewTop = 0; + protected int mViewWidth = 0; + protected int mViewHeight = 0; + + protected int mVisibleLeft = 0; + protected int mVisibleTop = 0; + protected int mVisibleWidth = 0; + protected int mVisibleHeight = 0; + + private int mViewTag = 0; + + public Cocos2dxVideoView(Context context,int tag) { + super(context); + + mViewTag = tag; + mContext = context; + initVideoView(); + } + + public Cocos2dxVideoView(Context context, AttributeSet attrs) { + this(context, attrs, 0); + + mContext = context; + initVideoView(); + } + + public Cocos2dxVideoView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + + mContext = context; + initVideoView(); + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + if (mVideoWidth == 0 || mVideoHeight == 0) { + setMeasuredDimension(mViewWidth, mViewHeight); + Log.e(TAG, ""+mViewWidth+ ":" +mViewHeight); + } + else { + setMeasuredDimension(mVisibleWidth, mVisibleHeight); + Log.e(TAG, ""+mVisibleWidth+ ":" +mVisibleHeight); + } + + } + + public void setVideoRect(int left,int top,int maxWidth,int maxHeight) { + mViewLeft = left; + mViewTop = top; + mViewWidth = maxWidth; + mViewHeight = maxHeight; + + if (mVideoWidth != 0 && mVideoHeight != 0) { + fixSize(); + } + } + + public int resolveAdjustedSize(int desiredSize, int measureSpec) { + int result = desiredSize; + int specMode = MeasureSpec.getMode(measureSpec); + int specSize = MeasureSpec.getSize(measureSpec); + + switch (specMode) { + case MeasureSpec.UNSPECIFIED: + /* Parent says we can be as big as we want. Just don't be larger + * than max size imposed on ourselves. + */ + result = desiredSize; + break; + + case MeasureSpec.AT_MOST: + /* Parent says we can be as big as we want, up to specSize. + * Don't be larger than specSize, and don't be larger than + * the max size imposed on ourselves. + */ + result = Math.min(desiredSize, specSize); + break; + + case MeasureSpec.EXACTLY: + // No choice. Do what we are told. + result = specSize; + break; + } + return result; +} + + private boolean mNeedResume = false; + + @Override + public void setVisibility(int visibility) { + if (visibility == INVISIBLE) { + mNeedResume = isPlaying(); + if (mNeedResume) { + mSeekWhenPrepared = getCurrentPosition(); + } + } + else if (mNeedResume){ + start(); + mNeedResume = false; + } + super.setVisibility(visibility); + } + + private void initVideoView() { + mVideoWidth = 0; + mVideoHeight = 0; + getHolder().addCallback(mSHCallback); + setFocusable(true); + setFocusableInTouchMode(true); + mCurrentState = STATE_IDLE; + mTargetState = STATE_IDLE; + } + + @Override + public boolean onTouchEvent(MotionEvent event) { + if((event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_UP) + { + if (isPlaying()) { + pause(); + } else if(mCurrentState == STATE_PAUSED){ + resume(); + } + } + + return true; + } + + private boolean isAssetRouse = false; + private String fileName = null; + + public void setVideoFileName(String path) { + if (path.startsWith("/")) { + isAssetRouse = false; + setVideoURI(Uri.parse(path),null); + } + else { + fileName = path; + isAssetRouse = true; + setVideoURI(Uri.parse(path),null); + } + } + + public void setVideoURL(String url) { + isAssetRouse = false; + setVideoURI(Uri.parse(url), null); + } + + /** + * @hide + */ + private void setVideoURI(Uri uri, Map headers) { + mUri = uri; + mSeekWhenPrepared = 0; + mVideoWidth = 0; + mVideoHeight = 0; + openVideo(); + requestLayout(); + invalidate(); + } + + public void stopPlayback() { + if (mMediaPlayer != null) { + mMediaPlayer.stop(); + mMediaPlayer.release(); + mMediaPlayer = null; + mCurrentState = STATE_IDLE; + mTargetState = STATE_IDLE; + } + } + + private void openVideo() { + if (mSurfaceHolder == null) { + // not ready for playback just yet, will try again later + return; + } + if (isAssetRouse) { + if(fileName == null) + return; + } else { + if(mUri == null) + return; + } + + // Tell the music playback service to pause + // TODO: these constants need to be published somewhere in the framework. + Intent i = new Intent("com.android.music.musicservicecommand"); + i.putExtra("command", "pause"); + mContext.sendBroadcast(i); + + // we shouldn't clear the target state, because somebody might have + // called start() previously + release(false); + + try { + //if (mMediaPlayer == null) { + mMediaPlayer = new MediaPlayer(); + mMediaPlayer.setOnPreparedListener(mPreparedListener); + mMediaPlayer.setOnVideoSizeChangedListener(mSizeChangedListener); + mMediaPlayer.setOnCompletionListener(mCompletionListener); + mMediaPlayer.setOnErrorListener(mErrorListener); + mMediaPlayer.setOnBufferingUpdateListener(mBufferingUpdateListener); + + mMediaPlayer.setDisplay(mSurfaceHolder); + mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); + mMediaPlayer.setScreenOnWhilePlaying(true); + //} + + mDuration = -1; + mCurrentBufferPercentage = 0; + if (isAssetRouse) { + AssetFileDescriptor afd = mContext.getAssets().openFd(fileName); + mMediaPlayer.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(),afd.getLength()); + } else { + mMediaPlayer.setDataSource(mContext, mUri); + } + + mMediaPlayer.prepareAsync(); + // we don't set the target state here either, but preserve the + // target state that was there before. + mCurrentState = STATE_PREPARING; + } catch (IOException ex) { + Log.w(TAG, "Unable to open content: " + mUri, ex); + mCurrentState = STATE_ERROR; + mTargetState = STATE_ERROR; + mErrorListener.onError(mMediaPlayer, MediaPlayer.MEDIA_ERROR_UNKNOWN, 0); + return; + } catch (IllegalArgumentException ex) { + Log.w(TAG, "Unable to open content: " + mUri, ex); + mCurrentState = STATE_ERROR; + mTargetState = STATE_ERROR; + mErrorListener.onError(mMediaPlayer, MediaPlayer.MEDIA_ERROR_UNKNOWN, 0); + return; + } + } + + private boolean mKeepRatio = false; + + public void setKeepRatio(boolean enabled) { + mKeepRatio = enabled; + fixSize(); + } + + public void fixSize() { + if (mViewWidth != 0 && mViewHeight != 0) { + if (mKeepRatio) { + if ( mVideoWidth * mViewHeight > mViewWidth * mVideoHeight ) { + mVisibleWidth = mViewWidth; + mVisibleHeight = mViewWidth * mVideoHeight / mVideoWidth; + } else if ( mVideoWidth * mViewHeight < mViewWidth * mVideoHeight ) { + mVisibleWidth = mViewHeight * mVideoWidth / mVideoHeight; + mVisibleHeight = mViewHeight; + } + mVisibleLeft = mViewLeft + (mViewWidth - mVisibleWidth) / 2; + mVisibleTop = mViewTop + (mViewHeight - mVisibleHeight) / 2; + } else { + mVisibleLeft = mViewLeft; + mVisibleTop = mViewTop; + mVisibleWidth = mViewWidth; + mVisibleHeight = mViewHeight; + } + } + else { + mVisibleLeft = mViewLeft; + mVisibleTop = mViewTop; + mVisibleWidth = mVideoWidth; + mVisibleHeight = mVideoHeight; + } + + getHolder().setFixedSize(mVisibleWidth, mVisibleHeight); + + FrameLayout.LayoutParams lParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, + FrameLayout.LayoutParams.WRAP_CONTENT); + lParams.leftMargin = mVisibleLeft; + lParams.topMargin = mVisibleTop; + setLayoutParams(lParams); + } + + protected + MediaPlayer.OnVideoSizeChangedListener mSizeChangedListener = + new MediaPlayer.OnVideoSizeChangedListener() { + public void onVideoSizeChanged(MediaPlayer mp, int width, int height) { + mVideoWidth = mp.getVideoWidth(); + mVideoHeight = mp.getVideoHeight(); + if (mVideoWidth != 0 && mVideoHeight != 0) { + getHolder().setFixedSize(mVideoWidth, mVideoHeight); + } + } + }; + + + MediaPlayer.OnPreparedListener mPreparedListener = new MediaPlayer.OnPreparedListener() { + public void onPrepared(MediaPlayer mp) { + mCurrentState = STATE_PREPARED; + + if (mOnPreparedListener != null) { + mOnPreparedListener.onPrepared(mMediaPlayer); + } + + mVideoWidth = mp.getVideoWidth(); + mVideoHeight = mp.getVideoHeight(); + + int seekToPosition = mSeekWhenPrepared; // mSeekWhenPrepared may be changed after seekTo() call + if (seekToPosition != 0) { + seekTo(seekToPosition); + } + if (mVideoWidth != 0 && mVideoHeight != 0) { + fixSize(); + } + + if (mTargetState == STATE_PLAYING) { + start(); + } + } + }; + + private MediaPlayer.OnCompletionListener mCompletionListener = + new MediaPlayer.OnCompletionListener() { + public void onCompletion(MediaPlayer mp) { + mCurrentState = STATE_PLAYBACK_COMPLETED; + mTargetState = STATE_PLAYBACK_COMPLETED; + + mp.release(); + if (mOnVideoEventListener != null) { + mOnVideoEventListener.onVideoEvent(mViewTag,EVENT_COMPLETED); + } + } + }; + + + private static final int EVENT_PLAYING = 0; + private static final int EVENT_PAUSED = 1; + private static final int EVENT_STOPPED = 2; + private static final int EVENT_COMPLETED = 3; + + public interface OnVideoEventListener + { + void onVideoEvent(int tag,int event); + } + + private MediaPlayer.OnErrorListener mErrorListener = + new MediaPlayer.OnErrorListener() { + public boolean onError(MediaPlayer mp, int framework_err, int impl_err) { + Log.d(TAG, "Error: " + framework_err + "," + impl_err); + mCurrentState = STATE_ERROR; + mTargetState = STATE_ERROR; + + /* If an error handler has been supplied, use it and finish. */ + if (mOnErrorListener != null) { + if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err)) { + return true; + } + } + + /* Otherwise, pop up an error dialog so the user knows that + * something bad has happened. Only try and pop up the dialog + * if we're attached to a window. When we're going away and no + * longer have a window, don't bother showing the user an error. + */ + if (getWindowToken() != null) { + Resources r = mContext.getResources(); + int messageId; + + if (framework_err == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK) { + //messageId = com.android.internal.R.string.VideoView_error_text_invalid_progressive_playback; + messageId = r.getIdentifier("VideoView_error_text_invalid_progressive_playback", "string", "android"); + } else { + //messageId = com.android.internal.R.string.VideoView_error_text_unknown; + messageId = r.getIdentifier("VideoView_error_text_unknown", "string", "android"); + } + + int titleId = r.getIdentifier("VideoView_error_title", "string", "android"); + int buttonStringId = r.getIdentifier("VideoView_error_button", "string", "android"); + + new AlertDialog.Builder(mContext) + .setTitle(r.getString(titleId)) + .setMessage(messageId) + .setPositiveButton(r.getString(buttonStringId), + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int whichButton) { + /* If we get here, there is no onError listener, so + * at least inform them that the video is over. + */ + if (mOnVideoEventListener != null) { + mOnVideoEventListener.onVideoEvent(mViewTag,EVENT_COMPLETED); + } + } + }) + .setCancelable(false) + .show(); + } + return true; + } + }; + + private MediaPlayer.OnBufferingUpdateListener mBufferingUpdateListener = + new MediaPlayer.OnBufferingUpdateListener() { + public void onBufferingUpdate(MediaPlayer mp, int percent) { + mCurrentBufferPercentage = percent; + } + }; + + /** + * Register a callback to be invoked when the media file + * is loaded and ready to go. + * + * @param l The callback that will be run + */ + public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) + { + mOnPreparedListener = l; + } + + /** + * Register a callback to be invoked when the end of a media file + * has been reached during playback. + * + * @param l The callback that will be run + */ + public void setOnCompletionListener(OnVideoEventListener l) + { + mOnVideoEventListener = l; + } + + /** + * Register a callback to be invoked when an error occurs + * during playback or setup. If no listener is specified, + * or if the listener returned false, VideoView will inform + * the user of any errors. + * + * @param l The callback that will be run + */ + public void setOnErrorListener(OnErrorListener l) + { + mOnErrorListener = l; + } + + SurfaceHolder.Callback mSHCallback = new SurfaceHolder.Callback() + { + public void surfaceChanged(SurfaceHolder holder, int format, + int w, int h) + { + boolean isValidState = (mTargetState == STATE_PLAYING); + boolean hasValidSize = (mVideoWidth == w && mVideoHeight == h); + if (mMediaPlayer != null && isValidState && hasValidSize) { + if (mSeekWhenPrepared != 0) { + seekTo(mSeekWhenPrepared); + } + start(); + } + } + + public void surfaceCreated(SurfaceHolder holder) + { + mSurfaceHolder = holder; + openVideo(); + } + + public void surfaceDestroyed(SurfaceHolder holder) + { + // after we return from this we can't use the surface any more + mSurfaceHolder = null; + + release(true); + } + }; + + /* + * release the media player in any state + */ + private void release(boolean cleartargetstate) { + if (mMediaPlayer != null) { + mMediaPlayer.reset(); + mMediaPlayer.release(); + mMediaPlayer = null; + mCurrentState = STATE_IDLE; + if (cleartargetstate) { + mTargetState = STATE_IDLE; + } + } + } + + public void start() { + if (isInPlaybackState()) { + mMediaPlayer.start(); + mCurrentState = STATE_PLAYING; + if (mOnVideoEventListener != null) { + mOnVideoEventListener.onVideoEvent(mViewTag, EVENT_PLAYING); + } + } + mTargetState = STATE_PLAYING; + } + + public void pause() { + if (isInPlaybackState()) { + if (mMediaPlayer.isPlaying()) { + mMediaPlayer.pause(); + mCurrentState = STATE_PAUSED; + if (mOnVideoEventListener != null) { + mOnVideoEventListener.onVideoEvent(mViewTag, EVENT_PAUSED); + } + } + } + mTargetState = STATE_PAUSED; + } + + public void stop() { + if (isInPlaybackState()) { + if (mMediaPlayer.isPlaying()) { + stopPlayback(); + if (mOnVideoEventListener != null) { + mOnVideoEventListener.onVideoEvent(mViewTag, EVENT_STOPPED); + } + } + } + } + + public void suspend() { + release(false); + } + + public void resume() { + if (isInPlaybackState()) { + if (mCurrentState == STATE_PAUSED) { + mMediaPlayer.start(); + mCurrentState = STATE_PLAYING; + if (mOnVideoEventListener != null) { + mOnVideoEventListener.onVideoEvent(mViewTag, EVENT_PLAYING); + } + } + } + } + + public void restart() { + if (isInPlaybackState()) { + mMediaPlayer.seekTo(0); + mMediaPlayer.start(); + mCurrentState = STATE_PLAYING; + mTargetState = STATE_PLAYING; + } + } + // cache duration as mDuration for faster access + public int getDuration() { + if (isInPlaybackState()) { + if (mDuration > 0) { + return mDuration; + } + mDuration = mMediaPlayer.getDuration(); + return mDuration; + } + mDuration = -1; + return mDuration; + } + + public int getCurrentPosition() { + if (isInPlaybackState()) { + return mMediaPlayer.getCurrentPosition(); + } + return 0; + } + + public void seekTo(int msec) { + if (isInPlaybackState()) { + mMediaPlayer.seekTo(msec); + mSeekWhenPrepared = 0; + } else { + mSeekWhenPrepared = msec; + } + } + + public boolean isPlaying() { + return isInPlaybackState() && mMediaPlayer.isPlaying(); + } + + public int getBufferPercentage() { + if (mMediaPlayer != null) { + return mCurrentBufferPercentage; + } + return 0; + } + + public boolean isInPlaybackState() { + return (mMediaPlayer != null && + mCurrentState != STATE_ERROR && + mCurrentState != STATE_IDLE && + mCurrentState != STATE_PREPARING); + } + + @Override + public boolean canPause() { + // TODO Auto-generated method stub + return true; + } + + @Override + public boolean canSeekBackward() { + // TODO Auto-generated method stub + return true; + } + + @Override + public boolean canSeekForward() { + // TODO Auto-generated method stub + return true; + } + +} diff --git a/cocos/2d/platform/android/jni/TouchesJni.cpp b/cocos/2d/platform/android/jni/TouchesJni.cpp index d6c33ad564..3d53f3204b 100644 --- a/cocos/2d/platform/android/jni/TouchesJni.cpp +++ b/cocos/2d/platform/android/jni/TouchesJni.cpp @@ -65,28 +65,41 @@ extern "C" { cocos2d::Director::getInstance()->getOpenGLView()->handleTouchesCancel(size, id, x, y); } - #define KEYCODE_BACK 0x04 - #define KEYCODE_MENU 0x52 - +#define KEYCODE_BACK 0x04 +#define KEYCODE_MENU 0x52 +#define KEYCODE_DPAD_UP 0x13 +#define KEYCODE_DPAD_DOWN 0x14 +#define KEYCODE_DPAD_LEFT 0x15 +#define KEYCODE_DPAD_RIGHT 0x16 +#define KEYCODE_ENTER 0x42 +#define KEYCODE_PLAY 0x7e +#define KEYCODE_DPAD_CENTER 0x17 + + + static std::unordered_map g_keyCodeMap = { + { KEYCODE_BACK , cocos2d::EventKeyboard::KeyCode::KEY_ESCAPE}, + { KEYCODE_MENU , cocos2d::EventKeyboard::KeyCode::KEY_MENU}, + { KEYCODE_DPAD_UP , cocos2d::EventKeyboard::KeyCode::KEY_DPAD_UP }, + { KEYCODE_DPAD_DOWN , cocos2d::EventKeyboard::KeyCode::KEY_DPAD_DOWN }, + { KEYCODE_DPAD_LEFT , cocos2d::EventKeyboard::KeyCode::KEY_DPAD_LEFT }, + { KEYCODE_DPAD_RIGHT , cocos2d::EventKeyboard::KeyCode::KEY_DPAD_RIGHT }, + { KEYCODE_ENTER , cocos2d::EventKeyboard::KeyCode::KEY_ENTER}, + { KEYCODE_PLAY , cocos2d::EventKeyboard::KeyCode::KEY_PLAY}, + { KEYCODE_DPAD_CENTER , cocos2d::EventKeyboard::KeyCode::KEY_DPAD_CENTER}, + + }; + JNIEXPORT jboolean JNICALL Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeKeyDown(JNIEnv * env, jobject thiz, jint keyCode) { Director* pDirector = Director::getInstance(); - switch (keyCode) { - case KEYCODE_BACK: - { - cocos2d::EventKeyboard event(cocos2d::EventKeyboard::KeyCode::KEY_BACKSPACE, false); - cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); - return JNI_TRUE; - } - case KEYCODE_MENU: - { - cocos2d::EventKeyboard event(cocos2d::EventKeyboard::KeyCode::KEY_MENU, false); - cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); - - return JNI_TRUE; - } - default: - return JNI_FALSE; + + auto iterKeyCode = g_keyCodeMap.find(keyCode); + if (iterKeyCode == g_keyCodeMap.end()) { + return JNI_FALSE; } - return JNI_FALSE; - } -} + + cocos2d::EventKeyboard::KeyCode cocos2dKey = g_keyCodeMap.at(keyCode); + cocos2d::EventKeyboard event(cocos2dKey, false); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event); + return JNI_TRUE; + + }} diff --git a/cocos/2d/platform/winrt/CCFreeTypeFont.cpp b/cocos/2d/platform/winrt/CCFreeTypeFont.cpp index 8c45db23c7..9f5b4acc58 100644 --- a/cocos/2d/platform/winrt/CCFreeTypeFont.cpp +++ b/cocos/2d/platform/winrt/CCFreeTypeFont.cpp @@ -84,6 +84,10 @@ unsigned char* CCFreeTypeFont::initWithString(const char * text, const FontDefin m_inWidth = textDefinition._dimensions.width; m_inHeight = textDefinition._dimensions.height; + m_fontFillColorR = textDefinition._fontFillColor.r; + m_fontFillColorG = textDefinition._fontFillColor.g; + m_fontFillColorB = textDefinition._fontFillColor.b; + #if 0 // check the cache for the font file buffer auto ittFontNames = s_fontsNames.find(textDefinition._fontName); @@ -304,10 +308,10 @@ void CCFreeTypeFont::draw_bitmap(unsigned char* pBuffer, FT_Bitmap* bitmap, FT_ if(value > 0) { FT_Int index = (j * m_width * 4) + (i * 4); + pBuffer[index++] = m_fontFillColorR; + pBuffer[index++] = m_fontFillColorG; + pBuffer[index++] = m_fontFillColorB; pBuffer[index++] = value; - pBuffer[index++] = value; - pBuffer[index++] = value; - pBuffer[index++] = 0xff; } } } diff --git a/cocos/2d/platform/winrt/CCFreeTypeFont.h b/cocos/2d/platform/winrt/CCFreeTypeFont.h index 00f302f4bc..f2fcbe28a2 100644 --- a/cocos/2d/platform/winrt/CCFreeTypeFont.h +++ b/cocos/2d/platform/winrt/CCFreeTypeFont.h @@ -129,6 +129,9 @@ private: FTLineInfo* m_currentLine; // the current line object to add words to. + int m_fontFillColorR; + int m_fontFillColorG; + int m_fontFillColorB; }; NS_CC_END diff --git a/cocos/Android.mk b/cocos/Android.mk index 94fa16b3e8..bdd8f7bc73 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -121,6 +121,8 @@ base/CCEventListenerMouse.cpp \ base/CCEventListenerTouch.cpp \ base/CCEventMouse.cpp \ base/CCEventTouch.cpp \ +base/CCEventFocus.cpp \ +base/CCEventListenerFocus.cpp \ base/CCNS.cpp \ base/CCProfiling.cpp \ base/CCRef.cpp \ diff --git a/cocos/audio/proj.win32/CocosDenshion.vcxproj b/cocos/audio/proj.win32/CocosDenshion.vcxproj index ecde64b8c3..27bbe7021d 100644 --- a/cocos/audio/proj.win32/CocosDenshion.vcxproj +++ b/cocos/audio/proj.win32/CocosDenshion.vcxproj @@ -23,6 +23,8 @@ v100 v110 v110_xp + v120 + v120_xp StaticLibrary @@ -30,6 +32,8 @@ v100 v110 v110_xp + v120 + v120_xp diff --git a/cocos/base/CCEvent.h b/cocos/base/CCEvent.h index 282dcf7ea9..a2c9a4d2d7 100644 --- a/cocos/base/CCEvent.h +++ b/cocos/base/CCEvent.h @@ -48,6 +48,7 @@ public: KEYBOARD, ACCELERATION, MOUSE, + FOCUS, CUSTOM }; diff --git a/cocos/base/CCEventDispatcher.cpp b/cocos/base/CCEventDispatcher.cpp index 9b37cd68c9..8eff6c0581 100644 --- a/cocos/base/CCEventDispatcher.cpp +++ b/cocos/base/CCEventDispatcher.cpp @@ -30,6 +30,7 @@ #include "base/CCEventListenerMouse.h" #include "base/CCEventListenerKeyboard.h" #include "base/CCEventListenerCustom.h" +#include "base/CCEventListenerFocus.h" #include "2d/CCScene.h" #include "base/CCDirector.h" @@ -85,6 +86,9 @@ static EventListener::ListenerID __getListenerID(Event* event) case Event::Type::MOUSE: ret = EventListenerMouse::LISTENER_ID; break; + case Event::Type::FOCUS: + ret = EventListenerFocus::LISTENER_ID; + break; case Event::Type::TOUCH: // Touch listener is very special, it contains two kinds of listeners, EventListenerTouchOneByOne and EventListenerTouchAllAtOnce. // return UNKNOWN instead. diff --git a/cocos/base/CCEventFocus.cpp b/cocos/base/CCEventFocus.cpp new file mode 100644 index 0000000000..a4a84dbba4 --- /dev/null +++ b/cocos/base/CCEventFocus.cpp @@ -0,0 +1,42 @@ +/**************************************************************************** + Copyright (c) 2014 cocos2d-x.org + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "CCEventFocus.h" + +NS_CC_BEGIN + + +EventFocus::EventFocus(ui::Widget *widgetLoseFocus, ui::Widget* widgetGetFocus) +:Event(Type::FOCUS), +_widgetLoseFocus(widgetLoseFocus), +_widgetGetFocus(widgetGetFocus) +{ + +} + + + + +NS_CC_END \ No newline at end of file diff --git a/cocos/base/CCEventFocus.h b/cocos/base/CCEventFocus.h new file mode 100644 index 0000000000..83fc989143 --- /dev/null +++ b/cocos/base/CCEventFocus.h @@ -0,0 +1,53 @@ +/**************************************************************************** + Copyright (c) 2014 cocos2d-x.org + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __cocos2d_libs__CCEventFocus__ +#define __cocos2d_libs__CCEventFocus__ + +#include "CCEvent.h" + + +NS_CC_BEGIN + +namespace ui { + class Widget; +} + +class EventFocus : public Event +{ +public: + EventFocus(ui::Widget* widgetLoseFocus, ui::Widget* widgetGetFocus); + +private: + ui::Widget *_widgetGetFocus; + ui::Widget *_widgetLoseFocus; + + friend class EventListenerFocus; +}; + + +NS_CC_END + +#endif /* defined(__cocos2d_libs__CCEventFocus__) */ diff --git a/cocos/base/CCEventKeyboard.h b/cocos/base/CCEventKeyboard.h index 9d077d5140..b80ebd8585 100644 --- a/cocos/base/CCEventKeyboard.h +++ b/cocos/base/CCEventKeyboard.h @@ -38,162 +38,169 @@ public: */ enum class KeyCode { - KEY_NONE = 0, - KEY_PAUSE = 0x0013, - KEY_SCROLL_LOCK = 0x1014, - KEY_PRINT = 0x1061, - KEY_SYSREQ = 0x106A, - KEY_BREAK = 0x106B, - KEY_ESCAPE = 0x001B, - KEY_BACKSPACE = 0x0008, - KEY_TAB = 0x0009, - KEY_BACK_TAB = 0x0089, - KEY_RETURN = 0x000D, - KEY_CAPS_LOCK = 0x00E5, - KEY_SHIFT = 0x00E1, - KEY_CTRL = 0x00E3, - KEY_ALT = 0x00E9, - KEY_MENU = 0x1067, - KEY_HYPER = 0x10ED, - KEY_INSERT = 0x1063, - KEY_HOME = 0x1050, - KEY_PG_UP = 0x1055, - KEY_DELETE = 0x10FF, - KEY_END = 0x1057, - KEY_PG_DOWN = 0x1056, - KEY_LEFT_ARROW = 0x1051, - KEY_RIGHT_ARROW = 0x1053, - KEY_UP_ARROW = 0x1052, - KEY_DOWN_ARROW = 0x1054, - KEY_NUM_LOCK = 0x107F, - KEY_KP_PLUS = 0x10AB, - KEY_KP_MINUS = 0x10AD, - KEY_KP_MULTIPLY = 0x10AA, - KEY_KP_DIVIDE = 0x10AF, - KEY_KP_ENTER = 0x108D, - KEY_KP_HOME = 0x10B7, - KEY_KP_UP = 0x10B8, - KEY_KP_PG_UP = 0x10B9, - KEY_KP_LEFT = 0x10B4, - KEY_KP_FIVE = 0x10B5, - KEY_KP_RIGHT = 0x10B6, - KEY_KP_END = 0x10B1, - KEY_KP_DOWN = 0x10B2, - KEY_KP_PG_DOWN = 0x10B3, - KEY_KP_INSERT = 0x10B0, - KEY_KP_DELETE = 0x10AE, - KEY_F1 = 0x00BE, - KEY_F2 = 0x00BF, - KEY_F3 = 0x00C0, - KEY_F4 = 0x00C1, - KEY_F5 = 0x00C2, - KEY_F6 = 0x00C3, - KEY_F7 = 0x00C4, - KEY_F8 = 0x00C5, - KEY_F9 = 0x00C6, - KEY_F10 = 0x00C7, - KEY_F11 = 0x00C8, - KEY_F12 = 0x00C9, - KEY_SPACE = ' ', - KEY_EXCLAM = '!', - KEY_QUOTE = '"', - KEY_NUMBER = '#', - KEY_DOLLAR = '$', - KEY_PERCENT = '%', - KEY_CIRCUMFLEX = '^', - KEY_AMPERSAND = '&', - KEY_APOSTROPHE = '\'', - KEY_LEFT_PARENTHESIS = '(', - KEY_RIGHT_PARENTHESIS = ')', - KEY_ASTERISK = '*', - KEY_PLUS = '+', - KEY_COMMA = ',', - KEY_MINUS = '-', - KEY_PERIOD = '.', - KEY_SLASH = '/', - KEY_0 = '0', - KEY_1 = '1', - KEY_2 = '2', - KEY_3 = '3', - KEY_4 = '4', - KEY_5 = '5', - KEY_6 = '6', - KEY_7 = '7', - KEY_8 = '8', - KEY_9 = '9', - KEY_COLON = ':', - KEY_SEMICOLON = ';', - KEY_LESS_THAN = '<', - KEY_EQUAL = '=', - KEY_GREATER_THAN = '>', - KEY_QUESTION = '?', - KEY_AT = '@', - KEY_CAPITAL_A = 'A', - KEY_CAPITAL_B = 'B', - KEY_CAPITAL_C = 'C', - KEY_CAPITAL_D = 'D', - KEY_CAPITAL_E = 'E', - KEY_CAPITAL_F = 'F', - KEY_CAPITAL_G = 'G', - KEY_CAPITAL_H = 'H', - KEY_CAPITAL_I = 'I', - KEY_CAPITAL_J = 'J', - KEY_CAPITAL_K = 'K', - KEY_CAPITAL_L = 'L', - KEY_CAPITAL_M = 'M', - KEY_CAPITAL_N = 'N', - KEY_CAPITAL_O = 'O', - KEY_CAPITAL_P = 'P', - KEY_CAPITAL_Q = 'Q', - KEY_CAPITAL_R = 'R', - KEY_CAPITAL_S = 'S', - KEY_CAPITAL_T = 'T', - KEY_CAPITAL_U = 'U', - KEY_CAPITAL_V = 'V', - KEY_CAPITAL_W = 'W', - KEY_CAPITAL_X = 'X', - KEY_CAPITAL_Y = 'Y', - KEY_CAPITAL_Z = 'Z', - KEY_LEFT_BRACKET = '[', - KEY_BACK_SLASH = '\\', - KEY_RIGHT_BRACKET = ']', - KEY_UNDERSCORE = '_', - KEY_GRAVE = '`', - KEY_A = 'a', - KEY_B = 'b', - KEY_C = 'c', - KEY_D = 'd', - KEY_E = 'e', - KEY_F = 'f', - KEY_G = 'g', - KEY_H = 'h', - KEY_I = 'i', - KEY_J = 'j', - KEY_K = 'k', - KEY_L = 'l', - KEY_M = 'm', - KEY_N = 'n', - KEY_O = 'o', - KEY_P = 'p', - KEY_Q = 'q', - KEY_R = 'r', - KEY_S = 's', - KEY_T = 't', - KEY_U = 'u', - KEY_V = 'v', - KEY_W = 'w', - KEY_X = 'x', - KEY_Y = 'y', - KEY_Z = 'z', - KEY_LEFT_BRACE = '{', - KEY_BAR = '|', - KEY_RIGHT_BRACE = '}', - KEY_TILDE = '~', - KEY_EURO = 0x20AC, - KEY_POUND = 0x00A3, - KEY_YEN = 0x00A5, - KEY_MIDDLE_DOT = 0x0095, - KEY_SEARCH = 0xFFAA + KEY_NONE, + KEY_PAUSE, + KEY_SCROLL_LOCK, + KEY_PRINT, + KEY_SYSREQ, + KEY_BREAK, + KEY_ESCAPE, + KEY_BACKSPACE, + KEY_TAB, + KEY_BACK_TAB, + KEY_RETURN, + KEY_CAPS_LOCK, + KEY_SHIFT, + KEY_CTRL, + KEY_ALT, + KEY_MENU, + KEY_HYPER, + KEY_INSERT, + KEY_HOME, + KEY_PG_UP, + KEY_DELETE, + KEY_END, + KEY_PG_DOWN, + KEY_LEFT_ARROW, + KEY_RIGHT_ARROW, + KEY_UP_ARROW, + KEY_DOWN_ARROW, + KEY_NUM_LOCK, + KEY_KP_PLUS, + KEY_KP_MINUS, + KEY_KP_MULTIPLY, + KEY_KP_DIVIDE, + KEY_KP_ENTER, + KEY_KP_HOME, + KEY_KP_UP, + KEY_KP_PG_UP, + KEY_KP_LEFT, + KEY_KP_FIVE, + KEY_KP_RIGHT, + KEY_KP_END, + KEY_KP_DOWN, + KEY_KP_PG_DOWN, + KEY_KP_INSERT, + KEY_KP_DELETE, + KEY_F1, + KEY_F2, + KEY_F3, + KEY_F4, + KEY_F5, + KEY_F6, + KEY_F7, + KEY_F8, + KEY_F9, + KEY_F10, + KEY_F11, + KEY_F12, + KEY_SPACE, + KEY_EXCLAM, + KEY_QUOTE, + KEY_NUMBER, + KEY_DOLLAR, + KEY_PERCENT, + KEY_CIRCUMFLEX, + KEY_AMPERSAND, + KEY_APOSTROPHE, + KEY_LEFT_PARENTHESIS, + KEY_RIGHT_PARENTHESIS, + KEY_ASTERISK, + KEY_PLUS, + KEY_COMMA, + KEY_MINUS, + KEY_PERIOD, + KEY_SLASH, + KEY_0, + KEY_1, + KEY_2, + KEY_3, + KEY_4, + KEY_5, + KEY_6, + KEY_7, + KEY_8, + KEY_9, + KEY_COLON, + KEY_SEMICOLON, + KEY_LESS_THAN, + KEY_EQUAL, + KEY_GREATER_THAN, + KEY_QUESTION, + KEY_AT, + KEY_CAPITAL_A, + KEY_CAPITAL_B, + KEY_CAPITAL_C, + KEY_CAPITAL_D, + KEY_CAPITAL_E, + KEY_CAPITAL_F, + KEY_CAPITAL_G, + KEY_CAPITAL_H, + KEY_CAPITAL_I, + KEY_CAPITAL_J, + KEY_CAPITAL_K, + KEY_CAPITAL_L, + KEY_CAPITAL_M, + KEY_CAPITAL_N, + KEY_CAPITAL_O, + KEY_CAPITAL_P, + KEY_CAPITAL_Q, + KEY_CAPITAL_R, + KEY_CAPITAL_S, + KEY_CAPITAL_T, + KEY_CAPITAL_U, + KEY_CAPITAL_V, + KEY_CAPITAL_W, + KEY_CAPITAL_X, + KEY_CAPITAL_Y, + KEY_CAPITAL_Z, + KEY_LEFT_BRACKET, + KEY_BACK_SLASH, + KEY_RIGHT_BRACKET, + KEY_UNDERSCORE, + KEY_GRAVE, + KEY_A, + KEY_B, + KEY_C, + KEY_D, + KEY_E, + KEY_F, + KEY_G, + KEY_H, + KEY_I, + KEY_J, + KEY_K, + KEY_L, + KEY_M, + KEY_N, + KEY_O, + KEY_P, + KEY_Q, + KEY_R, + KEY_S, + KEY_T, + KEY_U, + KEY_V, + KEY_W, + KEY_X, + KEY_Y, + KEY_Z, + KEY_LEFT_BRACE, + KEY_BAR, + KEY_RIGHT_BRACE, + KEY_TILDE, + KEY_EURO, + KEY_POUND, + KEY_YEN, + KEY_MIDDLE_DOT, + KEY_SEARCH, + KEY_DPAD_LEFT, + KEY_DPAD_RIGHT, + KEY_DPAD_UP, + KEY_DPAD_DOWN, + KEY_DPAD_CENTER, + KEY_ENTER, + KEY_PLAY, }; EventKeyboard(KeyCode keyCode, bool isPressed); diff --git a/cocos/base/CCEventListener.h b/cocos/base/CCEventListener.h index 1c001aa1d4..ef4370289b 100644 --- a/cocos/base/CCEventListener.h +++ b/cocos/base/CCEventListener.h @@ -54,6 +54,7 @@ public: KEYBOARD, MOUSE, ACCELERATION, + FOCUS, CUSTOM }; diff --git a/cocos/base/CCEventListenerFocus.cpp b/cocos/base/CCEventListenerFocus.cpp new file mode 100644 index 0000000000..dd6c9fc114 --- /dev/null +++ b/cocos/base/CCEventListenerFocus.cpp @@ -0,0 +1,98 @@ +/**************************************************************************** + Copyright (c) 2014 cocos2d-x.org + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "CCEventListenerFocus.h" +#include "CCEventFocus.h" +#include "ccMacros.h" + +NS_CC_BEGIN + + +const std::string EventListenerFocus::LISTENER_ID = "__cc_focus_event"; + + +EventListenerFocus::EventListenerFocus() +:onFocusChanged(nullptr) +{ + +} + +EventListenerFocus::~EventListenerFocus() +{ + CCLOGINFO("In the destructor of EventListenerFocus, %p", this); +} + +EventListenerFocus* EventListenerFocus::create() +{ + EventListenerFocus* ret = new EventListenerFocus; + if (ret && ret->init()) { + ret->autorelease(); + return ret; + } + CC_SAFE_DELETE(ret); + return nullptr; +} + +EventListenerFocus* EventListenerFocus::clone() +{ + EventListenerFocus* ret = new EventListenerFocus; + if (ret && ret->init()) { + ret->autorelease(); + + ret->onFocusChanged = onFocusChanged; + } + else + { + CC_SAFE_DELETE(ret); + } + return ret; +} + +bool EventListenerFocus::init() +{ + auto listener = [this](Event* event){ + auto focusEvent = static_cast(event); + onFocusChanged(focusEvent->_widgetLoseFocus, focusEvent->_widgetGetFocus); + }; + if (EventListener::init(Type::FOCUS, LISTENER_ID, listener)) { + return true; + } + return false; +} + +bool EventListenerFocus::checkAvailable() +{ + if (onFocusChanged == nullptr) + { + CCASSERT(false, "Invalid EventListenerFocus!"); + return false; + } + + return true; +} + + + +NS_CC_END \ No newline at end of file diff --git a/cocos/base/CCEventListenerFocus.h b/cocos/base/CCEventListenerFocus.h new file mode 100644 index 0000000000..dec59f774a --- /dev/null +++ b/cocos/base/CCEventListenerFocus.h @@ -0,0 +1,65 @@ +/**************************************************************************** + Copyright (c) 2014 cocos2d-x.org + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __cocos2d_libs__CCEventListenerFocus__ +#define __cocos2d_libs__CCEventListenerFocus__ + +#include "CCEventListener.h" + + +NS_CC_BEGIN + +namespace ui { + class Widget; +} + +class EventListenerFocus : public EventListener +{ +public: + static const std::string LISTENER_ID; + static EventListenerFocus* create(); + + virtual ~EventListenerFocus(); + + /// Overrides + virtual EventListenerFocus* clone() override; + virtual bool checkAvailable() override; + // + +public: + std::function onFocusChanged; + +private: + EventListenerFocus(); + bool init(); + + friend class EventDispatcher; +}; + + + +NS_CC_END + +#endif /* defined(__cocos2d_libs__CCEventListenerFocus__) */ diff --git a/cocos/base/CMakeLists.txt b/cocos/base/CMakeLists.txt index eac6fd991b..2c7faeb78f 100644 --- a/cocos/base/CMakeLists.txt +++ b/cocos/base/CMakeLists.txt @@ -20,6 +20,8 @@ set(COCOS_BASE_SRC base/CCEventListenerTouch.cpp base/CCEventMouse.cpp base/CCEventTouch.cpp + base/CCEventFocus.cpp + base/CCEventListenerFocus.cpp base/CCNS.cpp base/CCProfiling.cpp base/CCRef.cpp diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index 065e42ab57..35f75e3159 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -69,6 +69,8 @@ THE SOFTWARE. #include "base/CCEventListenerAcceleration.h" #include "base/CCEventCustom.h" #include "base/CCEventListenerCustom.h" +#include "base/CCEventFocus.h" +#include "base/CCEventListenerFocus.h" // math #include "math/CCAffineTransform.h" diff --git a/cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj b/cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj index f9bebc27e3..1ab8540b96 100644 --- a/cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj +++ b/cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj @@ -21,6 +21,8 @@ v100 v110 v110_xp + v120 + v120_xp Unicode @@ -29,6 +31,8 @@ v100 v110 v110_xp + v120 + v120_xp true Unicode diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index badc94bc75..3e775437f0 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -1113,9 +1113,9 @@ Widget* WidgetPropertiesReader0300::widgetFromJsonDictionary(const rapidjson::Va { if (child->getPositionType() == cocos2d::ui::POSITION_PERCENT) { - child->setPositionPercent(Vector2(child->getPositionPercent().x + 0.5f, child->getPositionPercent().y + 0.5f)); + child->setPositionPercent(Vector2(child->getPositionPercent().x + widget->getAnchorPoint().x, child->getPositionPercent().y + widget->getAnchorPoint().y)); } - child->setPosition(Vector2(child->getPositionX() + widget->getSize().width / 2.0f, child->getPositionY() + widget->getSize().height / 2.0f)); + child->setPosition(Vector2(child->getPositionX() + widget->getAnchorPointInPoints().x, child->getPositionY() + widget->getAnchorPointInPoints().y)); } widget->addChild(child); } diff --git a/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj b/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj index c8ecbfb141..f87a9f3f36 100644 --- a/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj +++ b/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj @@ -135,6 +135,8 @@ v100 v110 v110_xp + v120 + v120_xp Unicode @@ -143,6 +145,8 @@ v100 v110 v110_xp + v120 + v120_xp true Unicode diff --git a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj index 5391b02a6c..1908cd64a2 100644 --- a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj +++ b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj @@ -76,6 +76,8 @@ v100 v110 v110_xp + v120 + v120_xp Unicode @@ -84,6 +86,8 @@ v100 v110 v110_xp + v120 + v120_xp true Unicode diff --git a/cocos/network/proj.win32/libNetwork.vcxproj b/cocos/network/proj.win32/libNetwork.vcxproj index 761ab39423..81d55f49d3 100644 --- a/cocos/network/proj.win32/libNetwork.vcxproj +++ b/cocos/network/proj.win32/libNetwork.vcxproj @@ -35,6 +35,8 @@ v100 v110 v110_xp + v120 + v120_xp StaticLibrary @@ -42,6 +44,8 @@ v100 v110 v110_xp + v120 + v120_xp diff --git a/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua b/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua index 0aad939852..78fa52fdeb 100644 --- a/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua +++ b/cocos/scripting/lua-bindings/auto/api/ActionCamera.lua @@ -6,7 +6,7 @@ -------------------------------- -- overload function: setEye(float, float, float) -- --- overload function: setEye(array_table) +-- overload function: setEye(vector3_table) -- -- @function [parent=#ActionCamera] setEye -- @param self @@ -17,27 +17,27 @@ -------------------------------- -- @function [parent=#ActionCamera] getEye -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector3_table#vector3_table ret (return value: vector3_table) -------------------------------- -- @function [parent=#ActionCamera] setUp -- @param self --- @param #array_table array +-- @param #vector3_table array -------------------------------- -- @function [parent=#ActionCamera] getCenter -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector3_table#vector3_table ret (return value: vector3_table) -------------------------------- -- @function [parent=#ActionCamera] setCenter -- @param self --- @param #array_table array +-- @param #vector3_table array -------------------------------- -- @function [parent=#ActionCamera] getUp -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector3_table#vector3_table ret (return value: vector3_table) -------------------------------- -- @function [parent=#ActionCamera] startWithTarget diff --git a/cocos/scripting/lua-bindings/auto/api/Armature.lua b/cocos/scripting/lua-bindings/auto/api/Armature.lua index f41c59ddfd..695a07327d 100644 --- a/cocos/scripting/lua-bindings/auto/api/Armature.lua +++ b/cocos/scripting/lua-bindings/auto/api/Armature.lua @@ -141,19 +141,19 @@ -------------------------------- -- @function [parent=#Armature] setAnchorPoint -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Armature] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- -- @function [parent=#Armature] getAnchorPointInPoints -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Armature] update @@ -163,7 +163,7 @@ -------------------------------- -- @function [parent=#Armature] getNodeToParentTransform -- @param self --- @return Matrix#Matrix ret (return value: cc.Matrix) +-- @return matrix_table#matrix_table ret (return value: matrix_table) -------------------------------- -- @function [parent=#Armature] getBoundingBox diff --git a/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua b/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua index 118eab29d1..4b895602db 100644 --- a/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/AtlasNode.lua @@ -50,7 +50,7 @@ -- @function [parent=#AtlasNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- @@ -61,12 +61,12 @@ -------------------------------- -- @function [parent=#AtlasNode] setColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#AtlasNode] getColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#AtlasNode] setOpacityModifyRGB diff --git a/cocos/scripting/lua-bindings/auto/api/BaseData.lua b/cocos/scripting/lua-bindings/auto/api/BaseData.lua index b6084d2971..f8275efc31 100644 --- a/cocos/scripting/lua-bindings/auto/api/BaseData.lua +++ b/cocos/scripting/lua-bindings/auto/api/BaseData.lua @@ -6,12 +6,12 @@ -------------------------------- -- @function [parent=#BaseData] getColor -- @param self --- @return color4B_table#color4B_table ret (return value: color4B_table) +-- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- -- @function [parent=#BaseData] setColor -- @param self --- @param #color4B_table color4b +-- @param #color4b_table color4b -------------------------------- -- @function [parent=#BaseData] create diff --git a/cocos/scripting/lua-bindings/auto/api/BatchNode.lua b/cocos/scripting/lua-bindings/auto/api/BatchNode.lua index 6ab9846a70..43e201ca00 100644 --- a/cocos/scripting/lua-bindings/auto/api/BatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/BatchNode.lua @@ -30,7 +30,7 @@ -- @function [parent=#BatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Bone.lua b/cocos/scripting/lua-bindings/auto/api/Bone.lua index 5831335aaa..ce56baf22c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Bone.lua +++ b/cocos/scripting/lua-bindings/auto/api/Bone.lua @@ -162,7 +162,7 @@ -------------------------------- -- @function [parent=#Bone] getNodeToArmatureTransform -- @param self --- @return Matrix#Matrix ret (return value: cc.Matrix) +-- @return matrix_table#matrix_table ret (return value: matrix_table) -------------------------------- -- @function [parent=#Bone] getDisplayManager @@ -192,7 +192,7 @@ -------------------------------- -- @function [parent=#Bone] updateDisplayedColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#Bone] setLocalZOrder @@ -202,7 +202,7 @@ -------------------------------- -- @function [parent=#Bone] getNodeToWorldTransform -- @param self --- @return Matrix#Matrix ret (return value: cc.Matrix) +-- @return matrix_table#matrix_table ret (return value: matrix_table) -------------------------------- -- @function [parent=#Bone] update diff --git a/cocos/scripting/lua-bindings/auto/api/Button.lua b/cocos/scripting/lua-bindings/auto/api/Button.lua index f4b9700b56..cab3c968e6 100644 --- a/cocos/scripting/lua-bindings/auto/api/Button.lua +++ b/cocos/scripting/lua-bindings/auto/api/Button.lua @@ -26,7 +26,7 @@ -------------------------------- -- @function [parent=#Button] setTitleColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#Button] setCapInsetsDisabledRenderer @@ -112,7 +112,7 @@ -------------------------------- -- @function [parent=#Button] getTitleColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#Button] setPressedActionEnabled diff --git a/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua b/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua index 91086fba88..307d52ecb1 100644 --- a/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/CardinalSplineBy.lua @@ -16,7 +16,7 @@ -------------------------------- -- @function [parent=#CardinalSplineBy] updatePosition -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#CardinalSplineBy] reverse diff --git a/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua b/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua index bc9f21a6f6..c32bd94523 100644 --- a/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/CardinalSplineTo.lua @@ -11,7 +11,7 @@ -------------------------------- -- @function [parent=#CardinalSplineTo] updatePosition -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#CardinalSplineTo] initWithDuration diff --git a/cocos/scripting/lua-bindings/auto/api/ContourData.lua b/cocos/scripting/lua-bindings/auto/api/ContourData.lua index 7b648eed60..0e52073164 100644 --- a/cocos/scripting/lua-bindings/auto/api/ContourData.lua +++ b/cocos/scripting/lua-bindings/auto/api/ContourData.lua @@ -11,7 +11,7 @@ -------------------------------- -- @function [parent=#ContourData] addVertex -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ContourData] create diff --git a/cocos/scripting/lua-bindings/auto/api/Control.lua b/cocos/scripting/lua-bindings/auto/api/Control.lua index 7c40b76557..263898c5d9 100644 --- a/cocos/scripting/lua-bindings/auto/api/Control.lua +++ b/cocos/scripting/lua-bindings/auto/api/Control.lua @@ -82,7 +82,7 @@ -- @function [parent=#Control] getTouchLocation -- @param self -- @param #cc.Touch touch --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Control] isHighlighted diff --git a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua index c2f7157658..c2188cec37 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlButton.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlButton.lua @@ -43,12 +43,12 @@ -------------------------------- -- @function [parent=#ControlButton] setLabelAnchorPoint -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ControlButton] getLabelAnchorPoint -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#ControlButton] getTitleTTFSizeForState @@ -81,7 +81,7 @@ -------------------------------- -- @function [parent=#ControlButton] getCurrentTitleColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#ControlButton] setEnabled @@ -132,12 +132,12 @@ -- @function [parent=#ControlButton] getTitleColorForState -- @param self -- @param #cc.Control::State state --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#ControlButton] setTitleColorForState -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #cc.Control::State state -------------------------------- @@ -248,12 +248,12 @@ -------------------------------- -- @function [parent=#ControlButton] setColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#ControlButton] getColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#ControlButton] onTouchCancelled diff --git a/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua index 31436870f2..9cf9687a1d 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlColourPicker.lua @@ -16,7 +16,7 @@ -------------------------------- -- @function [parent=#ControlColourPicker] setColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#ControlColourPicker] hueSliderValueChanged diff --git a/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua index 2cacb772b1..1cd38bb25c 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlHuePicker.lua @@ -12,7 +12,7 @@ -- @function [parent=#ControlHuePicker] initWithTargetAndPos -- @param self -- @param #cc.Node node --- @param #array_table array +-- @param #vector2_table array -- @return bool#bool ret (return value: bool) -------------------------------- @@ -23,7 +23,7 @@ -------------------------------- -- @function [parent=#ControlHuePicker] getStartPos -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#ControlHuePicker] getHue @@ -64,7 +64,7 @@ -- @function [parent=#ControlHuePicker] create -- @param self -- @param #cc.Node node --- @param #array_table array +-- @param #vector2_table array -- @return ControlHuePicker#ControlHuePicker ret (return value: cc.ControlHuePicker) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua b/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua index cc6641c57c..40f9228399 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlPotentiometer.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#ControlPotentiometer] setPreviousLocation -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ControlPotentiometer] setValue @@ -26,16 +26,16 @@ -------------------------------- -- @function [parent=#ControlPotentiometer] angleInDegreesBetweenLineFromPoint_toPoint_toLineFromPoint_toPoint -- @param self --- @param #array_table array --- @param #array_table array --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @return float#float ret (return value: float) -------------------------------- -- @function [parent=#ControlPotentiometer] potentiometerBegan -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ControlPotentiometer] setMaximumValue @@ -60,19 +60,19 @@ -------------------------------- -- @function [parent=#ControlPotentiometer] getPreviousLocation -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#ControlPotentiometer] distanceBetweenPointAndPoint -- @param self --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @return float#float ret (return value: float) -------------------------------- -- @function [parent=#ControlPotentiometer] potentiometerEnded -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ControlPotentiometer] setProgressTimer @@ -100,7 +100,7 @@ -------------------------------- -- @function [parent=#ControlPotentiometer] potentiometerMoved -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ControlPotentiometer] create diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua b/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua index 081e840ba6..e19d124639 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSaturationBrightnessPicker.lua @@ -12,13 +12,13 @@ -- @function [parent=#ControlSaturationBrightnessPicker] initWithTargetAndPos -- @param self -- @param #cc.Node node --- @param #array_table array +-- @param #vector2_table array -- @return bool#bool ret (return value: bool) -------------------------------- -- @function [parent=#ControlSaturationBrightnessPicker] getStartPos -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#ControlSaturationBrightnessPicker] getOverlay @@ -54,7 +54,7 @@ -- @function [parent=#ControlSaturationBrightnessPicker] create -- @param self -- @param #cc.Node node --- @param #array_table array +-- @param #vector2_table array -- @return ControlSaturationBrightnessPicker#ControlSaturationBrightnessPicker ret (return value: cc.ControlSaturationBrightnessPicker) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua b/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua index cff4fdfd6b..ddcaefb0cd 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSlider.lua @@ -12,7 +12,7 @@ -- @function [parent=#ControlSlider] locationFromTouch -- @param self -- @param #cc.Touch touch --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#ControlSlider] setSelectedThumbSprite diff --git a/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua b/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua index d447a1c37f..442182a7df 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlStepper.lua @@ -31,7 +31,7 @@ -------------------------------- -- @function [parent=#ControlStepper] updateLayoutUsingTouchLocation -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ControlStepper] setValueWithSendingEvent diff --git a/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua b/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua index 07bdd24a45..e4b2db3479 100644 --- a/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua +++ b/cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua @@ -47,7 +47,7 @@ -- @function [parent=#ControlSwitch] locationFromTouch -- @param self -- @param #cc.Touch touch --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- overload function: create(cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite) diff --git a/cocos/scripting/lua-bindings/auto/api/Director.lua b/cocos/scripting/lua-bindings/auto/api/Director.lua index a5b572f5b4..1b7b572392 100644 --- a/cocos/scripting/lua-bindings/auto/api/Director.lua +++ b/cocos/scripting/lua-bindings/auto/api/Director.lua @@ -58,7 +58,7 @@ -- @function [parent=#Director] loadMatrix -- @param self -- @param #cc.MATRIX_STACK_TYPE matrix_stack_type --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -------------------------------- -- @function [parent=#Director] getNotificationNode @@ -83,7 +83,7 @@ -------------------------------- -- @function [parent=#Director] getVisibleOrigin -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Director] mainLoop @@ -107,8 +107,8 @@ -------------------------------- -- @function [parent=#Director] convertToUI -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Director] setDefaultValues @@ -177,8 +177,8 @@ -------------------------------- -- @function [parent=#Director] convertToGL -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Director] purgeCachedData @@ -212,7 +212,7 @@ -- @function [parent=#Director] getMatrix -- @param self -- @param #cc.MATRIX_STACK_TYPE matrix_stack_type --- @return Matrix#Matrix ret (return value: cc.Matrix) +-- @return matrix_table#matrix_table ret (return value: matrix_table) -------------------------------- -- @function [parent=#Director] popScene @@ -286,7 +286,7 @@ -- @function [parent=#Director] multiplyMatrix -- @param self -- @param #cc.MATRIX_STACK_TYPE matrix_stack_type --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -------------------------------- -- @function [parent=#Director] getActionManager diff --git a/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua b/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua index 9742ad82be..d4614625f8 100644 --- a/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua +++ b/cocos/scripting/lua-bindings/auto/api/DisplayManager.lua @@ -11,7 +11,7 @@ -------------------------------- -- @function [parent=#DisplayManager] getAnchorPointInPoints -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#DisplayManager] getDisplayRenderNodeType @@ -57,7 +57,7 @@ -------------------------------- -- overload function: containPoint(float, float) -- --- overload function: containPoint(array_table) +-- overload function: containPoint(vector2_table) -- -- @function [parent=#DisplayManager] containPoint -- @param self @@ -90,7 +90,7 @@ -------------------------------- -- @function [parent=#DisplayManager] getAnchorPoint -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#DisplayManager] getDecorativeDisplayList diff --git a/cocos/scripting/lua-bindings/auto/api/DrawNode.lua b/cocos/scripting/lua-bindings/auto/api/DrawNode.lua index 85c1b8d837..37665f9ec6 100644 --- a/cocos/scripting/lua-bindings/auto/api/DrawNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/DrawNode.lua @@ -6,16 +6,16 @@ -------------------------------- -- @function [parent=#DrawNode] drawQuadraticBezier -- @param self --- @param #array_table array --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @param #unsigned int int --- @param #color4F_table color4f +-- @param #color4f_table color4f -------------------------------- -- @function [parent=#DrawNode] onDraw -- @param self --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- @@ -25,35 +25,35 @@ -------------------------------- -- @function [parent=#DrawNode] drawTriangle -- @param self --- @param #array_table array --- @param #array_table array --- @param #array_table array --- @param #color4F_table color4f +-- @param #vector2_table array +-- @param #vector2_table array +-- @param #vector2_table array +-- @param #color4f_table color4f -------------------------------- -- @function [parent=#DrawNode] drawDot -- @param self --- @param #array_table array +-- @param #vector2_table array -- @param #float float --- @param #color4F_table color4f +-- @param #color4f_table color4f -------------------------------- -- @function [parent=#DrawNode] drawCubicBezier -- @param self --- @param #array_table array --- @param #array_table array --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @param #unsigned int int --- @param #color4F_table color4f +-- @param #color4f_table color4f -------------------------------- -- @function [parent=#DrawNode] drawSegment -- @param self --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @param #float float --- @param #color4F_table color4f +-- @param #color4f_table color4f -------------------------------- -- @function [parent=#DrawNode] create @@ -64,7 +64,7 @@ -- @function [parent=#DrawNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EditBox.lua b/cocos/scripting/lua-bindings/auto/api/EditBox.lua index a3d04f0f60..c53e8a7daa 100644 --- a/cocos/scripting/lua-bindings/auto/api/EditBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/EditBox.lua @@ -36,12 +36,12 @@ -------------------------------- -- @function [parent=#EditBox] setPlaceholderFontColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#EditBox] setFontColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#EditBox] setPlaceholderFont @@ -109,12 +109,12 @@ -------------------------------- -- @function [parent=#EditBox] setAnchorPoint -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#EditBox] setPosition -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#EditBox] setVisible diff --git a/cocos/scripting/lua-bindings/auto/api/EventFocus.lua b/cocos/scripting/lua-bindings/auto/api/EventFocus.lua new file mode 100644 index 0000000000..be5e16f2ce --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/EventFocus.lua @@ -0,0 +1,12 @@ + +-------------------------------- +-- @module EventFocus +-- @extend Event + +-------------------------------- +-- @function [parent=#EventFocus] EventFocus +-- @param self +-- @param #ccui.Widget widget +-- @param #ccui.Widget widget + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua b/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua new file mode 100644 index 0000000000..df6e2c96e5 --- /dev/null +++ b/cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua @@ -0,0 +1,16 @@ + +-------------------------------- +-- @module EventListenerFocus +-- @extend EventListener + +-------------------------------- +-- @function [parent=#EventListenerFocus] clone +-- @param self +-- @return EventListenerFocus#EventListenerFocus ret (return value: cc.EventListenerFocus) + +-------------------------------- +-- @function [parent=#EventListenerFocus] checkAvailable +-- @param self +-- @return bool#bool ret (return value: bool) + +return nil diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua index e33a0164a1..a7286cf64a 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua @@ -6,17 +6,17 @@ -------------------------------- -- @function [parent=#FadeOutTRTiles] turnOnTile -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#FadeOutTRTiles] turnOffTile -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#FadeOutTRTiles] transformTile -- @param self --- @param #array_table array +-- @param #vector2_table array -- @param #float float -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua b/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua index 0c77b114ee..2b3f539ded 100644 --- a/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#FadeOutUpTiles] transformTile -- @param self --- @param #array_table array +-- @param #vector2_table array -- @param #float float -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/GLProgram.lua b/cocos/scripting/lua-bindings/auto/api/GLProgram.lua index bf7e9daae2..c58c1a78c0 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLProgram.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLProgram.lua @@ -45,13 +45,13 @@ -- @return string#string ret (return value: string) -------------------------------- --- overload function: setUniformsForBuiltins(cc.Matrix) +-- overload function: setUniformsForBuiltins(matrix_table) -- -- overload function: setUniformsForBuiltins() -- -- @function [parent=#GLProgram] setUniformsForBuiltins -- @param self --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -------------------------------- -- @function [parent=#GLProgram] setUniformLocationWith3i diff --git a/cocos/scripting/lua-bindings/auto/api/GLViewProtocol.lua b/cocos/scripting/lua-bindings/auto/api/GLViewProtocol.lua index 9c275b9960..c9d86148e2 100644 --- a/cocos/scripting/lua-bindings/auto/api/GLViewProtocol.lua +++ b/cocos/scripting/lua-bindings/auto/api/GLViewProtocol.lua @@ -53,7 +53,7 @@ -------------------------------- -- @function [parent=#GLViewProtocol] getVisibleOrigin -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#GLViewProtocol] getFrameSize diff --git a/cocos/scripting/lua-bindings/auto/api/GridBase.lua b/cocos/scripting/lua-bindings/auto/api/GridBase.lua index 3ec43d3764..44787b64a8 100644 --- a/cocos/scripting/lua-bindings/auto/api/GridBase.lua +++ b/cocos/scripting/lua-bindings/auto/api/GridBase.lua @@ -34,7 +34,7 @@ -------------------------------- -- @function [parent=#GridBase] getStep -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#GridBase] set2DProjection @@ -43,7 +43,7 @@ -------------------------------- -- @function [parent=#GridBase] setStep -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#GridBase] setTextureFlipped diff --git a/cocos/scripting/lua-bindings/auto/api/JumpBy.lua b/cocos/scripting/lua-bindings/auto/api/JumpBy.lua index 0a46e0a85a..b94e2d7304 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpBy.lua @@ -7,7 +7,7 @@ -- @function [parent=#JumpBy] create -- @param self -- @param #float float --- @param #array_table array +-- @param #vector2_table array -- @param #float float -- @param #int int -- @return JumpBy#JumpBy ret (return value: cc.JumpBy) diff --git a/cocos/scripting/lua-bindings/auto/api/JumpTo.lua b/cocos/scripting/lua-bindings/auto/api/JumpTo.lua index 3c0c1fffbb..30257a00a9 100644 --- a/cocos/scripting/lua-bindings/auto/api/JumpTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/JumpTo.lua @@ -7,7 +7,7 @@ -- @function [parent=#JumpTo] create -- @param self -- @param #float float --- @param #array_table array +-- @param #vector2_table array -- @param #float float -- @param #int int -- @return JumpTo#JumpTo ret (return value: cc.JumpTo) diff --git a/cocos/scripting/lua-bindings/auto/api/Label.lua b/cocos/scripting/lua-bindings/auto/api/Label.lua index ea01834b01..e50bfb44b8 100644 --- a/cocos/scripting/lua-bindings/auto/api/Label.lua +++ b/cocos/scripting/lua-bindings/auto/api/Label.lua @@ -41,7 +41,7 @@ -------------------------------- -- @function [parent=#Label] getTextColor -- @param self --- @return color4B_table#color4B_table ret (return value: color4B_table) +-- @return color4b_table#color4b_table ret (return value: color4b_table) -------------------------------- -- @function [parent=#Label] getCommonLineHeight @@ -82,7 +82,7 @@ -- @function [parent=#Label] setBMFontFilePath -- @param self -- @param #string str --- @param #array_table array +-- @param #vector2_table array -- @return bool#bool ret (return value: bool) -------------------------------- @@ -117,7 +117,7 @@ -------------------------------- -- @function [parent=#Label] enableOutline -- @param self --- @param #color4B_table color4b +-- @param #color4b_table color4b -- @param #int int -------------------------------- @@ -168,7 +168,7 @@ -------------------------------- -- @function [parent=#Label] setTextColor -- @param self --- @param #color4B_table color4b +-- @param #color4b_table color4b -------------------------------- -- @function [parent=#Label] setHeight @@ -183,7 +183,7 @@ -------------------------------- -- @function [parent=#Label] enableGlow -- @param self --- @param #color4B_table color4b +-- @param #color4b_table color4b -------------------------------- -- @function [parent=#Label] getLetter @@ -228,7 +228,7 @@ -- @param #string str -- @param #cc.TextHAlignment texthalignment -- @param #int int --- @param #array_table array +-- @param #vector2_table array -- @return Label#Label ret (return value: cc.Label) -------------------------------- @@ -266,7 +266,7 @@ -- @function [parent=#Label] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- @@ -343,6 +343,6 @@ -------------------------------- -- @function [parent=#Label] updateDisplayedColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b return nil diff --git a/cocos/scripting/lua-bindings/auto/api/LabelBMFont.lua b/cocos/scripting/lua-bindings/auto/api/LabelBMFont.lua index b4b8b0c221..87ec6373d8 100644 --- a/cocos/scripting/lua-bindings/auto/api/LabelBMFont.lua +++ b/cocos/scripting/lua-bindings/auto/api/LabelBMFont.lua @@ -46,7 +46,7 @@ -- @param #string str -- @param #float float -- @param #cc.TextHAlignment texthalignment --- @param #array_table array +-- @param #vector2_table array -- @return bool#bool ret (return value: bool) -------------------------------- @@ -63,7 +63,7 @@ -- @function [parent=#LabelBMFont] setFntFile -- @param self -- @param #string str --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#LabelBMFont] setAlignment @@ -78,7 +78,7 @@ -------------------------------- -- overload function: create() -- --- overload function: create(string, string, float, cc.TextHAlignment, array_table) +-- overload function: create(string, string, float, cc.TextHAlignment, vector2_table) -- -- @function [parent=#LabelBMFont] create -- @param self @@ -86,7 +86,7 @@ -- @param #string str -- @param #float float -- @param #cc.TextHAlignment texthalignment --- @param #array_table array +-- @param #vector2_table array -- @return LabelBMFont#LabelBMFont ret (retunr value: cc.LabelBMFont) -------------------------------- @@ -102,7 +102,7 @@ -------------------------------- -- @function [parent=#LabelBMFont] setColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#LabelBMFont] getChildByTag diff --git a/cocos/scripting/lua-bindings/auto/api/LabelTTF.lua b/cocos/scripting/lua-bindings/auto/api/LabelTTF.lua index c50874f56f..a690ccc3e5 100644 --- a/cocos/scripting/lua-bindings/auto/api/LabelTTF.lua +++ b/cocos/scripting/lua-bindings/auto/api/LabelTTF.lua @@ -77,7 +77,7 @@ -------------------------------- -- @function [parent=#LabelTTF] setFontFillColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #bool bool -------------------------------- @@ -88,7 +88,7 @@ -------------------------------- -- @function [parent=#LabelTTF] enableStroke -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #float float -- @param #bool bool diff --git a/cocos/scripting/lua-bindings/auto/api/LayerColor.lua b/cocos/scripting/lua-bindings/auto/api/LayerColor.lua index 0b9d5d5d9b..8b555df12b 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerColor.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerColor.lua @@ -20,15 +20,15 @@ -- @param #float float -------------------------------- --- overload function: create(color4B_table, float, float) +-- overload function: create(color4b_table, float, float) -- -- overload function: create() -- --- overload function: create(color4B_table) +-- overload function: create(color4b_table) -- -- @function [parent=#LayerColor] create -- @param self --- @param #color4B_table color4b +-- @param #color4b_table color4b -- @param #float float -- @param #float float -- @return LayerColor#LayerColor ret (retunr value: cc.LayerColor) @@ -37,7 +37,7 @@ -- @function [parent=#LayerColor] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua b/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua index 1d90c766c6..f02f0133bb 100644 --- a/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua +++ b/cocos/scripting/lua-bindings/auto/api/LayerGradient.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#LayerGradient] getStartColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#LayerGradient] isCompressedInterpolation @@ -21,7 +21,7 @@ -------------------------------- -- @function [parent=#LayerGradient] setVector -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#LayerGradient] setStartOpacity @@ -41,17 +41,17 @@ -------------------------------- -- @function [parent=#LayerGradient] getVector -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#LayerGradient] setEndColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#LayerGradient] getEndColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#LayerGradient] getEndOpacity @@ -61,20 +61,20 @@ -------------------------------- -- @function [parent=#LayerGradient] setStartColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- --- overload function: create(color4B_table, color4B_table) +-- overload function: create(color4b_table, color4b_table) -- -- overload function: create() -- --- overload function: create(color4B_table, color4B_table, array_table) +-- overload function: create(color4b_table, color4b_table, vector2_table) -- -- @function [parent=#LayerGradient] create -- @param self --- @param #color4B_table color4b --- @param #color4B_table color4b --- @param #array_table array +-- @param #color4b_table color4b +-- @param #color4b_table color4b +-- @param #vector2_table array -- @return LayerGradient#LayerGradient ret (retunr value: cc.LayerGradient) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Layout.lua b/cocos/scripting/lua-bindings/auto/api/Layout.lua index a20debff9f..44f2f895a0 100644 --- a/cocos/scripting/lua-bindings/auto/api/Layout.lua +++ b/cocos/scripting/lua-bindings/auto/api/Layout.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#Layout] setBackGroundColorVector -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Layout] setClippingType @@ -18,21 +18,31 @@ -- @param self -- @param #ccui.LayoutBackGroundColorType layoutbackgroundcolortype +-------------------------------- +-- @function [parent=#Layout] setLoopFocus +-- @param self +-- @param #bool bool + -------------------------------- -- @function [parent=#Layout] setBackGroundImageColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#Layout] getBackGroundColorVector -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Layout] getClippingType -- @param self -- @return LayoutClippingType#LayoutClippingType ret (return value: ccui.LayoutClippingType) +-------------------------------- +-- @function [parent=#Layout] isLoopFocus +-- @param self +-- @return bool#bool ret (return value: bool) + -------------------------------- -- @function [parent=#Layout] removeBackGroundImage -- @param self @@ -59,14 +69,14 @@ -- @param #ccui.TextureResType texturerestype -------------------------------- --- overload function: setBackGroundColor(color3B_table, color3B_table) +-- overload function: setBackGroundColor(color3b_table, color3b_table) -- --- overload function: setBackGroundColor(color3B_table) +-- overload function: setBackGroundColor(color3b_table) -- -- @function [parent=#Layout] setBackGroundColor -- @param self --- @param #color3B_table color3b --- @param #color3B_table color3b +-- @param #color3b_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#Layout] requestDoLayout @@ -80,7 +90,7 @@ -------------------------------- -- @function [parent=#Layout] getBackGroundColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#Layout] setClippingEnabled @@ -90,7 +100,7 @@ -------------------------------- -- @function [parent=#Layout] getBackGroundImageColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#Layout] isBackGroundImageScale9Enabled @@ -105,7 +115,7 @@ -------------------------------- -- @function [parent=#Layout] getBackGroundEndColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#Layout] setBackGroundColorOpacity @@ -117,6 +127,11 @@ -- @param self -- @return unsigned char#unsigned char ret (return value: unsigned char) +-------------------------------- +-- @function [parent=#Layout] isPassFocusToChild +-- @param self +-- @return bool#bool ret (return value: bool) + -------------------------------- -- @function [parent=#Layout] setBackGroundImageCapInsets -- @param self @@ -132,10 +147,15 @@ -- @param self -- @return LayoutType#LayoutType ret (return value: ccui.LayoutType) +-------------------------------- +-- @function [parent=#Layout] setPassFocusToChild +-- @param self +-- @param #bool bool + -------------------------------- -- @function [parent=#Layout] getBackGroundStartColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#Layout] setBackGroundImageScale9Enabled @@ -188,6 +208,13 @@ -- @function [parent=#Layout] sortAllChildren -- @param self +-------------------------------- +-- @function [parent=#Layout] findNextFocusedWidget +-- @param self +-- @param #ccui.FocusDirection focusdirection +-- @param #ccui.Widget widget +-- @return Widget#Widget ret (return value: ccui.Widget) + -------------------------------- -- @function [parent=#Layout] removeChild -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Lens3D.lua b/cocos/scripting/lua-bindings/auto/api/Lens3D.lua index 28148f147c..5d968b4330 100644 --- a/cocos/scripting/lua-bindings/auto/api/Lens3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Lens3D.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#Lens3D] setPosition -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Lens3D] setConcave @@ -21,7 +21,7 @@ -------------------------------- -- @function [parent=#Lens3D] getPosition -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Lens3D] getLensEffect @@ -33,7 +33,7 @@ -- @param self -- @param #float float -- @param #size_table size --- @param #array_table array +-- @param #vector2_table array -- @param #float float -- @return Lens3D#Lens3D ret (return value: cc.Lens3D) diff --git a/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua b/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua index 9a81231381..1d6f1a8850 100644 --- a/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua +++ b/cocos/scripting/lua-bindings/auto/api/MenuItemLabel.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#MenuItemLabel] getDisabledColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#MenuItemLabel] setString @@ -21,7 +21,7 @@ -------------------------------- -- @function [parent=#MenuItemLabel] setDisabledColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#MenuItemLabel] getLabel diff --git a/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua b/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua index 1d0fd73255..8b0553ae90 100644 --- a/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua +++ b/cocos/scripting/lua-bindings/auto/api/MotionStreak.lua @@ -20,7 +20,7 @@ -------------------------------- -- @function [parent=#MotionStreak] tintWithColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#MotionStreak] setStartingPositionInitialized @@ -43,16 +43,16 @@ -- @param #bool bool -------------------------------- --- overload function: create(float, float, float, color3B_table, cc.Texture2D) +-- overload function: create(float, float, float, color3b_table, cc.Texture2D) -- --- overload function: create(float, float, float, color3B_table, string) +-- overload function: create(float, float, float, color3b_table, string) -- -- @function [parent=#MotionStreak] create -- @param self -- @param #float float -- @param #float float -- @param #float float --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #string str -- @return MotionStreak#MotionStreak ret (retunr value: cc.MotionStreak) @@ -99,7 +99,7 @@ -------------------------------- -- overload function: setPosition(float, float) -- --- overload function: setPosition(array_table) +-- overload function: setPosition(vector2_table) -- -- @function [parent=#MotionStreak] setPosition -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/MoveBy.lua b/cocos/scripting/lua-bindings/auto/api/MoveBy.lua index cb0108953f..837c15c792 100644 --- a/cocos/scripting/lua-bindings/auto/api/MoveBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/MoveBy.lua @@ -7,7 +7,7 @@ -- @function [parent=#MoveBy] create -- @param self -- @param #float float --- @param #array_table array +-- @param #vector2_table array -- @return MoveBy#MoveBy ret (return value: cc.MoveBy) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/MoveTo.lua b/cocos/scripting/lua-bindings/auto/api/MoveTo.lua index b2fcb15a7e..569a3f6c61 100644 --- a/cocos/scripting/lua-bindings/auto/api/MoveTo.lua +++ b/cocos/scripting/lua-bindings/auto/api/MoveTo.lua @@ -7,7 +7,7 @@ -- @function [parent=#MoveTo] create -- @param self -- @param #float float --- @param #array_table array +-- @param #vector2_table array -- @return MoveTo#MoveTo ret (return value: cc.MoveTo) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index 48d48d3610..d2a68061ed 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -72,8 +72,8 @@ -------------------------------- -- @function [parent=#Node] convertToWorldSpaceAR -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Node] isIgnoreAnchorPointForPosition @@ -132,12 +132,12 @@ -------------------------------- -- @function [parent=#Node] getNodeToWorldTransform -- @param self --- @return Matrix#Matrix ret (return value: cc.Matrix) +-- @return matrix_table#matrix_table ret (return value: matrix_table) -------------------------------- -- @function [parent=#Node] getPosition3D -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector3_table#vector3_table ret (return value: vector3_table) -------------------------------- -- @function [parent=#Node] removeChild @@ -148,8 +148,8 @@ -------------------------------- -- @function [parent=#Node] convertToWorldSpace -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Node] getScene @@ -180,7 +180,7 @@ -- @function [parent=#Node] convertTouchToNodeSpace -- @param self -- @param #cc.Touch touch --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- overload function: removeAllChildrenWithCleanup(bool) @@ -209,24 +209,24 @@ -------------------------------- -- @function [parent=#Node] getRotation3D -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector3_table#vector3_table ret (return value: vector3_table) -------------------------------- -- @function [parent=#Node] getNodeToParentTransform -- @param self --- @return Matrix#Matrix ret (return value: cc.Matrix) +-- @return matrix_table#matrix_table ret (return value: matrix_table) -------------------------------- -- @function [parent=#Node] convertTouchToNodeSpaceAR -- @param self -- @param #cc.Touch touch --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Node] convertToNodeSpace -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Node] resume @@ -240,7 +240,7 @@ -------------------------------- -- overload function: setPosition(float, float) -- --- overload function: setPosition(array_table) +-- overload function: setPosition(vector2_table) -- -- @function [parent=#Node] setPosition -- @param self @@ -271,7 +271,7 @@ -------------------------------- -- @function [parent=#Node] setRotation3D -- @param self --- @param #array_table array +-- @param #vector3_table array -------------------------------- -- @function [parent=#Node] setPositionX @@ -281,12 +281,12 @@ -------------------------------- -- @function [parent=#Node] setNodeToParentTransform -- @param self --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -------------------------------- -- @function [parent=#Node] getAnchorPoint -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Node] getNumberOfRunningActions @@ -310,8 +310,8 @@ -------------------------------- -- @function [parent=#Node] convertToNodeSpaceAR -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Node] addComponent @@ -332,7 +332,7 @@ -------------------------------- -- @function [parent=#Node] getAnchorPointInPoints -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Node] runAction @@ -362,7 +362,7 @@ -------------------------------- -- @function [parent=#Node] getDisplayedColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#Node] getActionByTag @@ -373,11 +373,11 @@ -------------------------------- -- overload function: setAdditionalTransform(cc.AffineTransform) -- --- overload function: setAdditionalTransform(cc.Matrix) +-- overload function: setAdditionalTransform(matrix_table) -- -- @function [parent=#Node] setAdditionalTransform -- @param self --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -------------------------------- -- @function [parent=#Node] getDisplayedOpacity @@ -416,7 +416,7 @@ -------------------------------- -- @function [parent=#Node] setColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#Node] isRunning @@ -461,7 +461,7 @@ -------------------------------- -- @function [parent=#Node] updateDisplayedColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#Node] setVisible @@ -471,7 +471,7 @@ -------------------------------- -- @function [parent=#Node] getParentToNodeTransform -- @param self --- @return Matrix#Matrix ret (return value: cc.Matrix) +-- @return matrix_table#matrix_table ret (return value: matrix_table) -------------------------------- -- @function [parent=#Node] setGlobalZOrder @@ -552,7 +552,7 @@ -------------------------------- -- @function [parent=#Node] getColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#Node] getBoundingBox @@ -572,12 +572,12 @@ -------------------------------- -- overload function: draw() -- --- overload function: draw(cc.Renderer, cc.Matrix, bool) +-- overload function: draw(cc.Renderer, matrix_table, bool) -- -- @function [parent=#Node] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- @@ -597,7 +597,7 @@ -------------------------------- -- @function [parent=#Node] setPosition3D -- @param self --- @param #array_table array +-- @param #vector3_table array -------------------------------- -- @function [parent=#Node] update @@ -611,7 +611,7 @@ -------------------------------- -- @function [parent=#Node] getWorldToNodeTransform -- @param self --- @return Matrix#Matrix ret (return value: cc.Matrix) +-- @return matrix_table#matrix_table ret (return value: matrix_table) -------------------------------- -- @function [parent=#Node] getScale diff --git a/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua b/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua index 9e1c7e8306..69a1488cdd 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParallaxNode.lua @@ -8,8 +8,8 @@ -- @param self -- @param #cc.Node node -- @param #int int --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ParallaxNode] removeAllChildrenWithCleanup diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua b/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua index d83c7fe5ce..aa310eae54 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleBatchNode.lua @@ -70,7 +70,7 @@ -- @function [parent=#ParticleBatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua b/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua index 62d9ee07eb..de3905dc84 100644 --- a/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua +++ b/cocos/scripting/lua-bindings/auto/api/ParticleSystem.lua @@ -26,7 +26,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] getStartColor -- @param self --- @return color4F_table#color4F_table ret (return value: color4F_table) +-- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- -- @function [parent=#ParticleSystem] getPositionType @@ -36,7 +36,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] setPosVar -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ParticleSystem] getEndSpin @@ -106,7 +106,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] getGravity -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#ParticleSystem] getTangentialAccel @@ -131,7 +131,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] setEndColor -- @param self --- @param #color4F_table color4f +-- @param #color4f_table color4f -------------------------------- -- @function [parent=#ParticleSystem] setStartSpin @@ -151,7 +151,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] getPosVar -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#ParticleSystem] updateWithNoTime @@ -179,7 +179,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] getSourcePosition -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#ParticleSystem] setLifeVar @@ -194,13 +194,13 @@ -------------------------------- -- @function [parent=#ParticleSystem] setEndColorVar -- @param self --- @param #color4F_table color4f +-- @param #color4f_table color4f -------------------------------- -- @function [parent=#ParticleSystem] updateQuadWithParticle -- @param self -- @param #cc.sParticle sparticle --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ParticleSystem] getAtlasIndex @@ -294,7 +294,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] setSourcePosition -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ParticleSystem] getEndSpinVar @@ -359,7 +359,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] setStartColor -- @param self --- @param #color4F_table color4f +-- @param #color4f_table color4f -------------------------------- -- @function [parent=#ParticleSystem] getRotatePerSecondVar @@ -389,7 +389,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] setGravity -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ParticleSystem] postStep @@ -403,7 +403,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] getEndColorVar -- @param self --- @return color4F_table#color4F_table ret (return value: color4F_table) +-- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- -- @function [parent=#ParticleSystem] getRotationIsDir @@ -423,7 +423,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] getEndColor -- @param self --- @return color4F_table#color4F_table ret (return value: color4F_table) +-- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- -- @function [parent=#ParticleSystem] getLifeVar @@ -463,7 +463,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] setStartColorVar -- @param self --- @param #color4F_table color4f +-- @param #color4f_table color4f -------------------------------- -- @function [parent=#ParticleSystem] setEndSpin @@ -498,7 +498,7 @@ -------------------------------- -- @function [parent=#ParticleSystem] getStartColorVar -- @param self --- @return color4F_table#color4F_table ret (return value: color4F_table) +-- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- -- @function [parent=#ParticleSystem] create diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua index 0135b66666..b1be555484 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsBody.lua @@ -48,14 +48,14 @@ -- @return float#float ret (return value: float) -------------------------------- --- overload function: applyImpulse(array_table, array_table) +-- overload function: applyImpulse(vector2_table, vector2_table) -- --- overload function: applyImpulse(array_table) +-- overload function: applyImpulse(vector2_table) -- -- @function [parent=#PhysicsBody] applyImpulse -- @param self --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsBody] setRotationOffset @@ -63,14 +63,14 @@ -- @param #float float -------------------------------- --- overload function: applyForce(array_table, array_table) +-- overload function: applyForce(vector2_table, vector2_table) -- --- overload function: applyForce(array_table) +-- overload function: applyForce(vector2_table) -- -- @function [parent=#PhysicsBody] applyForce -- @param self --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsBody] addShape @@ -97,7 +97,7 @@ -------------------------------- -- @function [parent=#PhysicsBody] getVelocity -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsBody] getLinearDamping @@ -126,7 +126,7 @@ -------------------------------- -- @function [parent=#PhysicsBody] getPositionOffset -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsBody] setCategoryBitmask @@ -146,7 +146,7 @@ -------------------------------- -- @function [parent=#PhysicsBody] getPosition -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsBody] setEnable @@ -176,8 +176,8 @@ -------------------------------- -- @function [parent=#PhysicsBody] local2World -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsBody] getCategoryBitmask @@ -212,8 +212,8 @@ -------------------------------- -- @function [parent=#PhysicsBody] world2Local -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsBody] isEnabled @@ -243,7 +243,7 @@ -------------------------------- -- @function [parent=#PhysicsBody] setVelocity -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsBody] setLinearDamping @@ -258,7 +258,7 @@ -------------------------------- -- @function [parent=#PhysicsBody] setPositionOffset -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsBody] setRotationEnable @@ -278,8 +278,8 @@ -------------------------------- -- @function [parent=#PhysicsBody] getVelocityAtLocalPoint -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsBody] isResting @@ -305,8 +305,8 @@ -------------------------------- -- @function [parent=#PhysicsBody] getVelocityAtWorldPoint -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsBody] setContactTestBitmask @@ -332,14 +332,14 @@ -- @param self -- @param #size_table size -- @param #cc.PhysicsMaterial physicsmaterial --- @param #array_table array +-- @param #vector2_table array -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- -- @function [parent=#PhysicsBody] createEdgeSegment -- @param self --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @param #cc.PhysicsMaterial physicsmaterial -- @param #float float -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) @@ -363,7 +363,7 @@ -- @param #size_table size -- @param #cc.PhysicsMaterial physicsmaterial -- @param #float float --- @param #array_table array +-- @param #vector2_table array -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) -------------------------------- @@ -371,7 +371,7 @@ -- @param self -- @param #float float -- @param #cc.PhysicsMaterial physicsmaterial --- @param #array_table array +-- @param #vector2_table array -- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua index e31f0e5c0c..07f45c1197 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPostSolve.lua @@ -10,7 +10,7 @@ -------------------------------- -- @function [parent=#PhysicsContactPostSolve] getSurfaceVelocity -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsContactPostSolve] getRestitution diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua index 3e2e540e80..892baaa0a1 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContactPreSolve.lua @@ -24,12 +24,12 @@ -------------------------------- -- @function [parent=#PhysicsContactPreSolve] getSurfaceVelocity -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsContactPreSolve] setSurfaceVelocity -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsContactPreSolve] setRestitution diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua index 3ccb00cd10..6f40c2dcba 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointDistance.lua @@ -18,8 +18,8 @@ -- @param self -- @param #cc.PhysicsBody physicsbody -- @param #cc.PhysicsBody physicsbody --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @return PhysicsJointDistance#PhysicsJointDistance ret (return value: cc.PhysicsJointDistance) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua index 726ebc4a73..57a6d4d79c 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointFixed.lua @@ -8,7 +8,7 @@ -- @param self -- @param #cc.PhysicsBody physicsbody -- @param #cc.PhysicsBody physicsbody --- @param #array_table array +-- @param #vector2_table array -- @return PhysicsJointFixed#PhysicsJointFixed ret (return value: cc.PhysicsJointFixed) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua index 9db4c759c2..d206386932 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointGroove.lua @@ -6,41 +6,41 @@ -------------------------------- -- @function [parent=#PhysicsJointGroove] setAnchr2 -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsJointGroove] setGrooveA -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsJointGroove] setGrooveB -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsJointGroove] getGrooveA -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsJointGroove] getGrooveB -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsJointGroove] getAnchr2 -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsJointGroove] construct -- @param self -- @param #cc.PhysicsBody physicsbody -- @param #cc.PhysicsBody physicsbody --- @param #array_table array --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @return PhysicsJointGroove#PhysicsJointGroove ret (return value: cc.PhysicsJointGroove) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua index 6b5e725753..f0bb61c2ac 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointLimit.lua @@ -6,12 +6,12 @@ -------------------------------- -- @function [parent=#PhysicsJointLimit] setAnchr2 -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsJointLimit] setAnchr1 -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsJointLimit] setMax @@ -21,12 +21,12 @@ -------------------------------- -- @function [parent=#PhysicsJointLimit] getAnchr2 -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsJointLimit] getAnchr1 -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsJointLimit] getMin @@ -44,16 +44,16 @@ -- @param #float float -------------------------------- --- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, array_table, array_table, float, float) +-- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, vector2_table, vector2_table, float, float) -- --- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, array_table, array_table) +-- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, vector2_table, vector2_table) -- -- @function [parent=#PhysicsJointLimit] construct -- @param self -- @param #cc.PhysicsBody physicsbody -- @param #cc.PhysicsBody physicsbody --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @param #float float -- @param #float float -- @return PhysicsJointLimit#PhysicsJointLimit ret (retunr value: cc.PhysicsJointLimit) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua index ccbacd0f58..16b6f66bd8 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointPin.lua @@ -8,7 +8,7 @@ -- @param self -- @param #cc.PhysicsBody physicsbody -- @param #cc.PhysicsBody physicsbody --- @param #array_table array +-- @param #vector2_table array -- @return PhysicsJointPin#PhysicsJointPin ret (return value: cc.PhysicsJointPin) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua index c91484f670..4b51d70f2a 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsJointSpring.lua @@ -6,12 +6,12 @@ -------------------------------- -- @function [parent=#PhysicsJointSpring] setAnchr2 -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsJointSpring] setAnchr1 -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsJointSpring] getDamping @@ -31,12 +31,12 @@ -------------------------------- -- @function [parent=#PhysicsJointSpring] getAnchr2 -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsJointSpring] getAnchr1 -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsJointSpring] getStiffness @@ -58,8 +58,8 @@ -- @param self -- @param #cc.PhysicsBody physicsbody -- @param #cc.PhysicsBody physicsbody --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @param #float float -- @param #float float -- @return PhysicsJointSpring#PhysicsJointSpring ret (return value: cc.PhysicsJointSpring) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua index d3c03aa415..400a7a3db7 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShape.lua @@ -56,7 +56,7 @@ -------------------------------- -- @function [parent=#PhysicsShape] containsPoint -- @param self --- @param #array_table array +-- @param #vector2_table array -- @return bool#bool ret (return value: bool) -------------------------------- @@ -77,7 +77,7 @@ -------------------------------- -- @function [parent=#PhysicsShape] getCenter -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsShape] getDensity @@ -112,7 +112,7 @@ -------------------------------- -- @function [parent=#PhysicsShape] getOffset -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsShape] getRestitution diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua index 5d1278ba23..3bb6f81e08 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeBox.lua @@ -18,7 +18,7 @@ -- @param self -- @param #size_table size -- @param #cc.PhysicsMaterial physicsmaterial --- @param #array_table array +-- @param #vector2_table array -- @return PhysicsShapeBox#PhysicsShapeBox ret (return value: cc.PhysicsShapeBox) -------------------------------- @@ -32,13 +32,13 @@ -- @param self -- @param #float float -- @param #size_table size --- @param #array_table array +-- @param #vector2_table array -- @return float#float ret (return value: float) -------------------------------- -- @function [parent=#PhysicsShapeBox] getOffset -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsShapeBox] calculateDefaultMoment diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua index 2de98f24d7..0276a6deed 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeCircle.lua @@ -13,7 +13,7 @@ -- @param self -- @param #float float -- @param #cc.PhysicsMaterial physicsmaterial --- @param #array_table array +-- @param #vector2_table array -- @return PhysicsShapeCircle#PhysicsShapeCircle ret (return value: cc.PhysicsShapeCircle) -------------------------------- @@ -27,13 +27,13 @@ -- @param self -- @param #float float -- @param #float float --- @param #array_table array +-- @param #vector2_table array -- @return float#float ret (return value: float) -------------------------------- -- @function [parent=#PhysicsShapeCircle] getOffset -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsShapeCircle] calculateDefaultMoment diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua index 7fdd1d48e2..6cb94825bd 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeBox.lua @@ -14,12 +14,12 @@ -- @param #size_table size -- @param #cc.PhysicsMaterial physicsmaterial -- @param #float float --- @param #array_table array +-- @param #vector2_table array -- @return PhysicsShapeEdgeBox#PhysicsShapeEdgeBox ret (return value: cc.PhysicsShapeEdgeBox) -------------------------------- -- @function [parent=#PhysicsShapeEdgeBox] getOffset -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua index b1dd60fdc2..3b8ec67729 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeChain.lua @@ -11,6 +11,6 @@ -------------------------------- -- @function [parent=#PhysicsShapeEdgeChain] getCenter -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua index 782242212b..0f65e53c2f 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgePolygon.lua @@ -11,6 +11,6 @@ -------------------------------- -- @function [parent=#PhysicsShapeEdgePolygon] getCenter -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua index 2eec791ba2..f1f8a6939c 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapeEdgeSegment.lua @@ -6,18 +6,18 @@ -------------------------------- -- @function [parent=#PhysicsShapeEdgeSegment] getPointB -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsShapeEdgeSegment] getPointA -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsShapeEdgeSegment] create -- @param self --- @param #array_table array --- @param #array_table array +-- @param #vector2_table array +-- @param #vector2_table array -- @param #cc.PhysicsMaterial physicsmaterial -- @param #float float -- @return PhysicsShapeEdgeSegment#PhysicsShapeEdgeSegment ret (return value: cc.PhysicsShapeEdgeSegment) @@ -25,6 +25,6 @@ -------------------------------- -- @function [parent=#PhysicsShapeEdgeSegment] getCenter -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua index 11469e3c24..73f5f9ee0f 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua @@ -12,7 +12,7 @@ -- @function [parent=#PhysicsShapePolygon] getPoint -- @param self -- @param #int int --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsShapePolygon] calculateDefaultMoment @@ -22,6 +22,6 @@ -------------------------------- -- @function [parent=#PhysicsShapePolygon] getCenter -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua index 1adc72ec63..c574f44609 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua @@ -5,7 +5,7 @@ -------------------------------- -- @function [parent=#PhysicsWorld] getGravity -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#PhysicsWorld] getAllBodies @@ -15,7 +15,7 @@ -------------------------------- -- @function [parent=#PhysicsWorld] setGravity -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#PhysicsWorld] getSpeed @@ -50,7 +50,7 @@ -------------------------------- -- @function [parent=#PhysicsWorld] getShapes -- @param self --- @param #array_table array +-- @param #vector2_table array -- @return array_table#array_table ret (return value: array_table) -------------------------------- @@ -60,7 +60,7 @@ -------------------------------- -- @function [parent=#PhysicsWorld] getShape -- @param self --- @param #array_table array +-- @param #vector2_table array -- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Place.lua b/cocos/scripting/lua-bindings/auto/api/Place.lua index 9444b7538e..acfa221588 100644 --- a/cocos/scripting/lua-bindings/auto/api/Place.lua +++ b/cocos/scripting/lua-bindings/auto/api/Place.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#Place] create -- @param self --- @param #array_table array +-- @param #vector2_table array -- @return Place#Place ret (return value: cc.Place) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua b/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua index da2f43a5c2..2b9b8915ac 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua @@ -11,7 +11,7 @@ -------------------------------- -- @function [parent=#ProgressTimer] setBarChangeRate -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ProgressTimer] getPercentage @@ -36,12 +36,12 @@ -------------------------------- -- @function [parent=#ProgressTimer] setMidpoint -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ProgressTimer] getBarChangeRate -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- overload function: setReverseDirection(bool) @@ -55,7 +55,7 @@ -------------------------------- -- @function [parent=#ProgressTimer] getMidpoint -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#ProgressTimer] setPercentage @@ -76,24 +76,24 @@ -------------------------------- -- @function [parent=#ProgressTimer] setAnchorPoint -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ProgressTimer] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- -- @function [parent=#ProgressTimer] setColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#ProgressTimer] getColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#ProgressTimer] setOpacity diff --git a/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua b/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua index f01edbb387..38343b0bf0 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProtectedNode.lua @@ -70,7 +70,7 @@ -------------------------------- -- @function [parent=#ProtectedNode] updateDisplayedColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#ProtectedNode] cleanup diff --git a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua index d1d4e72bdd..6316f226b2 100644 --- a/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua +++ b/cocos/scripting/lua-bindings/auto/api/RenderTexture.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#RenderTexture] setVirtualViewport -- @param self --- @param #array_table array +-- @param #vector2_table array -- @param #rect_table rect -- @param #rect_table rect @@ -82,7 +82,7 @@ -------------------------------- -- @function [parent=#RenderTexture] setClearColor -- @param self --- @param #color4F_table color4f +-- @param #color4f_table color4f -------------------------------- -- @function [parent=#RenderTexture] endToLua @@ -112,7 +112,7 @@ -------------------------------- -- @function [parent=#RenderTexture] getClearColor -- @param self --- @return color4F_table#color4F_table ret (return value: color4F_table) +-- @return color4f_table#color4f_table ret (return value: color4f_table) -------------------------------- -- @function [parent=#RenderTexture] clear @@ -169,7 +169,7 @@ -- @function [parent=#RenderTexture] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/RichElement.lua b/cocos/scripting/lua-bindings/auto/api/RichElement.lua index c90261c788..baeddbe006 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElement.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElement.lua @@ -7,7 +7,7 @@ -- @function [parent=#RichElement] init -- @param self -- @param #int int --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #unsigned char char -- @return bool#bool ret (return value: bool) diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua b/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua index 56673221ec..a663590aaf 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementCustomNode.lua @@ -7,7 +7,7 @@ -- @function [parent=#RichElementCustomNode] init -- @param self -- @param #int int --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #unsigned char char -- @param #cc.Node node -- @return bool#bool ret (return value: bool) @@ -16,7 +16,7 @@ -- @function [parent=#RichElementCustomNode] create -- @param self -- @param #int int --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #unsigned char char -- @param #cc.Node node -- @return RichElementCustomNode#RichElementCustomNode ret (return value: ccui.RichElementCustomNode) diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua b/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua index 7db74e410e..ec2dba52dc 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementImage.lua @@ -7,7 +7,7 @@ -- @function [parent=#RichElementImage] init -- @param self -- @param #int int --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #unsigned char char -- @param #char char -- @return bool#bool ret (return value: bool) @@ -16,7 +16,7 @@ -- @function [parent=#RichElementImage] create -- @param self -- @param #int int --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #unsigned char char -- @param #char char -- @return RichElementImage#RichElementImage ret (return value: ccui.RichElementImage) diff --git a/cocos/scripting/lua-bindings/auto/api/RichElementText.lua b/cocos/scripting/lua-bindings/auto/api/RichElementText.lua index 0dab3b4583..c063b7b0a6 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichElementText.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichElementText.lua @@ -7,7 +7,7 @@ -- @function [parent=#RichElementText] init -- @param self -- @param #int int --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #unsigned char char -- @param #char char -- @param #char char @@ -18,7 +18,7 @@ -- @function [parent=#RichElementText] create -- @param self -- @param #int int --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @param #unsigned char char -- @param #char char -- @param #char char diff --git a/cocos/scripting/lua-bindings/auto/api/RichText.lua b/cocos/scripting/lua-bindings/auto/api/RichText.lua index f3334b5290..de7d915621 100644 --- a/cocos/scripting/lua-bindings/auto/api/RichText.lua +++ b/cocos/scripting/lua-bindings/auto/api/RichText.lua @@ -12,7 +12,7 @@ -------------------------------- -- @function [parent=#RichText] setAnchorPoint -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#RichText] pushBackElement diff --git a/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua b/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua index 4e94374d6c..8f8bb5de9b 100644 --- a/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Ripple3D.lua @@ -26,19 +26,19 @@ -------------------------------- -- @function [parent=#Ripple3D] setPosition -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Ripple3D] getPosition -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Ripple3D] create -- @param self -- @param #float float -- @param #size_table size --- @param #array_table array +-- @param #vector2_table array -- @param #float float -- @param #unsigned int int -- @param #float float diff --git a/cocos/scripting/lua-bindings/auto/api/RotateBy.lua b/cocos/scripting/lua-bindings/auto/api/RotateBy.lua index 719008037b..6ce7b86d82 100644 --- a/cocos/scripting/lua-bindings/auto/api/RotateBy.lua +++ b/cocos/scripting/lua-bindings/auto/api/RotateBy.lua @@ -8,7 +8,7 @@ -- -- overload function: create(float, float) -- --- overload function: create(float, array_table) +-- overload function: create(float, vector3_table) -- -- @function [parent=#RotateBy] create -- @param self diff --git a/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua index cb3883ab06..75374964da 100644 --- a/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua @@ -192,7 +192,7 @@ -------------------------------- -- @function [parent=#Scale9Sprite] setColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#Scale9Sprite] setOpacityModifyRGB @@ -212,7 +212,7 @@ -------------------------------- -- @function [parent=#Scale9Sprite] updateDisplayedColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#Scale9Sprite] setContentSize diff --git a/cocos/scripting/lua-bindings/auto/api/ScrollView.lua b/cocos/scripting/lua-bindings/auto/api/ScrollView.lua index e83907a26b..f2fe766334 100644 --- a/cocos/scripting/lua-bindings/auto/api/ScrollView.lua +++ b/cocos/scripting/lua-bindings/auto/api/ScrollView.lua @@ -24,7 +24,7 @@ -------------------------------- -- @function [parent=#ScrollView] scrollToPercentBothDirection -- @param self --- @param #array_table array +-- @param #vector2_table array -- @param #float float -- @param #bool bool @@ -123,7 +123,7 @@ -------------------------------- -- @function [parent=#ScrollView] jumpToPercentBothDirection -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#ScrollView] scrollToPercentVertical diff --git a/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua b/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua index 1d2c0e69ef..c955115690 100644 --- a/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/ShuffleTiles.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#ShuffleTiles] placeTile -- @param self --- @param #array_table array +-- @param #vector2_table array -- @param #cc.Tile tile -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Skeleton.lua b/cocos/scripting/lua-bindings/auto/api/Skeleton.lua index 466b26aec6..d94a0647e7 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skeleton.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skeleton.lua @@ -15,7 +15,7 @@ -------------------------------- -- @function [parent=#Skeleton] onDraw -- @param self --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Skin.lua b/cocos/scripting/lua-bindings/auto/api/Skin.lua index e824b1bca8..5a2a6dc30a 100644 --- a/cocos/scripting/lua-bindings/auto/api/Skin.lua +++ b/cocos/scripting/lua-bindings/auto/api/Skin.lua @@ -11,7 +11,7 @@ -------------------------------- -- @function [parent=#Skin] getNodeToWorldTransformAR -- @param self --- @return Matrix#Matrix ret (return value: cc.Matrix) +-- @return matrix_table#matrix_table ret (return value: matrix_table) -------------------------------- -- @function [parent=#Skin] initWithFile @@ -62,13 +62,13 @@ -------------------------------- -- @function [parent=#Skin] getNodeToWorldTransform -- @param self --- @return Matrix#Matrix ret (return value: cc.Matrix) +-- @return matrix_table#matrix_table ret (return value: matrix_table) -------------------------------- -- @function [parent=#Skin] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Slider.lua b/cocos/scripting/lua-bindings/auto/api/Slider.lua index 9203a480d2..a7768f6323 100644 --- a/cocos/scripting/lua-bindings/auto/api/Slider.lua +++ b/cocos/scripting/lua-bindings/auto/api/Slider.lua @@ -114,7 +114,7 @@ -------------------------------- -- @function [parent=#Slider] hitTest -- @param self --- @param #array_table array +-- @param #vector2_table array -- @return bool#bool ret (return value: bool) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Sprite.lua index a81721b269..0774209628 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite.lua @@ -44,7 +44,7 @@ -------------------------------- -- @function [parent=#Sprite] getOffsetPosition -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Sprite] removeAllChildrenWithCleanup @@ -184,7 +184,7 @@ -- @function [parent=#Sprite] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- @@ -217,7 +217,7 @@ -------------------------------- -- @function [parent=#Sprite] setAnchorPoint -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Sprite] setRotationSkewX diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua b/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua index 8b85c6226f..fa0afd485a 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteBatchNode.lua @@ -118,7 +118,7 @@ -- @function [parent=#SpriteBatchNode] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua b/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua index 8238998fae..294d610b65 100644 --- a/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua +++ b/cocos/scripting/lua-bindings/auto/api/SpriteFrame.lua @@ -19,7 +19,7 @@ -- @param #cc.Texture2D texture2d -------------------------------- --- overload function: initWithTexture(cc.Texture2D, rect_table, bool, array_table, size_table) +-- overload function: initWithTexture(cc.Texture2D, rect_table, bool, vector2_table, size_table) -- -- overload function: initWithTexture(cc.Texture2D, rect_table) -- @@ -28,7 +28,7 @@ -- @param #cc.Texture2D texture2d -- @param #rect_table rect -- @param #bool bool --- @param #array_table array +-- @param #vector2_table array -- @param #size_table size -- @return bool#bool ret (retunr value: bool) @@ -50,7 +50,7 @@ -------------------------------- -- @function [parent=#SpriteFrame] setOffsetInPixels -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#SpriteFrame] getRectInPixels @@ -75,12 +75,12 @@ -------------------------------- -- @function [parent=#SpriteFrame] setOffset -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#SpriteFrame] getOffset -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#SpriteFrame] isRotated @@ -88,7 +88,7 @@ -- @return bool#bool ret (return value: bool) -------------------------------- --- overload function: initWithTextureFilename(string, rect_table, bool, array_table, size_table) +-- overload function: initWithTextureFilename(string, rect_table, bool, vector2_table, size_table) -- -- overload function: initWithTextureFilename(string, rect_table) -- @@ -97,7 +97,7 @@ -- @param #string str -- @param #rect_table rect -- @param #bool bool --- @param #array_table array +-- @param #vector2_table array -- @param #size_table size -- @return bool#bool ret (retunr value: bool) @@ -109,7 +109,7 @@ -------------------------------- -- @function [parent=#SpriteFrame] getOffsetInPixels -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#SpriteFrame] getOriginalSize @@ -117,7 +117,7 @@ -- @return size_table#size_table ret (return value: size_table) -------------------------------- --- overload function: create(string, rect_table, bool, array_table, size_table) +-- overload function: create(string, rect_table, bool, vector2_table, size_table) -- -- overload function: create(string, rect_table) -- @@ -126,12 +126,12 @@ -- @param #string str -- @param #rect_table rect -- @param #bool bool --- @param #array_table array +-- @param #vector2_table array -- @param #size_table size -- @return SpriteFrame#SpriteFrame ret (retunr value: cc.SpriteFrame) -------------------------------- --- overload function: createWithTexture(cc.Texture2D, rect_table, bool, array_table, size_table) +-- overload function: createWithTexture(cc.Texture2D, rect_table, bool, vector2_table, size_table) -- -- overload function: createWithTexture(cc.Texture2D, rect_table) -- @@ -140,7 +140,7 @@ -- @param #cc.Texture2D texture2d -- @param #rect_table rect -- @param #bool bool --- @param #array_table array +-- @param #vector2_table array -- @param #size_table size -- @return SpriteFrame#SpriteFrame ret (retunr value: cc.SpriteFrame) diff --git a/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua b/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua index 9651db7395..f66e717b33 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXLayer.lua @@ -6,15 +6,15 @@ -------------------------------- -- @function [parent=#TMXLayer] getTileGIDAt -- @param self --- @param #array_table array +-- @param #vector2_table array -- @param #cc.TMXTileFlags_ tmxtileflags_ -- @return unsigned int#unsigned int ret (return value: unsigned int) -------------------------------- -- @function [parent=#TMXLayer] getPositionAt -- @param self --- @param #array_table array --- @return array_table#array_table ret (return value: array_table) +-- @param #vector2_table array +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#TMXLayer] setLayerOrientation @@ -58,7 +58,7 @@ -------------------------------- -- @function [parent=#TMXLayer] removeTileAt -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#TMXLayer] initWithTilesetInfo @@ -73,14 +73,14 @@ -- @param self -------------------------------- --- overload function: setTileGID(unsigned int, array_table, cc.TMXTileFlags_) +-- overload function: setTileGID(unsigned int, vector2_table, cc.TMXTileFlags_) -- --- overload function: setTileGID(unsigned int, array_table) +-- overload function: setTileGID(unsigned int, vector2_table) -- -- @function [parent=#TMXLayer] setTileGID -- @param self -- @param #unsigned int int --- @param #array_table array +-- @param #vector2_table array -- @param #cc.TMXTileFlags_ tmxtileflags_ -------------------------------- @@ -126,7 +126,7 @@ -------------------------------- -- @function [parent=#TMXLayer] getTileAt -- @param self --- @param #array_table array +-- @param #vector2_table array -- @return Sprite#Sprite ret (return value: cc.Sprite) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua b/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua index 0c78e9c74e..f89f66e842 100644 --- a/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua +++ b/cocos/scripting/lua-bindings/auto/api/TMXObjectGroup.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#TMXObjectGroup] setPositionOffset -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#TMXObjectGroup] getProperty @@ -17,7 +17,7 @@ -------------------------------- -- @function [parent=#TMXObjectGroup] getPositionOffset -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#TMXObjectGroup] getObject diff --git a/cocos/scripting/lua-bindings/auto/api/TextField.lua b/cocos/scripting/lua-bindings/auto/api/TextField.lua index e3e6695b89..1b5bd559e6 100644 --- a/cocos/scripting/lua-bindings/auto/api/TextField.lua +++ b/cocos/scripting/lua-bindings/auto/api/TextField.lua @@ -149,7 +149,7 @@ -------------------------------- -- @function [parent=#TextField] hitTest -- @param self --- @param #array_table array +-- @param #vector2_table array -- @return bool#bool ret (return value: bool) -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua index 6a6dece5b4..e9af28e4d3 100644 --- a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua +++ b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua @@ -149,7 +149,7 @@ -------------------------------- -- @function [parent=#Texture2D] drawAtPoint -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Texture2D] hasMipmaps diff --git a/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua b/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua index 42b8632b24..04f6683ba1 100644 --- a/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua +++ b/cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua @@ -19,14 +19,14 @@ -------------------------------- -- @function [parent=#TileMapAtlas] getTileAt -- @param self --- @param #array_table array --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @param #vector2_table array +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#TileMapAtlas] setTile -- @param self --- @param #color3B_table color3b --- @param #array_table array +-- @param #color3b_table color3b +-- @param #vector2_table array -------------------------------- -- @function [parent=#TileMapAtlas] setTGAInfo diff --git a/cocos/scripting/lua-bindings/auto/api/Touch.lua b/cocos/scripting/lua-bindings/auto/api/Touch.lua index ff48325100..13cd6ae294 100644 --- a/cocos/scripting/lua-bindings/auto/api/Touch.lua +++ b/cocos/scripting/lua-bindings/auto/api/Touch.lua @@ -6,27 +6,27 @@ -------------------------------- -- @function [parent=#Touch] getPreviousLocationInView -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Touch] getLocation -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Touch] getDelta -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Touch] getStartLocationInView -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Touch] getStartLocation -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Touch] getID @@ -43,12 +43,12 @@ -------------------------------- -- @function [parent=#Touch] getLocationInView -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Touch] getPreviousLocation -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Touch] Touch diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua b/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua index 6f7b3e28bb..e5e4ca60a5 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionCrossFade.lua @@ -14,7 +14,7 @@ -- @function [parent=#TransitionCrossFade] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua index bef0cee226..ab95eaf36e 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFade.lua @@ -6,13 +6,13 @@ -------------------------------- -- overload function: create(float, cc.Scene) -- --- overload function: create(float, cc.Scene, color3B_table) +-- overload function: create(float, cc.Scene, color3b_table) -- -- @function [parent=#TransitionFade] create -- @param self -- @param #float float -- @param #cc.Scene scene --- @param #color3B_table color3b +-- @param #color3b_table color3b -- @return TransitionFade#TransitionFade ret (retunr value: cc.TransitionFade) return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua b/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua index 801b78f191..cada7a2e53 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionFadeTR.lua @@ -26,7 +26,7 @@ -- @function [parent=#TransitionFadeTR] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua b/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua index a38210ba52..38faa66cfe 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionPageTurn.lua @@ -29,7 +29,7 @@ -- @function [parent=#TransitionPageTurn] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua b/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua index 9fb27c281d..f6a76963cf 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionScene.lua @@ -22,7 +22,7 @@ -- @function [parent=#TransitionScene] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool -------------------------------- diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua b/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua index 2c0c19e36a..21a7b1afae 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionSplitCols.lua @@ -25,7 +25,7 @@ -- @function [parent=#TransitionSplitCols] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua b/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua index 4edc916066..14e6f4574d 100644 --- a/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/TransitionTurnOffTiles.lua @@ -20,7 +20,7 @@ -- @function [parent=#TransitionTurnOffTiles] draw -- @param self -- @param #cc.Renderer renderer --- @param #cc.Matrix matrix +-- @param #matrix_table matrix -- @param #bool bool return nil diff --git a/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua b/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua index 0304f4f019..104734b689 100644 --- a/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua +++ b/cocos/scripting/lua-bindings/auto/api/TurnOffTiles.lua @@ -6,12 +6,12 @@ -------------------------------- -- @function [parent=#TurnOffTiles] turnOnTile -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#TurnOffTiles] turnOffTile -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#TurnOffTiles] shuffle diff --git a/cocos/scripting/lua-bindings/auto/api/Twirl.lua b/cocos/scripting/lua-bindings/auto/api/Twirl.lua index 63ec449e83..8b3afd531c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Twirl.lua +++ b/cocos/scripting/lua-bindings/auto/api/Twirl.lua @@ -26,19 +26,19 @@ -------------------------------- -- @function [parent=#Twirl] setPosition -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Twirl] getPosition -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Twirl] create -- @param self -- @param #float float -- @param #size_table size --- @param #array_table array +-- @param #vector2_table array -- @param #unsigned int int -- @param #float float -- @return Twirl#Twirl ret (return value: cc.Twirl) diff --git a/cocos/scripting/lua-bindings/auto/api/Widget.lua b/cocos/scripting/lua-bindings/auto/api/Widget.lua index db7263217e..2a4e79ba6c 100644 --- a/cocos/scripting/lua-bindings/auto/api/Widget.lua +++ b/cocos/scripting/lua-bindings/auto/api/Widget.lua @@ -6,7 +6,7 @@ -------------------------------- -- @function [parent=#Widget] setSizePercent -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Widget] getCustomSize @@ -31,18 +31,23 @@ -------------------------------- -- @function [parent=#Widget] getTouchEndPos -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Widget] setPositionPercent -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Widget] getLayoutSize -- @param self -- @return size_table#size_table ret (return value: size_table) +-------------------------------- +-- @function [parent=#Widget] setHighlighted +-- @param self +-- @param #bool bool + -------------------------------- -- @function [parent=#Widget] setPositionType -- @param self @@ -63,6 +68,11 @@ -- @param self -- @return float#float ret (return value: float) +-------------------------------- +-- @function [parent=#Widget] isHighlighted +-- @param self +-- @return bool#bool ret (return value: bool) + -------------------------------- -- @function [parent=#Widget] getLayoutParameter -- @param self @@ -100,6 +110,13 @@ -- @param self -- @return size_table#size_table ret (return value: size_table) +-------------------------------- +-- @function [parent=#Widget] findNextFocusedWidget +-- @param self +-- @param #ccui.FocusDirection focusdirection +-- @param #ccui.Widget widget +-- @return Widget#Widget ret (return value: ccui.Widget) + -------------------------------- -- @function [parent=#Widget] isTouchEnabled -- @param self @@ -113,7 +130,7 @@ -------------------------------- -- @function [parent=#Widget] getWorldPosition -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Widget] didNotSelectSelf @@ -137,7 +154,7 @@ -------------------------------- -- @function [parent=#Widget] getTouchMovePos -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Widget] setEnabled @@ -167,12 +184,17 @@ -------------------------------- -- @function [parent=#Widget] getSizePercent -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Widget] getTouchStartPos -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) + +-------------------------------- +-- @function [parent=#Widget] setFocusEnabled +-- @param self +-- @param #bool bool -------------------------------- -- @function [parent=#Widget] setActionTag @@ -187,14 +209,24 @@ -------------------------------- -- @function [parent=#Widget] clippingParentAreaContainPoint -- @param self --- @param #array_table array +-- @param #vector2_table array -- @return bool#bool ret (return value: bool) +-------------------------------- +-- @function [parent=#Widget] getCurrentFocusedWidget +-- @param self +-- @param #bool bool +-- @return Widget#Widget ret (return value: ccui.Widget) + -------------------------------- -- @function [parent=#Widget] getTopInParent -- @param self -- @return float#float ret (return value: float) +-------------------------------- +-- @function [parent=#Widget] requestFocus +-- @param self + -------------------------------- -- overload function: updateSizeAndPosition(size_table) -- @@ -227,12 +259,12 @@ -------------------------------- -- @function [parent=#Widget] getPositionPercent -- @param self --- @return array_table#array_table ret (return value: array_table) +-- @return vector2_table#vector2_table ret (return value: vector2_table) -------------------------------- -- @function [parent=#Widget] hitTest -- @param self --- @param #array_table array +-- @param #vector2_table array -- @return bool#bool ret (return value: bool) -------------------------------- @@ -255,7 +287,7 @@ -- @param self -- @param #int int -- @param #ccui.Widget widget --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Widget] setSize @@ -267,6 +299,11 @@ -- @param self -- @param #bool bool +-------------------------------- +-- @function [parent=#Widget] isFocusEnabled +-- @param self +-- @return bool#bool ret (return value: bool) + -------------------------------- -- @function [parent=#Widget] create -- @param self @@ -275,12 +312,12 @@ -------------------------------- -- @function [parent=#Widget] setColor -- @param self --- @param #color3B_table color3b +-- @param #color3b_table color3b -------------------------------- -- @function [parent=#Widget] getColor -- @param self --- @return color3B_table#color3B_table ret (return value: color3B_table) +-- @return color3b_table#color3b_table ret (return value: color3b_table) -------------------------------- -- @function [parent=#Widget] setOpacity @@ -295,7 +332,7 @@ -------------------------------- -- @function [parent=#Widget] setPosition -- @param self --- @param #array_table array +-- @param #vector2_table array -------------------------------- -- @function [parent=#Widget] getDescription diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua index c83cac4b3d..f813648fbb 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua @@ -131,6 +131,16 @@ -- @field [parent=#cc] EventListenerCustom#EventListenerCustom EventListenerCustom preloaded module +-------------------------------------------------------- +-- the cc EventFocus +-- @field [parent=#cc] EventFocus#EventFocus EventFocus preloaded module + + +-------------------------------------------------------- +-- the cc EventListenerFocus +-- @field [parent=#cc] EventListenerFocus#EventListenerFocus EventListenerFocus preloaded module + + -------------------------------------------------------- -- the cc Action -- @field [parent=#cc] Action#Action Action preloaded module diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 91e20e7dfd..0100483d75 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -16042,6 +16042,84 @@ int lua_register_cocos2dx_EventListenerCustom(lua_State* tolua_S) return 1; } +int lua_cocos2dx_EventFocus_constructor(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::EventFocus* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::ui::Widget* arg0; + cocos2d::ui::Widget* arg1; + + ok &= luaval_to_object(tolua_S, 2, "ccui.Widget",&arg0); + + ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1); + if(!ok) + return 0; + cobj = new cocos2d::EventFocus(arg0, arg1); + cobj->autorelease(); + int ID = (int)cobj->_ID ; + int* luaID = &cobj->_luaID ; + toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventFocus"); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "EventFocus",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_EventFocus_constructor'.",&tolua_err); +#endif + + return 0; +} + +static int lua_cocos2dx_EventFocus_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EventFocus)"); + return 0; +} + +int lua_register_cocos2dx_EventFocus(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventFocus"); + tolua_cclass(tolua_S,"EventFocus","cc.EventFocus","cc.Event",nullptr); + + tolua_beginmodule(tolua_S,"EventFocus"); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::EventFocus).name(); + g_luaType[typeName] = "cc.EventFocus"; + g_typeCast["EventFocus"] = "cc.EventFocus"; + return 1; +} + +static int lua_cocos2dx_EventListenerFocus_finalize(lua_State* tolua_S) +{ + printf("luabindings: finalizing LUA object (EventListenerFocus)"); + return 0; +} + +int lua_register_cocos2dx_EventListenerFocus(lua_State* tolua_S) +{ + tolua_usertype(tolua_S,"cc.EventListenerFocus"); + tolua_cclass(tolua_S,"EventListenerFocus","cc.EventListenerFocus","cc.EventListener",nullptr); + + tolua_beginmodule(tolua_S,"EventListenerFocus"); + tolua_endmodule(tolua_S); + std::string typeName = typeid(cocos2d::EventListenerFocus).name(); + g_luaType[typeName] = "cc.EventListenerFocus"; + g_typeCast["EventListenerFocus"] = "cc.EventListenerFocus"; + return 1; +} + int lua_cocos2dx_Action_startWithTarget(lua_State* tolua_S) { int argc = 0; @@ -65285,7 +65363,7 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_RotateTo(tolua_S); lua_register_cocos2dx_TransitionSplitRows(tolua_S); lua_register_cocos2dx_TransitionProgressRadialCCW(tolua_S); - lua_register_cocos2dx_ScaleTo(tolua_S); + lua_register_cocos2dx_EventListenerFocus(tolua_S); lua_register_cocos2dx_TransitionPageTurn(tolua_S); lua_register_cocos2dx_BezierBy(tolua_S); lua_register_cocos2dx_BezierTo(tolua_S); @@ -65294,13 +65372,15 @@ TOLUA_API int register_all_cocos2dx(lua_State* tolua_S) lua_register_cocos2dx_ActionManager(tolua_S); lua_register_cocos2dx_TransitionFade(tolua_S); lua_register_cocos2dx_TransitionZoomFlipX(tolua_S); + lua_register_cocos2dx_EventFocus(tolua_S); lua_register_cocos2dx_EaseQuinticActionInOut(tolua_S); lua_register_cocos2dx_SpriteFrameCache(tolua_S); lua_register_cocos2dx_TransitionCrossFade(tolua_S); lua_register_cocos2dx_Ripple3D(tolua_S); lua_register_cocos2dx_Lens3D(tolua_S); - lua_register_cocos2dx_EaseQuarticActionInOut(tolua_S); + lua_register_cocos2dx_ScaleTo(tolua_S); lua_register_cocos2dx_Spawn(tolua_S); + lua_register_cocos2dx_EaseQuarticActionInOut(tolua_S); lua_register_cocos2dx_ShakyTiles3D(tolua_S); lua_register_cocos2dx_PageTurn3D(tolua_S); lua_register_cocos2dx_TransitionSlideInL(tolua_S); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 87bbdf1c67..8969923520 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1559,6 +1559,9 @@ int register_all_cocos2dx(lua_State* tolua_S); + + + 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 961c620764..5c59836be5 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.cpp @@ -1173,6 +1173,52 @@ int lua_cocos2dx_ui_Widget_getLayoutSize(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Widget_setHighlighted(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Widget* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_setHighlighted'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0); + if(!ok) + return 0; + cobj->setHighlighted(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setHighlighted",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_setHighlighted'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Widget_setPositionType(lua_State* tolua_S) { int argc = 0; @@ -1351,6 +1397,50 @@ int lua_cocos2dx_ui_Widget_getBottomInParent(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Widget_isHighlighted(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Widget* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_isHighlighted'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isHighlighted(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "isHighlighted",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_isHighlighted'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Widget_getLayoutParameter(lua_State* tolua_S) { int argc = 0; @@ -1665,6 +1755,56 @@ int lua_cocos2dx_ui_Widget_getVirtualRendererSize(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Widget_findNextFocusedWidget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Widget* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_findNextFocusedWidget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + cocos2d::ui::FocusDirection arg0; + cocos2d::ui::Widget* arg1; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0); + + ok &= luaval_to_object(tolua_S, 3, "ccui.Widget",&arg1); + if(!ok) + return 0; + cocos2d::ui::Widget* ret = cobj->findNextFocusedWidget(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", "findNextFocusedWidget",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_findNextFocusedWidget'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Widget_isTouchEnabled(lua_State* tolua_S) { int argc = 0; @@ -2336,6 +2476,52 @@ int lua_cocos2dx_ui_Widget_getTouchStartPos(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Widget_setFocusEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Widget* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_setFocusEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0); + if(!ok) + return 0; + cobj->setFocusEnabled(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setFocusEnabled",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_setFocusEnabled'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Widget_setActionTag(lua_State* tolua_S) { int argc = 0; @@ -2473,6 +2659,53 @@ int lua_cocos2dx_ui_Widget_clippingParentAreaContainPoint(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Widget_getCurrentFocusedWidget(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Widget* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getCurrentFocusedWidget'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0); + if(!ok) + return 0; + cocos2d::ui::Widget* ret = cobj->getCurrentFocusedWidget(arg0); + 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", "getCurrentFocusedWidget",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getCurrentFocusedWidget'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Widget_getTopInParent(lua_State* tolua_S) { int argc = 0; @@ -2517,6 +2750,49 @@ int lua_cocos2dx_ui_Widget_getTopInParent(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Widget_requestFocus(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Widget* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_requestFocus'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + cobj->requestFocus(); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "requestFocus",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_requestFocus'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Widget_updateSizeAndPosition(lua_State* tolua_S) { int argc = 0; @@ -3113,6 +3389,50 @@ int lua_cocos2dx_ui_Widget_setBright(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Widget_isFocusEnabled(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Widget* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_isFocusEnabled'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isFocusEnabled(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "isFocusEnabled",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_isFocusEnabled'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Widget_create(lua_State* tolua_S) { int argc = 0; @@ -3198,10 +3518,12 @@ int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S) tolua_function(tolua_S,"getTouchEndPos",lua_cocos2dx_ui_Widget_getTouchEndPos); tolua_function(tolua_S,"setPositionPercent",lua_cocos2dx_ui_Widget_setPositionPercent); tolua_function(tolua_S,"getLayoutSize",lua_cocos2dx_ui_Widget_getLayoutSize); + tolua_function(tolua_S,"setHighlighted",lua_cocos2dx_ui_Widget_setHighlighted); tolua_function(tolua_S,"setPositionType",lua_cocos2dx_ui_Widget_setPositionType); tolua_function(tolua_S,"getName",lua_cocos2dx_ui_Widget_getName); tolua_function(tolua_S,"isIgnoreContentAdaptWithSize",lua_cocos2dx_ui_Widget_isIgnoreContentAdaptWithSize); tolua_function(tolua_S,"getBottomInParent",lua_cocos2dx_ui_Widget_getBottomInParent); + tolua_function(tolua_S,"isHighlighted",lua_cocos2dx_ui_Widget_isHighlighted); tolua_function(tolua_S,"getLayoutParameter",lua_cocos2dx_ui_Widget_getLayoutParameter); tolua_function(tolua_S,"getPositionType",lua_cocos2dx_ui_Widget_getPositionType); tolua_function(tolua_S,"getWidgetType",lua_cocos2dx_ui_Widget_getWidgetType); @@ -3209,6 +3531,7 @@ int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S) tolua_function(tolua_S,"isEnabled",lua_cocos2dx_ui_Widget_isEnabled); tolua_function(tolua_S,"isFocused",lua_cocos2dx_ui_Widget_isFocused); tolua_function(tolua_S,"getVirtualRendererSize",lua_cocos2dx_ui_Widget_getVirtualRendererSize); + tolua_function(tolua_S,"findNextFocusedWidget",lua_cocos2dx_ui_Widget_findNextFocusedWidget); tolua_function(tolua_S,"isTouchEnabled",lua_cocos2dx_ui_Widget_isTouchEnabled); tolua_function(tolua_S,"getActionTag",lua_cocos2dx_ui_Widget_getActionTag); tolua_function(tolua_S,"getWorldPosition",lua_cocos2dx_ui_Widget_getWorldPosition); @@ -3224,10 +3547,13 @@ int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S) tolua_function(tolua_S,"setLayoutParameter",lua_cocos2dx_ui_Widget_setLayoutParameter); tolua_function(tolua_S,"getSizePercent",lua_cocos2dx_ui_Widget_getSizePercent); tolua_function(tolua_S,"getTouchStartPos",lua_cocos2dx_ui_Widget_getTouchStartPos); + tolua_function(tolua_S,"setFocusEnabled",lua_cocos2dx_ui_Widget_setFocusEnabled); tolua_function(tolua_S,"setActionTag",lua_cocos2dx_ui_Widget_setActionTag); tolua_function(tolua_S,"isBright",lua_cocos2dx_ui_Widget_isBright); tolua_function(tolua_S,"clippingParentAreaContainPoint",lua_cocos2dx_ui_Widget_clippingParentAreaContainPoint); + tolua_function(tolua_S,"getCurrentFocusedWidget",lua_cocos2dx_ui_Widget_getCurrentFocusedWidget); tolua_function(tolua_S,"getTopInParent",lua_cocos2dx_ui_Widget_getTopInParent); + tolua_function(tolua_S,"requestFocus",lua_cocos2dx_ui_Widget_requestFocus); tolua_function(tolua_S,"updateSizeAndPosition",lua_cocos2dx_ui_Widget_updateSizeAndPosition); tolua_function(tolua_S,"getSize",lua_cocos2dx_ui_Widget_getSize); tolua_function(tolua_S,"getRightInParent",lua_cocos2dx_ui_Widget_getRightInParent); @@ -3241,6 +3567,7 @@ int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S) tolua_function(tolua_S,"checkChildInfo",lua_cocos2dx_ui_Widget_checkChildInfo); tolua_function(tolua_S,"setSize",lua_cocos2dx_ui_Widget_setSize); tolua_function(tolua_S,"setBright",lua_cocos2dx_ui_Widget_setBright); + tolua_function(tolua_S,"isFocusEnabled",lua_cocos2dx_ui_Widget_isFocusEnabled); tolua_function(tolua_S,"new",lua_cocos2dx_ui_Widget_constructor); tolua_function(tolua_S,"create", lua_cocos2dx_ui_Widget_create); tolua_endmodule(tolua_S); @@ -3388,6 +3715,52 @@ int lua_cocos2dx_ui_Layout_setBackGroundColorType(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Layout_setLoopFocus(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Layout* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Layout",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Layout*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Layout_setLoopFocus'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0); + if(!ok) + return 0; + cobj->setLoopFocus(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setLoopFocus",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Layout_setLoopFocus'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Layout_setBackGroundImageColor(lua_State* tolua_S) { int argc = 0; @@ -3522,6 +3895,50 @@ int lua_cocos2dx_ui_Layout_getClippingType(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Layout_isLoopFocus(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Layout* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Layout",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Layout*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Layout_isLoopFocus'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isLoopFocus(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "isLoopFocus",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Layout_isLoopFocus'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Layout_removeBackGroundImage(lua_State* tolua_S) { int argc = 0; @@ -4258,6 +4675,50 @@ int lua_cocos2dx_ui_Layout_getBackGroundImageOpacity(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Layout_isPassFocusToChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Layout* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Layout",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Layout*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Layout_isPassFocusToChild'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 0) + { + if(!ok) + return 0; + bool ret = cobj->isPassFocusToChild(); + tolua_pushboolean(tolua_S,(bool)ret); + return 1; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "isPassFocusToChild",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Layout_isPassFocusToChild'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Layout_setBackGroundImageCapInsets(lua_State* tolua_S) { int argc = 0; @@ -4392,6 +4853,52 @@ int lua_cocos2dx_ui_Layout_getLayoutType(lua_State* tolua_S) return 0; } +int lua_cocos2dx_ui_Layout_setPassFocusToChild(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::ui::Layout* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"ccui.Layout",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::ui::Layout*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Layout_setPassFocusToChild'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0); + if(!ok) + return 0; + cobj->setPassFocusToChild(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setPassFocusToChild",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Layout_setPassFocusToChild'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_ui_Layout_getBackGroundStartColor(lua_State* tolua_S) { int argc = 0; @@ -4639,9 +5146,11 @@ int lua_register_cocos2dx_ui_Layout(lua_State* tolua_S) tolua_function(tolua_S,"setBackGroundColorVector",lua_cocos2dx_ui_Layout_setBackGroundColorVector); tolua_function(tolua_S,"setClippingType",lua_cocos2dx_ui_Layout_setClippingType); tolua_function(tolua_S,"setBackGroundColorType",lua_cocos2dx_ui_Layout_setBackGroundColorType); + tolua_function(tolua_S,"setLoopFocus",lua_cocos2dx_ui_Layout_setLoopFocus); tolua_function(tolua_S,"setBackGroundImageColor",lua_cocos2dx_ui_Layout_setBackGroundImageColor); tolua_function(tolua_S,"getBackGroundColorVector",lua_cocos2dx_ui_Layout_getBackGroundColorVector); tolua_function(tolua_S,"getClippingType",lua_cocos2dx_ui_Layout_getClippingType); + tolua_function(tolua_S,"isLoopFocus",lua_cocos2dx_ui_Layout_isLoopFocus); tolua_function(tolua_S,"removeBackGroundImage",lua_cocos2dx_ui_Layout_removeBackGroundImage); tolua_function(tolua_S,"getBackGroundColorOpacity",lua_cocos2dx_ui_Layout_getBackGroundColorOpacity); tolua_function(tolua_S,"isClippingEnabled",lua_cocos2dx_ui_Layout_isClippingEnabled); @@ -4658,9 +5167,11 @@ int lua_register_cocos2dx_ui_Layout(lua_State* tolua_S) tolua_function(tolua_S,"getBackGroundEndColor",lua_cocos2dx_ui_Layout_getBackGroundEndColor); tolua_function(tolua_S,"setBackGroundColorOpacity",lua_cocos2dx_ui_Layout_setBackGroundColorOpacity); tolua_function(tolua_S,"getBackGroundImageOpacity",lua_cocos2dx_ui_Layout_getBackGroundImageOpacity); + tolua_function(tolua_S,"isPassFocusToChild",lua_cocos2dx_ui_Layout_isPassFocusToChild); tolua_function(tolua_S,"setBackGroundImageCapInsets",lua_cocos2dx_ui_Layout_setBackGroundImageCapInsets); tolua_function(tolua_S,"getBackGroundImageTextureSize",lua_cocos2dx_ui_Layout_getBackGroundImageTextureSize); tolua_function(tolua_S,"getLayoutType",lua_cocos2dx_ui_Layout_getLayoutType); + tolua_function(tolua_S,"setPassFocusToChild",lua_cocos2dx_ui_Layout_setPassFocusToChild); tolua_function(tolua_S,"getBackGroundStartColor",lua_cocos2dx_ui_Layout_getBackGroundStartColor); tolua_function(tolua_S,"setBackGroundImageScale9Enabled",lua_cocos2dx_ui_Layout_setBackGroundImageScale9Enabled); tolua_function(tolua_S,"setLayoutType",lua_cocos2dx_ui_Layout_setLayoutType); 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 fa8c906dcd..4787b7ab78 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_ui_auto.hpp @@ -355,6 +355,17 @@ int register_all_cocos2dx_ui(lua_State* tolua_S); + + + + + + + + + + + diff --git a/cocos/scripting/lua-bindings/proj.win32/liblua.vcxproj b/cocos/scripting/lua-bindings/proj.win32/liblua.vcxproj index 929c92a21f..194e986d50 100644 --- a/cocos/scripting/lua-bindings/proj.win32/liblua.vcxproj +++ b/cocos/scripting/lua-bindings/proj.win32/liblua.vcxproj @@ -140,6 +140,8 @@ v100 v110 v110_xp + v120 + v120_xp StaticLibrary @@ -147,6 +149,8 @@ v100 v110 v110_xp + v120 + v120_xp diff --git a/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj b/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj index 3413ec57b0..16c4f896fd 100644 --- a/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj +++ b/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj @@ -27,6 +27,8 @@ v100 v110 v110_xp + v120 + v120_xp Unicode @@ -35,6 +37,8 @@ v100 v110 v110_xp + v120 + v120_xp true Unicode diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk index a857d26e36..e83f35e8ea 100644 --- a/cocos/ui/Android.mk +++ b/cocos/ui/Android.mk @@ -28,9 +28,8 @@ UIRichText.cpp \ CCProtectedNode.cpp \ UIHBox.cpp \ UIVBox.cpp \ -UIRelativeBox.cpp - - +UIRelativeBox.cpp \ +UIVideoWidgetAndroid.cpp LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/../editor-support diff --git a/cocos/ui/CocosGUI.h b/cocos/ui/CocosGUI.h index 296f0508fb..992c8d910b 100644 --- a/cocos/ui/CocosGUI.h +++ b/cocos/ui/CocosGUI.h @@ -45,6 +45,9 @@ THE SOFTWARE. #include "ui/UIHBox.h" #include "ui/UIVBox.h" #include "ui/UIRelativeBox.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) +#include "ui/UIVideoWidget.h" +#endif NS_CC_BEGIN namespace ui { diff --git a/cocos/ui/UICheckBox.cpp b/cocos/ui/UICheckBox.cpp index e19c057338..b0552e72f2 100644 --- a/cocos/ui/UICheckBox.cpp +++ b/cocos/ui/UICheckBox.cpp @@ -293,7 +293,7 @@ void CheckBox::loadTextureFrontCrossDisabled(const std::string& frontCrossDisabl void CheckBox::onTouchEnded(Touch *touch, Event *unusedEvent) { _touchEndPos = touch->getLocation(); - if (_focus) + if (_highlight) { releaseUpEvent(); if (_isSelected){ @@ -306,7 +306,7 @@ void CheckBox::onTouchEnded(Touch *touch, Event *unusedEvent) selectedEvent(); } } - setFocused(false); + setHighlighted(false); Widget* widgetParent = getWidgetParent(); if (widgetParent) { diff --git a/cocos/ui/UILayout.cpp b/cocos/ui/UILayout.cpp index 558183983f..9c32d8d3aa 100644 --- a/cocos/ui/UILayout.cpp +++ b/cocos/ui/UILayout.cpp @@ -604,9 +604,12 @@ _currentAlphaTestFunc(GL_ALWAYS), _currentAlphaTestRef(1), _backGroundImageColor(Color3B::WHITE), _backGroundImageOpacity(255), -_curLayoutExecutant(nullptr) +_curLayoutExecutant(nullptr), +_passFocusToChild(true), +_loopFocus(false) { _widgetType = WidgetTypeContainer; + onPassFocusToChild = CC_CALLBACK_2(Layout::findNearestChildWidgetIndex, this); } Layout::~Layout() @@ -1514,5 +1517,911 @@ void Layout::copySpecialProperties(Widget *widget) setClippingType(layout->_clippingType); } } + +void Layout::setLoopFocus(bool loop) +{ + _loopFocus = loop; +} + +bool Layout::isLoopFocus() +{ + return _loopFocus; +} + + +void Layout::setPassFocusToChild(bool pass) +{ + _passFocusToChild = pass; +} + +bool Layout::isPassFocusToChild() +{ + return _passFocusToChild; +} + +Size Layout::getLayoutContentSize()const +{ + const auto& children = this->getChildren(); + Size layoutSize = Size::ZERO; + int widgetCount =0; + for(const auto& widget : children) + { + Layout *layout = dynamic_cast(widget); + if (nullptr != layout) + { + layoutSize = layoutSize + layout->getLayoutContentSize(); + } + else + { + Widget *w = dynamic_cast(widget); + if (w) + { + widgetCount++; + Margin m = w->getLayoutParameter(LAYOUT_PARAMETER_LINEAR)->getMargin(); + layoutSize = layoutSize + w->getSize() + Size(m.right + m.left, m.top + m.bottom) * 0.5; + } + } + } + + //substract extra size + LayoutType type = this->getLayoutType(); + if (type == LAYOUT_LINEAR_HORIZONTAL) + { + layoutSize = layoutSize - Size(0, layoutSize.height/widgetCount * (widgetCount-1)); + } + if (type == LAYOUT_LINEAR_VERTICAL) + { + layoutSize = layoutSize - Size(layoutSize.width/widgetCount * (widgetCount-1), 0); + } + return layoutSize; +} + +Vector2 Layout::getWorldCenterPoint(Widget* widget) +{ + Layout *layout = dynamic_cast(widget); + //FIXEDME: we don't need to calculate the content size of layout anymore + Size widgetSize = layout ? layout->getLayoutContentSize() : widget->getSize(); +// CCLOG("contnet size : width = %f, height = %f", widgetSize.width, widgetSize.height); + return widget->convertToWorldSpace(Vector2(widgetSize.width/2, widgetSize.height/2)); +} + +float Layout::caculateNearestDistance(Widget* baseWidget) +{ + float distance = FLT_MAX; + + Vector2 widgetPosition = this->getWorldCenterPoint(baseWidget); + + for (Node* node : _children) { + Layout *layout = dynamic_cast(node); + int length; + if (layout) { + length = layout->caculateNearestDistance(baseWidget); + } + else + { + Widget* w = dynamic_cast(node); + if (w && w->isFocusEnabled()) { + Vector2 wPosition = this->getWorldCenterPoint(w); + length = (wPosition - widgetPosition).length(); + } + else { + continue; + } + } + + if (length < distance) { + distance = length; + } + + + } + return distance; +} + +float Layout::caculateFarestDistance(cocos2d::ui::Widget *baseWidget) +{ + float distance = -FLT_MAX; + + Vector2 widgetPosition = this->getWorldCenterPoint(baseWidget); + + for (Node* node : _children) { + Layout *layout = dynamic_cast(node); + int length; + if (layout) { + length = layout->caculateFarestDistance(baseWidget); + } + else + { + Widget* w = dynamic_cast(node); + if (w && w->isFocusEnabled()) { + Vector2 wPosition = this->getWorldCenterPoint(w); + length = (wPosition - widgetPosition).length(); + } + else { + continue; + } + } + + if (length > distance) { + distance = length; + } + } + return distance; +} + +int Layout::findFirstFocusEnabledWidgetIndex() +{ + ssize_t index = 0; + ssize_t count = this->getChildren().size(); + while (index < count) { + Widget* w = dynamic_cast(_children.at(index)); + if (w && w->isFocusEnabled()) { + return (int)index; + } + index++; + } + CCASSERT(0, "invalide operation"); + return 0; +} + +int Layout::findNearestChildWidgetIndex(FocusDirection direction, Widget* baseWidget) +{ + if (baseWidget == nullptr || baseWidget == this) + { + return this->findFirstFocusEnabledWidgetIndex(); + } + int index = 0; + ssize_t count = this->getChildren().size(); + + float distance = FLT_MAX; + int found = 0; + if (direction == FocusDirection::FocusDirection_Left || direction == FocusDirection::FocusDirection_Right) + { + Vector2 widgetPosition = this->getWorldCenterPoint(baseWidget); + while (index < count) + { + Widget *w = dynamic_cast(this->getChildren().at(index)); + if (w && w->isFocusEnabled()) + { + Vector2 wPosition = this->getWorldCenterPoint(w); + float length; + Layout *layout = dynamic_cast(w); + if (layout) + { + length = layout->caculateNearestDistance(baseWidget); + } + else + { + length = (wPosition - widgetPosition).getLength(); + } + + if (length < distance) + { + found = index; + distance = length; + } + } + index++; + } + return found; + } + + index = 0; + found = 0; + distance = FLT_MAX; + if (direction == FocusDirection::FocusDirection_Down || direction == FocusDirection::FocusDirection_Up) { + Vector2 widgetPosition = this->getWorldCenterPoint(baseWidget); + while (index < count) + { + Widget *w = dynamic_cast(this->getChildren().at(index)); + if (w && w->isFocusEnabled()) + { + Vector2 wPosition = this->getWorldCenterPoint(w); + float length; + Layout *layout = dynamic_cast(w); + if (layout) + { + length = layout->caculateNearestDistance(baseWidget); + } + else + { + length = (wPosition - widgetPosition).getLength(); + } + + if (length < distance) + { + found = index; + distance = length; + } + + } + index++; + } + return found; + } + CCASSERT(0, "invalid focus direction!!!"); + return 0; +} + +int Layout::findFarestChildWidgetIndex(cocos2d::ui::FocusDirection direction, cocos2d::ui::Widget *baseWidget) +{ + if (baseWidget == nullptr || baseWidget == this) + { + return this->findFirstFocusEnabledWidgetIndex(); + } + int index = 0; + ssize_t count = this->getChildren().size(); + + float distance = -FLT_MAX; + int found = 0; + if (direction == FocusDirection::FocusDirection_Left || direction == FocusDirection::FocusDirection_Right) + { + Vector2 widgetPosition = this->getWorldCenterPoint(baseWidget); + while (index < count) + { + Widget *w = dynamic_cast(this->getChildren().at(index)); + if (w && w->isFocusEnabled()) + { + Vector2 wPosition = this->getWorldCenterPoint(w); + float length; + Layout *layout = dynamic_cast(w); + if (layout) + { + length = layout->caculateFarestDistance(baseWidget); + } + else + { + length = (wPosition - widgetPosition).getLength(); + } + + if (length > distance) + { + found = index; + distance = length; + } + } + index++; + } + return found; + } + + index = 0; + found = 0; + distance = -FLT_MAX; + if (direction == FocusDirection::FocusDirection_Down || direction == FocusDirection::FocusDirection_Up) { + Vector2 widgetPosition = this->getWorldCenterPoint(baseWidget); + while (index < count) + { + Widget *w = dynamic_cast(this->getChildren().at(index)); + if (w && w->isFocusEnabled()) + { + Vector2 wPosition = this->getWorldCenterPoint(w); + float length; + Layout *layout = dynamic_cast(w); + if (layout) + { + length = layout->caculateFarestDistance(baseWidget); + } + else + { + length = (wPosition - widgetPosition).getLength(); + } + + if (length > distance) + { + found = index; + distance = length; + } + + } + index++; + } + return found; + } + CCASSERT(0, "invalid focus direction!!!"); + return 0; +} + + + +Widget* Layout::findFocusEnabledChildWidgetByIndex(ssize_t index) +{ + + Widget *widget = this->getChildWidgetByIndex(index); + + if (widget) + { + if (widget->isFocusEnabled()) + { + return widget; + } + index = index + 1; + return this->findFocusEnabledChildWidgetByIndex(index); + } + return nullptr; +} + +Widget *Layout::findFirstNonLayoutWidget() +{ + Widget* widget = nullptr; + for(Node *node : _children) + { + Layout* layout = dynamic_cast(node); + if (layout) { + widget = layout->findFirstNonLayoutWidget(); + } + else{ + Widget *w = dynamic_cast(node); + if (w) { + widget = w; + break; + } + } + + } + + return widget; +} + +void Layout::findProperSearchingFunctor(FocusDirection dir, Widget* baseWidget) +{ + if (baseWidget == nullptr) { + return; + } + + Vector2 previousWidgetPosition = this->getWorldCenterPoint(baseWidget); + + Vector2 layoutPosition = this->getWorldCenterPoint(this->findFirstNonLayoutWidget()); + + if (dir == FocusDirection::FocusDirection_Left) { + if (previousWidgetPosition.x > layoutPosition.x) { + onPassFocusToChild = CC_CALLBACK_2(Layout::findNearestChildWidgetIndex, this); + } + else{ + onPassFocusToChild = CC_CALLBACK_2(Layout::findFarestChildWidgetIndex, this); + } + }else if(dir == FocusDirection::FocusDirection_Right){ + if (previousWidgetPosition.x > layoutPosition.x) { + onPassFocusToChild = CC_CALLBACK_2(Layout::findFarestChildWidgetIndex, this); + } + else{ + onPassFocusToChild = CC_CALLBACK_2(Layout::findNearestChildWidgetIndex, this); + } + }else if(dir == FocusDirection::FocusDirection_Down){ + if (previousWidgetPosition.y > layoutPosition.y) { + onPassFocusToChild = CC_CALLBACK_2(Layout::findNearestChildWidgetIndex, this); + }else{ + onPassFocusToChild = CC_CALLBACK_2(Layout::findFarestChildWidgetIndex, this); + } + }else if(dir == FocusDirection::FocusDirection_Up){ + if (previousWidgetPosition.y < layoutPosition.y) { + onPassFocusToChild = CC_CALLBACK_2(Layout::findNearestChildWidgetIndex, this); + }else{ + onPassFocusToChild = CC_CALLBACK_2(Layout::findFarestChildWidgetIndex, this); + } + }else{ + CCASSERT(0, "invalid direction!"); + } + +} + + +Widget* Layout::passFocusToChild(cocos2d::ui::FocusDirection dir, cocos2d::ui::Widget *current) +{ + if (checkFocusEnabledChild()) + { + Widget* previousWidget = this->getCurrentFocusedWidget(true); + + this->findProperSearchingFunctor(dir, previousWidget); + + int index = onPassFocusToChild(dir, previousWidget); + + Widget *widget = this->getChildWidgetByIndex(index); + this->dispatchFocusEvent(current, widget); + Layout *layout = dynamic_cast(widget); + if (layout) + { + return layout->findNextFocusedWidget(dir, layout); + } + else + { + return widget; + } + } + else + { + return this; + } + +} + +bool Layout::checkFocusEnabledChild() +{ + bool ret = false; + for(Node* node : _children) + { + Widget* widget = dynamic_cast(node); + if (widget && widget->isFocusEnabled()) + { + ret = true; + break; + } + } + return ret; +} + +Widget* Layout::getChildWidgetByIndex(ssize_t index) +{ + ssize_t size = _children.size(); + int count = 0; + ssize_t oldIndex = index; + Widget *widget = nullptr; + while (index < size) + { + Widget* firstChild = dynamic_cast(_children.at(index)); + if (firstChild) + { + widget = firstChild; + break; + } + count++; + index++; + } + + if (nullptr == widget) + { + int begin = 0; + while (begin < oldIndex) + { + Widget* firstChild = dynamic_cast(_children.at(begin)); + if (firstChild) + { + widget = firstChild; + break; + } + count++; + begin++; + } + } + + + return widget; +} + +Widget* Layout::getPreviousFocusedWidget(FocusDirection direction, Widget *current) +{ + Widget *nextWidget = nullptr; + ssize_t previousWidgetPos = _children.getIndex(current); + previousWidgetPos = previousWidgetPos - 1; + if (previousWidgetPos >= 0) + { + nextWidget = this->getChildWidgetByIndex(previousWidgetPos); + if (nextWidget->isFocusEnabled()) + { + + this->dispatchFocusEvent(current, nextWidget); + + Layout* layout = dynamic_cast(nextWidget); + if (layout) + { + return layout->findNextFocusedWidget(direction, layout); + } + + return nextWidget; + } + else + { + //handling the disabled widget, there is no actual focus lose or get, so we don't need any envet + return this->getPreviousFocusedWidget(direction, nextWidget); + } + }else + { + if (_loopFocus) + { + if (checkFocusEnabledChild()) + { + previousWidgetPos = _children.size()-1; + nextWidget = this->getChildWidgetByIndex(previousWidgetPos); + if (nextWidget->isFocusEnabled()) + { + this->dispatchFocusEvent(current, nextWidget); + Layout* layout = dynamic_cast(nextWidget); + if (layout) + { + return layout->findNextFocusedWidget(direction, layout); + } + else + { + return nextWidget; + } + } + else + { + return this->getPreviousFocusedWidget(direction, nextWidget); + } + } + else + { + if (dynamic_cast(current)) { + return current; + } + else + { + return _focusedWidget; + } + } + } + else + { + if (isLastWidgetInContainer(current, direction)) + { + if (isWidgetAncestorSupportLoopFocus(this, direction)) + { + this->dispatchFocusEvent(current, this); + return Widget::findNextFocusedWidget(direction, this); + } + if (dynamic_cast(current)) { + return current; + } + else + { + return _focusedWidget; + } + } + else + { + //call parent method to get its parent's next focus enabled widget + this->dispatchFocusEvent(current,this); + return Widget::findNextFocusedWidget(direction, this); + } + } + } +} + +Widget* Layout::getNextFocusedWidget(FocusDirection direction, Widget *current) +{ + Widget *nextWidget = nullptr; + ssize_t previousWidgetPos = _children.getIndex(current); + previousWidgetPos = previousWidgetPos + 1; + if (previousWidgetPos < _children.size()) + { + nextWidget = this->getChildWidgetByIndex(previousWidgetPos); + //handle widget + if (nextWidget) + { + if (nextWidget->isFocusEnabled()) + { + + this->dispatchFocusEvent(current, nextWidget); + Layout* layout = dynamic_cast(nextWidget); + if (layout) + { + return layout->findNextFocusedWidget(direction, layout); + } + else + { + return nextWidget; + } + } + else + { + return this->getNextFocusedWidget(direction, nextWidget); + } + } + else + { + return current; + } + }else + { + if (_loopFocus) + { + if (checkFocusEnabledChild()) + { + previousWidgetPos = 0; + nextWidget = this->getChildWidgetByIndex(previousWidgetPos); + if (nextWidget->isFocusEnabled()) + { + + this->dispatchFocusEvent(current, nextWidget); + + Layout* layout = dynamic_cast(nextWidget); + if (layout) + { + return layout->findNextFocusedWidget(direction, layout); + }else + { + return nextWidget; + } + } + else + { + return this->getNextFocusedWidget(direction, nextWidget); + } + } + else + { + if (dynamic_cast(current)) { + return current; + } + else + { + return _focusedWidget; + } + } + } + else{ + if (isLastWidgetInContainer(current, direction)) + { + if (isWidgetAncestorSupportLoopFocus(this, direction)) + { + this->dispatchFocusEvent(current, this); + return Widget::findNextFocusedWidget(direction, this); + } + if (dynamic_cast(current)) { + return current; + } + else + { + return _focusedWidget; + } + } + else + { + //call parent method to get its parent's next focus enabled widget + this->dispatchFocusEvent(current,this); + return Widget::findNextFocusedWidget(direction, this); + } + } + } +} + +bool Layout::isLastWidgetInContainer(Widget* widget, FocusDirection direction) +{ + Layout* parent = dynamic_cast(widget->getParent()); + if (parent == nullptr) + { + return true; + } + + auto container = parent->getChildren(); + ssize_t index = container.getIndex(widget); + if (parent->getLayoutType() == LAYOUT_LINEAR_HORIZONTAL) + { + if (direction == FocusDirection::FocusDirection_Left) { + if (index == 0) + { + return true * isLastWidgetInContainer(parent, direction); + } + else + { + return false; + } + } + if (direction == FocusDirection::FocusDirection_Right) { + if (index == container.size()-1) + { + return true * isLastWidgetInContainer(parent, direction); + } + else + { + return false; + } + } + if (direction == FocusDirection::FocusDirection_Down) + { + return isLastWidgetInContainer(parent, direction); + } + + if (direction == FocusDirection::FocusDirection_Up) + { + return isLastWidgetInContainer(parent, direction); + } + } + else if(parent->getLayoutType() == LAYOUT_LINEAR_VERTICAL) + { + if (direction == FocusDirection::FocusDirection_Up) + { + if (index == 0) + { + return true * isLastWidgetInContainer(parent, direction); + + } + else + { + return false; + } + } + if (direction == FocusDirection::FocusDirection_Down) + { + if (index == container.size() - 1) + { + return true * isLastWidgetInContainer(parent, direction); + } + else + { + return false; + } + } + if (direction == FocusDirection::FocusDirection_Left) + { + return isLastWidgetInContainer(parent, direction); + } + + if (direction == FocusDirection::FocusDirection_Right) + { + return isLastWidgetInContainer(parent, direction); + } + } + else + { + CCASSERT(0, "invalid layout Type"); + return false; + } + + return false; +} + +bool Layout::isWidgetAncestorSupportLoopFocus(Widget* widget, FocusDirection direction) +{ + Layout* parent = dynamic_cast(widget->getParent()); + if (parent == nullptr) + { + return false; + } + if (parent->isLoopFocus()) + { + auto layoutType = parent->getLayoutType(); + if (layoutType == LAYOUT_LINEAR_HORIZONTAL) + { + if (direction == FocusDirection::FocusDirection_Left || direction == FocusDirection::FocusDirection_Right) + { + return true; + } + else + { + return isWidgetAncestorSupportLoopFocus(parent, direction); + } + } + if (layoutType == LAYOUT_LINEAR_VERTICAL) + { + if (direction == FocusDirection::FocusDirection_Down || direction == FocusDirection::FocusDirection_Up) + { + return true; + } + else + { + return isWidgetAncestorSupportLoopFocus(parent, direction); + } + } + else + { + CCASSERT(0, "invalid layout type"); + } + + } + else + { + return isWidgetAncestorSupportLoopFocus(parent, direction); + } +} + + + + +Widget* Layout::findNextFocusedWidget(FocusDirection direction, Widget* current) +{ + if (this->isFocused()) + { + Layout* parent = dynamic_cast(this->getParent()); + + if (_passFocusToChild) + { + Widget * w = this->passFocusToChild(direction, current); + if (dynamic_cast(w)) { + if (parent) { + return parent->findNextFocusedWidget(direction, this); + } + } + return w; + } + + if (nullptr == parent) { + return this; + } + return parent->findNextFocusedWidget(direction, this); + + } + else if(current->isFocused() || !current->isFocusEnabled()) + { + if (_layoutType == LAYOUT_LINEAR_HORIZONTAL) + { + switch (direction) + { + case FocusDirection::FocusDirection_Left: + { + return this->getPreviousFocusedWidget(direction, current); + }break; + case FocusDirection::FocusDirection_Right: + { + return this->getNextFocusedWidget(direction, current); + }break; + case FocusDirection::FocusDirection_Down: + case FocusDirection::FocusDirection_Up: + { + if (isLastWidgetInContainer(this, direction)) + { + if (isWidgetAncestorSupportLoopFocus(current, direction)) + { + this->dispatchFocusEvent(current, this); + return Widget::findNextFocusedWidget(direction, this); + } + return current; + } + else{ + this->dispatchFocusEvent(current, this); + return Widget::findNextFocusedWidget(direction, this); + } + }break; + default: + { + CCASSERT(0, "Invalid Focus Direction"); + return current; + } + break; + } + } + else if (_layoutType == LAYOUT_LINEAR_VERTICAL) + { + switch (direction) + { + case FocusDirection::FocusDirection_Left: + case FocusDirection::FocusDirection_Right: + { + if (isLastWidgetInContainer(this, direction)) + { + if (isWidgetAncestorSupportLoopFocus(current, direction)) + { + this->dispatchFocusEvent(current, this); + return Widget::findNextFocusedWidget(direction, this); + } + return current; + } + else + { + this->dispatchFocusEvent(current, this); + return Widget::findNextFocusedWidget(direction, this); + } + } break; + case FocusDirection::FocusDirection_Down: + { + return getNextFocusedWidget(direction, current); + } + break; + case FocusDirection::FocusDirection_Up: + { + return getPreviousFocusedWidget(direction, current); + } + break; + default: + { + CCASSERT(0, "Invalid Focus Direction"); + return current; + } + break; + } + } + else + { + CCASSERT(0, "Un Supported Layout type, please use VBox and HBox instead!!!"); + return current; + } + } + else + { + return current; + } +} + } NS_CC_END diff --git a/cocos/ui/UILayout.h b/cocos/ui/UILayout.h index 49dded3556..316354961e 100644 --- a/cocos/ui/UILayout.h +++ b/cocos/ui/UILayout.h @@ -265,6 +265,44 @@ public: virtual void onEnter() override; virtual void onExit() override; + + /** + * If a layout is loop focused which means that the focus movement will be inside the layout + *@param loop pass true to let the focus movement loop inside the layout + */ + void setLoopFocus(bool loop); + + /** + *@return If focus loop is enabled, then it will return true, otherwise it returns false. The default value is false. + */ + bool isLoopFocus(); + + /** + *@param pass To specify whether the layout pass its focus to its child + */ + void setPassFocusToChild(bool pass); + + /** + * @return To query whether the layout will pass the focus to its children or not. The default value is true + */ + bool isPassFocusToChild(); + + /** + * When a widget is in a layout, you could call this method to get the next focused widget within a specified direction. + * If the widget is not in a layout, it will return itself + *@param dir the direction to look for the next focused widget in a layout + *@param current the current focused widget + *@return the next focused widget in a layout + */ + virtual Widget* findNextFocusedWidget(FocusDirection direction, Widget* current) override; + + /** + * To specify a user-defined functor to decide which child widget of the layout should get focused + * @param FocusDirection the finding direction + * @param this previous focused widget + * @return return the index of widget in the layout + */ + std::function onPassFocusToChild; CC_CONSTRUCTOR_ACCESS: //override "init" method of widget. @@ -300,6 +338,110 @@ protected: void updateBackGroundImageOpacity(); void updateBackGroundImageRGBA(); LayoutExecutant* createCurrentLayoutExecutant(); + + /** + *get the content size of the layout, it will accumulate all its children's content size + */ + Size getLayoutContentSize() const; + + /** + * When the layout get focused, it the layout pass the focus to its child, it will use this method to determine which child + * will get the focus. The current algorithm to determine which child will get focus is nearest-distance-priority algorithm + *@param dir next focused widget direction + *@return The index of child widget in the container + */ + int findNearestChildWidgetIndex(FocusDirection direction, Widget* baseWidget); + + /** + * When the layout get focused, it the layout pass the focus to its child, it will use this method to determine which child + * will get the focus. The current algorithm to determine which child will get focus is farest-distance-priority algorithm + *@param dir next focused widget direction + *@return The index of child widget in the container + */ + int findFarestChildWidgetIndex(FocusDirection direction, Widget* baseWidget); + + /** + * caculate the nearest distance between the baseWidget and the children of the layout + *@param the base widget which will be used to caculate the distance between the layout's children and itself + *@return return the nearest distance between the baseWidget and the layout's children + */ + float caculateNearestDistance(Widget* baseWidget); + + /** + * caculate the farest distance between the baseWidget and the children of the layout + *@param the base widget which will be used to caculate the distance between the layout's children and itself + *@return return the farest distance between the baseWidget and the layout's children + */ + + float caculateFarestDistance(Widget* baseWidget); + + /** + * when a layout pass the focus to it's child, use this method to determine which algorithm to use, nearest or farest distance algorithm or not + */ + void findProperSearchingFunctor(FocusDirection dir, Widget* baseWidget); + + /** + * find the first non-layout widget in this layout + */ + Widget *findFirstNonLayoutWidget(); + + /** + * find the fisrt focus enabled widget index in the layout, it will recusive searching the child widget + */ + int findFirstFocusEnabledWidgetIndex(); + + /** + * find a focus enabled child Widget in the layout by index + */ + Widget* findFocusEnabledChildWidgetByIndex(ssize_t index); + + /** + * get the center point of a widget in world space + */ + Vector2 getWorldCenterPoint(Widget* node); + + /** + * this method is called internally by nextFocusedWidget. When the dir is Right/Down, then this method will be called + *@param dir the direction. + *@param current the current focused widget + *@return the next focused widget + */ + Widget* getNextFocusedWidget(FocusDirection direction,Widget *current); + + /** + * this method is called internally by nextFocusedWidget. When the dir is Left/Up, then this method will be called + *@param dir the direction. + *@param current the current focused widget + *@return the next focused widget + */ + Widget* getPreviousFocusedWidget(FocusDirection direction, Widget *current); + + /** + * find the nth elment in the _children array. Only the Widget descendant object will be returned + *@param index The index of a element in the _children array + */ + Widget* getChildWidgetByIndex(ssize_t index); + /** + * whether it is the last element according to all their parents + */ + bool isLastWidgetInContainer(Widget* widget, FocusDirection direction); + + /**Lookup any parent widget with a layout type as the direction, + * if the layout is loop focused, then return true, otherwise + * It returns false + */ + bool isWidgetAncestorSupportLoopFocus(Widget* widget, FocusDirection direction); + + /** + * pass the focus to the layout's next focus enabled child + */ + Widget* passFocusToChild(FocusDirection direction, Widget* current); + + /** + * If there are no focus enabled child in the layout, it will return false, otherwise it returns true + */ + bool checkFocusEnabledChild(); + protected: bool _clippingEnabled; @@ -356,6 +498,9 @@ protected: CustomCommand _afterVisitCmdStencil; CustomCommand _beforeVisitCmdScissor; CustomCommand _afterVisitCmdScissor; + + bool _loopFocus; //whether enable loop focus or not + bool _passFocusToChild; //on default, it will pass the focus to the next nearest widget }; } diff --git a/cocos/ui/UIPageView.cpp b/cocos/ui/UIPageView.cpp index 97c85bb439..ad0fa59c06 100644 --- a/cocos/ui/UIPageView.cpp +++ b/cocos/ui/UIPageView.cpp @@ -550,7 +550,7 @@ void PageView::interceptTouchEvent(int handleState, Widget *sender, const Vector offset = fabs(sender->getTouchStartPos().x - touchPoint.x); if (offset > _childFocusCancelOffset) { - sender->setFocused(false); + sender->setHighlighted(false); handleMoveLogic(touchPoint); } } diff --git a/cocos/ui/UIScrollView.cpp b/cocos/ui/UIScrollView.cpp index 0fdca517d6..cd69c209ed 100644 --- a/cocos/ui/UIScrollView.cpp +++ b/cocos/ui/UIScrollView.cpp @@ -1528,7 +1528,7 @@ void ScrollView::interceptTouchEvent(int handleState, Widget *sender, const Vect float offset = (sender->getTouchStartPos() - touchPoint).getLength(); if (offset > _childFocusCancelOffset) { - sender->setFocused(false); + sender->setHighlighted(false); handleMoveLogic(touchPoint); } } diff --git a/cocos/ui/UIVideoWidget.h b/cocos/ui/UIVideoWidget.h new file mode 100644 index 0000000000..0189046784 --- /dev/null +++ b/cocos/ui/UIVideoWidget.h @@ -0,0 +1,115 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#ifndef __COCOS2D_UI_VIDEOWEIGTH_H_ +#define __COCOS2D_UI_VIDEOWEIGTH_H_ + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + +#include "ui/UIWidget.h" + +NS_CC_BEGIN +namespace experimental{ +namespace ui{ + + enum class VideoWidgetEvent + { + PLAYING = 0, + PAUSED, + STOPPED, + COMPLETED + }; + + typedef std::function VideoWidgetCallback; + + class VideoWidget : public cocos2d::ui::Widget + { + public: + + CREATE_FUNC(VideoWidget); + + //Sets local file[support assets' file on android] as a video source for VideoWidget + virtual void setVideoFileName(const std::string& videoPath); + virtual const std::string& getVideoFileName() const { return _videoUrl;} + + //Sets network link as a video source for VideoWidget + virtual void setVideoURL(const std::string& videoUrl); + virtual const std::string& getVideoURL() const { return _videoUrl;} + + virtual void startVideo(); + virtual void pauseVideo(); + virtual void resumeVideo(); + virtual void stopVideo(); + + virtual void seekVideoTo(float sec); + virtual bool isPlaying() const; + + virtual void setVisible(bool visible) override; + + virtual void setKeepAspectRatioEnabled(bool enable); + virtual bool isKeepAspectRatioEnabled() { return _keepAspectRatioEnabled;} + + virtual void setFullScreenEnabled(bool enabled); + virtual bool isFullScreenEnabled(); + + virtual void setEventListener(const VideoWidgetCallback& callback); + + virtual void onVideoEvent(VideoWidgetEvent event); + virtual void draw(Renderer *renderer, const Matrix& transform, bool transformUpdated) override; + + protected: + VideoWidget(); + virtual ~VideoWidget(); + +#if CC_VIDEOWIDGET_DEBUG_DRAW + CustomCommand _customDebugDrawCommand; + void VideoWidget::drawDebugData(); +#endif + + enum class VideoSource + { + FILENAME = 0, + URL + }; + + bool _isPlaying; + bool _fullScreenDirty; + bool _fullScreenEnabled; + bool _keepAspectRatioEnabled; + + std::string _videoUrl; + VideoSource _videoSource; + + int _videoWidgetIndex; + VideoWidgetCallback _callback; + + void* _videiView; + }; +} +} + +NS_CC_END + +#endif +#endif diff --git a/cocos/ui/UIVideoWidgetAndroid.cpp b/cocos/ui/UIVideoWidgetAndroid.cpp new file mode 100644 index 0000000000..596f77b100 --- /dev/null +++ b/cocos/ui/UIVideoWidgetAndroid.cpp @@ -0,0 +1,367 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "UIVideoWidget.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#include +#include +#include +#include +#include "jni/JniHelper.h" + +//----------------------------------------------------------------------------------------------------------- +#define CLASS_NAME "org/cocos2dx/lib/Cocos2dxVideoHelper" + +void executeVideoCallback(int index,int event); + +USING_NS_CC; + +extern "C" { + void Java_org_cocos2dx_lib_Cocos2dxVideoHelper_nativeExecuteVideoCallback(JNIEnv * env, jobject obj, jint index,jint event) { + executeVideoCallback(index,event); + } +} + +int createVideoWidgetJNI() +{ + JniMethodInfo t; + int ret = -1; + if (JniHelper::getStaticMethodInfo(t, CLASS_NAME, "createVideoWidget", "()I")) { + ret = t.env->CallStaticIntMethod(t.classID, t.methodID); + + t.env->DeleteLocalRef(t.classID); + } + + return ret; +} + +void callVideoNonParameterFun(int index,const char* funName) +{ + JniMethodInfo t; + + if (JniHelper::getStaticMethodInfo(t, CLASS_NAME, funName, "(I)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index); + + t.env->DeleteLocalRef(t.classID); + } +} + +void removeVideoWidgetJNI(int index) +{ + callVideoNonParameterFun(index,"removeVideoWidget"); +} + +void setVideoRectJNI(int index,int left,int top,int width,int height) +{ + JniMethodInfo t; + + if (JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setVideoRect", "(IIIII)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, left, top, width, height); + + t.env->DeleteLocalRef(t.classID); + } +} + +void setVideoURLJNI(int index,int videoSource,const std::string& videoUrl) +{ + JniMethodInfo t; + if (JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setVideoUrl", "(IILjava/lang/String;)V")) { + jstring stringArg = t.env->NewStringUTF(videoUrl.c_str()); + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, videoSource,stringArg); + + t.env->DeleteLocalRef(t.classID); + t.env->DeleteLocalRef(stringArg); + } +} + +void startVideoJNI(int index) +{ + callVideoNonParameterFun(index,"startVideo"); +} + +void pauseVideoJNI(int index) +{ + callVideoNonParameterFun(index,"pauseVideo"); +} + +void resumeVideoJNI(int index) +{ + callVideoNonParameterFun(index,"resumeVideo"); +} + +void stopVideoJNI(int index) +{ + callVideoNonParameterFun(index,"stopVideo"); +} + +void seekVideoToJNI(int index,int msec) +{ + JniMethodInfo t; + + if (JniHelper::getStaticMethodInfo(t, CLASS_NAME, "seekVideoTo", "(II)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, msec); + + t.env->DeleteLocalRef(t.classID); + } +} + +void setVideoVisible(int index,bool visible) +{ + JniMethodInfo t; + + if (JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setVideoVisible", "(IZ)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, visible); + + t.env->DeleteLocalRef(t.classID); + } +} + +void setVideoKeepRatioEnabled(int index,bool enabled) +{ + JniMethodInfo t; + + if (JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setVideoKeepRatioEnabled", "(IZ)V")) { + t.env->CallStaticVoidMethod(t.classID, t.methodID, index, enabled); + + t.env->DeleteLocalRef(t.classID); + } +} +//----------------------------------------------------------------------------------------------------------- + +using namespace cocos2d::experimental::ui; + +static std::unordered_map s_allVideoWidgets; + +VideoWidget::VideoWidget() +: _videoWidgetIndex(-1) +, _callback(nullptr) +, _fullScreenEnabled(false) +, _fullScreenDirty(false) +, _keepAspectRatioEnabled(false) +{ + _videoWidgetIndex = createVideoWidgetJNI(); + s_allVideoWidgets[_videoWidgetIndex] = this; + + auto listener = EventListenerKeyboard::create(); + listener->onKeyReleased = [&](EventKeyboard::KeyCode keycode, Event* event){ + if (keycode == EventKeyboard::KeyCode::KEY_BACKSPACE && _fullScreenEnabled) + { + this->setFullScreenEnabled(false); + } + }; + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); +} + +VideoWidget::~VideoWidget() +{ + s_allVideoWidgets.erase(_videoWidgetIndex); + removeVideoWidgetJNI(_videoWidgetIndex); +} + +void VideoWidget::setVideoFileName(const std::string& fileName) +{ + _videoUrl = fileName; + _videoSource = VideoWidget::VideoSource::FILENAME; + setVideoURLJNI(_videoWidgetIndex, (int)VideoSource::FILENAME,_videoUrl); +} + +void VideoWidget::setVideoURL(const std::string& videoUrl) +{ + _videoUrl = videoUrl; + _videoSource = VideoWidget::VideoSource::URL; + setVideoURLJNI(_videoWidgetIndex,(int)VideoSource::URL,_videoUrl); +} + +void VideoWidget::draw(Renderer* renderer, const Matrix &transform, bool transformUpdated) +{ + cocos2d::ui::Widget::draw(renderer,transform,transformUpdated); + + if (transformUpdated || _fullScreenDirty) + { + _fullScreenDirty = false; + auto directorInstance = Director::getInstance(); + auto glView = directorInstance->getOpenGLView(); + auto frameSize = glView->getFrameSize(); + + if (_fullScreenEnabled) + { + setVideoRectJNI(_videoWidgetIndex,0,0,frameSize.width,frameSize.height); + } + else + { + auto winSize = directorInstance->getWinSize(); + + auto leftBottom = convertToWorldSpace(Point::ZERO); + auto rightTop = convertToWorldSpace(Point(_contentSize.width,_contentSize.height)); + + auto uiLeft = frameSize.width / 2 + (leftBottom.x - winSize.width / 2 ) * glView->getScaleX(); + auto uiTop = frameSize.height /2 - (rightTop.y - winSize.height / 2) * glView->getScaleY(); + + setVideoRectJNI(_videoWidgetIndex,uiLeft,uiTop, + (rightTop.x - leftBottom.x) * glView->getScaleX(), + (rightTop.y - leftBottom.y) * glView->getScaleY()); + } + } + +#if CC_VIDEOWIDGET_DEBUG_DRAW + _customDebugDrawCommand.init(_globalZOrder); + _customDebugDrawCommand.func = CC_CALLBACK_0(VideoWidget::drawDebugData, this); + renderer->addCommand(&_customDebugDrawCommand); +#endif +} + +void VideoWidget::setFullScreenEnabled(bool enabled) +{ + if (_fullScreenEnabled != enabled) + { + _fullScreenEnabled = enabled; + _fullScreenDirty = true; + } +} + +bool VideoWidget::isFullScreenEnabled() +{ + return _fullScreenEnabled; +} + +void VideoWidget::setKeepAspectRatioEnabled(bool enable) +{ + if (_keepAspectRatioEnabled != enable) + { + _keepAspectRatioEnabled = enable; + setVideoKeepRatioEnabled(_videoWidgetIndex,enable); + } +} + +#if CC_VIDEOWIDGET_DEBUG_DRAW +void VideoWidget::drawDebugData() +{ + Director* director = Director::getInstance(); + CCASSERT(nullptr != director, "Director is null when seting matrix stack"); + + director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); + director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform); + + auto size = getContentSize(); + + Point vertices[4]= + { + Point::ZERO, + Point(size.width, 0), + Point(size.width, size.height), + Point(0, size.height) + }; + + DrawPrimitives::drawPoly(vertices, 4, true); + + director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); +} +#endif + +void VideoWidget::startVideo() +{ + if (! _videoUrl.empty()) + { + startVideoJNI(_videoWidgetIndex); + } +} + +void VideoWidget::pauseVideo() +{ + if (! _videoUrl.empty()) + { + pauseVideoJNI(_videoWidgetIndex); + } +} + +void VideoWidget::resumeVideo() +{ + if (! _videoUrl.empty()) + { + resumeVideoJNI(_videoWidgetIndex); + } +} + +void VideoWidget::stopVideo() +{ + if (! _videoUrl.empty()) + { + stopVideoJNI(_videoWidgetIndex); + } +} + +void VideoWidget::seekVideoTo(float sec) +{ + if (! _videoUrl.empty()) + { + seekVideoToJNI(_videoWidgetIndex,int(sec * 1000)); + } +} + +bool VideoWidget::isPlaying() const +{ + return _isPlaying; +} + +void VideoWidget::setVisible(bool visible) +{ + cocos2d::ui::Widget::setVisible(visible); + + if (! _videoUrl.empty()) + { + setVideoVisible(_videoWidgetIndex,visible); + } +} + +void VideoWidget::setEventListener(const VideoWidgetCallback& callback) +{ + _callback = callback; +} + +void VideoWidget::onVideoEvent(VideoWidgetEvent event) +{ + if (event == VideoWidgetEvent::PLAYING) { + _isPlaying = true; + } else { + _isPlaying = false; + } + + if (_callback) + { + _callback(this,event); + } +} + +void executeVideoCallback(int index,int event) +{ + auto it = s_allVideoWidgets.find(index); + if (it != s_allVideoWidgets.end()) + { + s_allVideoWidgets[index]->onVideoEvent((VideoWidgetEvent)event); + } +} + +#endif \ No newline at end of file diff --git a/cocos/ui/UIVideoWidgetIOS.mm b/cocos/ui/UIVideoWidgetIOS.mm new file mode 100644 index 0000000000..361bc8d977 --- /dev/null +++ b/cocos/ui/UIVideoWidgetIOS.mm @@ -0,0 +1,464 @@ +/**************************************************************************** + Copyright (c) 2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "UIVideoWidget.h" + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) +//------------------------------------------------------------------------------------- +#include "CCEAGLView.h" +#import + +@interface UIVideoViewWrapperIos : NSObject + +@property (strong,nonatomic) MPMoviePlayerController * moviePlayer; + +- (void) setVideoRect:(int) left :(int) top :(int) width :(int) height; +- (void) setVideoURL:(int) videoSource :(std::string&) videoUrl; +- (void) startVideo; +- (void) pauseVideo; +- (void) resumeVideo; +- (void) stopVideo; +- (void) seekVideoTo:(float) sec; +- (void) setVideoVisible:(bool) visible; +- (void) setVideoKeepRatioEnabled:(bool) enabled; +- (void) setFullScreenEnabled:(bool) enabled; +- (bool) isFullScreenEnabled; + +-(id) init:(void*) widget; + +-(void) videoFinished:(NSNotification*) notification; +-(void) playStateChange; + ++(NSString*) fullPathFromRelativePath:(NSString*) relPath; + +@end + +@implementation UIVideoViewWrapperIos +{ + int _left; + int _top; + int _width; + int _height; + bool _keepRatioEnabled; + + cocos2d::experimental::ui::VideoWidget* _widget; +} + +-(id)init:(void*)widget +{ + if (self = [super init]) { + self.moviePlayer = nullptr; + _widget = (cocos2d::experimental::ui::VideoWidget*)widget; + _keepRatioEnabled = false; + } + + return self; +} + +-(void) dealloc +{ + if (self.moviePlayer != nullptr) { + [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:self.moviePlayer]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackStateDidChangeNotification object:self.moviePlayer]; + + [self.moviePlayer stop]; + [self.moviePlayer.view removeFromSuperview]; + self.moviePlayer = nullptr; + _widget = nullptr; + } + [super dealloc]; +} + +-(void) setVideoRect:(int)left :(int)top :(int)width :(int)height +{ + _left = left; + _width = width; + _top = top; + _height = height; + if (self.moviePlayer != nullptr) { + [self.moviePlayer.view setFrame:CGRectMake(left, top, width, height)]; + } +} + +-(void) setFullScreenEnabled:(bool) enabled +{ + if (self.moviePlayer != nullptr) { + [self.moviePlayer setFullscreen:enabled animated:(true)]; + } +} + +-(bool) isFullScreenEnabled +{ + if (self.moviePlayer != nullptr) { + return [self.moviePlayer isFullscreen]; + } + + return false; +} + +-(void) setVideoURL:(int)videoSource :(std::string &)videoUrl +{ + if (self.moviePlayer != nullptr) { + [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:self.moviePlayer]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackStateDidChangeNotification object:self.moviePlayer]; + + [self.moviePlayer stop]; + [self.moviePlayer.view removeFromSuperview]; + self.moviePlayer = nullptr; + } + + if (videoSource == 1) { + self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:@(videoUrl.c_str())]]; + self.moviePlayer.movieSourceType = MPMovieSourceTypeStreaming; + } else { + NSString *path = [UIVideoViewWrapperIos fullPathFromRelativePath:@(videoUrl.c_str())]; + self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:path]]; + self.moviePlayer.movieSourceType = MPMovieSourceTypeFile; + } + self.moviePlayer.allowsAirPlay = false; + self.moviePlayer.controlStyle = MPMovieControlStyleEmbedded; + self.moviePlayer.view.userInteractionEnabled = true; + + auto clearColor = [UIColor clearColor]; + self.moviePlayer.backgroundView.backgroundColor = clearColor; + self.moviePlayer.view.backgroundColor = clearColor; + for (UIView * subView in self.moviePlayer.view.subviews) { + subView.backgroundColor = clearColor; + } + + if (_keepRatioEnabled) { + self.moviePlayer.scalingMode = MPMovieScalingModeAspectFit; + } else { + self.moviePlayer.scalingMode = MPMovieScalingModeFill; + } + + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + auto eaglview = (CCEAGLView *) view->getEAGLView(); + [eaglview addSubview:self.moviePlayer.view]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoFinished:) name:MPMoviePlayerPlaybackDidFinishNotification object:self.moviePlayer]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playStateChange) name:MPMoviePlayerPlaybackStateDidChangeNotification object:self.moviePlayer]; +} + +-(void) videoFinished:(NSNotification *)notification +{ + if(_widget != nullptr) + { + if([self.moviePlayer playbackState] != MPMoviePlaybackStateStopped) + { + _widget->onVideoEvent(cocos2d::experimental::ui::VideoWidgetEvent::COMPLETED); + } + } +} + +-(void) playStateChange +{ + MPMoviePlaybackState state = [self.moviePlayer playbackState]; + switch (state) { + case MPMoviePlaybackStatePaused: + _widget->onVideoEvent(cocos2d::experimental::ui::VideoWidgetEvent::PAUSED); + break; + case MPMoviePlaybackStateStopped: + _widget->onVideoEvent(cocos2d::experimental::ui::VideoWidgetEvent::STOPPED); + break; + case MPMoviePlaybackStatePlaying: + _widget->onVideoEvent(cocos2d::experimental::ui::VideoWidgetEvent::PLAYING); + break; + case MPMoviePlaybackStateInterrupted: + break; + case MPMoviePlaybackStateSeekingBackward: + break; + case MPMoviePlaybackStateSeekingForward: + break; + default: + break; + } +} + +-(void) seekVideoTo:(float)sec +{ + if (self.moviePlayer != NULL) { + [self.moviePlayer setCurrentPlaybackTime:(sec)]; + } +} + +-(void) setVideoVisible:(bool)visible +{ + if (self.moviePlayer != NULL) { + [self.moviePlayer.view setHidden:visible]; + } +} + +-(void) setVideoKeepRatioEnabled:(bool)enabled +{ + _keepRatioEnabled = enabled; + if (self.moviePlayer != NULL) { + if (enabled) { + self.moviePlayer.scalingMode = MPMovieScalingModeAspectFit; + } else { + self.moviePlayer.scalingMode = MPMovieScalingModeFill; + } + } +} + +-(void) startVideo +{ + if (self.moviePlayer != NULL) { + [self.moviePlayer.view setFrame:CGRectMake(_left, _top, _width, _height)]; + [self.moviePlayer play]; + } +} + +-(void) pauseVideo +{ + if (self.moviePlayer != NULL) { + [self.moviePlayer pause]; + } +} + +-(void) resumeVideo +{ + if (self.moviePlayer != NULL) { + if([self.moviePlayer playbackState] == MPMoviePlaybackStatePaused) + { + [self.moviePlayer play]; + } + } +} + +-(void) stopVideo +{ + if (self.moviePlayer != NULL) { + [self.moviePlayer stop]; + } +} + ++(NSString*) fullPathFromRelativePath:(NSString*) relPath +{ + // do not convert an absolute path (starting with '/') + if(([relPath length] > 0) && ([relPath characterAtIndex:0] == '/')) + { + return relPath; + } + + NSMutableArray *imagePathComponents = [NSMutableArray arrayWithArray:[relPath pathComponents]]; + NSString *file = [imagePathComponents lastObject]; + + [imagePathComponents removeLastObject]; + NSString *imageDirectory = [NSString pathWithComponents:imagePathComponents]; + + NSString *fullpath = [[NSBundle mainBundle] pathForResource:file ofType:nil inDirectory:imageDirectory]; + if (fullpath == nil) + fullpath = relPath; + + return fullpath; +} +@end +//------------------------------------------------------------------------------------------------------------ + +using namespace cocos2d::experimental::ui; + +VideoWidget::VideoWidget() +: _videoWidgetIndex(-1) +, _callback(nullptr) +, _fullScreenEnabled(false) +, _fullScreenDirty(false) +, _keepAspectRatioEnabled(false) +, _isPlaying(false) +{ + _videiView = [[UIVideoViewWrapperIos alloc] init:this]; +} + +VideoWidget::~VideoWidget() +{ + if(_videiView) + { + [((UIVideoViewWrapperIos*)_videiView) dealloc]; + } +} + +void VideoWidget::setVideoFileName(const std::string& fileName) +{ + _videoUrl = fileName; + _videoSource = VideoWidget::VideoSource::FILENAME; + [((UIVideoViewWrapperIos*)_videiView) setVideoURL:(int)_videoSource :_videoUrl]; +} + +void VideoWidget::setVideoURL(const std::string& videoUrl) +{ + _videoUrl = videoUrl; + _videoSource = VideoWidget::VideoSource::URL; + [((UIVideoViewWrapperIos*)_videiView) setVideoURL:(int)_videoSource :_videoUrl]; +} + +void VideoWidget::draw(Renderer* renderer, const Matrix &transform, bool transformUpdated) +{ + cocos2d::ui::Widget::draw(renderer,transform,transformUpdated); + + if (transformUpdated) + { + auto directorInstance = Director::getInstance(); + auto glView = directorInstance->getOpenGLView(); + auto frameSize = glView->getFrameSize(); + auto scaleFactor = directorInstance->getContentScaleFactor(); + + auto winSize = directorInstance->getWinSize(); + + auto leftBottom = convertToWorldSpace(Vector2::ZERO); + auto rightTop = convertToWorldSpace(Vector2(_contentSize.width,_contentSize.height)); + + auto uiLeft = (frameSize.width / 2 + (leftBottom.x - winSize.width / 2 ) * glView->getScaleX()) / scaleFactor; + auto uiTop = (frameSize.height /2 - (rightTop.y - winSize.height / 2) * glView->getScaleY()) / scaleFactor; + + [((UIVideoViewWrapperIos*)_videiView) setVideoRect:uiLeft :uiTop + :(rightTop.x - leftBottom.x) * glView->getScaleX() / scaleFactor + :( (rightTop.y - leftBottom.y) * glView->getScaleY()/scaleFactor)]; + } + +#if CC_VIDEOWIDGET_DEBUG_DRAW + _customDebugDrawCommand.init(_globalZOrder); + _customDebugDrawCommand.func = CC_CALLBACK_0(VideoWidget::drawDebugData, this); + renderer->addCommand(&_customDebugDrawCommand); +#endif +} + +bool VideoWidget::isFullScreenEnabled() +{ + return [((UIVideoViewWrapperIos*)_videiView) isFullScreenEnabled]; +} + +void VideoWidget::setFullScreenEnabled(bool enabled) +{ + [((UIVideoViewWrapperIos*)_videiView) setFullScreenEnabled:enabled]; +} + +void VideoWidget::setKeepAspectRatioEnabled(bool enable) +{ + if (_keepAspectRatioEnabled != enable) + { + _keepAspectRatioEnabled = enable; + [((UIVideoViewWrapperIos*)_videiView) setVideoKeepRatioEnabled:enable]; + } +} + +#if CC_VIDEOWIDGET_DEBUG_DRAW +void VideoWidget::drawDebugData() +{ + Director* director = Director::getInstance(); + CCASSERT(nullptr != director, "Director is null when seting matrix stack"); + + director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); + director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform); + + auto size = getContentSize(); + + Point vertices[4]= + { + Point::ZERO, + Point(size.width, 0), + Point(size.width, size.height), + Point(0, size.height) + }; + + DrawPrimitives::drawPoly(vertices, 4, true); + + director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); +} +#endif + +void VideoWidget::startVideo() +{ + if (! _videoUrl.empty()) + { + [((UIVideoViewWrapperIos*)_videiView) startVideo]; + } +} + +void VideoWidget::pauseVideo() +{ + if (! _videoUrl.empty()) + { + [((UIVideoViewWrapperIos*)_videiView) pauseVideo]; + } +} + +void VideoWidget::resumeVideo() +{ + if (! _videoUrl.empty()) + { + [((UIVideoViewWrapperIos*)_videiView) resumeVideo]; + } +} + +void VideoWidget::stopVideo() +{ + if (! _videoUrl.empty()) + { + [((UIVideoViewWrapperIos*)_videiView) stopVideo]; + } +} + +void VideoWidget::seekVideoTo(float sec) +{ + if (! _videoUrl.empty()) + { + [((UIVideoViewWrapperIos*)_videiView) seekVideoTo:sec]; + } +} + +bool VideoWidget::isPlaying() const +{ + return _isPlaying; +} + +void VideoWidget::setVisible(bool visible) +{ + cocos2d::ui::Widget::setVisible(visible); + + if (! _videoUrl.empty()) + { + [((UIVideoViewWrapperIos*)_videiView) setVideoVisible:visible]; + } +} + +void VideoWidget::setEventListener(const VideoWidgetCallback& callback) +{ + _callback = callback; +} + +void VideoWidget::onVideoEvent(VideoWidgetEvent event) +{ + if (event == VideoWidgetEvent::PLAYING) { + _isPlaying = true; + } else { + _isPlaying = false; + } + + if (_callback) + { + _callback(this,event); + } +} + +#endif diff --git a/cocos/ui/UIWidget.cpp b/cocos/ui/UIWidget.cpp index e6a4f21fe8..f1cb8a1f02 100644 --- a/cocos/ui/UIWidget.cpp +++ b/cocos/ui/UIWidget.cpp @@ -30,12 +30,15 @@ NS_CC_BEGIN namespace ui { +Widget* Widget::_focusedWidget = nullptr; +Widget* Widget::_realFocusedWidget = nullptr; + Widget::Widget(): _enabled(true), _bright(true), _touchEnabled(false), _touchPassedEnabled(false), -_focus(false), +_highlight(false), _brightStyle(BRIGHT_NONE), _touchStartPos(Vector2::ZERO), _touchMovePos(Vector2::ZERO), @@ -59,9 +62,12 @@ _touchListener(nullptr), _color(Color3B::WHITE), _opacity(255), _flippedX(false), -_flippedY(false) +_flippedY(false), +_focused(false), +_focusEnabled(true) { - + onFocusChanged = CC_CALLBACK_2(Widget::onFocusChange,this); + onNextFocusedWidget = nullptr; } Widget::~Widget() @@ -69,6 +75,12 @@ Widget::~Widget() _touchEventListener = nullptr; _touchEventSelector = nullptr; setTouchEnabled(false); + if (_focusedWidget == this) { + _focusedWidget = nullptr; + } + if (_realFocusedWidget == this) { + _realFocusedWidget = nullptr; + } } Widget* Widget::create() @@ -445,21 +457,21 @@ bool Widget::isTouchEnabled() const return _touchEnabled; } -bool Widget::isFocused() const +bool Widget::isHighlighted() const { - return _focus; + return _highlight; } -void Widget::setFocused(bool fucos) +void Widget::setHighlighted(bool hilight) { - if (fucos == _focus) + if (hilight == _highlight) { return; } - _focus = fucos; + _highlight = hilight; if (_bright) { - if (_focus) + if (_highlight) { setBrightStyle(BRIGHT_HIGHLIGHT); } @@ -543,7 +555,7 @@ bool Widget::onTouchBegan(Touch *touch, Event *unusedEvent) { return false; } - setFocused(true); + setHighlighted(true); Widget* widgetParent = getWidgetParent(); if (widgetParent) { @@ -556,7 +568,7 @@ bool Widget::onTouchBegan(Touch *touch, Event *unusedEvent) void Widget::onTouchMoved(Touch *touch, Event *unusedEvent) { _touchMovePos = touch->getLocation(); - setFocused(hitTest(_touchMovePos)); + setHighlighted(hitTest(_touchMovePos)); Widget* widgetParent = getWidgetParent(); if (widgetParent) { @@ -568,14 +580,14 @@ void Widget::onTouchMoved(Touch *touch, Event *unusedEvent) void Widget::onTouchEnded(Touch *touch, Event *unusedEvent) { _touchEndPos = touch->getLocation(); - bool focus = _focus; - setFocused(false); + bool highlight = _highlight; + setHighlighted(false); Widget* widgetParent = getWidgetParent(); if (widgetParent) { widgetParent->checkChildInfo(2,this,_touchEndPos); } - if (focus) + if (highlight) { releaseUpEvent(); } @@ -587,7 +599,7 @@ void Widget::onTouchEnded(Touch *touch, Event *unusedEvent) void Widget::onTouchCancelled(Touch *touch, Event *unusedEvent) { - setFocused(false); + setHighlighted(false); cancelUpEvent(); } @@ -942,6 +954,132 @@ int Widget::getActionTag() { return _actionTag; } + +void Widget::setFocused(bool focus) +{ + _focused = focus; + + //make sure there is only one focusedWidget + if (focus) { + _focusedWidget = this; + if (!dynamic_cast(this)) { + _realFocusedWidget = this; + } + } + +} + +bool Widget::isFocused() +{ + return _focused; +} + +void Widget::setFocusEnabled(bool enable) +{ + _focusEnabled = enable; +} + +bool Widget::isFocusEnabled() +{ + return _focusEnabled; +} + +Widget* Widget::findNextFocusedWidget(cocos2d::ui::FocusDirection direction, Widget* current) +{ + if (nullptr == onNextFocusedWidget || nullptr == onNextFocusedWidget(direction) ) { + if (this->isFocused() || !current->isFocusEnabled()) + { + Node* parent = this->getParent(); + Layout* layout = dynamic_cast(parent); + if (nullptr == layout) + { + //the outer layout's default behaviour is : loop focus + if (dynamic_cast(current)) + { + return current->findNextFocusedWidget(direction, current); + } + return current; + } + else + { + Widget *nextWidget = layout->findNextFocusedWidget(direction, current); + return nextWidget; + } + } + else + { + return current; + } + } + else + { + Widget *getFocusWidget = onNextFocusedWidget(direction); + this->dispatchFocusEvent(this, getFocusWidget); + return getFocusWidget; + } +} + +void Widget::dispatchFocusEvent(cocos2d::ui::Widget *widgetLoseFocus, cocos2d::ui::Widget *widgetGetFocus) +{ + //if the widgetLoseFocus doesn't get focus, it will use the previous focused widget instead + if (widgetLoseFocus && !widgetLoseFocus->isFocused()) + { + widgetLoseFocus = _focusedWidget; + } + + if (widgetGetFocus != widgetLoseFocus) + { + + if (widgetGetFocus) + { + widgetGetFocus->onFocusChanged(widgetLoseFocus, widgetGetFocus); + } + + if (widgetLoseFocus) + { + widgetLoseFocus->onFocusChanged(widgetLoseFocus, widgetGetFocus); + } + + EventFocus event(widgetLoseFocus, widgetGetFocus); + auto dispatcher = cocos2d::Director::getInstance()->getEventDispatcher(); + dispatcher->dispatchEvent(&event); + } + +} + +void Widget::requestFocus() +{ + if (this == _focusedWidget) + { + return; + } + + this->dispatchFocusEvent(_focusedWidget, this); +} + +void Widget::onFocusChange(Widget* widgetLostFocus, Widget* widgetGetFocus) +{ + //only change focus when there is indeed a get&lose happens + if (widgetLostFocus) + { + widgetLostFocus->setFocused(false); + } + + if (widgetGetFocus) + { + widgetGetFocus->setFocused(true); + } +} + +Widget* Widget::getCurrentFocusedWidget(bool isWidget) +{ + if (isWidget) { + return _realFocusedWidget; + } + return _focusedWidget; +} + + } diff --git a/cocos/ui/UIWidget.h b/cocos/ui/UIWidget.h index ecd5407118..17ed80494d 100644 --- a/cocos/ui/UIWidget.h +++ b/cocos/ui/UIWidget.h @@ -72,6 +72,15 @@ typedef enum POSITION_ABSOLUTE, POSITION_PERCENT }PositionType; + +enum class FocusDirection +{ + FocusDirection_Left, + FocusDirection_Right, + FocusDirection_Up, + FocusDirection_Down +}; + typedef void (Ref::*SEL_TouchEvent)(Ref*,TouchEventType); #define toucheventselector(_SELECTOR) (SEL_TouchEvent)(&_SELECTOR) @@ -156,20 +165,20 @@ public: bool isTouchEnabled() const; /** - * Determines if the widget is on focused + * Determines if the widget is highlighted * - * @return true if the widget is on focused, false if the widget is not on focused. + * @return true if the widget is highlighted, false if the widget is not hignlighted . */ - bool isFocused() const; + bool isHighlighted() const; /** - * Sets whether the widget is on focused + * Sets whether the widget is hilighted * - * The default value is false, a widget is default to not on focused + * The default value is false, a widget is default to not hilighted * - * @param fucosed true if the widget is on focused, false if the widget is not on focused. + * @param hilight true if the widget is hilighted, false if the widget is not hilighted. */ - void setFocused(bool fucosed); + void setHighlighted(bool hilight); /** * Gets the left boundary position of this widget. @@ -529,10 +538,63 @@ public: void setActionTag(int tag); int getActionTag(); + /** + *@return whether the widget is focused or not + */ + bool isFocused(); + + /** + *@param focus pass true to let the widget get focus or pass false to let the widget lose focus + *@return void + */ + void setFocused(bool focus); + + /** + *@return true represent the widget could accept focus, false represent the widget couldn't accept focus + */ + bool isFocusEnabled(); + + /** + *@param enable pass true/false to enable/disable the focus ability of a widget + *@return void + */ + void setFocusEnabled(bool enable); + + /** + * When a widget is in a layout, you could call this method to get the next focused widget within a specified direction. + * If the widget is not in a layout, it will return itself + *@param dir the direction to look for the next focused widget in a layout + *@param current the current focused widget + *@return the next focused widget in a layout + */ + virtual Widget* findNextFocusedWidget(FocusDirection direction, Widget* current); + + /** + * when a widget calls this method, it will get focus immediately. + */ + void requestFocus(); + CC_CONSTRUCTOR_ACCESS: //initializes state of widget. virtual bool init() override; + /** + * This method is called when a focus change event happens + *@param widgetLostFocus The widget which lose its focus + *@param widgetGetFocus The widget whihc get its focus + *@return void + */ + void onFocusChange(Widget* widgetLostFocus, Widget* widgetGetFocus); + + /** + * Dispatch a EventFocus through a EventDispatcher + *@param widgetLoseFocus The widget which lose its focus + *@param widgetGetFocus he widget whihc get its focus + *@return void + */ + void dispatchFocusEvent(Widget* widgetLoseFocus, Widget* widgetGetFocus); + + protected: //call back function called when size changed. virtual void onSizeChanged(); @@ -572,7 +634,7 @@ protected: bool _bright; ///< is this widget bright bool _touchEnabled; ///< is this widget touch endabled bool _touchPassedEnabled; ///< is the touch event should be passed - bool _focus; ///< is the widget on focus + bool _highlight; ///< is the widget on focus BrightStyle _brightStyle; ///< bright style Vector2 _touchStartPos; ///< touch began point Vector2 _touchMovePos; ///< touch moved point @@ -598,7 +660,25 @@ protected: bool _flippedX; bool _flippedY; Map _layoutParameterDictionary; - + + bool _focused; + bool _focusEnabled; + + /** + * store the only one focued widget + */ + static Widget *_focusedWidget; //both layout & widget will be stored in this variable + static Widget *_realFocusedWidget; //only the widget class will be stored in this variable +public: + /** + * no matter what widget object you call this method on , it will return you the exact one focused widget + * @param isWidget if your set isWidget to true, it will return the _realFocusedWidget which is always a widget + * otherwise, it will return a widget or a layout + */ + Widget* getCurrentFocusedWidget(bool isWidget); + + std::function onFocusChanged; + std::function onNextFocusedWidget; }; } diff --git a/cocos/ui/proj.win32/libGUI.vcxproj b/cocos/ui/proj.win32/libGUI.vcxproj index e977a36ead..c9d3113857 100644 --- a/cocos/ui/proj.win32/libGUI.vcxproj +++ b/cocos/ui/proj.win32/libGUI.vcxproj @@ -72,6 +72,8 @@ v100 v110 v110_xp + v120 + v120_xp Unicode @@ -80,6 +82,8 @@ v100 v110 v110_xp + v120 + v120_xp true Unicode diff --git a/extensions/proj.win32/libExtensions.vcxproj b/extensions/proj.win32/libExtensions.vcxproj index 809221d8da..656e7c176f 100644 --- a/extensions/proj.win32/libExtensions.vcxproj +++ b/extensions/proj.win32/libExtensions.vcxproj @@ -22,6 +22,8 @@ v100 v110 v110_xp + v120 + v120_xp StaticLibrary @@ -29,6 +31,8 @@ v100 v110 v110_xp + v120 + v120_xp diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index 93dba2c770..cd84c2aba2 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -295,6 +295,8 @@ "cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxSound.java", "cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxTextInputWraper.java", "cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxTypefaces.java", + "cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoHelper.java", + "cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxVideoView.java", "cocos/2d/platform/android/javaactivity.cpp", "cocos/2d/platform/android/jni/DPIJni.cpp", "cocos/2d/platform/android/jni/DPIJni.h", @@ -504,6 +506,8 @@ "cocos/base/CCEventCustom.h", "cocos/base/CCEventDispatcher.cpp", "cocos/base/CCEventDispatcher.h", + "cocos/base/CCEventFocus.cpp", + "cocos/base/CCEventFocus.h", "cocos/base/CCEventKeyboard.cpp", "cocos/base/CCEventKeyboard.h", "cocos/base/CCEventListener.cpp", @@ -512,6 +516,8 @@ "cocos/base/CCEventListenerAcceleration.h", "cocos/base/CCEventListenerCustom.cpp", "cocos/base/CCEventListenerCustom.h", + "cocos/base/CCEventListenerFocus.cpp", + "cocos/base/CCEventListenerFocus.h", "cocos/base/CCEventListenerKeyboard.cpp", "cocos/base/CCEventListenerKeyboard.h", "cocos/base/CCEventListenerMouse.cpp", @@ -942,6 +948,9 @@ "cocos/ui/UITextField.h", "cocos/ui/UIVBox.cpp", "cocos/ui/UIVBox.h", + "cocos/ui/UIVideoWidget.h", + "cocos/ui/UIVideoWidgetAndroid.cpp", + "cocos/ui/UIVideoWidgetIOS.mm", "cocos/ui/UIWidget.cpp", "cocos/ui/UIWidget.h", "cocos/ui/proj.win32/libGUI.vcxproj", @@ -3564,10 +3573,12 @@ "cocos/scripting/lua-bindings/auto/api/EventAcceleration.lua", "cocos/scripting/lua-bindings/auto/api/EventCustom.lua", "cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua", + "cocos/scripting/lua-bindings/auto/api/EventFocus.lua", "cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua", "cocos/scripting/lua-bindings/auto/api/EventListener.lua", "cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua", "cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua", + "cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua", "cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua", "cocos/scripting/lua-bindings/auto/api/EventListenerMouse.lua", "cocos/scripting/lua-bindings/auto/api/EventListenerPhysicsContact.lua", diff --git a/templates/cpp-template-default/proj.android/build_native.py b/templates/cpp-template-default/proj.android/build_native.py index 13a3b37555..d8d303498e 100755 --- a/templates/cpp-template-default/proj.android/build_native.py +++ b/templates/cpp-template-default/proj.android/build_native.py @@ -84,7 +84,7 @@ def do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,and if ndk_build_param == None: command = '%s -j%d -C %s %s' % (ndk_path, num_of_cpu, app_android_root, ndk_module_path) else: - command = '%s -j%d -C %s %s %s' % (ndk_path, num_of_cpu, app_android_root, ''.join(str(e) for e in ndk_build_param), ndk_module_path) + command = '%s -j%d -C %s %s %s' % (ndk_path, num_of_cpu, app_android_root, ' '.join(str(e) for e in ndk_build_param), ndk_module_path) if os.system(command) != 0: raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!") elif android_platform is not None: @@ -156,7 +156,7 @@ def build(ndk_build_param,android_platform,build_mode): if __name__ == '__main__': parser = OptionParser() - parser.add_option("-n", "--ndk", dest="ndk_build_param", help='parameter for ndk-build') + parser.add_option("-n", "--ndk", dest="ndk_build_param", help='parameter for ndk-build', action="append") parser.add_option("-p", "--platform", dest="android_platform", help='parameter for android-update.Without the parameter,the script just build dynamic library for project. Valid android-platform are:[10|11|12|13|14|15|16|17|18|19]') parser.add_option("-b", "--build", dest="build_mode", diff --git a/templates/lua-template-default/frameworks/runtime-src/Classes/AppDelegate.cpp b/templates/lua-template-default/frameworks/runtime-src/Classes/AppDelegate.cpp index b3af0b27c8..b5a2e4f34e 100644 --- a/templates/lua-template-default/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/templates/lua-template-default/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -36,9 +36,11 @@ bool AppDelegate::applicationDidFinishLaunching() director->setAnimationInterval(1.0 / 60); - auto engine = LuaEngine::getInstance(); - ScriptEngineManager::getInstance()->setScriptEngine(engine); - engine->executeScriptFile("src/main.lua"); + auto engine = LuaEngine::getInstance(); + ScriptEngineManager::getInstance()->setScriptEngine(engine); + if (engine->executeScriptFile("src/main.lua")) { + return false; + } return true; } diff --git a/templates/lua-template-default/src/main.lua b/templates/lua-template-default/src/main.lua index 3be63ad14f..fa58c465ce 100644 --- a/templates/lua-template-default/src/main.lua +++ b/templates/lua-template-default/src/main.lua @@ -12,6 +12,7 @@ function __G__TRACKBACK__(msg) cclog("LUA ERROR: " .. tostring(msg) .. "\n") cclog(debug.traceback()) cclog("----------------------------------------") + return msg end local function main() @@ -230,4 +231,7 @@ local function main() end -xpcall(main, __G__TRACKBACK__) +local status, msg = xpcall(main, __G__TRACKBACK__) +if not status then + error(msg) +end diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp index 44770d80f2..296ea8da79 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -43,7 +43,9 @@ bool AppDelegate::applicationDidFinishLaunching() auto engine = LuaEngine::getInstance(); ScriptEngineManager::getInstance()->setScriptEngine(engine); - engine->executeScriptFile("src/main.lua"); + if (engine->executeScriptFile("src/main.lua")) { + return false; + } return true; } diff --git a/templates/lua-template-runtime/src/main.lua b/templates/lua-template-runtime/src/main.lua index 2547202166..175e1ab0a5 100644 --- a/templates/lua-template-runtime/src/main.lua +++ b/templates/lua-template-runtime/src/main.lua @@ -12,6 +12,7 @@ function __G__TRACKBACK__(msg) cclog("LUA ERROR: " .. tostring(msg) .. "\n") cclog(debug.traceback()) cclog("----------------------------------------") + return msg end local function main() @@ -230,4 +231,7 @@ local function main() end -xpcall(main, __G__TRACKBACK__) +local status, msg = xpcall(main, __G__TRACKBACK__) +if not status then + error(msg) +end diff --git a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj index e38b7d723d..0bd4855f12 100644 --- a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj +++ b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj @@ -23,6 +23,8 @@ v100 v110 v110_xp + v120 + v120_xp Application @@ -30,6 +32,8 @@ v100 v110 v110_xp + v120 + v120_xp diff --git a/tests/cpp-tests/Android.mk b/tests/cpp-tests/Android.mk index 396e9bedbc..87612034d7 100644 --- a/tests/cpp-tests/Android.mk +++ b/tests/cpp-tests/Android.mk @@ -60,50 +60,52 @@ Classes/ExtensionsTest/CocoStudioComponentsTest/GameOverScene.cpp \ Classes/ExtensionsTest/CocoStudioComponentsTest/PlayerController.cpp \ Classes/ExtensionsTest/CocoStudioComponentsTest/ProjectileController.cpp \ Classes/ExtensionsTest/CocoStudioComponentsTest/SceneController.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/CocoStudioGUITest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/CocosGUIScene.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/GUIEditorTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/CustomGUIScene.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIScene.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIScene_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomReader.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp \ -Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.cpp \ +Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.cpp \ +Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp \ +Classes/UITest/CocoStudioGUITest/GUIEditorTest.cpp \ +Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp \ +Classes/UITest/CocoStudioGUITest/UIScene.cpp \ +Classes/UITest/CocoStudioGUITest/UISceneManager.cpp \ +Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp \ +Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp \ +Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp \ +Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp \ +Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp \ +Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp \ +Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp \ +Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp \ +Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp \ +Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UISceneManager_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp \ +Classes/UITest/CocoStudioGUITest/UIVideoWidgetTest/UIVideoWidgetTest.cpp \ +Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp \ +Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp \ +Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp \ +Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.cpp \ +Classes/UITest/CocoStudioGUITest/CustomWidget/CustomReader.cpp \ +Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp \ +Classes/UITest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.cpp \ Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp \ Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/acts.cpp \ Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/cons.cpp \ @@ -174,6 +176,7 @@ Classes/TouchesTest/TouchesTest.cpp \ Classes/TransitionsTest/TransitionsTest.cpp \ Classes/UnitTest/RefPtrTest.cpp \ Classes/UnitTest/UnitTest.cpp \ +Classes/UITest/UITest.cpp \ Classes/UserDefaultTest/UserDefaultTest.cpp \ Classes/ZwoptexTest/ZwoptexTest.cpp diff --git a/tests/cpp-tests/CMakeLists.txt b/tests/cpp-tests/CMakeLists.txt index aefccde480..f223415d79 100644 --- a/tests/cpp-tests/CMakeLists.txt +++ b/tests/cpp-tests/CMakeLists.txt @@ -74,50 +74,51 @@ set(SAMPLE_SRC Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/acts.cpp Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/cons.cpp - Classes/ExtensionsTest/CocoStudioGUITest/CocoStudioGUITest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/CocosGUIScene.cpp - Classes/ExtensionsTest/CocoStudioGUITest/GUIEditorTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/CustomGUIScene.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIScene.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIScene_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp - Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp - Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp - Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp - Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.cpp - Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomReader.cpp - Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp - Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.cpp + Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.cpp + Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp + Classes/UITest/CocoStudioGUITest/GUIEditorTest.cpp + Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp + Classes/UITest/CocoStudioGUITest/UIScene.cpp + Classes/UITest/CocoStudioGUITest/UISceneManager.cpp + Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp + Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp + Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp + Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp + Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp + Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp + Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp + Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp + Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp + Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp + Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp + Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp + Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp + Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp + Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp + Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp + Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp + Classes/UITest/CocoStudioGUITest/UISceneManager_Editor.cpp + Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp + Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp + Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp + Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp + Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.cpp + Classes/UITest/CocoStudioGUITest/CustomWidget/CustomReader.cpp + Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp + Classes/UITest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.cpp Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.cpp Classes/NewRendererTest/NewRendererTest.cpp Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp @@ -175,6 +176,7 @@ set(SAMPLE_SRC Classes/ConsoleTest/ConsoleTest.cpp Classes/UnitTest/RefPtrTest.cpp Classes/UnitTest/UnitTest.cpp + Classes/UITest/UITest.cpp Classes/controller.cpp Classes/testBasic.cpp Classes/AppDelegate.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp index cdacb7a854..0052503d2a 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp @@ -11,7 +11,6 @@ #include "CocoStudioArmatureTest/ArmatureScene.h" #include "CocoStudioComponentsTest/ComponentsTestScene.h" #include "CocoStudioSceneTest/SceneEditorTest.h" -#include "CocoStudioGUITest/CocoStudioGUITest.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) #include "NetworkTest/WebSocketTest.h" @@ -86,13 +85,6 @@ static struct { scene->release(); } }, - { "CocoStudioGUITest", [](Ref *sender) - { - CocoStudioGUITestScene* pScene = new CocoStudioGUITestScene(); - pScene->runThisTest(); - pScene->release(); - } - }, }; static const int g_maxTests = sizeof(g_extensionsTests) / sizeof(g_extensionsTests[0]); diff --git a/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.h b/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.h index 350788b4a4..1ac62dc8f5 100644 --- a/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.h +++ b/tests/cpp-tests/Classes/PerformanceTest/PerformanceSpriteTest.h @@ -101,7 +101,7 @@ protected: static const int MAX_AUTO_TEST_TIMES = 25; static const int MAX_SPRITE_TEST_CASE = 7; - static const int MAX_SUB_TEST_NUMS = 9; + static const int MAX_SUB_TEST_NUMS = 13; static const int AUTO_TEST_NODE_NUM1 = 500; static const int AUTO_TEST_NODE_NUM2 = 1500; }; diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CocoStudioGUITest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.cpp similarity index 79% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CocoStudioGUITest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.cpp index 82a3b6aa38..019d9d5f3b 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CocoStudioGUITest.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.cpp @@ -5,7 +5,8 @@ #include "CocosGUIScene.h" #include "GUIEditorTest.h" #include "CustomGUIScene.h" - +#include "controller.h" +#include "cocostudio/CocoStudio.h" enum { @@ -93,35 +94,6 @@ void CocoStudioGUIMainLayer::onTouchesBegan(const std::vector& touches, _beginPos = touch->getLocation(); } -/* -void CocoStudioGUIMainLayer::onTouchesMoved(const std::vector& touches, Event *event) -{ - auto touch = static_cast(touches[0]); - - auto touchLocation = touch->getLocation(); - float nMoveY = touchLocation.y - _beginPos.y; - - auto curPos = _itemMenu->getPosition(); - auto nextPos = Vector2(curPos.x, curPos.y + nMoveY); - - if (nextPos.y < 0.0f) - { - _itemMenu->setPosition(Vector2::ZERO); - return; - } - - float y = (g_maxTests + 1)* LINE_SPACE - VisibleRect::getVisibleRect().size.height; - if (nextPos.y > y) - { - _itemMenu->setPosition(Vector2(0, y)); - return; - } - - _itemMenu->setPosition(nextPos); - _beginPos = touchLocation; - _curPos = nextPos; -} - */ //////////////////////////////////////////////////////// // @@ -156,7 +128,13 @@ void CocoStudioGUITestScene::runThisTest() void CocoStudioGUITestScene::BackCallback(Ref* pSender) { - ExtensionsTestScene* pScene = new ExtensionsTestScene(); - pScene->runThisTest(); - pScene->release(); + auto scene = Scene::create(); + + auto layer = new TestController(); + scene->addChild(layer); + layer->release(); + + Director::getInstance()->replaceScene(scene); + + cocostudio::ArmatureDataManager::destroyInstance(); } \ No newline at end of file diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CocoStudioGUITest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CocoStudioGUITest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocoStudioGUITest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp similarity index 87% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CocosGUIScene.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp index f4126cdb07..aa56eb262b 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CocosGUIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp @@ -1,7 +1,6 @@ #include "CocosGUIScene.h" #include "CocoStudioGUITest.h" #include "UISceneManager.h" -#include "../ExtensionsTest.h" #include "cocostudio/CocoStudio.h" enum @@ -17,7 +16,20 @@ static struct } g_guisTests[] = { + { + "gui focus test", + [](Ref* sender) + { + UISceneManager* pManager = UISceneManager::sharedUISceneManager(); + pManager->setCurrentUISceneId(KUIFocusTest_HBox); + pManager->setMinUISceneId(KUIFocusTest_HBox); + pManager->setMaxUISceneId(KUIFocusTest_NestedLayout3); + Scene* pScene = pManager->currentUIScene(); + Director::getInstance()->replaceScene(pScene); + } + }, { + "gui ButtonTest", [](Ref* sender) { @@ -267,6 +279,20 @@ g_guisTests[] = Director::getInstance()->replaceScene(pScene); } }, +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + { + "gui VideoWidgetTest", + [](Ref* sender) + { + UISceneManager* pManager = UISceneManager::sharedUISceneManager(); + pManager->setCurrentUISceneId(kUIVideoWidgetTest); + pManager->setMinUISceneId(kUIVideoWidgetTest); + pManager->setMaxUISceneId(kUIVideoWidgetTest); + Scene* pScene = pManager->currentUIScene(); + Director::getInstance()->replaceScene(pScene); + } + } +#endif }; static const int g_maxTests = sizeof(g_guisTests) / sizeof(g_guisTests[0]); @@ -375,78 +401,3 @@ void CocosGUITestScene::BackCallback(Ref* pSender) pScene->runThisTest(); pScene->release(); } - -/* -const char* gui_scene_names[1] = -{ - "CocosGUIWidgetTest", -}; - -CocosGUITestScene::CocosGUITestScene(bool bPortrait) -: _ul(nullptr) -, _label(nullptr) -, _itemMenu(nullptr) -{ - TestScene::init(); -} - -CocosGUITestScene::~CocosGUITestScene() -{ - cocostudio::SceneReader::getInstance()->purgeSceneReader(); - cocostudio::ActionManagerEx::purgeActionManager(); -} - -void CocosGUITestScene::runThisTest() -{ - - Director::getInstance()->replaceScene(this); - - Size s = Director::getInstance()->getWinSize(); - - _itemMenu = Menu::create(); - _itemMenu->setPosition(Vector2::ZERO); - MenuItemFont::setFontName("fonts/arial.ttf"); - MenuItemFont::setFontSize(24); - for (int i = 0; i < sizeof(gui_scene_names) / sizeof(gui_scene_names[0]); ++i) - { - auto item = MenuItemFont::create(gui_scene_names[i], - CC_CALLBACK_1( CocosGUITestScene::menuCallback, this)); - item->setPosition(Vector2(s.width / 2, s.height - s.height / 4 - (i + 1) * 40)); - item->setTag(i); - _itemMenu->addChild(item); - } - addChild(_itemMenu); -} -void CocosGUITestScene::MainMenuCallback(Ref* pSender) -{ - auto pScene = new ExtensionsTestScene(); - pScene->runThisTest(); -} - -void CocosGUITestScene::load(Ref *pSender, int count) -{ - char tmp[10]; - sprintf(tmp,"%d", count); - _label->setString(CCString::createWithFormat("%i", count)->getCString()); -} - -void CocosGUITestScene::menuCallback(Ref *pSender) -{ - auto pItem = static_cast(pSender); - - switch (pItem->getTag()) - { - case 0: - { - UISceneManager* pManager = UISceneManager::sharedUISceneManager(); - Scene* pScene = pManager->currentUIScene(); - Director::getInstance()->replaceScene(pScene); - } - break; - break; - - default: - break; - } -} -*/ \ No newline at end of file diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CocosGUIScene.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CocosGUIScene.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomGUIScene.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomGUIScene.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomGUIScene.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomGUIScene.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomGUIScene.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomGUIScene.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomImageTest/CustomImageTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomTest/CustomParticleWidgetTest/CustomParticleWidgetTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageView.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageView.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageView.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomImageViewReader.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidget.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomParticleWidgetReader.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomReader.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomReader.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomReader.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomReader.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomReader.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomReader.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/CustomWidget/CustomReader.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CustomWidget/CustomReader.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/GUIEditorTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/GUIEditorTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/GUIEditorTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/GUIEditorTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/GUIEditorTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/GUIEditorTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/GUIEditorTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/GUIEditorTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.h diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp new file mode 100644 index 0000000000..f811652b99 --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.cpp @@ -0,0 +1,589 @@ +// +// UIFocusTest.cpp +// cocos2d_tests +// +// Created by guanghui on 5/4/14. +// +// + +#include "UIFocusTest.h" + +UIFocusTestBase::UIFocusTestBase() +{ + +} + +UIFocusTestBase::~UIFocusTestBase() +{ + _eventDispatcher->removeEventListener(_eventListener); +} + +bool UIFocusTestBase::init() +{ + if (UIScene::init()) { + Layout* root = static_cast(_uiLayer->getChildByTag(81)); + + Layout* background = dynamic_cast(root->getChildByName("background_Panel")); + background->removeFromParentAndCleanup(true); + + _dpadMenu = Menu::create(); + + auto winSize = Director::getInstance()->getVisibleSize(); + auto leftItem = MenuItemFont::create("Left", CC_CALLBACK_0(UIFocusTestBase::onLeftKeyPressed, this)); + leftItem->setPosition(Vector2(winSize.width - 100, winSize.height/2)); + _dpadMenu->addChild(leftItem); + + + auto rightItem = MenuItemFont::create("Right", CC_CALLBACK_0(UIFocusTestBase::onRightKeyPressed, this)); + rightItem->setPosition(Vector2(winSize.width - 30, winSize.height/2)); + _dpadMenu->addChild(rightItem); + + auto upItem = MenuItemFont::create("Up", CC_CALLBACK_0(UIFocusTestBase::onUpKeyPressed, this)); + upItem->setPosition(Vector2(winSize.width - 60, winSize.height/2 + 50)); + _dpadMenu->addChild(upItem); + + auto downItem = MenuItemFont::create("Down", CC_CALLBACK_0(UIFocusTestBase::onDownKeyPressed, this)); + downItem->setPosition(Vector2(winSize.width - 60, winSize.height/2 - 50)); + _dpadMenu->addChild(downItem); + + _dpadMenu->setPosition(Vector2::ZERO); + _uiLayer->addChild(_dpadMenu); + + _eventListener = EventListenerFocus::create(); + _eventListener->onFocusChanged = CC_CALLBACK_2(UIFocusTestBase::onFocusChanged, this); + + _eventDispatcher->addEventListenerWithFixedPriority(_eventListener, 1); + + return true; + } + + return false; +} + +void UIFocusTestBase::onImageViewClicked(cocos2d::Ref *ref, TouchEventType touchType) +{ + if (touchType == TouchEventType::TOUCH_EVENT_ENDED) { + Widget *w = (Widget*)ref; + if (w->isFocusEnabled()) { + w->setFocusEnabled(false); + w->setColor(Color3B::YELLOW); + }else{ + w->setFocusEnabled(true); + w->setColor(Color3B::WHITE); + } + } +} + +void UIFocusTestBase::onLeftKeyPressed() +{ + if (_firstFocusedWidget) { + if (!_firstFocusedWidget->isFocused()) { + _firstFocusedWidget = _firstFocusedWidget->getCurrentFocusedWidget(false); + } + _firstFocusedWidget = _firstFocusedWidget->findNextFocusedWidget(FocusDirection::FocusDirection_Left, _firstFocusedWidget); + } +} + +void UIFocusTestBase::onRightKeyPressed() +{ + if (_firstFocusedWidget) { + if (!_firstFocusedWidget->isFocused()) { + _firstFocusedWidget = _firstFocusedWidget->getCurrentFocusedWidget(false); + } + _firstFocusedWidget = _firstFocusedWidget->findNextFocusedWidget(FocusDirection::FocusDirection_Right, _firstFocusedWidget); + } +} + +void UIFocusTestBase::onUpKeyPressed() +{ + if (_firstFocusedWidget) { + if (!_firstFocusedWidget->isFocused()) { + _firstFocusedWidget = _firstFocusedWidget->getCurrentFocusedWidget(false); + } + _firstFocusedWidget = _firstFocusedWidget->findNextFocusedWidget(FocusDirection::FocusDirection_Up, _firstFocusedWidget); + } + +} + +void UIFocusTestBase::onDownKeyPressed() +{ + if (_firstFocusedWidget) { + if (!_firstFocusedWidget->isFocused()) { + _firstFocusedWidget = _firstFocusedWidget->getCurrentFocusedWidget(false); + } + _firstFocusedWidget = _firstFocusedWidget->findNextFocusedWidget(FocusDirection::FocusDirection_Down, _firstFocusedWidget); + } + +} + +void UIFocusTestBase::onFocusChanged(cocos2d::ui::Widget *widgetLostFocus, cocos2d::ui::Widget *widgetGetFocus) +{ + //only change the widgets' state + Layout *getLayout = dynamic_cast(widgetGetFocus); + if (!getLayout && widgetGetFocus && widgetGetFocus->isFocusEnabled()) { + widgetGetFocus->setColor(Color3B::RED); + } + + Layout *loseLayout = dynamic_cast(widgetLostFocus); + if (!loseLayout && widgetLostFocus && widgetLostFocus->isFocusEnabled()) { + widgetLostFocus->setColor(Color3B::WHITE); + } + + if (widgetLostFocus && widgetGetFocus) { + CCLOG("on focus change, %d widget get focus, %d widget lose focus", widgetGetFocus->getTag(), widgetLostFocus->getTag()); + } +} + + +//UIFocusTestHorizontal +UIFocusTestHorizontal::UIFocusTestHorizontal() +{ + +} + +UIFocusTestHorizontal::~UIFocusTestHorizontal() +{ + +} + +bool UIFocusTestHorizontal::init() +{ + if (UIFocusTestBase::init()) { + + Size winSize = Director::getInstance()->getVisibleSize(); + + _horizontalLayout = HBox::create(); + _horizontalLayout->setPosition(Vector2(20, winSize.height/2 + 40)); + _uiLayer->addChild(_horizontalLayout); + + _horizontalLayout->setFocused(true); + _horizontalLayout->setLoopFocus(true); + _horizontalLayout->setTag(100); + _firstFocusedWidget = _horizontalLayout; + + int count = 3; + for (int i=0; isetTouchEnabled(true); + w->setTag(i); + w->addTouchEventListener(this, toucheventselector(UIFocusTestHorizontal::onImageViewClicked)); + _horizontalLayout->addChild(w); + } + + _loopText = Text::create("loop enabled", "Airal", 20); + _loopText->setPosition(Vector2(winSize.width/2, winSize.height - 50)); + _loopText->setColor(Color3B::GREEN); + this->addChild(_loopText); + + auto btn = Button::create("cocosui/switch-mask.png"); + btn->setTitleText("Toggle Loop"); + btn->setPosition(Vector2(60, winSize.height - 50)); + btn->setTitleColor(Color3B::RED); + btn->addTouchEventListener(this, toucheventselector(UIFocusTestHorizontal::toggleFocusLoop)); + this->addChild(btn); + + + return true; + } + return false; +} + + + + +void UIFocusTestHorizontal::toggleFocusLoop(cocos2d::Ref * pObjc, TouchEventType type) +{ + if (type == TouchEventType::TOUCH_EVENT_ENDED) { + _horizontalLayout->setLoopFocus(!_horizontalLayout->isLoopFocus()); + if (_horizontalLayout->isLoopFocus()) { + _loopText->setText("loop enabled"); + }else{ + _loopText->setText("loop disabled"); + } + } +} + + +//UIFocusTestVertical +UIFocusTestVertical::UIFocusTestVertical() +{ + +} + +UIFocusTestVertical::~UIFocusTestVertical() +{ + +} + +bool UIFocusTestVertical::init() +{ + if (UIFocusTestBase::init()) { + + Size winSize = Director::getInstance()->getVisibleSize(); + + _verticalLayout = VBox::create(); + _verticalLayout->setPosition(Vector2(winSize.width/2 - 100, winSize.height - 70)); + _uiLayer->addChild(_verticalLayout); + _verticalLayout->setTag(100); + _verticalLayout->setScale(0.5); + + _verticalLayout->setFocused(true); + _verticalLayout->setLoopFocus(true); + _firstFocusedWidget = _verticalLayout; + + int count = 3; + for (int i=0; isetTouchEnabled(true); + w->setTag(i); + w->addTouchEventListener(this, toucheventselector(UIFocusTestVertical::onImageViewClicked)); + _verticalLayout->addChild(w); + if (i == 2) { + w->requestFocus(); + } + } + + _loopText = Text::create("loop enabled", "Airal", 20); + _loopText->setPosition(Vector2(winSize.width/2, winSize.height - 50)); + _loopText->setColor(Color3B::GREEN); + this->addChild(_loopText); + + auto btn = Button::create("cocosui/switch-mask.png"); + btn->setTitleText("Toggle Loop"); + btn->setPosition(Vector2(60, winSize.height - 50)); + btn->setTitleColor(Color3B::RED); + btn->addTouchEventListener(this, toucheventselector(UIFocusTestHorizontal::toggleFocusLoop)); + this->addChild(btn); + + + return true; + } + return false; +} + + +void UIFocusTestVertical::toggleFocusLoop(cocos2d::Ref * pObjc, TouchEventType type) +{ + if (type == TouchEventType::TOUCH_EVENT_ENDED) { + _verticalLayout->setLoopFocus(!_verticalLayout->isLoopFocus()); + if (_verticalLayout->isLoopFocus()) { + _loopText->setText("loop enabled"); + }else{ + _loopText->setText("loop disabled"); + } + } +} + +//UIFocusTestNestedLayout1 +UIFocusTestNestedLayout1::UIFocusTestNestedLayout1() +{ + +} + +UIFocusTestNestedLayout1::~UIFocusTestNestedLayout1() +{ + +} + +bool UIFocusTestNestedLayout1::init() +{ + if (UIFocusTestBase::init()) { + + Size winSize = Director::getInstance()->getVisibleSize(); + + _verticalLayout = VBox::create(); + _verticalLayout->setPosition(Vector2(winSize.width/2 - 80, winSize.height - 70)); + _uiLayer->addChild(_verticalLayout); + _verticalLayout->setScale(0.5); + + _verticalLayout->setFocused(true); + _verticalLayout->setLoopFocus(true); + _verticalLayout->setTag(100); + _firstFocusedWidget = _verticalLayout; + + int count1 = 1; + for (int i=0; isetAnchorPoint(Vector2::ZERO); + w->setTouchEnabled(true); + w->setScaleX(2.5); + w->setTag(i+count1); + w->addTouchEventListener(this, toucheventselector(UIFocusTestVertical::onImageViewClicked)); + _verticalLayout->addChild(w); + } + + //add HBox into VBox + HBox *hbox = HBox::create(); + hbox->setScale(0.8); + hbox->setTag(101); + _verticalLayout->addChild(hbox); + + int count2 = 2; + for (int i=0; i < count2; ++i) { + ImageView *w = ImageView::create("cocosui/scrollviewbg.png"); + w->setAnchorPoint(Vector2(0,1)); + w->setScaleY(2.0); + w->setTouchEnabled(true); + w->setTag(i+count1+count2); + w->addTouchEventListener(this, toucheventselector(UIFocusTestVertical::onImageViewClicked)); + hbox->addChild(w); + } + + VBox *innerVBox = VBox::create(); + hbox->addChild(innerVBox); + innerVBox->setTag(102); +// innerVBox->setPassFocusToChild(false); +// innerVBox->setFocusEnabled(false); + + + int count3 = 2; + for (int i=0; isetTouchEnabled(true); + w->setTag(i+count1+count2+count3); + w->addTouchEventListener(this, toucheventselector(UIFocusTestVertical::onImageViewClicked)); + innerVBox->addChild(w); + } + + _loopText = Text::create("loop enabled", "Airal", 20); + _loopText->setPosition(Vector2(winSize.width/2, winSize.height - 50)); + _loopText->setColor(Color3B::GREEN); + this->addChild(_loopText); + + auto btn = Button::create("cocosui/switch-mask.png"); + btn->setTitleText("Toggle Loop"); + btn->setPosition(Vector2(60, winSize.height - 50)); + btn->setTitleColor(Color3B::RED); + btn->addTouchEventListener(this, toucheventselector(UIFocusTestHorizontal::toggleFocusLoop)); + this->addChild(btn); + + + return true; + } + return false; +} + + +void UIFocusTestNestedLayout1::toggleFocusLoop(cocos2d::Ref * pObjc, TouchEventType type) +{ + if (type == TouchEventType::TOUCH_EVENT_ENDED) { + _verticalLayout->setLoopFocus(!_verticalLayout->isLoopFocus()); + if (_verticalLayout->isLoopFocus()) { + _loopText->setText("loop enabled"); + }else{ + _loopText->setText("loop disabled"); + } + } +} + +//UIFocusTestNestedLayout2 +UIFocusTestNestedLayout2::UIFocusTestNestedLayout2() +{ + +} + +UIFocusTestNestedLayout2::~UIFocusTestNestedLayout2() +{ + +} + +bool UIFocusTestNestedLayout2::init() +{ + if (UIFocusTestBase::init()) { + + Size winSize = Director::getInstance()->getVisibleSize(); + + _horizontalLayout = HBox::create(); + _horizontalLayout->setPosition(Vector2(winSize.width/2 - 200, winSize.height - 70)); + _uiLayer->addChild(_horizontalLayout); + _horizontalLayout->setScale(0.6); + + _horizontalLayout->setFocused(true); + _horizontalLayout->setLoopFocus(true); + _horizontalLayout->setTag(100); + _firstFocusedWidget = _horizontalLayout; + + int count1 = 2; + for (int i=0; isetAnchorPoint(Vector2(0,1)); + w->setTouchEnabled(true); + w->setTag(i+count1); + w->setScaleY(2.4); + w->addTouchEventListener(this, toucheventselector(UIFocusTestVertical::onImageViewClicked)); + _horizontalLayout->addChild(w); + } + + //add HBox into VBox + VBox *vbox = VBox::create(); + vbox->setScale(0.8); + vbox->setTag(101); + _horizontalLayout->addChild(vbox); + + int count2 = 2; + for (int i=0; i < count2; ++i) { + ImageView *w = ImageView::create("cocosui/scrollviewbg.png"); + w->setAnchorPoint(Vector2(0,1)); + w->setScaleX(2.0); + w->setTouchEnabled(true); + w->setTag(i+count1+count2); + w->addTouchEventListener(this, toucheventselector(UIFocusTestVertical::onImageViewClicked)); + vbox->addChild(w); + } + + HBox *innerHBox = HBox::create(); + vbox->addChild(innerHBox); + innerHBox->setTag(102); + // innerVBox->setPassFocusToChild(false); + // innerVBox->setFocusEnabled(false); + + + int count3 = 2; + for (int i=0; isetTouchEnabled(true); + w->setTag(i+count1+count2+count3); + w->addTouchEventListener(this, toucheventselector(UIFocusTestVertical::onImageViewClicked)); + innerHBox->addChild(w); + } + + _loopText = Text::create("loop enabled", "Airal", 20); + _loopText->setPosition(Vector2(winSize.width/2, winSize.height - 50)); + _loopText->setColor(Color3B::GREEN); + this->addChild(_loopText); + + auto btn = Button::create("cocosui/switch-mask.png"); + btn->setTitleText("Toggle Loop"); + btn->setPosition(Vector2(60, winSize.height - 50)); + btn->setTitleColor(Color3B::RED); + btn->addTouchEventListener(this, toucheventselector(UIFocusTestHorizontal::toggleFocusLoop)); + this->addChild(btn); + + + return true; + } + return false; +} + + +void UIFocusTestNestedLayout2::toggleFocusLoop(cocos2d::Ref * pObjc, TouchEventType type) +{ + if (type == TouchEventType::TOUCH_EVENT_ENDED) { + _horizontalLayout->setLoopFocus(!_horizontalLayout->isLoopFocus()); + if (_horizontalLayout->isLoopFocus()) { + _loopText->setText("loop enabled"); + }else{ + _loopText->setText("loop disabled"); + } + } +} + +//UIFocusTestNestedLayout3 +UIFocusTestNestedLayout3::UIFocusTestNestedLayout3() +{ + +} + +UIFocusTestNestedLayout3::~UIFocusTestNestedLayout3() +{ + +} + +bool UIFocusTestNestedLayout3::init() +{ + if (UIFocusTestBase::init()) { + + Size winSize = Director::getInstance()->getVisibleSize(); + + _verticalLayout = VBox::create(); + _verticalLayout->setPosition(Vector2(40, winSize.height - 70)); + _uiLayer->addChild(_verticalLayout); + _verticalLayout->setScale(0.8); + + _verticalLayout->setFocused(true); + _verticalLayout->setLoopFocus(true); + _verticalLayout->setTag(-1000); + _firstFocusedWidget = _verticalLayout; + + + HBox *upperHBox = HBox::create(); + upperHBox->setTag(-200); + _verticalLayout->addChild(upperHBox); + + LinearLayoutParameter *params = LinearLayoutParameter::create(); + params->setMargin(Margin(0,0,50,0)); + + LinearLayoutParameter *vparams = LinearLayoutParameter::create(); + vparams->setMargin(Margin(10, 0, 0, 140)); + upperHBox->setLayoutParameter(vparams); + + int count = 3; + for (int i=0; isetScale(0.5); + firstVbox->setLayoutParameter(params); + firstVbox->setTag((i+1) * 100); + + int count1 = 3; + for (int j=0; jsetTouchEnabled(true); + w->setTag(j+firstVbox->getTag()+1); + w->addTouchEventListener(this, toucheventselector(UIFocusTestVertical::onImageViewClicked)); + firstVbox->addChild(w); + } + + upperHBox->addChild(firstVbox); + + } + + HBox *bottomHBox = HBox::create(); + bottomHBox->setScale(0.5); + bottomHBox->setTag(600); + + bottomHBox->setLayoutParameter(vparams); + count = 3; + LinearLayoutParameter *bottomParams = LinearLayoutParameter::create(); + bottomParams->setMargin(Margin(0, 0, 8, 0)); + for (int i=0; i < count; ++i) { + ImageView *w = ImageView::create("cocosui/scrollviewbg.png"); + w->setLayoutParameter(bottomParams); + w->setTouchEnabled(true); + w->setTag(i+601); + w->addTouchEventListener(this, toucheventselector(UIFocusTestVertical::onImageViewClicked)); + bottomHBox->addChild(w); + } + _verticalLayout->addChild(bottomHBox); + + + + _loopText = Text::create("loop enabled", "Airal", 20); + _loopText->setPosition(Vector2(winSize.width/2, winSize.height - 50)); + _loopText->setColor(Color3B::GREEN); + this->addChild(_loopText); + + auto btn = Button::create("cocosui/switch-mask.png"); + btn->setTitleText("Toggle Loop"); + btn->setPosition(Vector2(60, winSize.height - 50)); + btn->setTitleColor(Color3B::RED); + btn->addTouchEventListener(this, toucheventselector(UIFocusTestHorizontal::toggleFocusLoop)); + this->addChild(btn); + + + return true; + } + return false; +} + + +void UIFocusTestNestedLayout3::toggleFocusLoop(cocos2d::Ref * pObjc, TouchEventType type) +{ + if (type == TouchEventType::TOUCH_EVENT_ENDED) { + _verticalLayout->setLoopFocus(!_verticalLayout->isLoopFocus()); + if (_verticalLayout->isLoopFocus()) { + _loopText->setText("loop enabled"); + }else{ + _loopText->setText("loop disabled"); + } + } +} diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.h new file mode 100644 index 0000000000..db06c4149d --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIFocusTest/UIFocusTest.h @@ -0,0 +1,115 @@ +// +// UIFocusTest.h +// cocos2d_tests +// +// Created by guanghui on 5/4/14. +// +// + +#ifndef __cocos2d_tests__UIFocusTest__ +#define __cocos2d_tests__UIFocusTest__ + +#include "../UIScene.h" + + + +class UIFocusTestBase : public UIScene +{ +public: + UIFocusTestBase(); + virtual ~UIFocusTestBase(); + bool init(); + + virtual void onLeftKeyPressed(); + virtual void onRightKeyPressed(); + virtual void onUpKeyPressed(); + virtual void onDownKeyPressed(); + virtual void onFocusChanged(Widget* widgetLostFocus, Widget* widgetGetFocus); + + void onImageViewClicked(Ref* ref, TouchEventType touchType); + +protected: + Menu *_dpadMenu; + Widget *_firstFocusedWidget; + EventListenerFocus *_eventListener; +}; + +class UIFocusTestHorizontal : public UIFocusTestBase +{ +public: + UIFocusTestHorizontal(); + virtual ~UIFocusTestHorizontal(); + bool init(); + + + void toggleFocusLoop(Ref*,TouchEventType); + +protected: + UI_SCENE_CREATE_FUNC(UIFocusTestHorizontal); + Layout *_horizontalLayout; + Text *_loopText; +}; + +class UIFocusTestVertical : public UIFocusTestBase +{ +public: + UIFocusTestVertical(); + virtual ~UIFocusTestVertical(); + bool init(); + + + void toggleFocusLoop(Ref*,TouchEventType); +protected: + UI_SCENE_CREATE_FUNC(UIFocusTestVertical); + Layout *_verticalLayout; + Text *_loopText; +}; + +class UIFocusTestNestedLayout1 : public UIFocusTestBase +{ +public: + UIFocusTestNestedLayout1(); + virtual ~UIFocusTestNestedLayout1(); + bool init(); + + + void toggleFocusLoop(Ref*,TouchEventType); +protected: + UI_SCENE_CREATE_FUNC(UIFocusTestNestedLayout1); + Layout *_verticalLayout; + Text *_loopText; +}; + +class UIFocusTestNestedLayout2 : public UIFocusTestBase +{ +public: + UIFocusTestNestedLayout2(); + virtual ~UIFocusTestNestedLayout2(); + bool init(); + + + void toggleFocusLoop(Ref*,TouchEventType); +protected: + UI_SCENE_CREATE_FUNC(UIFocusTestNestedLayout2); + Layout *_horizontalLayout; + Text *_loopText; +}; + +class UIFocusTestNestedLayout3 : public UIFocusTestBase +{ +public: + UIFocusTestNestedLayout3(); + virtual ~UIFocusTestNestedLayout3(); + bool init(); + + + void toggleFocusLoop(Ref*,TouchEventType); +protected: + UI_SCENE_CREATE_FUNC(UIFocusTestNestedLayout3); + Layout *_verticalLayout; + Text *_loopText; +}; + + + +#endif /* defined(__cocos2d_tests__UIFocusTest__) */ diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIImageViewTest/UIImageViewTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIListViewTest/UIListViewTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILoadingBarTest/UILoadingBarTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIPageViewTest/UIPageViewTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIRichTextTest/UIRichTextTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.cpp similarity index 96% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScene.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.cpp index f73dc5e56b..7c7608295c 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScene.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.cpp @@ -2,7 +2,6 @@ #include "extensions/cocos-ext.h" #include "UIScene.h" #include "UISceneManager.h" -#include "../ExtensionsTest.h" #include "editor-support/cocostudio/CCSGUIReader.h" #include "CocosGUIScene.h" @@ -73,9 +72,7 @@ void UIScene::menuCloseCallback(Ref* pSender, TouchEventType type) if (type == TOUCH_EVENT_ENDED) { _uiLayer->removeFromParent(); - auto scene = new ExtensionsTestScene(); - scene->runThisTest(); - scene->release(); + } } diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScene.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScene.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp similarity index 90% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp index b85beee93f..65ff70cb2c 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp @@ -17,6 +17,10 @@ #include "UIListViewTest/UIListViewTest.h" #include "UIWidgetAddNodeTest/UIWidgetAddNodeTest.h" #include "UIRichTextTest/UIRichTextTest.h" +#include "UIFocusTest/UIFocusTest.h" +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) +#include "UIVideoWidgetTest/UIVideoWidgetTest.h" +#endif /* #include "UISwitchTest/UISwitchTest.h" */ @@ -109,6 +113,14 @@ static const char* s_testArray[] = */ "UIWidgetAddNodeTest", "UIRichTextTest", + "UIFocusTest-HBox", + "UIFocusTest-VBox", + "UIFocusTest-NestedLayout1", + "UIFocusTest-NestedLayout2", + "UIFocusTest-NestedLayout3", +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + "UIVideoWidgetTest" +#endif }; static UISceneManager *sharedInstance = NULL; @@ -359,6 +371,20 @@ Scene *UISceneManager::currentUIScene() case kUIRichTextTest: return UIRichTextTest::sceneWithTitle(s_testArray[_currentUISceneId]); + case KUIFocusTest_HBox: + return UIFocusTestHorizontal::sceneWithTitle(s_testArray[_currentUISceneId]); + case KUIFocusTest_VBox: + return UIFocusTestVertical::sceneWithTitle(s_testArray[_currentUISceneId]); + case KUIFocusTest_NestedLayout1: + return UIFocusTestNestedLayout1::sceneWithTitle(s_testArray[_currentUISceneId]); + case KUIFocusTest_NestedLayout2: + return UIFocusTestNestedLayout2::sceneWithTitle(s_testArray[_currentUISceneId]); + case KUIFocusTest_NestedLayout3: + return UIFocusTestNestedLayout3::sceneWithTitle(s_testArray[_currentUISceneId]); +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + case kUIVideoWidgetTest: + return VideoWidgetTest::sceneWithTitle(s_testArray[_currentUISceneId]); +#endif } return NULL; } \ No newline at end of file diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h similarity index 93% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h index feb293678e..7461440b62 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager.h +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h @@ -101,6 +101,14 @@ enum */ kUIWidgetAddNodeTest, kUIRichTextTest, + KUIFocusTest_HBox, + KUIFocusTest_VBox, + KUIFocusTest_NestedLayout1, + KUIFocusTest_NestedLayout2, + KUIFocusTest_NestedLayout3, +#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + kUIVideoWidgetTest, +#endif kUITestMax }; diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISceneManager_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScene_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScene_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScene_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScene_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScene_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIScrollViewTest/UIScrollViewTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextAtlasTest/UITextAtlasTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextBMFontTest/UITextBMFontTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UITextTest/UITextTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextTest/UITextTest_Editor.h diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoWidgetTest/UIVideoWidgetTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoWidgetTest/UIVideoWidgetTest.cpp new file mode 100644 index 0000000000..fe859fbaf0 --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoWidgetTest/UIVideoWidgetTest.cpp @@ -0,0 +1,211 @@ +#include "UIVideoWidgetTest.h" + +USING_NS_CC; +using namespace cocos2d::experimental::ui; + +bool VideoWidgetTest::init() +{ + if ( !UIScene::init() ) + { + return false; + } + + _visibleRect = Director::getInstance()->getOpenGLView()->getVisibleRect(); + + MenuItemFont::setFontSize(16); + + auto fullSwitch = MenuItemFont::create("FullScreenSwitch", CC_CALLBACK_1(VideoWidgetTest::menuFullScreenCallback, this)); + fullSwitch->setAnchorPoint(Vector2::ANCHOR_BOTTOM_LEFT); + fullSwitch->setPosition(Vector2(_visibleRect.origin.x + 10,_visibleRect.origin.y + 50)); + + auto pauseItem = MenuItemFont::create("Pause", CC_CALLBACK_1(VideoWidgetTest::menuPauseCallback, this)); + pauseItem->setAnchorPoint(Vector2::ANCHOR_BOTTOM_LEFT); + pauseItem->setPosition(Vector2(_visibleRect.origin.x + 10,_visibleRect.origin.y + 100)); + + auto resumeItem = MenuItemFont::create("Resume", CC_CALLBACK_1(VideoWidgetTest::menuResumeCallback, this)); + resumeItem->setAnchorPoint(Vector2::ANCHOR_BOTTOM_LEFT); + resumeItem->setPosition(Vector2(_visibleRect.origin.x + 10,_visibleRect.origin.y + 150)); + + auto stopItem = MenuItemFont::create("Stop", CC_CALLBACK_1(VideoWidgetTest::menuStopCallback, this)); + stopItem->setAnchorPoint(Vector2::ANCHOR_BOTTOM_LEFT); + stopItem->setPosition(Vector2(_visibleRect.origin.x + 10,_visibleRect.origin.y + 200)); + + auto hintItem = MenuItemFont::create("Hint", CC_CALLBACK_1(VideoWidgetTest::menuHintCallback, this)); + hintItem->setAnchorPoint(Vector2::ANCHOR_BOTTOM_LEFT); + hintItem->setPosition(Vector2(_visibleRect.origin.x + 10,_visibleRect.origin.y + 250)); + + //------------------------------------------------------------------------------------------------------------------- + auto resourceVideo = MenuItemFont::create("Play resource video", CC_CALLBACK_1(VideoWidgetTest::menuResourceVideoCallback, this)); + resourceVideo->setAnchorPoint(Vector2::ANCHOR_MIDDLE_RIGHT); + resourceVideo->setPosition(Vector2(_visibleRect.origin.x + _visibleRect.size.width - 10,_visibleRect.origin.y + 50)); + + auto onlineVideo = MenuItemFont::create("Play online video", CC_CALLBACK_1(VideoWidgetTest::menuOnlineVideoCallback, this)); + onlineVideo->setAnchorPoint(Vector2::ANCHOR_MIDDLE_RIGHT); + onlineVideo->setPosition(Vector2(_visibleRect.origin.x + _visibleRect.size.width - 10,_visibleRect.origin.y + 100)); + + auto ratioSwitch = MenuItemFont::create("KeepRatioSwitch", CC_CALLBACK_1(VideoWidgetTest::menuRatioCallback, this)); + ratioSwitch->setAnchorPoint(Vector2::ANCHOR_MIDDLE_RIGHT); + ratioSwitch->setPosition(Vector2(_visibleRect.origin.x + _visibleRect.size.width - 10,_visibleRect.origin.y + 150)); + + auto menu = Menu::create(resourceVideo,onlineVideo,ratioSwitch,fullSwitch,pauseItem,resumeItem,stopItem,hintItem,nullptr); + menu->setPosition(Vector2::ZERO); + _uiLayer->addChild(menu); + + _videoStateLabel = Label::createWithSystemFont("IDLE","Arial",16); + _videoStateLabel->setAnchorPoint(Vector2::ANCHOR_MIDDLE_RIGHT); + _videoStateLabel->setPosition(Vector2(_visibleRect.origin.x + _visibleRect.size.width - 10,_visibleRect.origin.y + 200)); + _uiLayer->addChild(_videoStateLabel); + createVideo(); + + return true; +} + +void VideoWidgetTest::menuCloseCallback(Ref* sender) +{ + Director::getInstance()->end(); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) + exit(0); +#endif +} + +void VideoWidgetTest::menuFullScreenCallback(Ref* sender) +{ + if (_videoWidget) + { + _videoWidget->setFullScreenEnabled(! _videoWidget->isFullScreenEnabled()); + } +} + +void VideoWidgetTest::menuRatioCallback(Ref* sender) +{ + if (_videoWidget) + { + _videoWidget->setKeepAspectRatioEnabled(! _videoWidget->isKeepAspectRatioEnabled()); + } +} + +void VideoWidgetTest::menuResourceVideoCallback(Ref* sender) +{ + if (_videoWidget) + { + _videoWidget->setVideoFileName("cocosvideo.mp4"); + _videoWidget->startVideo(); + } +} + +void VideoWidgetTest::menuOnlineVideoCallback(Ref* sender) +{ + if (_videoWidget) + { + _videoWidget->setVideoURL("http://video001.smgbb.cn/gslb/program/FDN/FDN1190949/HLSVodService.m3u8?_mdCode=6065719&_cdnCode=B2B_XL_TEST&_type=0&_rCode=TerOut_18865&_userId=020341000456068&_categoryCode=SMG_HUAYU&_categoryPath=SMG_1002,SMG_HUAYU,&_adPositionId=01001000&_adCategorySource=0&_flag=.m3u8&_enCode=m3u8&taskID=ysh_ps_002-ott_1397459105893_020341000456068&_client=103&_cms=ctv&_CDNToken=76C043FD4969501754DC19E54EC8DC2C"); + _videoWidget->startVideo(); + } +} + +void VideoWidgetTest::menuPauseCallback(Ref* sender) +{ + if (_videoWidget) + { + _videoWidget->pauseVideo(); + } +} + +void VideoWidgetTest::menuResumeCallback(Ref* sender) +{ + if (_videoWidget) + { + _videoWidget->resumeVideo(); + } +} + +void VideoWidgetTest::menuStopCallback(Ref* sender) +{ + if (_videoWidget) + { + _videoWidget->stopVideo(); + } +} + +void VideoWidgetTest::menuHintCallback(Ref* sender) +{ + if (_videoWidget) + { + _videoWidget->setVisible(! _videoWidget->isVisible()); + } +} + +void VideoWidgetTest::createVideo() +{ + auto centerPos = Vector2(_visibleRect.origin.x + _visibleRect.size.width / 2,_visibleRect.origin.y + _visibleRect.size.height /2); + + auto widgetSize = _widget->getSize(); + + _videoWidget = VideoWidget::create(); + _videoWidget->setPosition(centerPos); + _videoWidget->setAnchorPoint(Vector2::ANCHOR_MIDDLE); + _videoWidget->setContentSize(Size(widgetSize.width * 0.4f,widgetSize.height * 0.4f)); + _uiLayer->addChild(_videoWidget); + + _videoWidget->setEventListener(CC_CALLBACK_2(VideoWidgetTest::videoEventCallback, this)); +} + +void VideoWidgetTest::createSlider() +{ + auto centerPos = Vector2(_visibleRect.origin.x + _visibleRect.size.width / 2,_visibleRect.origin.y + _visibleRect.size.height /2); + + auto hSlider = ui::Slider::create(); + hSlider->setTouchEnabled(true); + hSlider->loadBarTexture("cocosui/sliderTrack.png"); + hSlider->loadSlidBallTextures("cocosui/sliderThumb.png", "cocosui/sliderThumb.png", ""); + hSlider->loadProgressBarTexture("cocosui/sliderProgress.png"); + hSlider->setPosition(Vector2(centerPos.x, _visibleRect.origin.y + _visibleRect.size.height * 0.15f)); + hSlider->setPercent(50); + hSlider->addEventListenerSlider(this, sliderpercentchangedselector(VideoWidgetTest::sliderCallback)); + _uiLayer->addChild(hSlider,0,1); + + auto vSlider = ui::Slider::create(); + vSlider->setTouchEnabled(true); + vSlider->loadBarTexture("cocosui/sliderTrack.png"); + vSlider->loadSlidBallTextures("cocosui/sliderThumb.png", "cocosui/sliderThumb.png", ""); + vSlider->loadProgressBarTexture("cocosui/sliderProgress.png"); + vSlider->setPosition(Vector2(_visibleRect.origin.x + _visibleRect.size.width * 0.15f, centerPos.y)); + vSlider->setRotation(90); + vSlider->setPercent(50); + vSlider->addEventListenerSlider(this, sliderpercentchangedselector(VideoWidgetTest::sliderCallback)); + _uiLayer->addChild(vSlider,0,2); +} + +void VideoWidgetTest::sliderCallback(Ref *sender, ui::SliderEventType eventType) +{ + if (eventType == SLIDER_PERCENTCHANGED && _videoWidget) + { + Slider* hSlider = (Slider*)this->getChildByTag(1); + Slider* vSlider = (Slider*)this->getChildByTag(2); + + auto newPosX = _visibleRect.origin.x + _visibleRect.size.width / 2 + hSlider->getPercent() - 50; + auto newPosY = _visibleRect.origin.y + _visibleRect.size.height / 2 + 50 - vSlider->getPercent(); + + _videoWidget->setPosition(Vector2(newPosX,newPosY)); + } +} + +void VideoWidgetTest::videoEventCallback(Ref* sender, VideoWidgetEvent eventType) +{ + switch (eventType) { + case VideoWidgetEvent::PLAYING: + _videoStateLabel->setString("PLAYING"); + break; + case VideoWidgetEvent::PAUSED: + _videoStateLabel->setString("PAUSED"); + break; + case VideoWidgetEvent::STOPPED: + _videoStateLabel->setString("STOPPED"); + break; + case VideoWidgetEvent::COMPLETED: + _videoStateLabel->setString("COMPLETED"); + break; + default: + break; + } +} \ No newline at end of file diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoWidgetTest/UIVideoWidgetTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoWidgetTest/UIVideoWidgetTest.h new file mode 100644 index 0000000000..063d398a4f --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIVideoWidgetTest/UIVideoWidgetTest.h @@ -0,0 +1,44 @@ +#ifndef __tests__VideoWidgetTest__ +#define __tests__VideoWidgetTest__ + +#include "../UIScene.h" + +USING_NS_CC; + +class VideoWidgetTest : public UIScene +{ +public: + UI_SCENE_CREATE_FUNC(VideoWidgetTest); + + virtual bool init(); + + void menuCloseCallback(Ref* sender); + + void menuRatioCallback(Ref* sender); + void menuResourceVideoCallback(Ref* sender); + void menuOnlineVideoCallback(Ref* sender); + + void menuFullScreenCallback(Ref* sender); + void menuPauseCallback(Ref* sender); + void menuResumeCallback(Ref* sender); + void menuStopCallback(Ref* sender); + void menuHintCallback(Ref* sender); + + void sliderCallback(Ref *sender, ui::SliderEventType eventType); + + void videoEventCallback(Ref* sender, experimental::ui::VideoWidgetEvent eventType); + +private: + void createVideo(); + void createSlider(); + + MenuItemFont* _hintItem; + experimental::ui::VideoWidget* _videoWidget; + Label* _videoStateLabel; + Rect _visibleRect; + + Layer* _rootLayer; + +}; + +#endif // __tests__VideoWidgetTest__ diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest.h diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.cpp diff --git a/tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.h similarity index 100% rename from tests/cpp-tests/Classes/ExtensionsTest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.h rename to tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIWidgetAddNodeTest/UIWidgetAddNodeTest_Editor.h diff --git a/tests/cpp-tests/Classes/UITest/UITest.cpp b/tests/cpp-tests/Classes/UITest/UITest.cpp new file mode 100644 index 0000000000..d4c931cf0c --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/UITest.cpp @@ -0,0 +1,8 @@ +#include "UITest.h" +#include "CocoStudioGUITest/CocoStudioGUITest.h" + +void UITestScene::runThisTest() +{ + CocoStudioGUITestScene* pScene = new CocoStudioGUITestScene(); + pScene->runThisTest(); +} \ No newline at end of file diff --git a/tests/cpp-tests/Classes/UITest/UITest.h b/tests/cpp-tests/Classes/UITest/UITest.h new file mode 100644 index 0000000000..eb5b555789 --- /dev/null +++ b/tests/cpp-tests/Classes/UITest/UITest.h @@ -0,0 +1,13 @@ +#ifndef __cocos2d_tests__UITest__ +#define __cocos2d_tests__UITest__ + +#include "../testBasic.h" +#include "../BaseTest.h" + +class UITestScene : public TestScene +{ +public: + virtual void runThisTest() override; +}; + +#endif /* defined(__cocos2d_tests__UITest__) */ diff --git a/tests/cpp-tests/Classes/controller.cpp b/tests/cpp-tests/Classes/controller.cpp index 5d25723e6d..00994e451e 100644 --- a/tests/cpp-tests/Classes/controller.cpp +++ b/tests/cpp-tests/Classes/controller.cpp @@ -19,6 +19,7 @@ #include #endif #include "cocostudio/CocoStudio.h" +#include "UITest/UITest.h" typedef struct _Controller{ const char *test_name; @@ -30,6 +31,7 @@ Controller g_aTestNames[] = { // TESTS MUST BE ORDERED ALPHABETICALLY // violators will be prosecuted // + { "A new UI", [](){ return new UITestScene(); }}, { "Accelerometer", []() { return new AccelerometerTestScene(); } }, { "ActionManager", [](){return new ActionManagerTestScene(); } }, { "Actions - Basic", [](){ return new ActionsTestScene(); } }, diff --git a/tests/cpp-tests/Resources/cocosvideo.mp4 b/tests/cpp-tests/Resources/cocosvideo.mp4 new file mode 100644 index 0000000000..194e0d2503 Binary files /dev/null and b/tests/cpp-tests/Resources/cocosvideo.mp4 differ diff --git a/tests/cpp-tests/Resources/fps_images.png b/tests/cpp-tests/Resources/fps_images.png new file mode 100644 index 0000000000..c7449025bf Binary files /dev/null and b/tests/cpp-tests/Resources/fps_images.png differ diff --git a/tests/cpp-tests/Resources/hd/fps_images.png b/tests/cpp-tests/Resources/hd/fps_images.png new file mode 100644 index 0000000000..54a299ed91 Binary files /dev/null and b/tests/cpp-tests/Resources/hd/fps_images.png differ diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index 2a619e4dcd..435e5fe31a 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -23,6 +23,8 @@ v100 v110 v110_xp + v120 + v120_xp Application @@ -30,6 +32,8 @@ v100 v110 v110_xp + v120 + v120_xp @@ -151,50 +155,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\websockets\prebuilt\win32\*.*" "$(Ou - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -224,6 +184,52 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\websockets\prebuilt\win32\*.*" "$(Ou + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -330,50 +336,6 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\websockets\prebuilt\win32\*.*" "$(Ou - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -404,6 +366,52 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\websockets\prebuilt\win32\*.*" "$(Ou + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters index 10517017e5..705e464be0 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.filters @@ -244,36 +244,6 @@ {a83cb042-e3d6-4d3b-a4f6-30a4b3fcb3e9} - - {9daecd38-37c6-4216-a999-86077af83beb} - - - {493fcd85-c749-482d-9404-905e99aa0103} - - - {2e08949f-bf73-4fdc-85e8-34b8c69aa978} - - - {c57c0453-a096-44d7-830b-1cf24c712cfd} - - - {01097388-e538-4081-8e16-d1ff3a86292a} - - - {fadff96e-c19a-41f5-a755-547cf1f8a5fb} - - - {73c268e8-3872-49d6-9204-1e679ff72a42} - - - {dedcabba-959c-40e3-9959-7ccf4e31c792} - - - {5caf2179-ae22-4040-8bac-17e9f22efbf7} - - - {24f044ee-09a6-406b-98d7-8d5d759e5bb1} - {8d7d37cd-5cc2-4a7d-9bd2-7b5c928adbb5} @@ -286,12 +256,6 @@ {688e201c-77fe-4665-931e-e508a58141f5} - - {160da6f0-a0f1-4a53-8e5e-cf0a63ee82a3} - - - {c4dbbfb3-0e91-492f-bbbf-f03fb26f3f54} - {1821914f-c088-4946-8c1e-19ab57b5eabc} @@ -301,29 +265,71 @@ {f71fab28-32be-45c9-a941-9a22b5a59e51} - - {5a8f369e-53b7-461e-9aaf-89f0931a0046} + + {ee9a44a8-ec5e-4e71-bb62-1f684fe29125} - - {2b92a344-8fd6-493c-bc5f-423e01abbfca} + + {cfe83a18-3031-4450-963b-6fecec24ef5d} - - {b9e1dc6c-3933-4dd2-b396-67f8a6a42821} + + {b339bf74-8da5-4910-a66b-5c29ea84969b} - - {a2acdd59-c690-4433-919c-9438e3279cd2} + + {7f0fb0c4-6ba5-4916-b294-4374c998c8f3} - - {30d5188b-85c9-4877-933a-5bf0e6d2ca54} + + {72c4afc0-d3a1-44fb-a26c-7feed23aff58} - - {c3353e37-e25e-4fa2-bc37-ebd7a8854efe} + + {b02ee6e4-e721-408e-9406-c6c5d95e01ed} - - {8bc33078-56ce-48a6-85fd-b9d67db67c13} + + {5aa7912a-da48-4905-a322-9282853368c3} - - {f2e15a07-0d4e-407f-b4dc-d7692afe64a4} + + {e560da84-2530-4642-9c7c-c57223e82b58} + + + {7255ed35-ec1a-4872-a633-a1ab0fd4d62c} + + + {d9a49c7a-219d-4d00-bb0d-5566e2a34cb1} + + + {d3b488b2-d666-448e-8727-e9193f19220d} + + + {4ccc551f-bc99-4609-97d9-948a0246b2f6} + + + {f70005e7-d796-4e6d-9970-837adc08cf05} + + + {e6f1c4c8-c222-4794-99e3-52f9c56a6aa0} + + + {0773584d-9c7f-4f00-995c-63031c963950} + + + {45c87afb-962e-47ab-83a1-6319d9899c87} + + + {361f6895-e9d1-4be7-a910-684d8d2a0d64} + + + {4762cfd1-9256-4988-97c7-6ae068689895} + + + {41d79a36-2286-402f-8dd7-d8a5af8f1363} + + + {ac3784ef-cbc6-4bff-8daf-21ffa9f124b6} + + + {492a20b0-e149-40f1-8bd5-98ec3f27aab2} + + + {5bde63be-bdba-4155-a3a9-72f06c169768} @@ -657,42 +663,6 @@ Classes\PhysicsTest - - Classes\ExtensionsTest\CocoStudioGUITest\UIButtonTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UICheckBoxTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIImageViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIListViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UILoadingBarTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIPageViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIScrollViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UISliderTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextFieldTest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - Classes\KeyboardTest @@ -708,12 +678,6 @@ Classes\NewRendererTest - - Classes\ExtensionsTest\CocoStudioGUITest\UIWidgetAddNodeTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UILayoutTest - Classes\UnitTest @@ -741,102 +705,150 @@ Classes\PerformanceTest - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIButtonTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UICheckBoxTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIImageViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextBMFontTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextBMFontTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextAtlasTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextAtlasTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UILayoutTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIListViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UILoadingBarTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIPageViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIScrollViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UISliderTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextFieldTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIWidgetAddNodeTest - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomTest\CustomImageTest - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomWidget - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomWidget - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomWidget - - - Classes\ExtensionsTest\CocoStudioGUITest\UIRichTextTest - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomWidget - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomWidget - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomTest\CustomParticleWidgetTest - Classes\ShaderTest Classes\UnitTest + + Classes\UITest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest\UITextTest + + + Classes\UITest\CocostudioGUISceneTest\UITextTest + + + Classes\UITest\CocostudioGUISceneTest\CustomTest\CustomImageTest + + + Classes\UITest\CocostudioGUISceneTest\CustomTest\CustomParticleWidgetTest + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\UIButtonTest + + + Classes\UITest\CocostudioGUISceneTest\UIButtonTest + + + Classes\UITest\CocostudioGUISceneTest\UICheckBoxTest + + + Classes\UITest\CocostudioGUISceneTest\UICheckBoxTest + + + Classes\UITest\CocostudioGUISceneTest\UIFocusTest + + + Classes\UITest\CocostudioGUISceneTest\UIImageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIImageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UILayoutTest + + + Classes\UITest\CocostudioGUISceneTest\UILayoutTest + + + Classes\UITest\CocostudioGUISceneTest\UIListViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIListViewTest + + + Classes\UITest\CocostudioGUISceneTest\UILoadingBarTest + + + Classes\UITest\CocostudioGUISceneTest\UILoadingBarTest + + + Classes\UITest\CocostudioGUISceneTest\UIPageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIPageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIRichTextTest + + + Classes\UITest\CocostudioGUISceneTest\UIScrollViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIScrollViewTest + + + Classes\UITest\CocostudioGUISceneTest\UISliderTest + + + Classes\UITest\CocostudioGUISceneTest\UISliderTest + + + Classes\UITest\CocostudioGUISceneTest\UITextAtlasTest + + + Classes\UITest\CocostudioGUISceneTest\UITextAtlasTest + + + Classes\UITest\CocostudioGUISceneTest\UITextBMFontTest + + + Classes\UITest\CocostudioGUISceneTest\UITextBMFontTest + + + Classes\UITest\CocostudioGUISceneTest\UITextFieldTest + + + Classes\UITest\CocostudioGUISceneTest\UITextFieldTest + + + Classes\UITest\CocostudioGUISceneTest\UIWidgetAddNodeTest + + + Classes\UITest\CocostudioGUISceneTest\UIWidgetAddNodeTest + @@ -1346,42 +1358,6 @@ Classes\PhysicsTest - - Classes\ExtensionsTest\CocoStudioGUITest\UIButtonTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UICheckBoxTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIImageViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIListViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UILoadingBarTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIPageViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIScrollViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UISliderTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextFieldTest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - Classes\KeyboardTest @@ -1412,12 +1388,6 @@ Classes\NewRendererTest - - Classes\ExtensionsTest\CocoStudioGUITest\UIWidgetAddNodeTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UILayoutTest - Classes\UnitTest @@ -1451,101 +1421,149 @@ Classes\PerformanceTest - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIButtonTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UICheckBoxTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIImageViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextBMFontTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextBMFontTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextAtlasTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextAtlasTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UILayoutTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIListViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UILoadingBarTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIPageViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIScrollViewTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UISliderTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UITextFieldTest - - - Classes\ExtensionsTest\CocoStudioGUITest\UIWidgetAddNodeTest - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomTest\CustomImageTest - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomWidget - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomWidget - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomWidget - - - Classes\ExtensionsTest\CocoStudioGUITest\UIRichTextTest - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomWidget - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomWidget - - - Classes\ExtensionsTest\CocoStudioGUITest\CustomTest\CustomParticleWidgetTest - Classes\ShaderTest Classes\UnitTest + + Classes\UITest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest + + + Classes\UITest\CocostudioGUISceneTest\UITextTest + + + Classes\UITest\CocostudioGUISceneTest\UITextTest + + + Classes\UITest\CocostudioGUISceneTest\CustomTest\CustomImageTest + + + Classes\UITest\CocostudioGUISceneTest\CustomTest\CustomParticleWidgetTest + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\CustomWidget + + + Classes\UITest\CocostudioGUISceneTest\UIButtonTest + + + Classes\UITest\CocostudioGUISceneTest\UIButtonTest + + + Classes\UITest\CocostudioGUISceneTest\UICheckBoxTest + + + Classes\UITest\CocostudioGUISceneTest\UICheckBoxTest + + + Classes\UITest\CocostudioGUISceneTest\UIFocusTest + + + Classes\UITest\CocostudioGUISceneTest\UIImageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIImageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UILayoutTest + + + Classes\UITest\CocostudioGUISceneTest\UILayoutTest + + + Classes\UITest\CocostudioGUISceneTest\UIListViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIListViewTest + + + Classes\UITest\CocostudioGUISceneTest\UILoadingBarTest + + + Classes\UITest\CocostudioGUISceneTest\UILoadingBarTest + + + Classes\UITest\CocostudioGUISceneTest\UIPageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIPageViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIRichTextTest + + + Classes\UITest\CocostudioGUISceneTest\UIScrollViewTest + + + Classes\UITest\CocostudioGUISceneTest\UIScrollViewTest + + + Classes\UITest\CocostudioGUISceneTest\UISliderTest + + + Classes\UITest\CocostudioGUISceneTest\UISliderTest + + + Classes\UITest\CocostudioGUISceneTest\UITextAtlasTest + + + Classes\UITest\CocostudioGUISceneTest\UITextAtlasTest + + + Classes\UITest\CocostudioGUISceneTest\UITextBMFontTest + + + Classes\UITest\CocostudioGUISceneTest\UITextBMFontTest + + + Classes\UITest\CocostudioGUISceneTest\UITextFieldTest + + + Classes\UITest\CocostudioGUISceneTest\UITextFieldTest + + + Classes\UITest\CocostudioGUISceneTest\UIWidgetAddNodeTest + + + Classes\UITest\CocostudioGUISceneTest\UIWidgetAddNodeTest + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.user b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.user new file mode 100644 index 0000000000..32a6296820 --- /dev/null +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj.user @@ -0,0 +1,11 @@ + + + + $(ProjectDir)..\Resources + WindowsLocalDebugger + + + $(ProjectDir)..\Resources + WindowsLocalDebugger + + \ No newline at end of file diff --git a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj index 54542c8dd0..c54bd5bfc6 100644 --- a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj +++ b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj @@ -21,6 +21,8 @@ v100 v110 v110_xp + v120 + v120_xp Application @@ -28,6 +30,8 @@ v100 v110 v110_xp + v120 + v120_xp diff --git a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj.user b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj.user new file mode 100644 index 0000000000..759c8a2b28 --- /dev/null +++ b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj.user @@ -0,0 +1,11 @@ + + + + $(ProjectDir)..\.. + WindowsLocalDebugger + + + $(ProjectDir)..\.. + WindowsLocalDebugger + + \ No newline at end of file diff --git a/tests/lua-tests/project/Classes/AppDelegate.cpp b/tests/lua-tests/project/Classes/AppDelegate.cpp index c042f2ca9c..a49f931cfe 100644 --- a/tests/lua-tests/project/Classes/AppDelegate.cpp +++ b/tests/lua-tests/project/Classes/AppDelegate.cpp @@ -31,13 +31,13 @@ bool AppDelegate::applicationDidFinishLaunching() // set FPS. the default value is 1.0/60 if you don't call this director->setAnimationInterval(1.0 / 60); - + auto screenSize = glview->getFrameSize(); - + auto designSize = Size(480, 320); - + auto pFileUtils = FileUtils::getInstance(); - + if (screenSize.height > 320) { auto resourceSize = Size(960, 640); @@ -46,24 +46,24 @@ bool AppDelegate::applicationDidFinishLaunching() pFileUtils->setSearchPaths(searchPaths); director->setContentScaleFactor(resourceSize.height/designSize.height); } - + glview->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::FIXED_HEIGHT); - + // register lua engine LuaEngine* pEngine = LuaEngine::getInstance(); ScriptEngineManager::getInstance()->setScriptEngine(pEngine); - + #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID ||CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) LuaStack* stack = pEngine->getLuaStack(); register_assetsmanager_test_sample(stack->getLuaState()); #endif - + #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) std::string resPrefix(""); #else std::string resPrefix("res/"); #endif - + std::vector searchPaths = pFileUtils->getSearchPaths(); searchPaths.insert(searchPaths.begin(), resPrefix); @@ -71,38 +71,40 @@ bool AppDelegate::applicationDidFinishLaunching() if (screenSize.height > 320) { searchPaths.insert(searchPaths.begin(), resPrefix + "hd"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/Images"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/ArmatureComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/AttributeComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/BackgroundComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/EffectComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/LoadSceneEdtiorFileTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/ParticleComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/SpriteComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/TmxMapComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/UIComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "hd/scenetest/TriggerTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/Images"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/ArmatureComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/AttributeComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/BackgroundComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/EffectComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/LoadSceneEdtiorFileTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/ParticleComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/SpriteComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/TmxMapComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/UIComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/hd/scenetest/TriggerTest"); } else { - searchPaths.insert(searchPaths.begin(), resPrefix + "Images"); - searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/ArmatureComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/AttributeComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/BackgroundComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/EffectComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/LoadSceneEdtiorFileTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/ParticleComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/SpriteComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/TmxMapComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/UIComponentTest"); - searchPaths.insert(searchPaths.begin(), resPrefix + "scenetest/TriggerTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/Images"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/ArmatureComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/AttributeComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/BackgroundComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/EffectComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/LoadSceneEdtiorFileTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/ParticleComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/SpriteComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/TmxMapComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/UIComponentTest"); + searchPaths.insert(searchPaths.begin(), resPrefix + "ccs-res/scenetest/TriggerTest"); } FileUtils::getInstance()->setSearchPaths(searchPaths); pEngine->executeScriptFile("src/controller.lua"); - + return true; } diff --git a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj index a11954b988..7d5ab0cb3a 100644 --- a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj +++ b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj @@ -22,6 +22,8 @@ v100 v110 v110_xp + v120 + v120_xp Application @@ -30,6 +32,8 @@ v100 v110 v110_xp + v120 + v120_xp diff --git a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj.user b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj.user new file mode 100644 index 0000000000..759c8a2b28 --- /dev/null +++ b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj.user @@ -0,0 +1,11 @@ + + + + $(ProjectDir)..\.. + WindowsLocalDebugger + + + $(ProjectDir)..\.. + WindowsLocalDebugger + + \ No newline at end of file diff --git a/tools/bindings-generator b/tools/bindings-generator index c85f633fe8..d5d57a27e2 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit c85f633fe8895da78bddf2f7f567cd73063a68fa +Subproject commit d5d57a27e2002f53746b3f7ee19535afbaba113e