From 2cccadeaabef105257cdb48771dfd36e41accd3c Mon Sep 17 00:00:00 2001 From: boyu0 Date: Fri, 28 Jun 2013 10:12:55 +0800 Subject: [PATCH 01/13] closed #2339 refactor checkParams() in create_project.py, use OptionParser to parse the params --- tools/project-creator/create_project.py | 83 ++++++++++--------------- 1 file changed, 32 insertions(+), 51 deletions(-) diff --git a/tools/project-creator/create_project.py b/tools/project-creator/create_project.py index bd8a052d8b..af8f235cc5 100755 --- a/tools/project-creator/create_project.py +++ b/tools/project-creator/create_project.py @@ -5,16 +5,7 @@ # Author: WangZhe # define global variables -context = { -"language" : "undefined", -"src_project_name" : "undefined", -"src_package_name" : "undefined", -"dst_project_name" : "undeifned", -"dst_package_name" : "undefined", -"src_project_path" : "undefined", -"dst_project_path" : "undefined", -"script_dir" : "undefined", -} +context = {}.fromkeys(("language", "src_project_name", "src_package_name", "dst_project_name", "dst_package_name", "src_project_path", "dst_project_path", "script_dir")); platforms_list = [] # begin @@ -23,52 +14,42 @@ import os, os.path import json import shutil -def dumpUsage(): - print "Usage: create_project.py -project PROJECT_NAME -package PACKAGE_NAME -language PROGRAMING_LANGUAGE" - print "Options:" - print " -project PROJECT_NAME Project name, for example: MyGame" - print " -package PACKAGE_NAME Package name, for example: com.MyCompany.MyAwesomeGame" - print " -language PROGRAMING_LANGUAGE Major programing lanauge you want to used, should be [cpp | lua | javascript]" - print "" - print "Sample : ./create_project.py -project MyGame -package com.MyCompany.AwesomeGame -language javascript" - print "" - def checkParams(context): + from optparse import OptionParser + + # set the parser to parse input params + # the correspond variable name of "-x, --xxx" is parser.xxx + parser = OptionParser(usage="Usage: ./%prog -p PROJECT_NAME -k PACKAGE_NAME -l PROGRAMING_LANGUAGE\nSample : ./%prog -p MyGame -k com.MyCompany.AwesomeGame -l javascript") + parser.add_option("-p", "--project", metavar="PROJECT_NAME", help="Set a project name") + parser.add_option("-k", "--package", metavar="PACKAGE_NAME", help="Set a package name for project") + parser.add_option("-l", "--language", + metavar="PROGRAMMING_NAME", + type="choice", + choices=["cpp", "lua", "javascript"], + help="Major programing lanauge you want to used, should be [cpp | lua | javascript]") + + #parse the params + (opts, args) = parser.parse_args() + # generate our internal params context["script_dir"] = os.getcwd() + "/" global platforms_list - # invalid invoke, tell users how to input params - if len(sys.argv) < 7: - dumpUsage() - sys.exit() - - # find our params - for i in range(1, len(sys.argv)): - if "-project" == sys.argv[i]: - # read the next param as project_name - context["dst_project_name"] = sys.argv[i+1] - context["dst_project_path"] = os.getcwd() + "/../../projects/" + context["dst_project_name"] - elif "-package" == sys.argv[i]: - # read the next param as g_PackageName - context["dst_package_name"] = sys.argv[i+1] - elif "-language" == sys.argv[i]: - # choose a scripting language - context["language"] = sys.argv[i+1] - - # pinrt error log our required paramters are not ready - raise_error = False - if context["dst_project_name"] == "undefined": - print "Invalid -project parameter" - raise_error = True - if context["dst_package_name"] == "undefined": - print "Invalid -package parameter" - raise_error = True - if context["language"] == "undefined": - print "Invalid -language parameter" - raise_error = True - if raise_error != False: - sys.exit() + if opts.project: + context["dst_project_name"] = opts.project + context["dst_project_path"] = os.getcwd() + "/../../projects/" + context["dst_project_name"] + else: + parser.error("-p or --project is not specified") + + if opts.package: + context["dst_package_name"] = opts.package + else: + parser.error("-k or --package is not specified") + + if opts.language: + context["language"] = opts.language + else: + parser.error("-k or --package is not specified") # fill in src_project_name and src_package_name according to "language" if ("cpp" == context["language"]): From 2625847a741c469c5fd19e847cebad48b98fe792 Mon Sep 17 00:00:00 2001 From: boyu0 Date: Mon, 1 Jul 2013 01:04:01 +0800 Subject: [PATCH 02/13] closed #2339 refactor checkParams() in create_project.py, use OptionParser to parse the params --- tools/project-creator/create_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/project-creator/create_project.py b/tools/project-creator/create_project.py index af8f235cc5..59ea32122c 100755 --- a/tools/project-creator/create_project.py +++ b/tools/project-creator/create_project.py @@ -49,7 +49,7 @@ def checkParams(context): if opts.language: context["language"] = opts.language else: - parser.error("-k or --package is not specified") + parser.error("-l or --language is not specified") # fill in src_project_name and src_package_name according to "language" if ("cpp" == context["language"]): From c3e043ef2037cd0fc60dc95ff0f06461c017b458 Mon Sep 17 00:00:00 2001 From: Squallium Date: Sun, 30 Jun 2013 21:38:06 +0200 Subject: [PATCH 03/13] Added CocosDenshion dependency to libextension project --- extensions/proj.linux/.cproject | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/proj.linux/.cproject b/extensions/proj.linux/.cproject index a4aac1c02c..9918728542 100644 --- a/extensions/proj.linux/.cproject +++ b/extensions/proj.linux/.cproject @@ -40,6 +40,7 @@ + @@ -66,6 +67,7 @@ + @@ -133,6 +135,7 @@ + @@ -159,6 +162,7 @@ + @@ -218,6 +222,7 @@ + @@ -244,6 +249,7 @@ + @@ -312,6 +318,7 @@ + @@ -338,6 +345,7 @@ + From aeb9c5a45f04c7fe78ce776a9f9e9ef85cea2a50 Mon Sep 17 00:00:00 2001 From: Squallium Date: Sun, 30 Jun 2013 21:43:40 +0200 Subject: [PATCH 04/13] adding ccFPSImages entity as linked resource --- cocos2dx/proj.linux/.project | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cocos2dx/proj.linux/.project b/cocos2dx/proj.linux/.project index 65b43549e7..306260a9da 100755 --- a/cocos2dx/proj.linux/.project +++ b/cocos2dx/proj.linux/.project @@ -96,6 +96,16 @@ 1 PARENT-1-PROJECT_LOC/CCConfiguration.h + + ccFPSImages.c + 1 + PARENT-1-PROJECT_LOC/ccFPSImages.c + + + ccFPSImages.h + 1 + PARENT-1-PROJECT_LOC/ccFPSImages.h + CCDirector.cpp 1 From 1156ae4f60804ee4846ab3973efd4ae3fc2da4dc Mon Sep 17 00:00:00 2001 From: boyu0 Date: Mon, 1 Jul 2013 14:10:14 +0800 Subject: [PATCH 05/13] change the useage text --- tools/project-creator/create_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/project-creator/create_project.py b/tools/project-creator/create_project.py index 59ea32122c..5492cbeb2c 100755 --- a/tools/project-creator/create_project.py +++ b/tools/project-creator/create_project.py @@ -19,7 +19,7 @@ def checkParams(context): # set the parser to parse input params # the correspond variable name of "-x, --xxx" is parser.xxx - parser = OptionParser(usage="Usage: ./%prog -p PROJECT_NAME -k PACKAGE_NAME -l PROGRAMING_LANGUAGE\nSample : ./%prog -p MyGame -k com.MyCompany.AwesomeGame -l javascript") + parser = OptionParser(usage="Usage: ./%prog -p -k -l \nSample: ./%prog -p MyGame -k com.MyCompany.AwesomeGame -l javascript") parser.add_option("-p", "--project", metavar="PROJECT_NAME", help="Set a project name") parser.add_option("-k", "--package", metavar="PACKAGE_NAME", help="Set a package name for project") parser.add_option("-l", "--language", From 0d040bae76c7ec01d851b2cc089bb40ac69a4d44 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 1 Jul 2013 16:48:42 +0800 Subject: [PATCH 06/13] closed #2347: Macros like CC_KEYBOARD_SUPPORT should not be in header file. --- cocos2dx/CCDirector.cpp | 8 -------- cocos2dx/CCDirector.h | 6 ++---- cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp | 6 ------ cocos2dx/layers_scenes_transitions_nodes/CCLayer.h | 6 ++---- cocos2dx/platform/linux/CCEGLView.cpp | 4 ---- .../cocos2dx.xcodeproj/project.pbxproj.REMOVED.git-id | 2 +- 6 files changed, 5 insertions(+), 27 deletions(-) diff --git a/cocos2dx/CCDirector.cpp b/cocos2dx/CCDirector.cpp index 1780a60f10..5fdeaa9f39 100644 --- a/cocos2dx/CCDirector.cpp +++ b/cocos2dx/CCDirector.cpp @@ -64,9 +64,7 @@ THE SOFTWARE. #include "platform/CCImage.h" #include "CCEGLView.h" #include "CCConfiguration.h" -#ifdef CC_KEYBOARD_SUPPORT #include "keyboard_dispatcher/CCKeyboardDispatcher.h" -#endif /** @@ -154,10 +152,8 @@ bool Director::init(void) _touchDispatcher = new TouchDispatcher(); _touchDispatcher->init(); -#ifdef CC_KEYBOARD_SUPPORT // KeyboardDispatcher _keyboardDispatcher = new KeyboardDispatcher(); -#endif // KeypadDispatcher _keypadDispatcher = new KeypadDispatcher(); @@ -185,9 +181,7 @@ Director::~Director(void) CC_SAFE_RELEASE(_scheduler); CC_SAFE_RELEASE(_actionManager); CC_SAFE_RELEASE(_touchDispatcher); -#ifdef CC_KEYBOARD_SUPPORT CC_SAFE_RELEASE(_keyboardDispatcher); -#endif CC_SAFE_RELEASE(_keypadDispatcher); CC_SAFE_DELETE(_accelerometer); @@ -1004,7 +998,6 @@ TouchDispatcher* Director::getTouchDispatcher() return _touchDispatcher; } -#ifdef CC_KEYBOARD_SUPPORT void Director::setKeyboardDispatcher(KeyboardDispatcher* pKeyboardDispatcher) { CC_SAFE_RETAIN(pKeyboardDispatcher); @@ -1016,7 +1009,6 @@ KeyboardDispatcher* Director::getKeyboardDispatcher() { return _keyboardDispatcher; } -#endif void Director::setKeypadDispatcher(KeypadDispatcher* pKeypadDispatcher) { diff --git a/cocos2dx/CCDirector.h b/cocos2dx/CCDirector.h index 0a1d642d00..88b05e95f6 100644 --- a/cocos2dx/CCDirector.h +++ b/cocos2dx/CCDirector.h @@ -71,9 +71,7 @@ class Node; class Scheduler; class ActionManager; class TouchDispatcher; -#ifdef CC_KEYBOARD_SUPPORT class KeyboardDispatcher; -#endif class KeypadDispatcher; class Accelerometer; @@ -328,12 +326,12 @@ public: */ CC_PROPERTY(TouchDispatcher*, _touchDispatcher, TouchDispatcher); -#ifdef CC_KEYBOARD_SUPPORT /** KeyboardDispatcher associated with this director + @note Supported on Mac and Linux only now. @since v?.? */ CC_PROPERTY(KeyboardDispatcher*, _keyboardDispatcher, KeyboardDispatcher); -#endif + /** KeypadDispatcher associated with this director @since v2.0 */ diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp index 00a544dc7d..d6950a23f7 100644 --- a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp +++ b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp @@ -38,9 +38,7 @@ THE SOFTWARE. #include "support/TransformUtils.h" // extern #include "kazmath/GL/matrix.h" -#ifdef CC_KEYBOARD_SUPPORT #include "keyboard_dispatcher/CCKeyboardDispatcher.h" -#endif NS_CC_BEGIN @@ -48,9 +46,7 @@ NS_CC_BEGIN Layer::Layer() : _touchEnabled(false) , _accelerometerEnabled(false) -#ifdef CC_KEYBOARD_SUPPORT , _keyboardEnabled(false) -#endif , _keypadEnabled(false) , _scriptTouchHandlerEntry(NULL) , _scriptKeypadHandlerEntry(NULL) @@ -279,7 +275,6 @@ void Layer::unregisterScriptAccelerateHandler(void) CC_SAFE_RELEASE_NULL(_scriptAccelerateHandlerEntry); } -#ifdef CC_KEYBOARD_SUPPORT /// isKeyboardEnabled getter bool Layer::isKeyboardEnabled() { @@ -305,7 +300,6 @@ void Layer::setKeyboardEnabled(bool enabled) } } } -#endif /// isKeypadEnabled getter bool Layer::isKeypadEnabled() diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h index 54182869f9..9b5a17a375 100644 --- a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h +++ b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h @@ -134,12 +134,12 @@ public: You can enable / disable accelerometer events with this property. it's new in cocos2d-x */ -#ifdef CC_KEYBOARD_SUPPORT + virtual bool isKeyboardEnabled(); virtual void setKeyboardEnabled(bool value); virtual void keyPressed(int keyCode) {}; virtual void keyReleased(int keyCode) {}; -#endif + virtual bool isKeypadEnabled(); virtual void setKeypadEnabled(bool value); @@ -157,9 +157,7 @@ public: protected: bool _touchEnabled; bool _accelerometerEnabled; -#ifdef CC_KEYBOARD_SUPPORT bool _keyboardEnabled; -#endif bool _keypadEnabled; private: diff --git a/cocos2dx/platform/linux/CCEGLView.cpp b/cocos2dx/platform/linux/CCEGLView.cpp index a195d56edc..2b9b497581 100644 --- a/cocos2dx/platform/linux/CCEGLView.cpp +++ b/cocos2dx/platform/linux/CCEGLView.cpp @@ -13,9 +13,7 @@ #include "touch_dispatcher/CCTouch.h" #include "touch_dispatcher/CCTouchDispatcher.h" #include "text_input_node/CCIMEDispatcher.h" -#ifdef CC_KEYBOARD_SUPPORT #include "keyboard_dispatcher/CCKeyboardDispatcher.h" -#endif PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT = NULL; PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT = NULL; @@ -157,7 +155,6 @@ int closeEventHandle() { return GL_TRUE; } -#ifdef CC_KEYBOARD_SUPPORT void GLFWCALL keyboardEventHandle(int keyCode, int action) { KeyboardDispatcher *kbDisp = Director::sharedDirector()->getKeyboardDispatcher(); @@ -172,7 +169,6 @@ void GLFWCALL keyboardEventHandle(int keyCode, int action) break; } } -#endif void EGLView::setFrameSize(float width, float height) { diff --git a/cocos2dx/proj.ios/cocos2dx.xcodeproj/project.pbxproj.REMOVED.git-id b/cocos2dx/proj.ios/cocos2dx.xcodeproj/project.pbxproj.REMOVED.git-id index 8228a6509a..ac1c60fb66 100644 --- a/cocos2dx/proj.ios/cocos2dx.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/cocos2dx/proj.ios/cocos2dx.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -0bfb5fd7085d3486aae4789b60c34035491f0338 \ No newline at end of file +d668f142f61f02f102e45e6839b7df302d545b79 \ No newline at end of file From cedfd6bbdc8bb8853233c15e91145b8f578a56a5 Mon Sep 17 00:00:00 2001 From: Peter Young Date: Mon, 1 Jul 2013 16:51:31 +0800 Subject: [PATCH 07/13] [plugin-x][Umeng] fix not sending Event when paramMap is nil --- plugin/plugins/umeng/proj.ios/AnalyticsUmeng.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/plugins/umeng/proj.ios/AnalyticsUmeng.m b/plugin/plugins/umeng/proj.ios/AnalyticsUmeng.m index 7805586e6b..9260004579 100644 --- a/plugin/plugins/umeng/proj.ios/AnalyticsUmeng.m +++ b/plugin/plugins/umeng/proj.ios/AnalyticsUmeng.m @@ -74,7 +74,11 @@ THE SOFTWARE. - (void) logEvent: (NSString*) eventId withParam:(NSMutableDictionary*) paramMap { OUTPUT_LOG(@"Umeng logEventWithParam invoked"); - [MobClick event:eventId attributes:paramMap]; + if (paramMap != nil) { + [MobClick event:eventId attributes:paramMap]; + } else { + [MobClick event:eventId]; + } } - (void) logTimedEventBegin: (NSString*) eventId From 728f6cd4849de0077fd46beb047943c5fbfb876e Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 1 Jul 2013 16:56:22 +0800 Subject: [PATCH 08/13] Update AUTHORS [ci skip] --- AUTHORS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index b572d20555..d048693925 100644 --- a/AUTHORS +++ b/AUTHORS @@ -14,7 +14,8 @@ Developers: Javascript Binding and testjs Squallium - Added ccFPSImages entity as linked resource on linux eclipse project setting + Added ccFPSImages entity as linked resource on linux eclipse project setting. + Added CocosDenshion dependency to libextension project for eclipse project of linux. longlene Improve android project creation script From fd72f87b7f9b35775afed7c2f0d174d68e372257 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 1 Jul 2013 17:13:58 +0800 Subject: [PATCH 09/13] Update AUTHORS [ci skip] --- AUTHORS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index d048693925..1fb0ec6e9e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -366,7 +366,8 @@ Developers: Refactoring emscripten building script. Peter Young (young40) - Implements setVisible() for CCEditBox + Implements setVisible() for CCEditBox. + Fixing a bug that event will not be sent to server when paramMap parameter of logEvent function is nil in plugin-x. csy1988525 Fixing a bug about display result is wrong when invoking CCControlButton:: setHighlighted. From 1ae41d07aa36dc206013fe9faf81b88700edc784 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 1 Jul 2013 17:15:49 +0800 Subject: [PATCH 10/13] closed #2347: Keyboard is supported from cocos2d-x 3.0. --- cocos2dx/CCDirector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2dx/CCDirector.h b/cocos2dx/CCDirector.h index 88b05e95f6..8f44a6a862 100644 --- a/cocos2dx/CCDirector.h +++ b/cocos2dx/CCDirector.h @@ -328,7 +328,7 @@ public: /** KeyboardDispatcher associated with this director @note Supported on Mac and Linux only now. - @since v?.? + @since v3.0 */ CC_PROPERTY(KeyboardDispatcher*, _keyboardDispatcher, KeyboardDispatcher); From c2ce65a32b3b9b768eaadf4b016956d3ccd6b03c Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 1 Jul 2013 17:35:51 +0800 Subject: [PATCH 11/13] issue #2347: Compiled ok for android, marmalade and nacl, windows needs to be tested too. --- cocos2dx/Android.mk | 1 + cocos2dx/proj.marmalade/cocos2dx.mkf | 5 +++++ cocos2dx/proj.nacl/Makefile | 1 + 3 files changed, 7 insertions(+) diff --git a/cocos2dx/Android.mk b/cocos2dx/Android.mk index cc6ed94737..fae21b44c0 100644 --- a/cocos2dx/Android.mk +++ b/cocos2dx/Android.mk @@ -59,6 +59,7 @@ kazmath/src/GL/mat4stack.c \ kazmath/src/GL/matrix.c \ keypad_dispatcher/CCKeypadDelegate.cpp \ keypad_dispatcher/CCKeypadDispatcher.cpp \ +keyboard_dispatcher/CCKeyboardDispatcher.cpp \ label_nodes/CCLabelAtlas.cpp \ label_nodes/CCLabelBMFont.cpp \ label_nodes/CCLabelTTF.cpp \ diff --git a/cocos2dx/proj.marmalade/cocos2dx.mkf b/cocos2dx/proj.marmalade/cocos2dx.mkf index 8f5a075930..c5a696ef41 100644 --- a/cocos2dx/proj.marmalade/cocos2dx.mkf +++ b/cocos2dx/proj.marmalade/cocos2dx.mkf @@ -109,6 +109,11 @@ files "*.h" "*.cpp" + ("../keyboard_dispatcher") + [keyboard_dispatcher] + "*.h" + "*.cpp" + ("../label_nodes") [label_nodes] "*.h" diff --git a/cocos2dx/proj.nacl/Makefile b/cocos2dx/proj.nacl/Makefile index 1b625891b1..5150410a89 100644 --- a/cocos2dx/proj.nacl/Makefile +++ b/cocos2dx/proj.nacl/Makefile @@ -37,6 +37,7 @@ SOURCES = ../actions/CCAction.cpp \ ../effects/CCGrid.cpp \ ../keypad_dispatcher/CCKeypadDelegate.cpp \ ../keypad_dispatcher/CCKeypadDispatcher.cpp \ +../keyboard_dispatcher/CCKeyboardDispatcher.cpp \ ../label_nodes/CCLabelAtlas.cpp \ ../label_nodes/CCLabelBMFont.cpp \ ../label_nodes/CCLabelTTF.cpp \ From 4e5ee103ec2f3550ac0f84902306f3e93c7a51f7 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 1 Jul 2013 18:22:09 +0800 Subject: [PATCH 12/13] Fixing errors on windows. --- .../CCKeyboardDispatcher.cpp | 4 +- .../CCLayer.cpp | 4 +- cocos2dx/proj.win32/cocos2d.vcxproj | 2 + cocos2dx/proj.win32/cocos2d.vcxproj.filters | 1931 +++++++++-------- 4 files changed, 976 insertions(+), 965 deletions(-) diff --git a/cocos2dx/keyboard_dispatcher/CCKeyboardDispatcher.cpp b/cocos2dx/keyboard_dispatcher/CCKeyboardDispatcher.cpp index be57e9477b..fbb089d176 100644 --- a/cocos2dx/keyboard_dispatcher/CCKeyboardDispatcher.cpp +++ b/cocos2dx/keyboard_dispatcher/CCKeyboardDispatcher.cpp @@ -33,8 +33,8 @@ NS_CC_BEGIN // //------------------------------------------------------------------ KeyboardDispatcher::KeyboardDispatcher() -: _keyPressDelegate(NULL) -, _keyReleaseDelegate(NULL) +: _keyPressDelegate(nullptr) +, _keyReleaseDelegate(nullptr) { } diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp index d6950a23f7..37b874dd4e 100644 --- a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp +++ b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.cpp @@ -295,8 +295,8 @@ void Layer::setKeyboardEnabled(bool enabled) } else { - pDirector->getKeyboardDispatcher()->setKeyPressDelegate(NULL); - pDirector->getKeyboardDispatcher()->setKeyReleaseDelegate(NULL); + pDirector->getKeyboardDispatcher()->setKeyPressDelegate(nullptr); + pDirector->getKeyboardDispatcher()->setKeyReleaseDelegate(nullptr); } } } diff --git a/cocos2dx/proj.win32/cocos2d.vcxproj b/cocos2dx/proj.win32/cocos2d.vcxproj index 014fcb908c..d8b0573358 100644 --- a/cocos2dx/proj.win32/cocos2d.vcxproj +++ b/cocos2dx/proj.win32/cocos2d.vcxproj @@ -172,6 +172,7 @@ xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir + @@ -312,6 +313,7 @@ xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir + diff --git a/cocos2dx/proj.win32/cocos2d.vcxproj.filters b/cocos2dx/proj.win32/cocos2d.vcxproj.filters index 380ced350c..b0d6e07b4f 100644 --- a/cocos2dx/proj.win32/cocos2d.vcxproj.filters +++ b/cocos2dx/proj.win32/cocos2d.vcxproj.filters @@ -1,962 +1,971 @@ - - - - - {cc64f5ad-2234-494c-9c51-b7a20c8887aa} - - - {aec8225f-81a7-4213-b97b-7004d5535398} - - - {736cf4ab-e0d6-40ba-912a-b062d28d318a} - - - {1c7c61b8-3d36-4ba0-a87c-457eb4c782d0} - - - {0b3a64bd-79fa-476a-a461-6b97e5072453} - - - {e455af5e-da09-4f41-b79f-df4dd311820d} - - - {206bd96b-f80e-4722-8675-d7c6ff9b3639} - - - {075492ba-08bc-404c-92da-32029797a600} - - - {41abe422-1602-4fe0-ac1c-6b04a14c1abb} - - - {8bf0f517-2ac3-4fc3-a1ad-999d9ea103cd} - - - {926fc31c-8742-4984-9940-c972dd02fc8a} - - - {9428f8e6-4ce3-4596-b8af-14d70b7c5b5d} - - - {755e5282-111e-46a5-9169-7c12b37f5ffc} - - - {d94bbf20-8de9-49a7-ae20-6a1140cf633b} - - - {4a64789e-cc8d-4f84-a869-e6dae2e0d58c} - - - {bb98a889-9a48-4e31-af2f-117f14da388a} - - - {fdea327e-b905-47db-8c33-b70d7866166b} - - - {46c8d130-b8b5-47f5-a063-ca700e1c32cc} - - - {f2671200-b2d8-4d2e-9728-06719cf6f835} - - - {eaa16c9b-dfbc-4a37-8e3e-e961d9ca1d1a} - - - {3c91932f-7667-4049-b9bd-caac4c8eab15} - - - {535c04b0-fe2b-44c9-9a8c-9029e2b6de5c} - - - {5b082c5c-d396-43ca-b3b1-997d0f6247d0} - - - {7751500e-ac9e-4604-a96d-670b30b7d8bd} - - - {b38113b1-3d59-4f6e-ac5a-f43921f6ed09} - - - {569c49c9-27eb-456e-a3f4-9f403e28a3a1} - - - {191b3e94-47dc-4054-b1cb-bf145d281521} - - - {a91a4cc0-41e6-43e9-80c0-2c9101924386} - - - {e278b354-1e41-4e92-95b3-7f661ba67140} - - - {163895ae-8a8e-46bf-bdf2-98bb2c1347fc} - - - {1179d205-d065-49f0-8457-bc4c3f1d0cb3} - - - {cc25bb83-527d-4218-8d68-ebf963ce7698} - - - {c45b97e8-fa1f-4e58-8ec5-d46371c2dd26} - - - {caa78ce0-9b58-4314-b117-1acae278691e} - - - - - base_nodes - - - base_nodes - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - effects - - - effects - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - label_nodes - - - label_nodes - - - label_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - menu_nodes - - - menu_nodes - - - misc_nodes - - - misc_nodes - - - misc_nodes - - - particle_nodes - - - particle_nodes - - - particle_nodes - - - particle_nodes - - - platform - - - platform - - - platform - - - platform - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - support - - - support - - - support - - - support - - - support - - - support - - - support - - - support\data_support - - - support\image_support - - - support\zip_support - - - support\zip_support - - - support\zip_support - - - textures - - - textures - - - textures - - - textures - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - touch_dispatcher - - - touch_dispatcher - - - touch_dispatcher - - - keypad_dispatcher - - - keypad_dispatcher - - - text_input_node - - - text_input_node - - - script_support - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src\GL - - - kazmath\src\GL - - - - - - - - draw_nodes - - - draw_nodes - - - misc_nodes - - - shaders - - - shaders - - - shaders - - - shaders - - - platform\win32 - - - platform - - - platform - - - platform\win32 - - - support - - - support\user_default - - - support\tinyxml2 - - - cocoa - - - - textures - - - support\component - - - support\component - - - - - base_nodes - - - base_nodes - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - effects - - - effects - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - include - - - include - - - include - - - include - - - include - - - include - - - label_nodes - - - label_nodes - - - label_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - menu_nodes - - - menu_nodes - - - misc_nodes - - - misc_nodes - - - misc_nodes - - - particle_nodes - - - particle_nodes - - - particle_nodes - - - particle_nodes - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - support - - - support - - - support - - - support - - - support - - - support - - - support - - - support\data_support - - - support\data_support - - - support\data_support - - - support\image_support - - - support\zip_support - - - support\zip_support - - - support\zip_support - - - textures - - - textures - - - textures - - - textures - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - touch_dispatcher - - - touch_dispatcher - - - touch_dispatcher - - - touch_dispatcher - - - keypad_dispatcher - - - keypad_dispatcher - - - text_input_node - - - text_input_node - - - text_input_node - - - script_support - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath\GL - - - kazmath\include\kazmath\GL - - - - - - - draw_nodes - - - draw_nodes - - - misc_nodes - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - platform\win32 - - - support - - - support\user_default - - - support\tinyxml2 - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - textures - - - - support\component - - - support\component - - + + + + + {cc64f5ad-2234-494c-9c51-b7a20c8887aa} + + + {aec8225f-81a7-4213-b97b-7004d5535398} + + + {736cf4ab-e0d6-40ba-912a-b062d28d318a} + + + {1c7c61b8-3d36-4ba0-a87c-457eb4c782d0} + + + {0b3a64bd-79fa-476a-a461-6b97e5072453} + + + {e455af5e-da09-4f41-b79f-df4dd311820d} + + + {206bd96b-f80e-4722-8675-d7c6ff9b3639} + + + {075492ba-08bc-404c-92da-32029797a600} + + + {41abe422-1602-4fe0-ac1c-6b04a14c1abb} + + + {8bf0f517-2ac3-4fc3-a1ad-999d9ea103cd} + + + {926fc31c-8742-4984-9940-c972dd02fc8a} + + + {9428f8e6-4ce3-4596-b8af-14d70b7c5b5d} + + + {755e5282-111e-46a5-9169-7c12b37f5ffc} + + + {d94bbf20-8de9-49a7-ae20-6a1140cf633b} + + + {4a64789e-cc8d-4f84-a869-e6dae2e0d58c} + + + {bb98a889-9a48-4e31-af2f-117f14da388a} + + + {fdea327e-b905-47db-8c33-b70d7866166b} + + + {46c8d130-b8b5-47f5-a063-ca700e1c32cc} + + + {f2671200-b2d8-4d2e-9728-06719cf6f835} + + + {eaa16c9b-dfbc-4a37-8e3e-e961d9ca1d1a} + + + {3c91932f-7667-4049-b9bd-caac4c8eab15} + + + {535c04b0-fe2b-44c9-9a8c-9029e2b6de5c} + + + {5b082c5c-d396-43ca-b3b1-997d0f6247d0} + + + {7751500e-ac9e-4604-a96d-670b30b7d8bd} + + + {b38113b1-3d59-4f6e-ac5a-f43921f6ed09} + + + {569c49c9-27eb-456e-a3f4-9f403e28a3a1} + + + {191b3e94-47dc-4054-b1cb-bf145d281521} + + + {a91a4cc0-41e6-43e9-80c0-2c9101924386} + + + {e278b354-1e41-4e92-95b3-7f661ba67140} + + + {163895ae-8a8e-46bf-bdf2-98bb2c1347fc} + + + {1179d205-d065-49f0-8457-bc4c3f1d0cb3} + + + {cc25bb83-527d-4218-8d68-ebf963ce7698} + + + {c45b97e8-fa1f-4e58-8ec5-d46371c2dd26} + + + {caa78ce0-9b58-4314-b117-1acae278691e} + + + {e7134ba0-4220-4dd1-b120-3533883394ac} + + + + + base_nodes + + + base_nodes + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + effects + + + effects + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + label_nodes + + + label_nodes + + + label_nodes + + + layers_scenes_transitions_nodes + + + layers_scenes_transitions_nodes + + + layers_scenes_transitions_nodes + + + layers_scenes_transitions_nodes + + + layers_scenes_transitions_nodes + + + menu_nodes + + + menu_nodes + + + misc_nodes + + + misc_nodes + + + misc_nodes + + + particle_nodes + + + particle_nodes + + + particle_nodes + + + particle_nodes + + + platform + + + platform + + + platform + + + platform + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + sprite_nodes + + + sprite_nodes + + + sprite_nodes + + + sprite_nodes + + + sprite_nodes + + + sprite_nodes + + + support + + + support + + + support + + + support + + + support + + + support + + + support + + + support\data_support + + + support\image_support + + + support\zip_support + + + support\zip_support + + + support\zip_support + + + textures + + + textures + + + textures + + + textures + + + tilemap_parallax_nodes + + + tilemap_parallax_nodes + + + tilemap_parallax_nodes + + + tilemap_parallax_nodes + + + tilemap_parallax_nodes + + + tilemap_parallax_nodes + + + touch_dispatcher + + + touch_dispatcher + + + touch_dispatcher + + + keypad_dispatcher + + + keypad_dispatcher + + + text_input_node + + + text_input_node + + + script_support + + + kazmath\src + + + kazmath\src + + + kazmath\src + + + kazmath\src + + + kazmath\src + + + kazmath\src + + + kazmath\src + + + kazmath\src + + + kazmath\src + + + kazmath\src + + + kazmath\src + + + kazmath\src\GL + + + kazmath\src\GL + + + + + + + + draw_nodes + + + draw_nodes + + + misc_nodes + + + shaders + + + shaders + + + shaders + + + shaders + + + platform\win32 + + + platform + + + platform + + + platform\win32 + + + support + + + support\user_default + + + support\tinyxml2 + + + cocoa + + + + textures + + + support\component + + + support\component + + + keyboard_dispatcher + + + + + base_nodes + + + base_nodes + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + effects + + + effects + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + actions + + + include + + + include + + + include + + + include + + + include + + + include + + + label_nodes + + + label_nodes + + + label_nodes + + + layers_scenes_transitions_nodes + + + layers_scenes_transitions_nodes + + + layers_scenes_transitions_nodes + + + layers_scenes_transitions_nodes + + + layers_scenes_transitions_nodes + + + menu_nodes + + + menu_nodes + + + misc_nodes + + + misc_nodes + + + misc_nodes + + + particle_nodes + + + particle_nodes + + + particle_nodes + + + particle_nodes + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + platform\win32 + + + sprite_nodes + + + sprite_nodes + + + sprite_nodes + + + sprite_nodes + + + sprite_nodes + + + sprite_nodes + + + support + + + support + + + support + + + support + + + support + + + support + + + support + + + support\data_support + + + support\data_support + + + support\data_support + + + support\image_support + + + support\zip_support + + + support\zip_support + + + support\zip_support + + + textures + + + textures + + + textures + + + textures + + + tilemap_parallax_nodes + + + tilemap_parallax_nodes + + + tilemap_parallax_nodes + + + tilemap_parallax_nodes + + + tilemap_parallax_nodes + + + tilemap_parallax_nodes + + + touch_dispatcher + + + touch_dispatcher + + + touch_dispatcher + + + touch_dispatcher + + + keypad_dispatcher + + + keypad_dispatcher + + + text_input_node + + + text_input_node + + + text_input_node + + + script_support + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath + + + kazmath\include\kazmath\GL + + + kazmath\include\kazmath\GL + + + + + + + draw_nodes + + + draw_nodes + + + misc_nodes + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + shaders + + + platform\win32 + + + support + + + support\user_default + + + support\tinyxml2 + + + cocoa + + + cocoa + + + cocoa + + + cocoa + + + textures + + + + support\component + + + support\component + + + keyboard_dispatcher + + \ No newline at end of file From 34871d47af02ee54cd42e83ee38c2140ada363ad Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 1 Jul 2013 22:34:57 +0800 Subject: [PATCH 13/13] close #2347: Updating tools/tojs/cocos2dx.ini. --- tools/tojs/cocos2dx.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tojs/cocos2dx.ini b/tools/tojs/cocos2dx.ini index 8654839dc8..14ec24745a 100644 --- a/tools/tojs/cocos2dx.ini +++ b/tools/tojs/cocos2dx.ini @@ -44,7 +44,7 @@ skip = Node::[convertToWindowSpace ^setPosition$ getGrid setGLServerState descri LayerColor::[getBlendFunc setBlendFunc], ParticleSystem::[getBlendFunc setBlendFunc], DrawNode::[getBlendFunc setBlendFunc drawPolygon], - Director::[getAccelerometer getKeypadDispatcher getTouchDispatcher setWatcherCallbackFun getOpenGLView getProjection getClassTypeInfo], + Director::[getAccelerometer (g|s)et.*Dispatcher getOpenGLView getProjection getClassTypeInfo], Layer.*::[didAccelerate (g|s)etBlendFunc], Menu.*::[.*Target getSubItems create initWithItems alignItemsInRows alignItemsInColumns], MenuItem.*::[create setCallback initWithCallback],