Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_pipu

This commit is contained in:
pipu 2014-10-12 17:44:28 +08:00
commit 9503253a17
31 changed files with 184 additions and 134 deletions

View File

@ -11,6 +11,7 @@ cocos2d-x-3.3-beta1
[NEW] WP8: enabled screen orientation change handling
[FIX] Accelerometer: using Accelerometer will freeze app and then crash on WP8
[FIX] Application: getCurrentLanguageCode() always return empty string
[FIX] Action: kRepeatForever macro superseded by CC_REPEAT_FOREVER macro
[FIX] C++: remove armv7s in VALID_ARCHS for Xcode projects
[FIX] Cocos Studio reader: UI animation playing crash if GUI JSON file is loaded again

View File

@ -162,7 +162,7 @@ def copy_resources(target, app_android_root):
copy_files(os.path.join(common_script_dir, "cocos2d"), assets_dir)
copy_files(os.path.join(common_script_dir, "cocosbuilder"), assets_dir)
copy_files(os.path.join(common_script_dir, "cocosdenshion"), assets_dir)
copy_files(os.path.join(common_script_dir, "cocostudio"), assets_dir)
copy_files(os.path.join(common_script_dir, "cocosstudio"), assets_dir)
copy_files(os.path.join(common_script_dir, "extension"), assets_dir)
copy_files(os.path.join(common_script_dir, "network"), assets_dir)
copy_files(os.path.join(common_script_dir, "ui"), assets_dir)

View File

@ -199,14 +199,6 @@
15D1FD3E199863CA00302043 /* DeprecatedCocosDenshionClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD39199863CA00302043 /* DeprecatedCocosDenshionClass.lua */; };
15D1FD3F199863CA00302043 /* DeprecatedCocosDenshionFunc.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD3A199863CA00302043 /* DeprecatedCocosDenshionFunc.lua */; };
15D1FD40199863CA00302043 /* DeprecatedCocosDenshionFunc.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD3A199863CA00302043 /* DeprecatedCocosDenshionFunc.lua */; };
15D1FD45199863E800302043 /* CocoStudio.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD41199863E800302043 /* CocoStudio.lua */; };
15D1FD46199863E800302043 /* CocoStudio.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD41199863E800302043 /* CocoStudio.lua */; };
15D1FD47199863E800302043 /* DeprecatedCocoStudioClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD42199863E800302043 /* DeprecatedCocoStudioClass.lua */; };
15D1FD48199863E800302043 /* DeprecatedCocoStudioClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD42199863E800302043 /* DeprecatedCocoStudioClass.lua */; };
15D1FD49199863E800302043 /* DeprecatedCocoStudioFunc.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD43199863E800302043 /* DeprecatedCocoStudioFunc.lua */; };
15D1FD4A199863E800302043 /* DeprecatedCocoStudioFunc.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD43199863E800302043 /* DeprecatedCocoStudioFunc.lua */; };
15D1FD4B199863E800302043 /* StudioConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD44199863E800302043 /* StudioConstants.lua */; };
15D1FD4C199863E800302043 /* StudioConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD44199863E800302043 /* StudioConstants.lua */; };
15D1FD51199863F900302043 /* DeprecatedExtensionClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD4D199863F900302043 /* DeprecatedExtensionClass.lua */; };
15D1FD52199863F900302043 /* DeprecatedExtensionClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD4D199863F900302043 /* DeprecatedExtensionClass.lua */; };
15D1FD53199863F900302043 /* DeprecatedExtensionEnum.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD4E199863F900302043 /* DeprecatedExtensionEnum.lua */; };
@ -239,6 +231,22 @@
15D1FD761998642800302043 /* experimentalUIConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD6F1998642800302043 /* experimentalUIConstants.lua */; };
15D1FD771998642800302043 /* GuiConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD701998642800302043 /* GuiConstants.lua */; };
15D1FD781998642800302043 /* GuiConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D1FD701998642800302043 /* GuiConstants.lua */; };
15D7638219E8FC980069EAE8 /* CocosStudio.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7637E19E8FC980069EAE8 /* CocosStudio.lua */; };
15D7638319E8FC980069EAE8 /* CocosStudio.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7637E19E8FC980069EAE8 /* CocosStudio.lua */; };
15D7638419E8FC980069EAE8 /* CocosStudio.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7637E19E8FC980069EAE8 /* CocosStudio.lua */; };
15D7638519E8FC980069EAE8 /* CocosStudio.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7637E19E8FC980069EAE8 /* CocosStudio.lua */; };
15D7638619E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7637F19E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua */; };
15D7638719E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7637F19E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua */; };
15D7638819E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7637F19E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua */; };
15D7638919E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7637F19E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua */; };
15D7638A19E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7638019E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua */; };
15D7638B19E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7638019E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua */; };
15D7638C19E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7638019E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua */; };
15D7638D19E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7638019E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua */; };
15D7638E19E8FC980069EAE8 /* StudioConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7638119E8FC980069EAE8 /* StudioConstants.lua */; };
15D7638F19E8FC980069EAE8 /* StudioConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7638119E8FC980069EAE8 /* StudioConstants.lua */; };
15D7639019E8FC980069EAE8 /* StudioConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7638119E8FC980069EAE8 /* StudioConstants.lua */; };
15D7639119E8FC980069EAE8 /* StudioConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15D7638119E8FC980069EAE8 /* StudioConstants.lua */; };
15E66FC8192D957100C20A52 /* Sprite3DTest in Resources */ = {isa = PBXBuildFile; fileRef = 3E92EA841921A7720094CD21 /* Sprite3DTest */; };
15E66FD6192DC8C700C20A52 /* Sprite3DTest in Resources */ = {isa = PBXBuildFile; fileRef = 3E92EA841921A7720094CD21 /* Sprite3DTest */; };
15EE465B19A7200300AF29F1 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15EE465A19A7200300AF29F1 /* libcurl.a */; };
@ -2310,10 +2318,6 @@
15D1FD38199863CA00302043 /* AudioEngine.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = AudioEngine.lua; path = "../cocos/scripting/lua-bindings/script/cocosdenshion/AudioEngine.lua"; sourceTree = "<group>"; };
15D1FD39199863CA00302043 /* DeprecatedCocosDenshionClass.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedCocosDenshionClass.lua; path = "../cocos/scripting/lua-bindings/script/cocosdenshion/DeprecatedCocosDenshionClass.lua"; sourceTree = "<group>"; };
15D1FD3A199863CA00302043 /* DeprecatedCocosDenshionFunc.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedCocosDenshionFunc.lua; path = "../cocos/scripting/lua-bindings/script/cocosdenshion/DeprecatedCocosDenshionFunc.lua"; sourceTree = "<group>"; };
15D1FD41199863E800302043 /* CocoStudio.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CocoStudio.lua; path = "../cocos/scripting/lua-bindings/script/cocostudio/CocoStudio.lua"; sourceTree = "<group>"; };
15D1FD42199863E800302043 /* DeprecatedCocoStudioClass.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedCocoStudioClass.lua; path = "../cocos/scripting/lua-bindings/script/cocostudio/DeprecatedCocoStudioClass.lua"; sourceTree = "<group>"; };
15D1FD43199863E800302043 /* DeprecatedCocoStudioFunc.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedCocoStudioFunc.lua; path = "../cocos/scripting/lua-bindings/script/cocostudio/DeprecatedCocoStudioFunc.lua"; sourceTree = "<group>"; };
15D1FD44199863E800302043 /* StudioConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = StudioConstants.lua; path = "../cocos/scripting/lua-bindings/script/cocostudio/StudioConstants.lua"; sourceTree = "<group>"; };
15D1FD4D199863F900302043 /* DeprecatedExtensionClass.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedExtensionClass.lua; path = "../cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionClass.lua"; sourceTree = "<group>"; };
15D1FD4E199863F900302043 /* DeprecatedExtensionEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedExtensionEnum.lua; path = "../cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionEnum.lua"; sourceTree = "<group>"; };
15D1FD4F199863F900302043 /* DeprecatedExtensionFunc.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedExtensionFunc.lua; path = "../cocos/scripting/lua-bindings/script/extension/DeprecatedExtensionFunc.lua"; sourceTree = "<group>"; };
@ -2326,6 +2330,10 @@
15D1FD6E1998642800302043 /* DeprecatedUIFunc.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedUIFunc.lua; path = "../cocos/scripting/lua-bindings/script/ui/DeprecatedUIFunc.lua"; sourceTree = "<group>"; };
15D1FD6F1998642800302043 /* experimentalUIConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = experimentalUIConstants.lua; path = "../cocos/scripting/lua-bindings/script/ui/experimentalUIConstants.lua"; sourceTree = "<group>"; };
15D1FD701998642800302043 /* GuiConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = GuiConstants.lua; path = "../cocos/scripting/lua-bindings/script/ui/GuiConstants.lua"; sourceTree = "<group>"; };
15D7637E19E8FC980069EAE8 /* CocosStudio.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CocosStudio.lua; path = "../cocos/scripting/lua-bindings/script/cocosstudio/CocosStudio.lua"; sourceTree = "<group>"; };
15D7637F19E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedCocoStudioClass.lua; path = "../cocos/scripting/lua-bindings/script/cocosstudio/DeprecatedCocoStudioClass.lua"; sourceTree = "<group>"; };
15D7638019E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedCocoStudioFunc.lua; path = "../cocos/scripting/lua-bindings/script/cocosstudio/DeprecatedCocoStudioFunc.lua"; sourceTree = "<group>"; };
15D7638119E8FC980069EAE8 /* StudioConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = StudioConstants.lua; path = "../cocos/scripting/lua-bindings/script/cocosstudio/StudioConstants.lua"; sourceTree = "<group>"; };
15EE465A19A7200300AF29F1 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../external/curl/prebuilt/ios/libcurl.a; sourceTree = "<group>"; };
1A0EE2B218CDF6DA004CD58F /* cpp-empty-test Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "cpp-empty-test Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; };
1A0EE31418CDF733004CD58F /* lua-empty-test Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "lua-empty-test Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@ -5312,6 +5320,10 @@
1ABCA36418CD9E060087CE3A /* Lua Common */ = {
isa = PBXGroup;
children = (
15D7637E19E8FC980069EAE8 /* CocosStudio.lua */,
15D7637F19E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua */,
15D7638019E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua */,
15D7638119E8FC980069EAE8 /* StudioConstants.lua */,
15D1FD6D1998642800302043 /* DeprecatedUIEnum.lua */,
15D1FD6E1998642800302043 /* DeprecatedUIFunc.lua */,
15D1FD6F1998642800302043 /* experimentalUIConstants.lua */,
@ -5324,10 +5336,6 @@
15D1FD4E199863F900302043 /* DeprecatedExtensionEnum.lua */,
15D1FD4F199863F900302043 /* DeprecatedExtensionFunc.lua */,
15D1FD50199863F900302043 /* ExtensionConstants.lua */,
15D1FD41199863E800302043 /* CocoStudio.lua */,
15D1FD42199863E800302043 /* DeprecatedCocoStudioClass.lua */,
15D1FD43199863E800302043 /* DeprecatedCocoStudioFunc.lua */,
15D1FD44199863E800302043 /* StudioConstants.lua */,
15D1FD38199863CA00302043 /* AudioEngine.lua */,
15D1FD39199863CA00302043 /* DeprecatedCocosDenshionClass.lua */,
15D1FD3A199863CA00302043 /* DeprecatedCocosDenshionFunc.lua */,
@ -7515,6 +7523,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
15D7638719E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua in Resources */,
1AC35D5C18CEDE9E00F37B72 /* InfoPlist.strings in Resources */,
1AC35D5D18CEDE9E00F37B72 /* MainMenu.xib in Resources */,
15D1FD621998641200302043 /* DeprecatedNetworkEnum.lua in Resources */,
@ -7525,12 +7534,15 @@
15D1FCED1998637C00302043 /* bitExtend.lua in Resources */,
1503FABF18DA8B6C00F6518C /* smtp.lua in Resources */,
15D1FD291998637C00302043 /* Opengl.lua in Resources */,
15D7638F19E8FC980069EAE8 /* StudioConstants.lua in Resources */,
1503FAB318DA8B6C00F6518C /* ftp.lua in Resources */,
1503FAB718DA8B6C00F6518C /* http.lua in Resources */,
15D1FCF71998637C00302043 /* Cocos2dConstants.lua in Resources */,
1503FAC118DA8B6C00F6518C /* socket.lua in Resources */,
1503FAB918DA8B6C00F6518C /* ltn12.lua in Resources */,
15D1FD0B1998637C00302043 /* DeprecatedOpenglEnum.lua in Resources */,
15D7638B19E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua in Resources */,
15D7638319E8FC980069EAE8 /* CocosStudio.lua in Resources */,
15D1FD661998641200302043 /* DeprecatedNetworkFunc.lua in Resources */,
15D1FD241998637C00302043 /* luaoc.lua in Resources */,
1AC35D5E18CEDE9E00F37B72 /* Icon.icns in Resources */,
@ -7583,7 +7595,9 @@
files = (
15D1FD171998637C00302043 /* extern.lua in Resources */,
15D1FD641998641200302043 /* DeprecatedNetworkEnum.lua in Resources */,
15D7638D19E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua in Resources */,
15D1FCF41998637C00302043 /* Cocos2d.lua in Resources */,
15D7638519E8FC980069EAE8 /* CocosStudio.lua in Resources */,
1AC35D4A18CEDE9400F37B72 /* Icon-120.png in Resources */,
1503FAC018DA8B6C00F6518C /* smtp.lua in Resources */,
15D1FD681998641200302043 /* DeprecatedNetworkFunc.lua in Resources */,
@ -7599,6 +7613,7 @@
1503FABE18DA8B6C00F6518C /* mime.lua in Resources */,
15D1FD601998641200302043 /* DeprecatedNetworkClass.lua in Resources */,
15D1FD2B1998637C00302043 /* Opengl.lua in Resources */,
15D7639119E8FC980069EAE8 /* StudioConstants.lua in Resources */,
1AC35D4E18CEDE9400F37B72 /* Icon-72.png in Resources */,
1AC35D4F18CEDE9400F37B72 /* Icon-76.png in Resources */,
1503FAC218DA8B6C00F6518C /* socket.lua in Resources */,
@ -7608,6 +7623,7 @@
15D1FD301998637C00302043 /* OpenglConstants.lua in Resources */,
1503FAB618DA8B6C00F6518C /* headers.lua in Resources */,
1AC35D4918CEDE9400F37B72 /* Icon-114.png in Resources */,
15D7638919E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua in Resources */,
1503FAB418DA8B6C00F6518C /* ftp.lua in Resources */,
15D1FCEF1998637C00302043 /* bitExtend.lua in Resources */,
1AC35D2A18CEDE7200F37B72 /* res in Resources */,
@ -7630,16 +7646,17 @@
files = (
15D1FD751998642800302043 /* experimentalUIConstants.lua in Resources */,
156EAE071977D0BD00F53709 /* ActionTimeline in Resources */,
15D7638219E8FC980069EAE8 /* CocosStudio.lua in Resources */,
15E66FD6192DC8C700C20A52 /* Sprite3DTest in Resources */,
15D1FD001998637C00302043 /* DeprecatedCocos2dEnum.lua in Resources */,
15D1FD2D1998637C00302043 /* OpenglConstants.lua in Resources */,
15D1FCF11998637C00302043 /* Cocos2d.lua in Resources */,
15D1FD47199863E800302043 /* DeprecatedCocoStudioClass.lua in Resources */,
3E2F27BC19D00D7200E7C490 /* audio in Resources */,
1AC35DC318CEE65100F37B72 /* Misc in Resources */,
1AC35DC618CEE65100F37B72 /* Shaders in Resources */,
15D1FD141998637C00302043 /* extern.lua in Resources */,
1AC35DBB18CEE65100F37B72 /* components in Resources */,
15D7638E19E8FC980069EAE8 /* StudioConstants.lua in Resources */,
1AC35DE218CEE65900F37B72 /* effect2.ogg in Resources */,
15C90B4318E66C1700D69802 /* mime.lua in Resources */,
15D1FD651998641200302043 /* DeprecatedNetworkFunc.lua in Resources */,
@ -7650,6 +7667,7 @@
1AC35DBF18CEE65100F37B72 /* hd in Resources */,
1AC35DC818CEE65100F37B72 /* TileMaps in Resources */,
1AC35DBE18CEE65100F37B72 /* fonts in Resources */,
15D7638619E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua in Resources */,
15D1FD691998641200302043 /* NetworkConstants.lua in Resources */,
1AC35DDE18CEE65900F37B72 /* CocosBuilderExample.ccbresourcelog in Resources */,
15D1FD34199863BA00302043 /* CCBReaderLoad.lua in Resources */,
@ -7664,6 +7682,7 @@
C08689C218D370C90093E810 /* background.caf in Resources */,
15D1FD0A1998637C00302043 /* DeprecatedOpenglEnum.lua in Resources */,
15C90B4918E66C2A00D69802 /* tp.lua in Resources */,
15D7638A19E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua in Resources */,
15D1FD281998637C00302043 /* Opengl.lua in Resources */,
1AC35DE918CEE65900F37B72 /* effect1.wav in Resources */,
3E2F27BD19D00D7D00E7C490 /* background.wav in Resources */,
@ -7676,9 +7695,7 @@
1AC35DC418CEE65100F37B72 /* Particles in Resources */,
15D1FD3F199863CA00302043 /* DeprecatedCocosDenshionFunc.lua in Resources */,
15D1FD191998637C00302043 /* json.lua in Resources */,
15D1FD4B199863E800302043 /* StudioConstants.lua in Resources */,
1AC35DB918CEE65100F37B72 /* ccb in Resources */,
15D1FD49199863E800302043 /* DeprecatedCocoStudioFunc.lua in Resources */,
15C90B4118E66C1100D69802 /* mbox.lua in Resources */,
15D1FD55199863F900302043 /* DeprecatedExtensionFunc.lua in Resources */,
15D1FD3B199863CA00302043 /* AudioEngine.lua in Resources */,
@ -7703,7 +7720,6 @@
15D1FD51199863F900302043 /* DeprecatedExtensionClass.lua in Resources */,
1AC35DBD18CEE65100F37B72 /* extensions in Resources */,
15D1FD771998642800302043 /* GuiConstants.lua in Resources */,
15D1FD45199863E800302043 /* CocoStudio.lua in Resources */,
15D1FD1E1998637C00302043 /* luaj.lua in Resources */,
1AC35DC718CEE65100F37B72 /* spine in Resources */,
15C90B4518E66C1E00D69802 /* smtp.lua in Resources */,
@ -7729,7 +7745,6 @@
1AC35DF718CEE65B00F37B72 /* effect1.wav in Resources */,
C08689C418D370C90093E810 /* background.caf in Resources */,
1AC35DD118CEE65200F37B72 /* fonts in Resources */,
15D1FD4C199863E800302043 /* StudioConstants.lua in Resources */,
1AC35DCC18CEE65200F37B72 /* ccb in Resources */,
1AC35DD218CEE65200F37B72 /* hd in Resources */,
15D1FD251998637C00302043 /* luaoc.lua in Resources */,
@ -7746,7 +7761,6 @@
15D1FD021998637C00302043 /* DeprecatedCocos2dEnum.lua in Resources */,
1AC35DF818CEE65B00F37B72 /* pew-pew-lei.wav in Resources */,
1AC35D9918CEE5D100F37B72 /* Default-568h@2x.png in Resources */,
15D1FD4A199863E800302043 /* DeprecatedCocoStudioFunc.lua in Resources */,
15D1FD071998637C00302043 /* DeprecatedCocos2dFunc.lua in Resources */,
15C90B4218E66C1200D69802 /* mbox.lua in Resources */,
15D1FD201998637C00302043 /* luaj.lua in Resources */,
@ -7780,16 +7794,16 @@
15D1FD2F1998637C00302043 /* OpenglConstants.lua in Resources */,
15D1FD671998641200302043 /* DeprecatedNetworkFunc.lua in Resources */,
1A1645A9191B6283008C7C7F /* ccs-res in Resources */,
15D1FD46199863E800302043 /* CocoStudio.lua in Resources */,
15D1FD37199863BA00302043 /* DeprecatedCocosBuilderClass.lua in Resources */,
1AC35DA118CEE5D100F37B72 /* Icon-72.png in Resources */,
15D7638819E8FC980069EAE8 /* DeprecatedCocoStudioClass.lua in Resources */,
15C90B4018E66C0D00D69802 /* ltn12.lua in Resources */,
15D1FD48199863E800302043 /* DeprecatedCocoStudioClass.lua in Resources */,
15D1FD161998637C00302043 /* extern.lua in Resources */,
1AC35DA218CEE5D100F37B72 /* Icon-76.png in Resources */,
15C90B4818E66C2500D69802 /* socket.lua in Resources */,
15D1FD40199863CA00302043 /* DeprecatedCocosDenshionFunc.lua in Resources */,
15C90B3C18E66BEC00D69802 /* headers.lua in Resources */,
15D7638419E8FC980069EAE8 /* CocosStudio.lua in Resources */,
1AC35DF418CEE65B00F37B72 /* effect1.raw in Resources */,
1AC35DD918CEE65200F37B72 /* Shaders in Resources */,
1AC35DCF18CEE65200F37B72 /* configs in Resources */,
@ -7803,7 +7817,9 @@
1AC35D9C18CEE5D100F37B72 /* Icon-114.png in Resources */,
15D1FD52199863F900302043 /* DeprecatedExtensionClass.lua in Resources */,
1AC35D9F18CEE5D100F37B72 /* Icon-152.png in Resources */,
15D7638C19E8FC980069EAE8 /* DeprecatedCocoStudioFunc.lua in Resources */,
1AC35DEE18CEE65B00F37B72 /* background.mp3 in Resources */,
15D7639019E8FC980069EAE8 /* StudioConstants.lua in Resources */,
1AC35D9A18CEE5D100F37B72 /* Default.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;

View File

@ -147,6 +147,8 @@ DrawNode::~DrawNode()
if (Configuration::getInstance()->supportsShareableVAO())
{
glDeleteVertexArrays(1, &_vao);
glDeleteVertexArrays(1, &_vaoGLLine);
glDeleteVertexArrays(1, &_vaoGLPoint);
GL::bindVAO(0);
_vao = 0;
}
@ -429,7 +431,7 @@ void DrawNode::drawPoints(const Vec2 *position, unsigned int numberOfPoints, con
V2F_C4B_T2F *point = (V2F_C4B_T2F*)(_bufferGLPoint + _bufferCountGLPoint);
for(int i=0; i<numberOfPoints; i++,point++)
for(unsigned int i=0; i < numberOfPoints; i++,point++)
{
V2F_C4B_T2F a = {position[i], Color4B(color), Tex2F(0.0, 0.0) };
*point = a;
@ -480,8 +482,8 @@ void DrawNode::drawPoly(const Vec2 *poli, unsigned int numberOfPoints, bool clos
V2F_C4B_T2F *point = (V2F_C4B_T2F*)(_bufferGLLine + _bufferCountGLLine);
int i;
for(i=0; i<numberOfPoints-1; i++)
unsigned int i = 0;
for(; i<numberOfPoints-1; i++)
{
V2F_C4B_T2F a = {poli[i], Color4B(color), Tex2F(0.0, 0.0)};
V2F_C4B_T2F b = {poli[i+1], Color4B(color), Tex2F(0.0, 0.0)};

View File

@ -49,6 +49,14 @@ THE SOFTWARE.
#include "platform/CCGL.h"
NS_CC_BEGIN
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (push)
#pragma warning (disable: 4996)
#endif
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
@ -582,4 +590,10 @@ void setDrawColor4B( GLubyte r, GLubyte g, GLubyte b, GLubyte a )
} // DrawPrimitives namespace
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (pop)
#endif
NS_CC_END

View File

@ -41,6 +41,12 @@ Use any of these editors to generate BMFonts:
NS_CC_BEGIN
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (push)
#pragma warning (disable: 4996)
#endif
/** @brief LabelBMFont is a subclass of SpriteBatchNode.
Features:
@ -142,7 +148,11 @@ private:
// end of GUI group
/// @}
/// @}
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (pop)
#endif
NS_CC_END
#endif //__CCBITMAP_FONT_ATLAS_H__

View File

@ -30,6 +30,13 @@ THE SOFTWARE.
NS_CC_BEGIN
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (push)
#pragma warning (disable: 4996)
#endif
class Label;
/**
@ -161,7 +168,11 @@ protected:
// end of GUI group
/// @}
/// @}
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#elif _MSC_VER >= 1400 //vs 2005 or higher
#pragma warning (pop)
#endif
NS_CC_END
#endif //__CCLABEL_H__

View File

@ -36,6 +36,12 @@
#include "platform/CCFileUtils.h"
#include <map>
// FIXME: Other platforms should use upstream minizip like mingw-w64
#ifdef __MINGW32__
#define unzGoToFirstFile64(A,B,C,D) unzGoToFirstFile2(A,B,C,D, NULL, 0, NULL, 0)
#define unzGoToNextFile64(A,B,C,D) unzGoToNextFile2(A,B,C,D, NULL, 0, NULL, 0)
#endif
NS_CC_BEGIN
unsigned int ZipUtils::s_uEncryptedPvrKeyParts[4] = {0,0,0,0};

View File

@ -37,12 +37,11 @@ THE SOFTWARE.
#include "platform/CCStdC.h"
#endif
namespace cocos2d
{
#ifndef _unz64_H
typedef struct unz_file_info_s unz_file_info;
#endif
namespace cocos2d
{
/* XXX: pragma pack ??? */
/** @struct CCZHeader
*/

View File

@ -210,13 +210,12 @@ bool ComRender::serialize(void* r)
}
else if (file_extension == ".CSB")
{
ssize_t size = 0;
unsigned char *pBytes = nullptr;
std::string binaryFilePath = FileUtils::getInstance()->fullPathForFilename(filePath.c_str());
pBytes = cocos2d::FileUtils::getInstance()->getFileData(binaryFilePath.c_str(), "rb", &size);
CC_BREAK_IF(pBytes == nullptr || strcmp((char*)pBytes, "") == 0);
auto fileData = FileUtils::getInstance()->getDataFromFile(binaryFilePath);
auto fileDataBytes = fileData.getBytes();
CC_BREAK_IF(fileData.isNull());
CocoLoader tCocoLoader;
if (tCocoLoader.ReadCocoBinBuff((char*)pBytes))
if (tCocoLoader.ReadCocoBinBuff((char*)fileDataBytes))
{
stExpCocoNode *tpRootCocoNode = tCocoLoader.GetRootCocoNode();
rapidjson::Type tType = tpRootCocoNode->GetType(&tCocoLoader);

View File

@ -357,9 +357,6 @@ WidgetReaderProtocol* WidgetPropertiesReader::createWidgetReaderProtocol(const s
return dynamic_cast<WidgetReaderProtocol*>(object);
}
Widget* GUIReader::widgetFromBinaryFile(const char *fileName)
{
std::string jsonpath;
@ -368,17 +365,18 @@ Widget* GUIReader::widgetFromBinaryFile(const char *fileName)
// jsonpath = CCFileUtils::getInstance()->fullPathForFilename(fileName);
size_t pos = jsonpath.find_last_of('/');
m_strFilePath = jsonpath.substr(0,pos+1);
ssize_t nSize = 0;
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(fileName);
unsigned char* pBuffer = FileUtils::getInstance()->getFileData(fullPath, "rb", &nSize);
auto fileData = FileUtils::getInstance()->getDataFromFile(fullPath);
auto fileDataBytes = fileData.getBytes();
auto fileDataSize = fileData.getSize();
const char* fileVersion = "";
ui::Widget* widget = nullptr;
if (pBuffer != nullptr && nSize > 0)
if (fileDataBytes != nullptr && fileDataSize > 0)
{
CocoLoader tCocoLoader;
if(true == tCocoLoader.ReadCocoBinBuff((char*)pBuffer))
if(true == tCocoLoader.ReadCocoBinBuff((char*)fileDataBytes))
{
stExpCocoNode* tpRootCocoNode = tCocoLoader.GetRootCocoNode();
@ -424,8 +422,6 @@ Widget* GUIReader::widgetFromBinaryFile(const char *fileName)
}
}
CC_SAFE_DELETE_ARRAY(pBuffer);
return widget;
}

View File

@ -82,10 +82,11 @@ cocos2d::Node* SceneReader::createNodeWithSceneFile(const std::string &fileName,
unsigned char *pBytes = nullptr;
do {
std::string binaryFilePath = CCFileUtils::getInstance()->fullPathForFilename(fileName);
pBytes = cocos2d::FileUtils::getInstance()->getFileData(binaryFilePath.c_str(), "rb", &size);
CC_BREAK_IF(pBytes == nullptr || strcmp((char*)pBytes, "") == 0);
auto fileData = FileUtils::getInstance()->getDataFromFile(binaryFilePath);
auto fileDataBytes = fileData.getBytes();
CC_BREAK_IF(fileData.isNull());
CocoLoader tCocoLoader;
if (tCocoLoader.ReadCocoBinBuff((char*)pBytes))
if (tCocoLoader.ReadCocoBinBuff((char*)fileDataBytes))
{
stExpCocoNode *tpRootCocoNode = tCocoLoader.GetRootCocoNode();
rapidjson::Type tType = tpRootCocoNode->GetType(&tCocoLoader);

View File

@ -648,7 +648,12 @@ unsigned char* FileUtils::getFileDataFromZip(const std::string& zipFilePath, con
file = unzOpen(zipFilePath.c_str());
CC_BREAK_IF(!file);
// FIXME: Other platforms should use upstream minizip like mingw-w64
#ifdef __MINGW32__
int ret = unzLocateFile(file, filename.c_str(), NULL);
#else
int ret = unzLocateFile(file, filename.c_str(), 1);
#endif
CC_BREAK_IF(UNZ_OK != ret);
char filePathA[260];

View File

@ -56,6 +56,10 @@ jclass _getClassID(const char *className) {
return _clazz;
}
void _detachCurrentThread(void* a) {
cocos2d::JniHelper::getJavaVM()->DetachCurrentThread();
}
namespace cocos2d {
JavaVM* JniHelper::_psJavaVM = nullptr;
@ -73,7 +77,7 @@ namespace cocos2d {
LOGD("JniHelper::setJavaVM(%p), pthread_self() = %ld", javaVM, thisthread);
_psJavaVM = javaVM;
pthread_key_create(&g_key, nullptr);
pthread_key_create(&g_key, _detachCurrentThread);
}
JNIEnv* JniHelper::cacheEnv(JavaVM* jvm) {
@ -89,11 +93,6 @@ namespace cocos2d {
case JNI_EDETACHED :
// Thread not attached
// TODO : If calling AttachCurrentThread() on a native thread
// must call DetachCurrentThread() in future.
// see: http://developer.android.com/guide/practices/design/jni.html
if (jvm->AttachCurrentThread(&_env, nullptr) < 0)
{
LOGE("Failed to get the environment using AttachCurrentThread()");

View File

@ -88,7 +88,7 @@ const char * Application::getCurrentLanguageCode()
// get the current language code.(such as English is "en", Chinese is "zh" and so on)
NSDictionary* temp = [NSLocale componentsFromLocaleIdentifier:currentLanguage];
NSString * languageCode = [temp objectForKey:NSLocaleLanguageCode];
[languageCode getCString:code maxLength:2 encoding:NSASCIIStringEncoding];
[languageCode getCString:code maxLength:3 encoding:NSASCIIStringEncoding];
code[2]='\0';
return code;
}

View File

@ -144,7 +144,7 @@ const char * Application::getCurrentLanguageCode()
// get the current language code.(such as English is "en", Chinese is "zh" and so on)
NSDictionary* temp = [NSLocale componentsFromLocaleIdentifier:currentLanguage];
NSString * languageCode = [temp objectForKey:NSLocaleLanguageCode];
[languageCode getCString:code maxLength:2 encoding:NSASCIIStringEncoding];
[languageCode getCString:code maxLength:3 encoding:NSASCIIStringEncoding];
code[2]='\0';
return code;
}

View File

@ -5,7 +5,7 @@
--------------------------------
-- brief Get a UTF8 substring from a std::string with a given start position and length<br>
-- Sample: std::string str = "中国中国中国; substr = getSubStringOfUTF8String(str,0,2) will = "中国"<br>
-- Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国"<br>
-- param start The start position of the substring.<br>
-- param length The length of the substring in UTF8 count<br>
-- return a UTF8 substring

View File

@ -37,7 +37,7 @@ static const int NORMAL_RENDERER_Z = (-2);
static const int PRESSED_RENDERER_Z = (-2);
static const int DISABLED_RENDERER_Z = (-2);
static const int TITLE_RENDERER_Z = (-1);
static const float ZOOM_ACTION_TIME_STEP = 0.05;
static const float ZOOM_ACTION_TIME_STEP = 0.05f;
IMPLEMENT_CLASS_GUI_INFO(Button)

View File

@ -70,7 +70,7 @@ public:
/**
* @brief Get a UTF8 substring from a std::string with a given start position and length
* Sample: std::string str = "中国中国中国”; substr = getSubStringOfUTF8String(str,0,2) will = ""
* Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国"
* @param start The start position of the substring.
* @param length The length of the substring in UTF8 count
* @return a UTF8 substring

View File

@ -1772,8 +1772,8 @@ bool Layout::isWidgetAncestorSupportLoopFocus(Widget* widget, FocusDirection di
else
{
CCASSERT(0, "invalid layout type");
return false;
}
}
else
{
@ -1781,9 +1781,6 @@ bool Layout::isWidgetAncestorSupportLoopFocus(Widget* widget, FocusDirection di
}
}
Widget* Layout::findNextFocusedWidget(FocusDirection direction, Widget* current)
{
if (_isFocusPassing || this->isFocused())

View File

@ -149,7 +149,8 @@ namespace ui {
bool Scale9Sprite::initWithBatchNode(cocos2d::SpriteBatchNode *batchnode, const cocos2d::Rect &rect, const cocos2d::Rect &capInsets)
{
return initWithBatchNode(batchnode, rect, false, capInsets);
auto sprite = Sprite::createWithTexture(batchnode->getTexture());
return init(sprite, rect, false, capInsets);
}
#define TRANSLATE_X(x, y, xtranslate) \

View File

@ -287,8 +287,8 @@ void StopAllActionsTest::onEnter()
auto pRepeatMove = RepeatForever::create(pSequenceMove);
pRepeatMove->setTag(kTagSequence);
auto pScale1 = ScaleBy::create(2, 1.5);
auto pScale2 = ScaleBy::create(2, 1.0/1.5);
auto pScale1 = ScaleBy::create(2, 1.5f);
auto pScale2 = ScaleBy::create(2, 1.0f/1.5f);
auto pSequenceScale = Sequence::createWithTwoActions(pScale1, pScale2);
auto pRepeatScale = RepeatForever::create(pSequenceScale);
pRepeatScale->setTag(kTagSequence);

View File

@ -260,7 +260,7 @@ void Camera3DTestDemo::onEnter()
addChild(layer3D,0);
_layer3D=layer3D;
_curState=State_None;
addNewSpriteWithCoords( Vec3(0,0,0),"Sprite3DTest/girl.c3b",true,0.2,true);
addNewSpriteWithCoords( Vec3(0,0,0),"Sprite3DTest/girl.c3b",true,0.2f,true);
TTFConfig ttfConfig("fonts/arial.ttf", 20);
auto label1 = Label::createWithTTF(ttfConfig,"zoom out");
auto menuItem1 = MenuItemLabel::create(label1, CC_CALLBACK_1(Camera3DTestDemo::scaleCameraCallback,this,1));
@ -392,15 +392,15 @@ void Camera3DTestDemo::onTouchesMoved(const std::vector<Touch*>& touches, cocos2
Vec3 cameraRightDir;
_camera->getNodeToWorldTransform().getForwardVector(&cameraDir);
cameraDir.normalize();
cameraDir.y=0;
cameraDir.y = 0;
_camera->getNodeToWorldTransform().getRightVector(&cameraRightDir);
cameraRightDir.normalize();
cameraRightDir.y=0;
Vec3 cameraPos= _camera->getPosition3D();
cameraPos+=cameraDir*newPos.y*0.1;
cameraPos+=cameraRightDir*newPos.x*0.1;
cameraRightDir.y = 0;
Vec3 cameraPos = _camera->getPosition3D();
cameraPos += cameraDir*newPos.y * 0.1f;
cameraPos += cameraRightDir * newPos.x * 0.1f;
_camera->setPosition3D(cameraPos);
if(_sprite3D && _cameraType==CameraType::FirstCamera)
if(_sprite3D && _cameraType == CameraType::FirstCamera)
{
_sprite3D->setPosition3D(Vec3(_camera->getPositionX(),0,_camera->getPositionZ()));
_targetPos=_sprite3D->getPosition3D();

View File

@ -1092,7 +1092,7 @@ void ClippingToRenderTextureTest::reproduceBug()
rt->setPosition(visibleSize.width/2, visibleSize.height/2);
this->addChild(rt);
rt->beginWithClear(0.3, 0, 0, 1);
rt->beginWithClear(0.3f, 0, 0, 1);
container->visit();
rt->end();
}

View File

@ -9,6 +9,13 @@ CurrentLanguageTest::CurrentLanguageTest()
auto labelLanguage = Label::createWithTTF("", "fonts/arial.ttf", 20);
labelLanguage->setPosition(VisibleRect::center());
auto labelLanguageCode = Label::createWithTTF("", "fonts/arial.ttf", 20);
labelLanguageCode->setPosition(VisibleRect::center().x, VisibleRect::center().y-50);
const char* currentLanguageCode = Application::getInstance()->getCurrentLanguageCode();
labelLanguageCode->setString(currentLanguageCode);
LanguageType currentLanguageType = Application::getInstance()->getCurrentLanguage();
switch (currentLanguageType)
{
@ -63,6 +70,7 @@ CurrentLanguageTest::CurrentLanguageTest()
}
addChild(labelLanguage);
addChild(labelLanguageCode);
}
void CurrentLanguageTestScene::runThisTest()

View File

@ -1263,13 +1263,13 @@ void Sprite3DWithOBBPerfromanceTest::onTouchesBegan(const std::vector<Touch*>& t
for (auto touch: touches)
{
auto location = touch->getLocationInView();
if(_obb.size() > 0)
auto obbSize = _obb.size();
if(obbSize)
{
_intersetList.clear();
Ray ray;
calculateRayByLocationInView(&ray,location);
for(int i = 0; i < _obb.size(); i++)
for(decltype(obbSize) i = 0; i < obbSize; i++)
{
if(ray.intersects(_obb[i]))
{
@ -1291,8 +1291,9 @@ void Sprite3DWithOBBPerfromanceTest::onTouchesMoved(const std::vector<Touch*>& t
for (auto touch: touches)
{
auto location = touch->getLocation();
auto obbSize = _obb.size();
for(int i = 0; i < _obb.size(); i++)
for(decltype(obbSize) i = 0; i < obbSize; i++)
{
if(_intersetList.find(i) != _intersetList.end())
_obb[i]._center = Vec3(location.x,location.y,0);
@ -1329,7 +1330,8 @@ void Sprite3DWithOBBPerfromanceTest::update(float dt)
if(_obb.size() > 0)
{
_drawOBB->clear();
for(int i =0; i < _obb.size(); i++)
auto obbSize = _obb.size();
for(decltype(obbSize) i =0; i < obbSize; i++)
{
Vec3 corners[8] = {};
_obb[i].getCorners(corners);

View File

@ -41,7 +41,7 @@ bool UIButtonTest::init()
button->getContentSize().height);
button->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f));
button->addTouchEventListener(CC_CALLBACK_2(UIButtonTest::touchEvent, this));
button->setZoomScale(0.4);
button->setZoomScale(0.4f);
button->setPressedActionEnabled(true);
_uiLayer->addChild(button);
button->setOpacity(100);
@ -306,8 +306,8 @@ bool UIButtonTest_Title::init()
button->addTouchEventListener(CC_CALLBACK_2(UIButtonTest_Title::touchEvent, this));
_uiLayer->addChild(button);
button->runAction(RepeatForever::create(Sequence::create(ScaleTo::create(1., 1.2),
ScaleTo::create(1.0, 1.0),nullptr)));
button->runAction(RepeatForever::create(Sequence::create(ScaleTo::create(1.0f, 1.2f),
ScaleTo::create(1.0f, 1.0f),nullptr)));
TextBMFont *text = TextBMFont::create("BMFont", "cocosui/bitmapFontTest2.fnt");
@ -394,7 +394,7 @@ bool UIButtonTestRemoveSelf::init()
_uiLayer->addChild(alert);
Layout *layout = Layout::create();
layout->setContentSize(widgetSize * 0.6);
layout->setContentSize(widgetSize * 0.6f);
layout->setBackGroundColor(Color3B::GREEN);
layout->setBackGroundColorType(Layout::BackGroundColorType::SOLID);
layout->setBackGroundColorOpacity(100);
@ -633,12 +633,12 @@ bool UIButtonTextOnly::init()
// Create the button
auto button = Button::create();
button->setNormalizedPosition(Vec2(0.5, 0.5));
button->setNormalizedPosition(Vec2(0.5f, 0.5f));
button->setTitleText("PLAY GAME");
CCLOG("content size should be greater than 0: width = %f, height = %f", button->getContentSize().width,
button->getContentSize().height);
button->setZoomScale(0.3);
button->setZoomScale(0.3f);
button->setPressedActionEnabled(true);
button->addClickEventListener([this](Ref* sender) {
CCLOG("clicked!");
@ -687,13 +687,13 @@ bool UIButtonIgnoreContentSizeTest::init()
"cocosui/animationbuttonpressed.png");
button->ignoreContentAdaptWithSize(false);
button->setContentSize(Size(200,100));
button->setNormalizedPosition(Vec2(0.3, 0.5));
button->setNormalizedPosition(Vec2(0.3f, 0.5f));
button->setTitleText("PLAY GAME");
button->setZoomScale(0.3);
button->setZoomScale(0.3f);
button->setPressedActionEnabled(true);
button->addClickEventListener([=](Ref* sender) {
CCLOG("clicked!");
button->setScale(1.2);
button->setScale(1.2f);
});
_uiLayer->addChild(button);
@ -702,12 +702,12 @@ bool UIButtonIgnoreContentSizeTest::init()
"cocosui/animationbuttonpressed.png");
button2->ignoreContentAdaptWithSize(false);
button2->setContentSize(Size(200,100));
button2->setNormalizedPosition(Vec2(0.8, 0.5));
button2->setNormalizedPosition(Vec2(0.8f, 0.5f));
button2->setTitleText("PLAY GAME");
button2->setZoomScale(0.3);
button2->setZoomScale(0.3f);
button2->setPressedActionEnabled(true);
button2->addClickEventListener([=](Ref* sender) {
button2->runAction(ScaleTo::create(1.0, 1.2));
button2->runAction(ScaleTo::create(1.0f, 1.2f));
CCLOG("clicked!");
});
_uiLayer->addChild(button2);
@ -753,11 +753,11 @@ bool UIButtonTitleEffectTest::init()
// Create the button
auto button = Button::create("cocosui/animationbuttonnormal.png",
"cocosui/animationbuttonpressed.png");
button->setNormalizedPosition(Vec2(0.3, 0.5));
button->setNormalizedPosition(Vec2(0.3f, 0.5f));
button->setTitleText("PLAY GAME");
button->setTitleFontName("fonts/Marker Felt.ttf");
button->setZoomScale(0.3);
button->setScale(2.0);
button->setZoomScale(0.3f);
button->setScale(2.0f);
button->setPressedActionEnabled(true);
Label *title = button->getTitleRenderer();
button->setTitleColor(Color3B::RED);
@ -769,7 +769,7 @@ bool UIButtonTitleEffectTest::init()
// Create the button
auto button2 = Button::create("cocosui/animationbuttonnormal.png",
"cocosui/animationbuttonpressed.png");
button2->setNormalizedPosition(Vec2(0.8, 0.5));
button2->setNormalizedPosition(Vec2(0.8f, 0.5f));
button2->setTitleText("PLAY GAME");
auto title2 = button2->getTitleRenderer();
title2->enableOutline(Color4B::GREEN, 3);

View File

@ -58,8 +58,6 @@ bool UIScale9SpriteTest::init()
ui::Scale9Sprite *normalSprite2 = ui::Scale9Sprite::create("cocosui/animationbuttonnormal.png");
normalSprite2->setPosition(120, 270);
normalSprite2->setScale9Enabled(false);
// normalSprite2->setContentSize(Size(100,100));
// normalSprite2->setAnchorPoint(Vec2(0.5,0.5));
normalSprite2->setOpacity(100);
this->addChild(normalSprite2);
normalSprite2->setColor(Color3B::GREEN);
@ -68,16 +66,15 @@ bool UIScale9SpriteTest::init()
auto action2 = action->clone();
ui::Scale9Sprite *sp1 = ui::Scale9Sprite::create("cocosui/animationbuttonnormal.png");
sp1->setPosition(100, 160);
sp1->setScale(1.2);
sp1->setScale(1.2f);
sp1->setContentSize(Size(100,100));
sp1->setColor(Color3B::GREEN);
// sp1->setScale9Enabled(false);
this->addChild(sp1);
sp1->runAction((FiniteTimeAction*)action2);
cocos2d::ui::Scale9Sprite *sp2 = ui::Scale9Sprite::create("cocosui/animationbuttonnormal.png");
sp2->setPosition(350, 160);
sp2->setPreferredSize(sp1->getContentSize() * 1.2);
sp2->setPreferredSize(sp1->getContentSize() * 1.2f);
sp2->setColor(Color3B::GREEN);
sp2->setContentSize(Size(100,100));
@ -106,55 +103,41 @@ bool UIScale9SpriteHierarchialTest::init()
{
Size widgetSize = _widget->getContentSize();
auto moveTo = MoveBy::create(1.0, Vec2(30,0));
auto moveTo = MoveBy::create(1.0f, Vec2(30,0));
auto moveBack = moveTo->reverse();
auto rotateBy = RotateBy::create(1.0, 180);
auto fadeOut = FadeOut::create(2.0);
auto rotateBy = RotateBy::create(1.0f, 180);
auto fadeOut = FadeOut::create(2.0f);
auto action = Sequence::create(moveTo,moveBack, rotateBy,fadeOut, NULL);
Sprite *normalSprite1 = Sprite::create("cocosui/animationbuttonnormal.png");
normalSprite1->setPosition(100, 270);
// normalSprite1->setAnchorPoint(Vec2(0.5,0.5));
// normalSprite1->setContentSize(Size(100,100));
// Sprite *childSprite = Sprite::create("cocosui/animationbuttonnormal.png");
normalSprite1->setCascadeColorEnabled(true);
normalSprite1->setCascadeOpacityEnabled(true);
normalSprite1->setColor(Color3B::GREEN);
this->addChild(normalSprite1);
normalSprite1->runAction((FiniteTimeAction*)action->clone());
ui::Scale9Sprite *normalSprite2 = ui::Scale9Sprite::create("cocosui/animationbuttonnormal.png");
// normalSprite2->setPosition(120, 270);
normalSprite2->setScale9Enabled(false);
// normalSprite2->setContentSize(Size(100,100));
// normalSprite2->setAnchorPoint(Vec2(0.5,0.5));
normalSprite2->setOpacity(100);
normalSprite1->addChild(normalSprite2);
auto action2 = action->clone();
ui::Scale9Sprite *sp1 = ui::Scale9Sprite::create("cocosui/animationbuttonnormal.png");
sp1->setPosition(200, 160);
sp1->setScale(1.2);
sp1->setScale(1.2f);
sp1->setContentSize(Size(100,100));
sp1->setColor(Color3B::GREEN);
// sp1->setScale9Enabled(false);
this->addChild(sp1);
sp1->runAction((FiniteTimeAction*)action2);
cocos2d::ui::Scale9Sprite *sp2 = ui::Scale9Sprite::create("cocosui/animationbuttonnormal.png");
// sp2->setPosition(350, 160);
sp2->setPreferredSize(sp1->getContentSize() * 1.2);
sp2->setPreferredSize(sp1->getContentSize() * 1.2f);
sp2->setColor(Color3B::GREEN);
sp2->setContentSize(Size(100,100));
sp1->addChild(sp2);
// auto action3 = action->clone();
// sp2->runAction((FiniteTimeAction*)action3);
return true;
}

View File

@ -49,7 +49,7 @@ pre_build(${APP_NAME}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/cocos/scripting/lua-bindings/script/cocosdenshion ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/cocos/scripting/lua-bindings/script/network ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/cocos/scripting/lua-bindings/script/cocosbuilder ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/cocos/scripting/lua-bindings/script/cocostudio ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/cocos/scripting/lua-bindings/script/cocosstudio ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/cocos/scripting/lua-bindings/script/extension ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/cocos/scripting/lua-bindings/script/ui ${APP_BIN_DIR}/Resources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tests/cpp-tests/Resources ${APP_BIN_DIR}/Resources/res

View File

@ -33,7 +33,7 @@
"to": ""
},
{
"from": "../../../../cocos/scripting/lua-bindings/script/cocostudio",
"from": "../../../../cocos/scripting/lua-bindings/script/cocosstudio",
"to": ""
},
{

View File

@ -112,7 +112,7 @@
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\cocosdenshion" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\network" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\cocosbuilder" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\cocostudio" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\cocosstudio" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\extension" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\ui" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\external\lua\luasocket\*.lua" "$(ProjectDir)..\..\" /e /Y
@ -167,7 +167,7 @@ xcopy "$(ProjectDir)..\..\..\cpp-tests\Resources" "$(ProjectDir)..\..\res" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\cocosdenshion" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\network" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\cocosbuilder" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\cocostudio" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\cocosstudio" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\extension" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\cocos\scripting\lua-bindings\script\ui" "$(ProjectDir)..\..\" /e /Y
xcopy "$(ProjectDir)..\..\..\..\external\lua\luasocket\*.lua" "$(ProjectDir)..\..\" /e /Y