Commit Graph

101 Commits

Author SHA1 Message Date
James Chen f7e003758f issue #4448: Respond to move event if dragging is enabled, no matter whether mouse is in the content of cocos2d::extension::ScrollView. 2014-03-19 17:11:34 +08:00
James Chen 02ee3a52eb closed #4448: Elastic bounce back effect support for cocos2d::extension::ScrollView. 2014-03-19 17:11:34 +08:00
Jeong YunWon 2f1a7ebf42 Elastic bounceback for ScrollView
Add iOS-like elastic bounceback.
If you scroll content of scroll view out of insets,
its content will be scrolled 0.35 of user scrolled distance.
2014-03-18 18:51:07 +09:00
Ricardo Quesada d78304599d Cache working OK.
Performance increased in 20% for static objects.
2014-02-28 16:10:48 -08:00
Ricardo Quesada 6920bec6ef transform object returns the MV
code cleaner.
the kmGL code is altogether
2014-02-28 11:20:53 -08:00
Ricardo Quesada eb66ddd931 visit and draw improved.
`visit()` and `draw()` are improved.
they both receive:
 - `Renderer`
 - `kmMat4` for transformation
 - `bool` whether or not the transform changed from the previous frame

Although `draw` and `visit` are not using the 3 new parameters,
they will start using it in the coming days (or weeks, or months).

Those parameters are needed for:
 - `Renderer` shouldn't be a singleton. There should be one renderer per Director. There could be more than one renderer
 - we should get rid of `kmGLXXX` functions since nodoby knows what is happening. the `kmMat4` is for that.
 - whenever possible, we should try to optimize the multiplications. the `dirty` flag is for that.

We need those changes, so, it is better to change the API now, and not right after v3.0-final is released.
2014-02-27 21:43:54 -08:00
James Chen e59a14f205 Merge pull request #5058 from zhiqiangxu/develop
ScrollView should implement ActionTweenDelegate
2014-02-20 20:33:04 +08:00
James Chen be507f6fda Merge pull request #5059 from zhiqiangxu/useless_code_in_scrollview
delete useless code in deaccelerateScrolling
2014-02-20 20:20:28 +08:00
James Chen 5e6130c92c issue #4058: Get rid of Object ,rename it to Ref. 2014-02-20 10:53:49 +08:00
Ricardo Quesada 7da8c84a75 Renames EGLView -> GLView 2014-01-30 16:51:43 -08:00
Ricardo Quesada 8ecaf49f93 GLView improvements
it is not longer a singleton
it is possible to specify the size
2014-01-23 15:36:55 -08:00
James Chen 9f793f8a9b Warning fixes: 1) getZOrder —> getLocalZOrder. 2) long —> int 2014-01-20 15:03:30 +08:00
Ricardo Quesada 5fcbf42356 GlobalZOrder is used for render priority...
...and not vertexZ

Node::setGlobalZOrder() is used to change that.

Node::setZOrder() -> Node::setLocalZOrder();
2014-01-18 11:38:06 -08:00
Ricardo Quesada 8931d968c0 Renderer uses a float as a key
Instead of using a 64-bit int key with viewport, opaque and depth,
it only uses a 32-bit float with only the depth.
Saves time in:
 - No need to convert the 32-bit float into 24-bit int
 - keys are shorter
2014-01-17 16:08:29 -08:00
Ricardo Quesada 1b5b9da102 compiles on Android
compiles on Android
2014-01-16 21:58:14 -08:00
Ricardo Quesada d0dbf34319 removes "include "cocos2d.h" from cocos2d files 2014-01-16 21:35:58 -08:00
xuzhiqiang 6dc6101357 more useless code 2014-01-14 22:40:02 +08:00
xuzhiqiang 8f76080b15 more useless code 2014-01-14 22:30:38 +08:00
xuzhiqiang f59c969216 delete useless code in deaccelerateScrolling 2014-01-14 21:22:55 +08:00
xuzhiqiang 3a86ec1ead fix compile 2014-01-14 20:36:37 +08:00
xuzhiqiang a2afff85a8 fix compile 2014-01-14 20:33:02 +08:00
xuzhiqiang 1d30bd0d80 fix compile 2014-01-14 20:27:14 +08:00
xuzhiqiang 562fdcf98b CCScrollView should inherit CCActionTweenDelegate 2014-01-14 20:03:12 +08:00
James Chen e93b567000 ScrollView::intWithView supports be invoked several times. 2014-01-07 22:16:24 +08:00
James Chen 5c217f70d1 ScrollView uses new renderer now. 2014-01-07 17:46:24 +08:00
James Chen d1ad635ad8 Merge pull request #4497 from zhiqiangxu/develop
closed #3559: Useless conversion in ScrollView::onTouchBegan
2014-01-01 17:55:41 -08:00
James Chen ed93f90ccc Removes unneeded ‘override’ codes, uses `using Node::addChild;` to prevent compiler warnings. 2013-12-23 16:58:26 +08:00
minggo 756f8f7a11 Merge pull request #4482 from dabingnn/develop_gridNode
Develop grid node
2013-12-19 18:30:42 -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
Huabing.Xu d51ad36613 Merge branch 'develop' into develop_gridNode
* develop: (67 commits)
  Adds const in ShaderTest2.h
  Skew works again!
  [AUTO] : updating submodule reference to latest autogenerated bindings
  [AUTO] : updating submodule reference to latest autogenerated bindings
  Reverts submodule.
  Updates submodule of bindings-generator.
  Adds `std::for_each` test in invocation
  Reverts bindings-generator.
  fixed not render
  iterator in Sprite fixes
  update vs project for removes unneeded files
  getNodeToParentTransform fixes
  Node cleanup
  [AUTO] : updating submodule reference to latest autogenerated bindings
  Improves SpriteTest
  [AUTO] : updating submodule reference to latest autogenerated bindings
  Android and Linux fixes
  removes `using namespace std` from header file
  Removes unneeded files
  change play arguments
  ...

Conflicts:
	cocos/2d/CCNode.cpp
	samples/Cpp/TestCpp/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp
2013-12-19 17:20:22 +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
xuzhiqiang e8f55069e3 reduce useless convert 2013-12-16 18:20:10 +08:00
Huabing.Xu 5509bd48ef remove _grid 2013-12-12 16:21:21 +08:00
James Chen 499a0404d4 issue #2790: Renames some functions in Vector<T>. Makes it more like stl vector. 2013-12-05 10:35:10 +08:00
James Chen f6676bd7ef issue #2790: [] -> getObjectAtIndex. 2013-12-04 16:02:51 +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
James Chen 48ce5e39fe EventDispatcher is managed by Director now, like Scheduler and ActionManager. 2013-10-26 15:04:01 +08:00
James Chen 262b54eef2 issue #3069: Updating ScrollView. 2013-10-25 16:06:52 +08:00
James Chen 1f3863e787 Event Dispatcher refactor commit. TestCpp could run. 2013-10-25 10:53:45 +08:00
James Chen cfaef2a01a Adding onEnterHook, onXXXHook for Node. 2013-10-25 10:53:45 +08:00
lite3 c6f9f0e406 do not change anchor point of child. 2013-10-22 11:30:53 +08:00
minggo 4c9771ba3c rename some class names to obey cocos2d-x coding style 2013-09-20 19:19:31 +08:00
James Chen c90291e01d ScrollView::_touches is std::vector now, so it should not be inited by NULL pointer. 2013-09-12 21:02:30 +08:00
James Chen 6f37529236 [dispatcher] Adding 'Node::updateEventPriorityIndex' and making 'Node::addEventId(removeEventId)' method to be private. 2013-09-12 20:47:15 +08:00
James Chen 6a2536b5bd [Dispatcher] Fixing logic errors in CCScrollView after using EventDispatcher. 2013-09-12 16:03:03 +08:00
James Chen 5d95711865 [EventDispatcher] Fixing compilation error after changing of Touch(It doesn't inherit from Object). 2013-09-12 14:42:56 +08:00
James Chen da1101beeb [Dispatcher] New event dispatcher, first commit. 2013-09-11 22:09:34 +08:00
James Chen b8c82ae5a9 [develop] Warning fixes. 2013-09-08 11:26:38 +08:00
Ricardo Quesada d7590affda Merge branch 'develop' into dictionary_array_fixes
Conflicts:
	cocos2dx/cocoa/CCArray.cpp
	cocos2dx/cocoa/CCArray.h
	cocos2dx/label_nodes/CCLabel.cpp
	extensions/CCArmature/datas/CCDatas.cpp
	extensions/CCArmature/display/CCDisplayManager.cpp
2013-08-21 21:27:44 -07:00