Implement some new features for cocos2d-1.0.1-x-0.10.0

Hi,
I think most purpose to used cocos2d-x are to develop mobile games and I found some important
features that are lacked, such as “UIGestureRecognizer”, “XmlReader”, “ResourceManager”, etc.
So I implement some features for cocos2d-1.0.0.1-x-0.10.0

# EPNotificationCenter
# EPGestureRecognizerLayer
> # performTap
> # performLongPress
> # performPinch
> # performRotation
> # performPan
# EPXmlReader
# EPResourceManager
# Optimize the memory usage of textures in according to the prefix of file name. (4444*,565*,8888*,5A1*)
# File Templates, including CCLayer,CCScene, and EPGestureRecognizerLayer
#

I tried to attach the source code but always failed and how did I do to upload the source including the sample code ?

They looks cool, especially NotificationCenter & GestureRecognizerLayer.
The limit size of attachment is 10MB, is your zip ball too large?

I pack them to a patch file, cocos2dx.patch.To copy the patch file to cocos2dx folder and
apply it.
$> patch p1i cocos2dx.patch

I modify some original source code of cocos2dx but all of them were marked as //Erawppa.
Maybe you will like and integrate them. :slight_smile:

best regards.

I forgot sample code and uploaded :slight_smile:

Thanks! I will read the source in Monday.

Issue #909

Is the notification center class used for Notification Center in iphone?
I have checked the code and it is something like observer pattern.

ya, the notification center is like observer of iOS.
I have no idea any similar observer system in Android and I implement the similar pattern by using C++.
Hope I can use the same observer pattern in both OS. (not Java and Obj-C)

The observer pattern is a nice feature. Just my 2 cents, the name EPNotificationCenter should be changed to something other than “Notification Center” if integrating into Cocos2dx. It is because someone might get confused to Notification Center in IOS (http://www.apple.com/iphone/features/notification-center.html). Someone needs the class name to implement Apple’s Notification Center.

BTW, are there Notification Center in other OS such as Android?

I totally agree what you say of naming issue and I think you can modify those codes in according to your requirement.

To develop Android App is my future plan and currently focus on iOS platform ,so I dont understand about Notification Center in Android. sorry.

Could you provide more demos about how to use EPScrollListLayer, EPTextFiled?
BTW, I have modified some of your code to make it suitable for the latest cocos2d-x code.
Here is my repository : https://github.com/dumganhar/cocos2d-x/tree/erawppa_new_feature

here are some files about EPScrollListLayer and there are three samples, including createScrollH() , createScrollV() , and createSyncScrollH()

I updated and fixed some codes in EPScrollListLayer.cpp/.h and you can replace them with attatchment.

btw, you can ignore EPTextField because there are some powerful samples in cocos2d-1.0.1-x-0.9.1/tests/tests/keypadTest. :slight_smile:

Thank you. :slight_smile:

Tix Lo wrote:

here are some files about EPScrollListLayer and there are three samples, including createScrollH() , createScrollV() , and createSyncScrollH()
>
I updated and fixed some codes in EPScrollListLayer.cpp/.h and you can replace them with attatchment.
>
btw, you can ignore EPTextField because there are some powerful samples in cocos2d-1.0.1-x-0.9.1/tests/tests/keypadTest. :slight_smile: