James Chen
5e6130c92c
issue #4058 : Get rid of Object ,rename it to Ref.
2014-02-20 10:53:49 +08:00
Ricardo Quesada
59fee6b8d2
replaces std::for_each with for()
...
replaces `std::for_each` with C++11 `for( : )`
2013-12-19 13:34:41 -08:00
boyu0
ef54ed3c15
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into HEAD
...
Conflicts:
cocos/2d/CCLabel.cpp
cocos/2d/CCLabel.h
cocos/2d/CCLabelBMFont.cpp
cocos/2d/CCLabelBMFont.h
cocos/2d/CCLayer.cpp
cocos/2d/CCLayer.h
cocos/2d/CCNode.cpp
extensions/GUI/CCControlExtension/CCControl.cpp
extensions/GUI/CCControlExtension/CCControlButton.cpp
extensions/GUI/CCControlExtension/CCScale9Sprite.cpp
tools/tojs/cocos2dx.ini
2013-12-19 17:05:59 +08:00
James Chen
d16fa07661
Removes Vector<T>::forEach, please use std::for_each instead. The same as Vector<T>::sort.
2013-12-17 17:45:29 +08:00
James Chen
2a38d4fe94
issue #2171 : Fixing compilation errors for Linux port.
2013-12-17 14:50:40 +08:00
boyu0
defae416f3
Merge branch 'develop' of git://github.com/cocos2d/cocos2d-x into bug3162_opacity_incorrect
2013-12-13 18:09:39 +08:00
boyu0
d7106d49be
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into bug3162_opacity_incorrect
2013-12-12 17:04:21 +08:00
minggo
16efe94946
fix compiling error after fixing conflicts
2013-12-12 14:48:27 +08:00
James Chen
cc567a3077
issue #2790 : Vector::remove —> Vector::erase.
2013-12-11 18:08:06 +08:00
boyu0
a71394b122
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into bug3162_opacity_incorrect
2013-12-10 18:03:41 +08:00
James Chen
713d89b6d8
issue #2790 : Uses Vector<Invocation*> instead of CCArray* for CCControl. Uses std::unordered_map<int, Vector<Invocation*>*> instead of CCDictionary*.
2013-12-07 14:36:07 +08:00
boyu0
af5f496861
issue #3162 : Merge Node and NodeRGBA, fix bug: Child's opacity will not be changed when its parent's setCascadeOpacityEnabled was set to true and opacity was changed.
2013-12-06 18:07:16 +08:00
James Chen
1d5984b29a
issue #2790 : Vector::makeObjectsPerformCallback —> Vector::forEach
2013-12-04 16:01:02 +08:00
James Chen
59c2647bd6
Prevents warning of invoking ScrollView::setTouchEnabled. Layer::setTouchEnabled should not be a virtual function.
2013-11-20 11:35:04 +08:00
Luis Parravicini
8b1d3af720
added | operator for Control::EventType
2013-11-05 23:55:24 -03:00
James Chen
50c4261092
closed #3104 : Touch listener should be registered in Menu::initXXX and Control::init rather than onEnter.
2013-11-01 20:53:51 +08:00
James Chen
48ce5e39fe
EventDispatcher is managed by Director now, like Scheduler and ActionManager.
2013-10-26 15:04:01 +08:00
James Chen
cfaef2a01a
Adding onEnterHook, onXXXHook for Node.
2013-10-25 10:53:45 +08:00
minggo
6fc2be62f5
issue #2905 : testcpp bild ok on Android
2013-10-15 18:00:03 +08:00
minggo
261f0e4f05
rename some files
2013-09-21 14:40:54 +08:00
James Chen
da1101beeb
[Dispatcher] New event dispatcher, first commit.
2013-09-11 22:09:34 +08:00
Ricardo Quesada
2e221ee6cc
Array & Dictionary fixes
...
In many places `Dictionary` and `Array` are not being initialized. In fact `Dictionary` doesn't have the `init()` method creating potential leaks.
Also in objects like `Armature` and the new `LabelTTF`, the `Array` object is not being used a pointer. So it doesn't use the 2 phase initialization, creating potential leaks.
This patch fixes all those issues.
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:12:09 -07:00
James Chen
fc437c5ef4
(Array*) --> static_cast<Array*>() for CCControl.cpp.
2013-08-09 10:56:39 +08:00
James Chen
343c98af13
Fixing warnings of the order of member variables and fixing errors for tizen projects.
2013-07-29 14:07:57 +08:00
minggo
f55d73194e
issue 2430:use enum class for Control enum values
2013-07-26 14:37:26 +08:00
James Chen
1db847ad7c
issue #2344 : ScriptEngineManager::sharedManager --> ScriptEngineManager::getInstance, ScriptEngineManager::purgeSharedManager --> ScriptEngineManager::destroyInstance
2013-07-22 17:24:54 +08:00
James Chen
2228614748
issue #2344 : JSB also uses 'ScriptEngineManager::sharedManager()->getScriptEngine()->sendEvent(XXX);' now.
2013-07-22 17:12:53 +08:00
Ricardo Quesada
ba6ab126c6
More best practices fixes
...
- class order fixes
- static methods (creators) at the beginning
- then constructors / destructors
- then init
- more `const` fixes
- adds some const getters
- some getters have 2 versions: `const` and no-const version
- renamed CocosDenshion::sharedEngine -> getInstance()
2013-07-18 16:30:19 -07:00
Ricardo Quesada
5d499d351d
Some more changes to make the code more c++ friendly:
...
- nodeToParentTransform -> getNodeToParentTransform() (the same for its friends)
- Deprecates the old methods
- adds 'consts' to those methods
- boundingBox() -> getBoundingBox()
- the new one is const
- Deprecates the old method.
- Adds overrides keywords in CCNodeRGBA and CCArmature
- AffineMatrix are mutables
2013-07-16 18:16:04 -07:00
samuele3hu
c955a559bf
issue #2377:Del register/unregister function in .cpp and .h files
2013-07-16 09:55:06 +08:00
Ricardo Quesada
cf262c28e2
getInstance() / destroyInstance() are used...
...
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.
common files + Mac files + iOS files + tests/samples files were updated.
The old methods are deprecated now.
2013-07-11 15:24:23 -07:00
James Chen
9b9fe67d25
issue #2387 : Using static_cast instead of C style cast in iteration of CCArray.
2013-07-09 14:29:51 +08:00
James Chen
ec902c3550
issue #2373 : Adding missing overload const getter functions.
2013-07-05 15:08:52 +08:00
samuele3hu
570f2663f4
issue #2244:Modify ScriptData struct and functions related with sendEvent
2013-07-04 15:44:42 +08:00
samuele3hu
9b08cee01f
issue #22434:make some execute funs into one funs in ScriptEngineProtocol
2013-07-02 15:23:51 +08:00
James Chen
cb67ed0227
issue #2129 : Removing CC prefix for extension module.
2013-06-20 14:15:53 +08:00
James Chen
c0d44cb2e4
fixed #2129 : Rename m_iVar to _var, remove CC prefixes.
2013-06-15 14:03:30 +08:00
samuele3hu
338c7c8d67
issue #2103 add more test lua
2013-05-24 11:42:27 +08:00
tianTian
053efa0537
m_nDefaultTouchPriority is never used anymore; Instead, we setTouchPriority(1) directly for all CCControl by default.
2013-03-29 16:19:34 +08:00
tianTian
9144946176
Fix bug: CCControl's touch priority is not set correctly; m_nDefaultTouchPriority is never used;
2013-03-23 12:18:00 +08:00
minggo
d730c9749d
Merge pull request #2117 from vipsbpig/master
...
fixed CCControl::registerWithTouchDispatcher()
2013-03-07 18:56:01 -08:00
vipsbpig
ce14169f4d
Update CCControl.cpp
2013-03-08 10:26:16 +08:00
vipsbpig
76e247fb9a
fix CCControl::registerWithTouchDispatcher()
2013-03-08 10:25:09 +08:00
minggo
63e4091bfa
fixed #1686:finish updating
2013-02-28 11:55:36 +08:00
James Chen
6565fa92cc
fixed #1649 : Changed return type to const reference for member variable access.
2013-01-14 15:51:53 +08:00
James Chen
ebd522e3fa
issue #1564 : Return a new object instead of 'const reference' for some get methods.
2012-11-20 16:34:55 +08:00
minggo
4efdbca23b
fixed #1545:remove the usage of CREATE_FUNC
2012-11-08 10:41:14 +08:00
James Chen
d91d7c8317
issue #1483 : Added LICENSE_CCControlExtension.txt, and added license information for headers of CCControlExtension.
2012-09-25 17:26:09 +08:00
James Chen
f7229f74d8
issue #1483 : Synchronizing CCControlExtension to latest version.
2012-09-25 16:57:51 +08:00
Walzer
cc3d850892
fixed #1416 , add object orientated APIs for CCGeometry, replace "CCFloat" with "float"
2012-08-01 15:30:12 +08:00