From d96077a68cd0ebc9cbf3c40bc3293a4b8baa96e1 Mon Sep 17 00:00:00 2001 From: Nan Wang Date: Fri, 19 May 2017 10:26:05 +0800 Subject: [PATCH 01/15] update travis branch --- native/.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/.travis.yml b/native/.travis.yml index 354ff1ba97..8fd1db49c4 100644 --- a/native/.travis.yml +++ b/native/.travis.yml @@ -8,7 +8,7 @@ before_install: - tools/travis-scripts/before-install.sh branches: only: - - develop + - v1.5 env: global: - secure: bUrk522Qw5Mc3SfDXHZtJ/aF9QbLXYDnUVSOJXt1wUB1d8xAQphTcZ1ARNYu7I5m3ZXqRfzTS4POOT58qeS3sYPpJ8urWW18hgX3I/dmsL1WJXmwnOV+0J3xLt6AT3ttqj7/emaf0xxuBvZ0szyRz0rU4wprtWftWMFiUrsF8G1an2Qa/g/f5LhilnDiKAqFdHMkn0ogaggL0PbgliHeHo7SEOfSF2gQaSIBta7jzE/BEZZ3R4AuReB3oNDwxr+1E4BpPaGO1lMLzdr8MAjWBGVLBRlpVDihgFTTmdka8UYasjEWDs6GbSjJRsTZQkluOo+1UylSiLn5o1tnWMqINo5DDaayBSKWRV/x+Sx+KMG221BwHLGFHrhEm8Jwc3g5IBiFrc9Xn/PAoCL3Zi/m0m8Y/TVIlA2nWuU0jeMZYXOb0ALCplAQMrG/Yt7euzgSjZ9iPvO7HO8BkaRkUxafcp6svWyMedNeDczG6liLSquJak+XIbOpWCOW+KVxc2S2Unz37MSOQR/aB9dJ8fKI/4e3LCdYrSKW9MSKAz9BSYA2IK2F8Fgr6zY3IPTANQCi6o8i/N54wsmpY17uvzqNDGuag5m/FkNpFWVQUy/TdONanXV6m1jvREaxtDHucSnP3olmvx6pi1awRspDfRmcILK08yvul+yLol0nQwenlx0= From a4e60ad6bb5b5ad09aa48076b4b75e71094e7cd0 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 19 May 2017 10:29:52 +0800 Subject: [PATCH 02/15] fix pauseAllEventListenersForTarget couldn't work while dispatching touch event. --- native/cocos/2d/CCNode.cpp | 2 ++ native/cocos/base/CCEventDispatcher.cpp | 4 ++-- native/cocos/base/CCEventListener.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/native/cocos/2d/CCNode.cpp b/native/cocos/2d/CCNode.cpp index ad60e2aa07..b26bdec58d 100644 --- a/native/cocos/2d/CCNode.cpp +++ b/native/cocos/2d/CCNode.cpp @@ -207,6 +207,8 @@ void Node::cleanup() this->stopAllActions(); // timers this->unscheduleAllCallbacks(); + + _eventDispatcher->removeEventListenersForTarget(this); for( const auto &child: _children) child->cleanup(); diff --git a/native/cocos/base/CCEventDispatcher.cpp b/native/cocos/base/CCEventDispatcher.cpp index 5757843afe..cfb4f981ef 100644 --- a/native/cocos/base/CCEventDispatcher.cpp +++ b/native/cocos/base/CCEventDispatcher.cpp @@ -477,9 +477,9 @@ void EventDispatcher::forceAddEventListener(EventListener* listener) associateNodeAndEventListener(node, listener); - if (node->isRunning()) + if (!node->isRunning() && listener->isPaused()) { - resumeEventListenersForTarget(node); + listener->setPaused(true); } } else diff --git a/native/cocos/base/CCEventListener.cpp b/native/cocos/base/CCEventListener.cpp index 02fdd362e5..929938e3be 100644 --- a/native/cocos/base/CCEventListener.cpp +++ b/native/cocos/base/CCEventListener.cpp @@ -41,7 +41,7 @@ bool EventListener::init(Type t, const ListenerID& listenerID, const std::functi _type = t; _listenerID = listenerID; _isRegistered = false; - _paused = true; + _paused = false; _isEnabled = true; return true; From 6c4b055371771f2a90b30b93816940e878475fe2 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 19 May 2017 11:02:02 +0800 Subject: [PATCH 03/15] remove unused checking --- native/cocos/base/CCEventDispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/cocos/base/CCEventDispatcher.cpp b/native/cocos/base/CCEventDispatcher.cpp index cfb4f981ef..455cf600ad 100644 --- a/native/cocos/base/CCEventDispatcher.cpp +++ b/native/cocos/base/CCEventDispatcher.cpp @@ -477,7 +477,7 @@ void EventDispatcher::forceAddEventListener(EventListener* listener) associateNodeAndEventListener(node, listener); - if (!node->isRunning() && listener->isPaused()) + if (!node->isRunning()) { listener->setPaused(true); } From 298b39d64c1fced8c12d84201c98c7ef7aad2627 Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Fri, 19 May 2017 11:31:58 +0800 Subject: [PATCH 04/15] update external config.json --- native/external/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/external/config.json b/native/external/config.json index a52026aab4..1eb81ad94d 100644 --- a/native/external/config.json +++ b/native/external/config.json @@ -1,5 +1,5 @@ { - "version": "v3-deps-27", + "version": "v3-deps-28", "zip_file_size": "74337963", "repo_name": "cocos2d-x-lite-external", "repo_parent": "https://github.com/cocos-creator/" From 4edd40c5b4aa8d284e36b79a98165f7381d8f196 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 22 May 2017 09:45:49 +0800 Subject: [PATCH 05/15] Call 'update' method in 'stop/stopAll' to cleanup immediately --- native/cocos/audio/apple/AudioEngine-inl.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/native/cocos/audio/apple/AudioEngine-inl.mm b/native/cocos/audio/apple/AudioEngine-inl.mm index 72936d1684..cd29c0b54f 100644 --- a/native/cocos/audio/apple/AudioEngine-inl.mm +++ b/native/cocos/audio/apple/AudioEngine-inl.mm @@ -504,6 +504,9 @@ void AudioEngineImpl::stop(int audioID) //Note: Don't set the flag to false here, it should be set in 'update' function. // Otherwise, the state got from alSourceState may be wrong // _alSourceUsed[player->_alSource] = false; + + // Call 'update' method to cleanup immediately since the schedule may be cancelled without any notification. + update(0.0f); } void AudioEngineImpl::stopAll() @@ -518,6 +521,9 @@ void AudioEngineImpl::stopAll() // { // _alSourceUsed[_alSources[index]] = false; // } + + // Call 'update' method to cleanup immediately since the schedule may be cancelled without any notification. + update(0.0f); } float AudioEngineImpl::getDuration(int audioID) From f535ec9b25c57cbe03e9386e5be172325d85196e Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 22 May 2017 09:48:11 +0800 Subject: [PATCH 06/15] [win32] Call 'update' method in 'stop/stopAll' to cleanup immediately --- native/cocos/audio/win32/AudioEngine-win32.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/native/cocos/audio/win32/AudioEngine-win32.cpp b/native/cocos/audio/win32/AudioEngine-win32.cpp index c3d8b50b52..99422d35a8 100644 --- a/native/cocos/audio/win32/AudioEngine-win32.cpp +++ b/native/cocos/audio/win32/AudioEngine-win32.cpp @@ -360,6 +360,9 @@ void AudioEngineImpl::stop(int audioID) //Note: Don't set the flag to false here, it should be set in 'update' function. // Otherwise, the state got from alSourceState may be wrong // _alSourceUsed[player->_alSource] = false; + + // Call 'update' method to cleanup immediately since the schedule may be cancelled without any notification. + update(0.0f); } void AudioEngineImpl::stopAll() @@ -374,6 +377,9 @@ void AudioEngineImpl::stopAll() // { // _alSourceUsed[_alSources[index]] = false; // } + + // Call 'update' method to cleanup immediately since the schedule may be cancelled without any notification. + update(0.0f); } float AudioEngineImpl::getDuration(int audioID) From f3e354b850c931611a6c6919f119c2d4b029c681 Mon Sep 17 00:00:00 2001 From: pandamicro Date: Mon, 22 May 2017 14:09:06 +0800 Subject: [PATCH 07/15] Sync serious XMLHTTP leak fix --- .../js-bindings/manual/cocos2d_specifics.cpp | 8 +-- .../manual/network/XMLHTTPRequest.cpp | 68 +++++++------------ .../manual/network/XMLHTTPRequest.h | 1 + 3 files changed, 27 insertions(+), 50 deletions(-) diff --git a/native/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp b/native/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp index 50529fd09e..6e926999a9 100644 --- a/native/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp +++ b/native/cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp @@ -579,7 +579,7 @@ void js_add_object_root(JS::HandleValue target) } JS::RootedObject root(cx); - get_or_create_js_obj(cx, jsbObj, "jsb._root", &root); + get_or_create_js_obj(cx, jsbObj, "_root", &root); JS::RootedValue valRoot(cx, OBJECT_TO_JSVAL(root)); JS::RootedValue retval(cx); @@ -600,12 +600,6 @@ void js_remove_object_root(JS::HandleValue target) JSContext *cx = engine->getGlobalContext(); JS::RootedObject global(cx, engine->getGlobalObject()); JSAutoCompartment(cx, global); - JS::RootedObject targetObj(cx, target.toObjectOrNull()); - js_proxy_t *pTarget = jsb_get_js_proxy(targetObj); - if (!pTarget) - { - return; - } JS::RootedObject jsbObj(cx); get_or_create_js_obj(cx, global, "jsb", &jsbObj); diff --git a/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.cpp b/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.cpp index 0368965746..2d1237da5c 100644 --- a/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.cpp +++ b/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.cpp @@ -248,6 +248,7 @@ void MinXmlHttpRequest::handle_requestResponse(cocos2d::network::HttpClient *sen callback.set(_onloadendCallback); _notify(callback, JS::HandleValueArray::empty()); } + _clearCallbacks(); return; } } @@ -291,6 +292,7 @@ void MinXmlHttpRequest::handle_requestResponse(cocos2d::network::HttpClient *sen callback.set(_onloadendCallback); _notify(callback, JS::HandleValueArray::empty()); } + _clearCallbacks(); } /** * @brief Send out request and fire callback when done. @@ -303,6 +305,26 @@ void MinXmlHttpRequest::_sendRequest(JSContext *cx) _httpRequest->release(); } +#define REMOVE_CALLBACK(x) \ +if (x)\ +{ \ + JS::RootedValue callback(_cx, OBJECT_TO_JSVAL(x)); \ + js_remove_object_root(callback); \ + x = nullptr; \ +} \ + +void MinXmlHttpRequest::_clearCallbacks() +{ + JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET + REMOVE_CALLBACK(_onreadystateCallback) + REMOVE_CALLBACK(_onloadstartCallback) + REMOVE_CALLBACK(_onabortCallback) + REMOVE_CALLBACK(_onerrorCallback) + REMOVE_CALLBACK(_onloadCallback) + REMOVE_CALLBACK(_onloadendCallback) + REMOVE_CALLBACK(_ontimeoutCallback) +} + MinXmlHttpRequest::MinXmlHttpRequest() : _url() { @@ -352,49 +374,7 @@ MinXmlHttpRequest::MinXmlHttpRequest(JSContext *cx) */ MinXmlHttpRequest::~MinXmlHttpRequest() { - JS::RootedValue callback(_cx); - if (_onreadystateCallback) - { - callback.set(OBJECT_TO_JSVAL(_onreadystateCallback)); - js_remove_object_root(callback); - } - if (_onloadstartCallback) - { - callback.set(OBJECT_TO_JSVAL(_onloadstartCallback)); - js_remove_object_root(callback); - } - if (_onabortCallback) - { - callback.set(OBJECT_TO_JSVAL(_onabortCallback)); - js_remove_object_root(callback); - } - if (_onerrorCallback) - { - callback.set(OBJECT_TO_JSVAL(_onerrorCallback)); - js_remove_object_root(callback); - } - if (_onloadCallback) - { - callback.set(OBJECT_TO_JSVAL(_onloadCallback)); - js_remove_object_root(callback); - } - if (_onloadendCallback) - { - callback.set(OBJECT_TO_JSVAL(_onloadendCallback)); - js_remove_object_root(callback); - } - if (_ontimeoutCallback) - { - callback.set(OBJECT_TO_JSVAL(_ontimeoutCallback)); - js_remove_object_root(callback); - } - - if (_httpRequest) - { - // We don't need to release _httpRequest here since it will be released in the http callback. -// _httpRequest->release(); - } - + _clearCallbacks(); CC_SAFE_FREE(_data); CC_SAFE_RELEASE_NULL(_scheduler); } @@ -890,6 +870,7 @@ void MinXmlHttpRequest::update(float dt) { JS::RootedObject callback(_cx, _ontimeoutCallback); _notify(callback, JS::HandleValueArray::empty()); + _clearCallbacks(); } _elapsedTime = 0; _readyState = UNSENT; @@ -916,6 +897,7 @@ JS_BINDED_FUNC_IMPL(MinXmlHttpRequest, abort) { JS::RootedObject callback(cx, _onabortCallback); _notify(callback, JS::HandleValueArray::empty()); + _clearCallbacks(); } return true; diff --git a/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.h b/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.h index 475d5b1ce4..3255e5b9c7 100644 --- a/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.h +++ b/native/cocos/scripting/js-bindings/manual/network/XMLHTTPRequest.h @@ -96,6 +96,7 @@ private: void _setHttpRequestData(const char *data, size_t len); void _sendRequest(JSContext *cx); void _notify(JS::HandleObject callback, JS::HandleValueArray progressEvent); + void _clearCallbacks(); std::string _url; JSContext* _cx; From 7ea050a7ce9c170a67df74048c77e084c7f64f1c Mon Sep 17 00:00:00 2001 From: colin <124654806@qq.com> Date: Mon, 22 May 2017 10:20:00 +0800 Subject: [PATCH 08/15] Improve insertNode performance --- native/cocos/2d/CCNode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/cocos/2d/CCNode.cpp b/native/cocos/2d/CCNode.cpp index b26bdec58d..a689f9e7f6 100644 --- a/native/cocos/2d/CCNode.cpp +++ b/native/cocos/2d/CCNode.cpp @@ -976,12 +976,12 @@ void Node::postInsertChild(Node* child) if (_cascadeColorEnabled) { - updateCascadeColor(); + child->updateCascadeColor(); } if (_cascadeOpacityEnabled) { - updateCascadeOpacity(); + child->updateCascadeOpacity(); } } From 3f1b33258cd43dd14b9ecdd72cf3053528c267f1 Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Mon, 22 May 2017 17:14:28 +0800 Subject: [PATCH 09/15] improve system label wrap option --- .../cocos/platform/win32/CCDevice-win32.cpp | 4 +- .../runtime-src/proj.win32/simulator.vcxproj | 488 +++++++++--------- 2 files changed, 246 insertions(+), 246 deletions(-) diff --git a/native/cocos/platform/win32/CCDevice-win32.cpp b/native/cocos/platform/win32/CCDevice-win32.cpp index eb1bbb119a..b7f286b395 100644 --- a/native/cocos/platform/win32/CCDevice-win32.cpp +++ b/native/cocos/platform/win32/CCDevice-win32.cpp @@ -226,7 +226,7 @@ public: if (nWidthLimit > 0) { rc.right = nWidthLimit; - dwCalcFmt |= DT_WORDBREAK + dwCalcFmt |= DT_WORDBREAK | DT_EDITCONTROL | (dwFmt & DT_CENTER) | (dwFmt & DT_RIGHT); } @@ -302,7 +302,7 @@ public: { CC_BREAK_IF(! pszText); - DWORD dwFmt = DT_WORDBREAK; + DWORD dwFmt = DT_WORDBREAK | DT_EDITCONTROL; if (!enableWrap) { dwFmt |= DT_SINGLELINE; } diff --git a/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj b/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj index 99f4830360..59245246f8 100755 --- a/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj +++ b/native/tools/simulator/frameworks/runtime-src/proj.win32/simulator.vcxproj @@ -1,244 +1,244 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED} - simulator - - - - Application - true - Unicode - v110 - v120 - v140 - v140_xp - v141 - v141_xp - - - Application - false - Unicode - v110 - v120 - v140 - v140_xp - v141 - v141_xp - - - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - true - $(IncludePath) - $(SourcePath); - AllRules.ruleset - - - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - false - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - - $(ProjectDir)..\Classes;$(ProjectDir)..\Classes\runtime;$(ProjectDir)..\Classes\ide-support;$(EngineRoot)cocos\base;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)cocos\scripting\js-bindings\auto;$(EngineRoot)cocos\scripting\js-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\win32\include;$(EngineRoot)external\win32\include\chipmunk;$(EngineRoot)external\win32\include\curl;$(EngineRoot)external\win32\include\glfw3;$(EngineRoot)external\win32\include\spidermonkey;$(EngineRoot)tools\simulator\libsimulator\lib;$(EngineRoot)tools\simulator\libsimulator\lib\protobuf-lite;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) - NotUsing - Level3 - MultiThreadedDebugDLL - false - ProgramDatabase - EnableFastChecks - Disabled - WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;_USRLUASTATIC;_USRJSSTATIC;_USRLIBSIMSTATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - true - $(IntDir)vc$(PlatformToolsetVersion).pdb - algorithm - CompileAsCpp - - - Windows - MachineX86 - true - $(OutDir);$(EngineRoot)external\win32\libs;%(AdditionalLibraryDirectories) - libcurl_imp.lib;websockets.lib;mozjs-33.lib;libSpine.lib;libDragonBones.lib;%(AdditionalDependencies) - $(ProjectDir)../../../runtime/win32/$(TargetName).pdb - $(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt) - libcmt.lib;%(IgnoreSpecificDefaultLibraries) - - - 0x0409 - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) - _DEBUG;%(PreprocessorDefinitions) - - - false - Win32 - _DEBUG;%(PreprocessorDefinitions) - simulator.h - simulator_i.c - simulator_p.c - true - $(IntDir)/simulator.tlb - - - - - if not exist "$(OutDir)" mkdir "$(OutDir)" - -xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(OutDir)" - - - - - - - - - - if not exist "$(ProjectDir)..\..\..\runtime" mkdir "$(ProjectDir)..\..\..\runtime" - -if not exist "$(ProjectDir)..\..\..\runtime\win32" mkdir "$(ProjectDir)..\..\..\runtime\win32" - -xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32" -xcopy /Y /Q "$(OutDir)*.exe" "$(ProjectDir)..\..\..\runtime\win32" -xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" - - - - - - $(ProjectDir)..\Classes;$(ProjectDir)..\Classes\runtime;$(EngineRoot)cocos\base;$(EngineRoot)tools\simulator\libsimulator\lib\protobuf-lite;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\scripting\js-bindings\auto;$(EngineRoot)cocos\scripting\js-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)extensions;$(EngineRoot)external\win32\include;$(EngineRoot)external\win32\include\chipmunk;$(EngineRoot)external\win32\include\curl;$(EngineRoot)external\win32\include\glfw3;$(EngineRoot)external\win32\include\spidermonkey;$(EngineRoot)tools\simulator\libsimulator\lib;$(EngineRoot);%(AdditionalIncludeDirectories) - NotUsing - Level3 - MultiThreadedDLL - Sync - ProgramDatabase - COCOS2D_DEBUG=1;WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGSNDEBUG;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;_USRLUASTATIC;_USRJSSTATIC;_USRLIBSIMSTATIC;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - true - $(IntDir)vc$(PlatformToolsetVersion).pdb - algorithm - CompileAsCpp - Default - true - - - Windows - MachineX86 - $(OutDir);$(EngineRoot)external\spidermonkey\prebuilt\win32;%(AdditionalLibraryDirectories) - libcurl_imp.lib;websockets.lib;mozjs-33.lib;libSpine.lib;libDragonBones.lib;%(AdditionalDependencies) - false - $(OutDir)$(ProjectName).exe - libcmt.lib;%(IgnoreSpecificDefaultLibraries) - - - 0x0409 - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) - NDEBUG;%(PreprocessorDefinitions) - - - false - Win32 - NDEBUG;%(PreprocessorDefinitions) - simulator.h - simulator_i.c - simulator_p.c - true - $(IntDir)/simulator.tlb - - - - - if not exist "$(OutDir)" mkdir "$(OutDir)" - -xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(OutDir)" - - - - - - - - - - if not exist "$(ProjectDir)..\..\..\runtime" mkdir "$(ProjectDir)..\..\..\runtime" - -if not exist "$(ProjectDir)..\..\..\runtime\win32" mkdir "$(ProjectDir)..\..\..\runtime\win32" - -xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32" -xcopy /Y /Q "$(OutDir)*.exe" "$(ProjectDir)..\..\..\runtime\win32" -xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {39379840-825a-45a0-b363-c09ffef864bd} - - - {001b324a-bb91-4e83-875c-c92f75c40857} - - - - - - \ No newline at end of file + + + + + Debug + Win32 + + + Release + Win32 + + + + {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED} + simulator + + + + Application + true + Unicode + v110 + v120 + v140 + v140_xp + v141 + v141_xp + + + Application + false + Unicode + v110 + v120 + v140 + v140_xp + v141 + v141_xp + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + true + $(IncludePath) + $(SourcePath); + AllRules.ruleset + + + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + false + + + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) + + + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) + + + + $(ProjectDir)..\Classes;$(ProjectDir)..\Classes\runtime;$(ProjectDir)..\Classes\ide-support;$(EngineRoot)cocos\base;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)cocos\scripting\js-bindings\auto;$(EngineRoot)cocos\scripting\js-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\win32\include;$(EngineRoot)external\win32\include\chipmunk;$(EngineRoot)external\win32\include\curl;$(EngineRoot)external\win32\include\glfw3;$(EngineRoot)external\win32\include\spidermonkey;$(EngineRoot)tools\simulator\libsimulator\lib;$(EngineRoot)tools\simulator\libsimulator\lib\protobuf-lite;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) + NotUsing + Level3 + MultiThreadedDebugDLL + false + ProgramDatabase + EnableFastChecks + Disabled + WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;_USRLUASTATIC;_USRJSSTATIC;_USRLIBSIMSTATIC;%(PreprocessorDefinitions) + 4267;4251;4244;%(DisableSpecificWarnings) + true + $(IntDir)vc$(PlatformToolsetVersion).pdb + algorithm + CompileAsCpp + + + Windows + MachineX86 + true + $(OutDir);$(EngineRoot)external\win32\libs;%(AdditionalLibraryDirectories) + libcurl.lib;websockets.lib;mozjs-33.lib;libSpine.lib;libDragonBones.lib;%(AdditionalDependencies) + $(ProjectDir)../../../runtime/win32/$(TargetName).pdb + $(ProjectDir)../../../runtime/win32/$(TargetName)$(TargetExt) + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + + + 0x0409 + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) + _DEBUG;%(PreprocessorDefinitions) + + + false + Win32 + _DEBUG;%(PreprocessorDefinitions) + simulator.h + simulator_i.c + simulator_p.c + true + $(IntDir)/simulator.tlb + + + + + if not exist "$(OutDir)" mkdir "$(OutDir)" + +xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(OutDir)" + + + + + + + + + + if not exist "$(ProjectDir)..\..\..\runtime" mkdir "$(ProjectDir)..\..\..\runtime" + +if not exist "$(ProjectDir)..\..\..\runtime\win32" mkdir "$(ProjectDir)..\..\..\runtime\win32" + +xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32" +xcopy /Y /Q "$(OutDir)*.exe" "$(ProjectDir)..\..\..\runtime\win32" +xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" + + + + + + $(ProjectDir)..\Classes;$(ProjectDir)..\Classes\runtime;$(EngineRoot)cocos\base;$(EngineRoot)tools\simulator\libsimulator\lib\protobuf-lite;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\scripting\js-bindings\auto;$(EngineRoot)cocos\scripting\js-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)extensions;$(EngineRoot)external\win32\include;$(EngineRoot)external\win32\include\chipmunk;$(EngineRoot)external\win32\include\curl;$(EngineRoot)external\win32\include\glfw3;$(EngineRoot)external\win32\include\spidermonkey;$(EngineRoot)tools\simulator\libsimulator\lib;$(EngineRoot);%(AdditionalIncludeDirectories) + NotUsing + Level3 + MultiThreadedDLL + Sync + ProgramDatabase + COCOS2D_DEBUG=1;WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGSNDEBUG;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;_USRLUASTATIC;_USRJSSTATIC;_USRLIBSIMSTATIC;%(PreprocessorDefinitions) + 4267;4251;4244;%(DisableSpecificWarnings) + true + $(IntDir)vc$(PlatformToolsetVersion).pdb + algorithm + CompileAsCpp + Default + true + + + Windows + MachineX86 + $(OutDir);$(EngineRoot)external\spidermonkey\prebuilt\win32;%(AdditionalLibraryDirectories) + libcurl.lib;websockets.lib;mozjs-33.lib;libSpine.lib;libDragonBones.lib;%(AdditionalDependencies) + false + $(OutDir)$(ProjectName).exe + libcmt.lib;%(IgnoreSpecificDefaultLibraries) + + + 0x0409 + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) + NDEBUG;%(PreprocessorDefinitions) + + + false + Win32 + NDEBUG;%(PreprocessorDefinitions) + simulator.h + simulator_i.c + simulator_p.c + true + $(IntDir)/simulator.tlb + + + + + if not exist "$(OutDir)" mkdir "$(OutDir)" + +xcopy /Y /Q "$(ProjectDir)..\Classes\ide-support\lang" "$(OutDir)" + + + + + + + + + + if not exist "$(ProjectDir)..\..\..\runtime" mkdir "$(ProjectDir)..\..\..\runtime" + +if not exist "$(ProjectDir)..\..\..\runtime\win32" mkdir "$(ProjectDir)..\..\..\runtime\win32" + +xcopy /Y /Q "$(OutDir)*.dll" "$(ProjectDir)..\..\..\runtime\win32" +xcopy /Y /Q "$(OutDir)*.exe" "$(ProjectDir)..\..\..\runtime\win32" +xcopy /Y /Q "$(OutDir)lang" "$(ProjectDir)..\..\..\runtime\win32" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {39379840-825a-45a0-b363-c09ffef864bd} + + + {001b324a-bb91-4e83-875c-c92f75c40857} + + + + + + From 6172e30a73db0ca1dda3359478eb6d7696199888 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 24 May 2017 11:46:24 +0800 Subject: [PATCH 10/15] update deps to 29 --- native/external/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/external/config.json b/native/external/config.json index 1eb81ad94d..45866e7290 100644 --- a/native/external/config.json +++ b/native/external/config.json @@ -1,6 +1,6 @@ { - "version": "v3-deps-28", + "version": "v3-deps-29", "zip_file_size": "74337963", "repo_name": "cocos2d-x-lite-external", "repo_parent": "https://github.com/cocos-creator/" -} \ No newline at end of file +} From 3c9fb6b4f3eee6927028b27530a0ae0e973b9baa Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Wed, 24 May 2017 17:23:23 +0800 Subject: [PATCH 11/15] fix win32 editbox display size error --- .../ui/UIEditBox/UIEditBoxImpl-win32.cpp | 55 +++++++++++-------- native/cocos/ui/UIHelper.cpp | 13 +++-- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp b/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp index 8f6abdbfd7..f3bedfbfe3 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp @@ -80,7 +80,7 @@ namespace ui { { lazyInit(); } - + s_editboxChildID++; } @@ -115,17 +115,17 @@ namespace ui { if (!hwndEdit) { hwndEdit = CreateWindowEx( - WS_EX_CLIENTEDGE, L"EDIT", // predefined class - NULL, // no window title + WS_EX_CLIENTEDGE, L"EDIT", // predefined class + NULL, // no window title WS_CHILD | ES_LEFT | WS_BORDER | WS_EX_TRANSPARENT | WS_TABSTOP | ES_AUTOHSCROLL, 0, 0, 0, - 0, // set size in WM_SIZE message - s_hwndCocos, // parent window - (HMENU)s_editboxChildID, // edit control ID + 0, // set size in WM_SIZE message + s_hwndCocos, // parent window + (HMENU)s_editboxChildID, // edit control ID s_hInstance, - this); // pointer not needed + this); // pointer not needed SetWindowLongPtr(hwndEdit, GWL_USERDATA, (LONG_PTR)this); _prevWndProc = (WNDPROC)SetWindowLongPtr(hwndEdit, GWL_WNDPROC, (LONG_PTR)WindowProc); @@ -143,17 +143,17 @@ namespace ui { if (!hwndEdit) { hwndEdit = CreateWindowEx( - WS_EX_CLIENTEDGE, L"EDIT", // predefined class - NULL, // no window title + WS_EX_CLIENTEDGE, L"EDIT", // predefined class + NULL, // no window title WS_CHILD | ES_LEFT | WS_BORDER | WS_EX_TRANSPARENT | WS_TABSTOP | ES_MULTILINE | ES_AUTOVSCROLL, 0, 0, 0, - 0, // set size in WM_SIZE message - s_hwndCocos, // parent window - (HMENU)s_editboxChildID, // edit control ID + 0, // set size in WM_SIZE message + s_hwndCocos, // parent window + (HMENU)s_editboxChildID, // edit control ID s_hInstance, - this); // pointer not needed + this); // pointer not needed //register new window proc func SetWindowLongPtr(hwndEdit, GWL_USERDATA, (LONG_PTR)this); @@ -168,7 +168,7 @@ namespace ui { void EditBoxImplWin::createNativeControl(const Rect & frame) { - + this->createMultilineEditCtrl(); } @@ -176,6 +176,7 @@ namespace ui { { //not implemented yet this->_fontSize = fontSize; + HFONT hFont = CreateFontW(fontSize, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH, TEXT("Arial")); @@ -230,7 +231,7 @@ namespace ui { { this->createSingleLineEditCtrl(); } - + else { if (_editBoxInputMode != cocos2d::ui::EditBox::InputMode::ANY) @@ -272,6 +273,8 @@ namespace ui { { if (visible) { + auto rect = ui::Helper::convertBoundingBoxToScreen(_editBox); + this->updateNativeFrame(rect); ::ShowWindow(hwndEdit, SW_SHOW); } else @@ -301,10 +304,6 @@ namespace ui { ::PostMessage(hwndEdit, WM_SETFOCUS, (WPARAM)s_previousFocusWnd, 0); // s_previousFocusWnd = hwndEdit; this->editBoxEditingDidBegin(); - - auto rect = ui::Helper::convertBoundingBoxToScreen(_editBox); - this->updateNativeFrame(rect); - } void EditBoxImplWin::nativeCloseKeyboard() { @@ -312,7 +311,7 @@ namespace ui { } void EditBoxImplWin::setNativeMaxLength(int maxLength) { - + ::SendMessageW(hwndEdit, EM_LIMITTEXT, maxLength, 0); } @@ -383,6 +382,16 @@ namespace ui { { switch (uMsg) { + case WM_SIZING: + { + EditBoxImplWin* pThis = (EditBoxImplWin*)GetWindowLongPtr(s_previousFocusWnd, GWLP_USERDATA); + if (pThis) + { + auto rect = ui::Helper::convertBoundingBoxToScreen(pThis->_editBox); + pThis->updateNativeFrame(rect); + } + } + break; case WM_COMMAND: if (HIWORD(wParam) == EN_CHANGE) { EditBoxImplWin* pThis = (EditBoxImplWin*)GetWindowLongPtr((HWND)lParam, GWLP_USERDATA); @@ -397,7 +406,7 @@ namespace ui { case WM_LBUTTONDOWN: if (s_previousFocusWnd != s_hwndCocos) { ::ShowWindow(s_previousFocusWnd, SW_HIDE); - + EditBoxImplWin* pThis = (EditBoxImplWin*)GetWindowLongPtr(s_previousFocusWnd, GWLP_USERDATA); if (!pThis->_hasFocus) { @@ -406,14 +415,14 @@ namespace ui { pThis->editBoxEditingReturn(); pThis->editBoxEditingDidEnd(pThis->getText()); } - } + } else { ::PostMessage(s_hwndCocos, WM_SETFOCUS, (WPARAM)s_previousFocusWnd, 0); } s_previousFocusWnd = s_hwndCocos; } - + break; default: break; diff --git a/native/cocos/ui/UIHelper.cpp b/native/cocos/ui/UIHelper.cpp index f90c3f30b5..96ea2945fa 100644 --- a/native/cocos/ui/UIHelper.cpp +++ b/native/cocos/ui/UIHelper.cpp @@ -184,7 +184,10 @@ Rect Helper::convertBoundingBoxToScreen(Node* node) { auto director = Director::getInstance(); auto glView = director->getOpenGLView(); - auto frameSize = glView->getFrameSize(); + + auto zoomFrameFactor = Director::getInstance()->getOpenGLView()->getFrameZoomFactor(); + + auto frameSize = glView->getFrameSize() * zoomFrameFactor; auto winSize = director->getWinSize(); auto leftBottom = node->convertToWorldSpace(Point::ZERO); @@ -192,10 +195,10 @@ Rect Helper::convertBoundingBoxToScreen(Node* node) auto contentSize = node->getContentSize(); auto rightTop = node->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(); - auto uiWidth = (rightTop.x - leftBottom.x) * glView->getScaleX(); - auto uiHeight = (rightTop.y - leftBottom.y) * glView->getScaleY(); + auto uiLeft = frameSize.width / 2 + (leftBottom.x - winSize.width / 2 ) * glView->getScaleX() * zoomFrameFactor; + auto uiTop = frameSize.height /2 - (rightTop.y - winSize.height / 2) * glView->getScaleY() * zoomFrameFactor; + auto uiWidth = (rightTop.x - leftBottom.x) * glView->getScaleX() * zoomFrameFactor; + auto uiHeight = (rightTop.y - leftBottom.y) * glView->getScaleY() * zoomFrameFactor; return Rect(uiLeft, uiTop, uiWidth, uiHeight); } From 6d31c00076137b8e2926c3fb4ed8692ab855e75e Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Wed, 24 May 2017 18:10:07 +0800 Subject: [PATCH 12/15] fix mac editbox positioning in zoom mode --- native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm b/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm index d3f77a8dfb..276bbd9da1 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm @@ -31,6 +31,8 @@ #include "UIEditBox.h" #include "base/ccUTF8.h" #include "ui/UIEditBox/Mac/CCUIEditBoxMac.h" +#include "ui/UIHelper.h" + NS_CC_BEGIN namespace ui { @@ -184,15 +186,20 @@ void EditBoxImplMac::setNativePlaceHolder(const char* pText) void EditBoxImplMac::setNativeVisible(bool visible) { [_sysEdit setVisible:visible]; + if (visible) { + auto rect = ui::Helper::convertBoundingBoxToScreen(_editBox); + this->updateNativeFrame(rect); + } } void EditBoxImplMac::updateNativeFrame(const cocos2d::Rect &rect) { GLView* eglView = Director::getInstance()->getOpenGLView(); auto viewPortRect = eglView->getViewPortRect(); + auto zoomFrameFactor = Director::getInstance()->getOpenGLView()->getFrameZoomFactor(); // Coordinate System on OSX has its origin at the lower left corner. // https://developer.apple.com/library/ios/documentation/General/Conceptual/Devpedia-CocoaApp/CoordinateSystem.html - auto screenPosY = viewPortRect.size.height - rect.origin.y - rect.size.height; + auto screenPosY = viewPortRect.size.height * zoomFrameFactor - rect.origin.y - rect.size.height; [_sysEdit updateFrame:CGRectMake(rect.origin.x, screenPosY, rect.size.width, rect.size.height)]; From af9d7fc0bcd9cd22de3b9f6ab89069f70c79440b Mon Sep 17 00:00:00 2001 From: knoxHuang <821686174@qq.com> Date: Thu, 1 Jun 2017 09:47:34 +0800 Subject: [PATCH 13/15] fix CCSystemEvent bug for fireball/issues/5821 --- native/cocos/base/CCEventDispatcher.cpp | 28 ++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/native/cocos/base/CCEventDispatcher.cpp b/native/cocos/base/CCEventDispatcher.cpp index 455cf600ad..e0663fcb81 100644 --- a/native/cocos/base/CCEventDispatcher.cpp +++ b/native/cocos/base/CCEventDispatcher.cpp @@ -859,7 +859,33 @@ void EventDispatcher::dispatchCustomEvent(const std::string &eventName, void *op bool EventDispatcher::hasEventListener(const EventListener::ListenerID& listenerID) const { - return getListeners(listenerID) != nullptr; + auto listeners = getListeners(listenerID); + if (listeners == nullptr) + return false; + + if (!_toRemovedListeners.empty()) + { + // fix cocos-creator/fireball/issues/5821 + auto fixedPriorityListeners = listeners->getFixedPriorityListeners(); + auto sceneGraphPriorityListeners = listeners->getSceneGraphPriorityListeners(); + for (auto& listener : _toRemovedListeners) + { + if (fixedPriorityListeners) + { + auto matchIter = std::find(fixedPriorityListeners->begin(), fixedPriorityListeners->end(), listener); + if (matchIter != fixedPriorityListeners->end()) + return false; + } + + if (sceneGraphPriorityListeners) + { + auto matchIter = std::find(sceneGraphPriorityListeners->begin(), sceneGraphPriorityListeners->end(), listener); + if (matchIter != sceneGraphPriorityListeners->end()) + return false; + } + } + } + return true; } void EventDispatcher::dispatchTouchEvent(EventTouch* event) From 1315dab50ea601521a5de897b8b9e9b04de3b9ef Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Thu, 1 Jun 2017 10:48:18 +0800 Subject: [PATCH 14/15] improve editbox window style --- native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp b/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp index f3bedfbfe3..ab0b7da6fd 100644 --- a/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp +++ b/native/cocos/ui/UIEditBox/UIEditBoxImpl-win32.cpp @@ -115,7 +115,7 @@ namespace ui { if (!hwndEdit) { hwndEdit = CreateWindowEx( - WS_EX_CLIENTEDGE, L"EDIT", // predefined class + WS_EX_WINDOWEDGE, L"EDIT", // predefined class NULL, // no window title WS_CHILD | ES_LEFT | WS_BORDER | WS_EX_TRANSPARENT | WS_TABSTOP | ES_AUTOHSCROLL, 0, @@ -143,7 +143,7 @@ namespace ui { if (!hwndEdit) { hwndEdit = CreateWindowEx( - WS_EX_CLIENTEDGE, L"EDIT", // predefined class + WS_EX_WINDOWEDGE, L"EDIT", // predefined class NULL, // no window title WS_CHILD | ES_LEFT | WS_BORDER | WS_EX_TRANSPARENT | WS_TABSTOP | ES_MULTILINE | ES_AUTOVSCROLL, 0, From c962ec5f98d8c76ab431cae80768bbc6f80675d3 Mon Sep 17 00:00:00 2001 From: knoxHuang <821686174@qq.com> Date: Thu, 1 Jun 2017 13:40:38 +0800 Subject: [PATCH 15/15] remove superfluous code in CCEventDispatcher --- native/cocos/base/CCEventDispatcher.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/native/cocos/base/CCEventDispatcher.cpp b/native/cocos/base/CCEventDispatcher.cpp index e0663fcb81..149c73a7b3 100644 --- a/native/cocos/base/CCEventDispatcher.cpp +++ b/native/cocos/base/CCEventDispatcher.cpp @@ -793,25 +793,6 @@ void EventDispatcher::dispatchEventToListeners(EventListenerVector* listeners, c } } } - - if (fixedPriorityListeners) - { - if (!shouldStopPropagation) - { - // priority > 0 - ssize_t size = fixedPriorityListeners->size(); - for (; i < size; ++i) - { - auto l = fixedPriorityListeners->at(i); - - if (l->isEnabled() && !l->isPaused() && l->isRegistered() && onEvent(l)) - { - shouldStopPropagation = true; - break; - } - } - } - } } void EventDispatcher::dispatchEvent(Event* event)