Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed #1324: Added some create methods. Compiling successfully on win…

…32 by vs2008.
  • Loading branch information...
commit a45ea808ee38df4501ee5c8d6a07313e237d5f67 1 parent 3c23da9
James Chen authored June 14, 2012

Showing 43 changed files with 279 additions and 63 deletions. Show diff stats Hide diff stats

  1. 2  cocos2dx/extensions/CCBReader/CCBFileLoader.h
  2. 2  cocos2dx/extensions/CCBReader/CCBMemberVariableAssigner.h
  3. 5  cocos2dx/extensions/CCBReader/CCBReader.cpp
  4. 2  cocos2dx/extensions/CCBReader/CCBSelectorResolver.h
  5. 2  cocos2dx/extensions/CCBReader/CCControlButtonLoader.h
  6. 2  cocos2dx/extensions/CCBReader/CCControlLoader.h
  7. 2  cocos2dx/extensions/CCBReader/CCLabelBMFontLoader.h
  8. 2  cocos2dx/extensions/CCBReader/CCLabelTTFLoader.h
  9. 2  cocos2dx/extensions/CCBReader/CCLayerColorLoader.h
  10. 2  cocos2dx/extensions/CCBReader/CCLayerGradientLoader.h
  11. 2  cocos2dx/extensions/CCBReader/CCLayerLoader.h
  12. 2  cocos2dx/extensions/CCBReader/CCMenuItemImageLoader.h
  13. 2  cocos2dx/extensions/CCBReader/CCMenuItemLoader.h
  14. 2  cocos2dx/extensions/CCBReader/CCMenuLoader.h
  15. 2  cocos2dx/extensions/CCBReader/CCNodeLoaderListener.h
  16. 2  cocos2dx/extensions/CCBReader/CCParticleSystemQuadLoader.h
  17. 2  cocos2dx/extensions/CCBReader/CCScale9SpriteLoader.h
  18. 2  cocos2dx/extensions/CCBReader/CCSpriteLoader.h
  19. 4  cocos2dx/extensions/CCControlExtension/CCControlColourPicker.cpp
  20. 4  cocos2dx/extensions/CCControlExtension/CCControlColourPicker.h
  21. 4  cocos2dx/label_nodes/CCLabelBMFont.cpp
  22. 5  cocos2dx/label_nodes/CCLabelBMFont.h
  23. 5  cocos2dx/label_nodes/CCLabelTTF.cpp
  24. 4  cocos2dx/label_nodes/CCLabelTTF.h
  25. 14  cocos2dx/layers_scenes_transitions_nodes/CCLayer.h
  26. 6  cocos2dx/menu_nodes/CCMenuItem.cpp
  27. 5  cocos2dx/menu_nodes/CCMenuItem.h
  28. 7  cocos2dx/particle_nodes/CCParticleSystemQuad.cpp
  29. 3  cocos2dx/particle_nodes/CCParticleSystemQuad.h
  30. 138  cocos2dx/proj.win32/cocos2d-win32.vcproj
  31. 44  tests/proj.win32/test.win32.vcproj
  32. 16  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp
  33. 16  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.h
  34. 4  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlColourPicker/CCControlColourPickerTest.cpp
  35. 2  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlColourPicker/CCControlColourPickerTest.h
  36. 2  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.cpp
  37. 2  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.h
  38. 4  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.cpp
  39. 2  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.h
  40. 4  tests/tests/SchedulerTest/SchedulerTest.cpp
  41. 4  tests/tests/SchedulerTest/SchedulerTest.h
  42. 2  tests/tests/ShaderTest/ShaderTest.cpp
  43. 2  tests/tests/ShaderTest/ShaderTest.h
2  cocos2dx/extensions/CCBReader/CCBFileLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCBFileLoader : public CCNodeLoader {
  11
+class CC_DLL CCBFileLoader : public CCNodeLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCBFileLoader, loader);
14 14
 
2  cocos2dx/extensions/CCBReader/CCBMemberVariableAssigner.h
@@ -5,7 +5,7 @@
5 5
 
6 6
 NS_CC_EXT_BEGIN
7 7
 
8  
-class CCBMemberVariableAssigner {
  8
+class CC_DLL CCBMemberVariableAssigner {
9 9
     public:
10 10
         virtual bool onAssignCCBMemberVariable(CCObject * pTarget, const char * pMemberVariableName, CCNode * pNode) = 0;
11 11
 };
5  cocos2dx/extensions/CCBReader/CCBReader.cpp
@@ -92,12 +92,15 @@ CCNode * CCBReader::readNodeGraphFromFile(const char * pCCBRootPath, const char
92 92
 CCNode * CCBReader::readNodeGraphFromFile(const char * pCCBRootPath, const char * pCCBFileName, CCObject * pOwner, CCSize pRootContainerSize) {
93 93
     this->mCCBRootPath = pCCBRootPath;
94 94
 
95  
-    char ccbFullFilePath[strlen(pCCBRootPath) + strlen(pCCBFileName) + 1];
  95
+    char* ccbFullFilePath = (char*)malloc(strlen(pCCBRootPath) + strlen(pCCBFileName) + 1);
  96
+
96 97
     strcpy(ccbFullFilePath, pCCBRootPath);
97 98
     strcat(ccbFullFilePath, pCCBFileName);
98 99
 
99 100
     const char * path = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath(ccbFullFilePath);
100 101
 
  102
+    CC_SAFE_FREE(ccbFullFilePath);
  103
+
101 104
     unsigned long size = 0;
102 105
     this->mBytes = CCFileUtils::sharedFileUtils()->getFileData(path, "rb", &size);
103 106
 
2  cocos2dx/extensions/CCBReader/CCBSelectorResolver.h
@@ -5,7 +5,7 @@
5 5
 
6 6
 NS_CC_EXT_BEGIN
7 7
 
8  
-class CCBSelectorResolver {
  8
+class CC_DLL CCBSelectorResolver {
9 9
     public:
10 10
         virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuSelector(CCObject * pTarget, const char * pSelectorName) = 0;
11 11
         virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, const char * pSelectorName) = 0;
2  cocos2dx/extensions/CCBReader/CCControlButtonLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCControlButtonLoader : public CCControlLoader {
  11
+class CC_DLL CCControlButtonLoader : public CCControlLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCControlButtonLoader, loader);
14 14
 
2  cocos2dx/extensions/CCBReader/CCControlLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCControlLoader : public CCNodeLoader {
  11
+class CC_DLL CCControlLoader : public CCNodeLoader {
12 12
     protected:
13 13
         virtual CCControl * createCCNode(CCNode *, CCBReader *) = 0;
14 14
 
2  cocos2dx/extensions/CCBReader/CCLabelBMFontLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCLabelBMFontLoader : public CCNodeLoader {
  11
+class CC_DLL CCLabelBMFontLoader : public CCNodeLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLabelBMFontLoader, loader);
14 14
 
2  cocos2dx/extensions/CCBReader/CCLabelTTFLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCLabelTTFLoader : public CCNodeLoader {
  11
+class CC_DLL CCLabelTTFLoader : public CCNodeLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLabelTTFLoader, loader);
14 14
 
2  cocos2dx/extensions/CCBReader/CCLayerColorLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCLayerColorLoader : public CCLayerLoader {
  11
+class CC_DLL CCLayerColorLoader : public CCLayerLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerColorLoader, loader);
14 14
     protected:
2  cocos2dx/extensions/CCBReader/CCLayerGradientLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCLayerGradientLoader : public CCLayerLoader {
  11
+class CC_DLL CCLayerGradientLoader : public CCLayerLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerGradientLoader, loader);
14 14
 
2  cocos2dx/extensions/CCBReader/CCLayerLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCLayerLoader : public CCNodeLoader {
  11
+class CC_DLL CCLayerLoader : public CCNodeLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerLoader, loader);
14 14
 
2  cocos2dx/extensions/CCBReader/CCMenuItemImageLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCMenuItemImageLoader : public CCMenuItemLoader {
  11
+class CC_DLL CCMenuItemImageLoader : public CCMenuItemLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCMenuItemImageLoader, loader);
14 14
 
2  cocos2dx/extensions/CCBReader/CCMenuItemLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCMenuItemLoader : public CCNodeLoader {
  11
+class CC_DLL CCMenuItemLoader : public CCNodeLoader {
12 12
     protected:
13 13
         virtual CCMenuItem * createCCNode(CCNode *, CCBReader *) = 0;
14 14
 
2  cocos2dx/extensions/CCBReader/CCMenuLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCMenuLoader : public CCLayerLoader {
  11
+class CC_DLL CCMenuLoader : public CCLayerLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCMenuLoader, loader);
14 14
 
2  cocos2dx/extensions/CCBReader/CCNodeLoaderListener.h
@@ -5,7 +5,7 @@
5 5
 
6 6
 NS_CC_EXT_BEGIN
7 7
 
8  
-class CCNodeLoaderListener {
  8
+class CC_DLL CCNodeLoaderListener {
9 9
     public:
10 10
         virtual void onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader) = 0;
11 11
 };
2  cocos2dx/extensions/CCBReader/CCParticleSystemQuadLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCParticleSystemQuadLoader : public CCNodeLoader {
  11
+class CC_DLL CCParticleSystemQuadLoader : public CCNodeLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCParticleSystemQuadLoader, loader);
14 14
 
2  cocos2dx/extensions/CCBReader/CCScale9SpriteLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCScale9SpriteLoader : public CCNodeLoader {
  11
+class CC_DLL CCScale9SpriteLoader : public CCNodeLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCScale9SpriteLoader, loader);
14 14
 
2  cocos2dx/extensions/CCBReader/CCSpriteLoader.h
@@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
8 8
 /* Forward declaration. */
9 9
 class CCBReader;
10 10
 
11  
-class CCSpriteLoader : public CCNodeLoader {
  11
+class CC_DLL CCSpriteLoader : public CCNodeLoader {
12 12
     public:
13 13
         STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCSpriteLoader, loader);
14 14
 
4  cocos2dx/extensions/CCControlExtension/CCControlColourPicker.cpp
@@ -130,7 +130,7 @@ void CCControlColourPicker::updateHueAndControlPicker()
130 130
 }
131 131
 
132 132
 
133  
-void CCControlColourPicker::hueSliderValueChanged(CCObject * sender)
  133
+void CCControlColourPicker::hueSliderValueChanged(CCObject * sender, CCControlEvent controlEvent)
134 134
 {
135 135
     m_hsv.h      = ((CCControlHuePicker*)sender)->getHue();
136 136
 
@@ -143,7 +143,7 @@ void CCControlColourPicker::hueSliderValueChanged(CCObject * sender)
143 143
     updateControlPicker();
144 144
 }
145 145
 
146  
-void CCControlColourPicker::colourSliderValueChanged(CCObject * sender)
  146
+void CCControlColourPicker::colourSliderValueChanged(CCObject * sender, CCControlEvent controlEvent)
147 147
 {
148 148
     m_hsv.s=((CCControlSaturationBrightnessPicker*)sender)->getSaturation();
149 149
     m_hsv.v=((CCControlSaturationBrightnessPicker*)sender)->getBrightness();
4  cocos2dx/extensions/CCControlExtension/CCControlColourPicker.h
@@ -59,8 +59,8 @@ class CC_DLL CCControlColourPicker: public CCControl
59 59
 
60 60
     virtual bool init();
61 61
     //virtual ~CCControlColourPicker();
62  
-    void hueSliderValueChanged(CCObject * sender);
63  
-    void colourSliderValueChanged(CCObject * sender);
  62
+    void hueSliderValueChanged(CCObject * sender, CCControlEvent controlEvent);
  63
+    void colourSliderValueChanged(CCObject * sender, CCControlEvent controlEvent);
64 64
 
65 65
 protected:    
66 66
     void updateControlPicker();
4  cocos2dx/label_nodes/CCLabelBMFont.cpp
@@ -718,6 +718,10 @@ void CCLabelBMFont::purgeCachedData()
718 718
     FNTConfigRemoveCache();
719 719
 }
720 720
 
  721
+CCLabelBMFont * CCLabelBMFont::node()
{
    return CCLabelBMFont::create();
}
  722
+
  723
+CCLabelBMFont * CCLabelBMFont::create()
{
    CCLabelBMFont * pRet = new CCLabelBMFont();
    if (pRet && pRet->init())
    {
        pRet->autorelease();
        return pRet;
    }
    CC_SAFE_DELETE(pRet);
    return NULL;
}
  724
+
721 725
 CCLabelBMFont *CCLabelBMFont::labelWithString(const char *str, const char *fntFile, float width/* = kCCLabelAutomaticWidth*/, CCTextAlignment alignment/* = kCCTextAlignmentLeft*/, CCPoint imageOffset/* = CCPointZero*/)
722 726
 {
723 727
     return CCLabelBMFont::create(str, fntFile, width, alignment, imageOffset);
5  cocos2dx/label_nodes/CCLabelBMFont.h
@@ -201,9 +201,14 @@ class CC_DLL CCLabelBMFont : public CCSpriteBatchNode, public CCLabelProtocol, p
201 201
     static CCLabelBMFont * create(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero);
202 202
 
203 203
     /** Creates an label.
  204
+    @warning: This interface will be deprecated in future.
204 205
      */
205 206
     static CCLabelBMFont * node();
206 207
 
  208
+    /** Creates an label.
  209
+     */
  210
+    static CCLabelBMFont * create();
  211
+
207 212
     bool init();
208 213
     /** init a bitmap font altas with an initial string and the FNT file */
209 214
     bool initWithString(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero);
5  cocos2dx/label_nodes/CCLabelTTF.cpp
@@ -55,6 +55,11 @@ CCLabelTTF::~CCLabelTTF()
55 55
 
56 56
 CCLabelTTF * CCLabelTTF::node()
57 57
 {
  58
+    return CCLabelTTF::create();
  59
+}
  60
+
  61
+CCLabelTTF * CCLabelTTF::create()
  62
+{
58 63
     CCLabelTTF * pRet = new CCLabelTTF();
59 64
     if (pRet && pRet->init())
60 65
     {
4  cocos2dx/label_nodes/CCLabelTTF.h
@@ -90,6 +90,10 @@ class CC_DLL CCLabelTTF : public CCSprite, public CCLabelProtocol
90 90
      */
91 91
     static CCLabelTTF * node();
92 92
 
  93
+    /** Creates an label.
  94
+     */
  95
+    static CCLabelTTF * create();
  96
+
93 97
     /** changes the string to render
94 98
     * @warning Changing the string is as expensive as creating a new CCLabelTTF. To obtain better performance use CCLabelAtlas
95 99
     */
14  cocos2dx/layers_scenes_transitions_nodes/CCLayer.h
@@ -252,8 +252,9 @@ class CC_DLL CCLayerColor : public CCLayer , public CCRGBAProtocol, public CCBle
252 252
 
253 253
     virtual void setIsOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);}
254 254
     virtual bool getIsOpacityModifyRGB(void) { return false;}
255  
-    LAYER_CREATE_FUNC(CCLayerColor);
256  
-    
  255
+    //@warning: This interface will be deprecated in future.
  256
+    LAYER_CREATE_FUNC(CCLayerColor)
  257
+    LAYER_NODE_FUNC(CCLayerColor)
257 258
 protected:
258 259
     virtual void updateColor();
259 260
 };
@@ -317,7 +318,9 @@ class CC_DLL CCLayerGradient : public CCLayerColor
317 318
     */
318 319
     CC_PROPERTY(bool, m_bCompressedInterpolation, IsCompressedInterpolation)
319 320
 
320  
-    LAYER_CREATE_FUNC(CCLayerGradient);
  321
+    // @warning: This interface will be deprecated in future.
  322
+    LAYER_NODE_FUNC(CCLayerGradient)
  323
+    LAYER_CREATE_FUNC(CCLayerGradient)
321 324
 protected:
322 325
     virtual void updateColor();
323 326
 };
@@ -372,7 +375,10 @@ class CC_DLL CCLayerMultiplex : public CCLayer
372 375
     */
373 376
     void switchToAndReleaseMe(unsigned int n);
374 377
     
375  
-    LAYER_CREATE_FUNC(CCLayerMultiplex);
  378
+    //@warning: This interface will be deprecated in future.
  379
+    LAYER_NODE_FUNC(CCLayerMultiplex)
  380
+
  381
+    LAYER_CREATE_FUNC(CCLayerMultiplex)
376 382
 };
377 383
 
378 384
 NS_CC_END
6  cocos2dx/menu_nodes/CCMenuItem.cpp
@@ -693,9 +693,13 @@ void CCMenuItemSprite::updateImagesVisibility()
693 693
     }
694 694
 }
695 695
 
696  
-
697 696
 CCMenuItemImage* CCMenuItemImage::node()
698 697
 {
  698
+    return CCMenuItemImage::create();
  699
+}
  700
+
  701
+CCMenuItemImage* CCMenuItemImage::create()
  702
+{
699 703
     CCMenuItemImage *pRet = new CCMenuItemImage();
700 704
     if (pRet && pRet->init())
701 705
     {
5  cocos2dx/menu_nodes/CCMenuItem.h
@@ -339,8 +339,13 @@ class CC_DLL CCMenuItemImage : public CCMenuItemSprite
339 339
     /** sets the sprite frame for the disabled image */
340 340
     void setDisabledSpriteFrame(CCSpriteFrame* frame);
341 341
     /** Creates an CCMenuItemImage.
  342
+    @warning: This interface will be deprecated in future.
342 343
      */
343 344
     static CCMenuItemImage* node();
  345
+
  346
+    /** Creates an CCMenuItemImage.
  347
+     */
  348
+    static CCMenuItemImage* create();
344 349
 };
345 350
 
346 351
 /** @brief A CCMenuItemToggle
7  cocos2dx/particle_nodes/CCParticleSystemQuad.cpp
@@ -569,7 +569,12 @@ void CCParticleSystemQuad::setBatchNode(CCParticleBatchNode * batchNode)
569 569
     }
570 570
 }
571 571
 
572  
-CCParticleSystemQuad * CCParticleSystemQuad::node() {
  572
+CCParticleSystemQuad * CCParticleSystemQuad::node()
  573
+{
  574
+    return CCParticleSystemQuad::create();
  575
+}
  576
+
  577
+CCParticleSystemQuad * CCParticleSystemQuad::create() {
573 578
     CCParticleSystemQuad *pParticleSystemQuad = new CCParticleSystemQuad();
574 579
     if (pParticleSystemQuad && pParticleSystemQuad->init())
575 580
     {
3  cocos2dx/particle_nodes/CCParticleSystemQuad.h
@@ -101,7 +101,10 @@ class CC_DLL CCParticleSystemQuad : public CCParticleSystem
101 101
      */
102 102
     void listenBackToForeground(CCObject *obj);
103 103
 
  104
+    //@warning: This interface will be deprecated in future.
104 105
     static CCParticleSystemQuad * node();
  106
+
  107
+    static CCParticleSystemQuad * create();
105 108
 private:
106 109
 #if CC_TEXTURE_ATLAS_USE_VAO
107 110
     void setupVBOandVAO();
138  cocos2dx/proj.win32/cocos2d-win32.vcproj
@@ -1239,11 +1239,19 @@
1239 1239
 				Name="CCBReader"
1240 1240
 				>
1241 1241
 				<File
1242  
-					RelativePath="..\extensions\CCBReader\CCBCustomClass.cpp"
  1242
+					RelativePath="..\extensions\CCBReader\CCBFileLoader.cpp"
1243 1243
 					>
1244 1244
 				</File>
1245 1245
 				<File
1246  
-					RelativePath="..\extensions\CCBReader\CCBCustomClass.h"
  1246
+					RelativePath="..\extensions\CCBReader\CCBFileLoader.h"
  1247
+					>
  1248
+				</File>
  1249
+				<File
  1250
+					RelativePath="..\extensions\CCBReader\CCBMemberVariableAssigner.h"
  1251
+					>
  1252
+				</File>
  1253
+				<File
  1254
+					RelativePath="..\extensions\CCBReader\CCBReader.cpp"
1247 1255
 					>
1248 1256
 				</File>
1249 1257
 				<File
@@ -1251,7 +1259,131 @@
1251 1259
 					>
1252 1260
 				</File>
1253 1261
 				<File
1254  
-					RelativePath="..\extensions\CCBReader\CCBReader_v2.cpp"
  1262
+					RelativePath="..\extensions\CCBReader\CCBSelectorResolver.h"
  1263
+					>
  1264
+				</File>
  1265
+				<File
  1266
+					RelativePath="..\extensions\CCBReader\CCControlButtonLoader.cpp"
  1267
+					>
  1268
+				</File>
  1269
+				<File
  1270
+					RelativePath="..\extensions\CCBReader\CCControlButtonLoader.h"
  1271
+					>
  1272
+				</File>
  1273
+				<File
  1274
+					RelativePath="..\extensions\CCBReader\CCControlLoader.cpp"
  1275
+					>
  1276
+				</File>
  1277
+				<File
  1278
+					RelativePath="..\extensions\CCBReader\CCControlLoader.h"
  1279
+					>
  1280
+				</File>
  1281
+				<File
  1282
+					RelativePath="..\extensions\CCBReader\CCLabelBMFontLoader.cpp"
  1283
+					>
  1284
+				</File>
  1285
+				<File
  1286
+					RelativePath="..\extensions\CCBReader\CCLabelBMFontLoader.h"
  1287
+					>
  1288
+				</File>
  1289
+				<File
  1290
+					RelativePath="..\extensions\CCBReader\CCLabelTTFLoader.cpp"
  1291
+					>
  1292
+				</File>
  1293
+				<File
  1294
+					RelativePath="..\extensions\CCBReader\CCLabelTTFLoader.h"
  1295
+					>
  1296
+				</File>
  1297
+				<File
  1298
+					RelativePath="..\extensions\CCBReader\CCLayerColorLoader.cpp"
  1299
+					>
  1300
+				</File>
  1301
+				<File
  1302
+					RelativePath="..\extensions\CCBReader\CCLayerColorLoader.h"
  1303
+					>
  1304
+				</File>
  1305
+				<File
  1306
+					RelativePath="..\extensions\CCBReader\CCLayerGradientLoader.cpp"
  1307
+					>
  1308
+				</File>
  1309
+				<File
  1310
+					RelativePath="..\extensions\CCBReader\CCLayerGradientLoader.h"
  1311
+					>
  1312
+				</File>
  1313
+				<File
  1314
+					RelativePath="..\extensions\CCBReader\CCLayerLoader.cpp"
  1315
+					>
  1316
+				</File>
  1317
+				<File
  1318
+					RelativePath="..\extensions\CCBReader\CCLayerLoader.h"
  1319
+					>
  1320
+				</File>
  1321
+				<File
  1322
+					RelativePath="..\extensions\CCBReader\CCMenuItemImageLoader.cpp"
  1323
+					>
  1324
+				</File>
  1325
+				<File
  1326
+					RelativePath="..\extensions\CCBReader\CCMenuItemImageLoader.h"
  1327
+					>
  1328
+				</File>
  1329
+				<File
  1330
+					RelativePath="..\extensions\CCBReader\CCMenuItemLoader.cpp"
  1331
+					>
  1332
+				</File>
  1333
+				<File
  1334
+					RelativePath="..\extensions\CCBReader\CCMenuItemLoader.h"
  1335
+					>
  1336
+				</File>
  1337
+				<File
  1338
+					RelativePath="..\extensions\CCBReader\CCMenuLoader.cpp"
  1339
+					>
  1340
+				</File>
  1341
+				<File
  1342
+					RelativePath="..\extensions\CCBReader\CCMenuLoader.h"
  1343
+					>
  1344
+				</File>
  1345
+				<File
  1346
+					RelativePath="..\extensions\CCBReader\CCNodeLoader.cpp"
  1347
+					>
  1348
+				</File>
  1349
+				<File
  1350
+					RelativePath="..\extensions\CCBReader\CCNodeLoader.h"
  1351
+					>
  1352
+				</File>
  1353
+				<File
  1354
+					RelativePath="..\extensions\CCBReader\CCNodeLoaderLibrary.cpp"
  1355
+					>
  1356
+				</File>
  1357
+				<File
  1358
+					RelativePath="..\extensions\CCBReader\CCNodeLoaderLibrary.h"
  1359
+					>
  1360
+				</File>
  1361
+				<File
  1362
+					RelativePath="..\extensions\CCBReader\CCNodeLoaderListener.h"
  1363
+					>
  1364
+				</File>
  1365
+				<File
  1366
+					RelativePath="..\extensions\CCBReader\CCParticleSystemQuadLoader.cpp"
  1367
+					>
  1368
+				</File>
  1369
+				<File
  1370
+					RelativePath="..\extensions\CCBReader\CCParticleSystemQuadLoader.h"
  1371
+					>
  1372
+				</File>
  1373
+				<File
  1374
+					RelativePath="..\extensions\CCBReader\CCScale9SpriteLoader.cpp"
  1375
+					>
  1376
+				</File>
  1377
+				<File
  1378
+					RelativePath="..\extensions\CCBReader\CCScale9SpriteLoader.h"
  1379
+					>
  1380
+				</File>
  1381
+				<File
  1382
+					RelativePath="..\extensions\CCBReader\CCSpriteLoader.cpp"
  1383
+					>
  1384
+				</File>
  1385
+				<File
  1386
+					RelativePath="..\extensions\CCBReader\CCSpriteLoader.h"
1255 1387
 					>
1256 1388
 				</File>
1257 1389
 			</Filter>
44  tests/proj.win32/test.win32.vcproj
@@ -894,6 +894,22 @@
894 894
 						Name="CocosBuilderTest"
895 895
 						>
896 896
 						<File
  897
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\ButtonTestLayer.cpp"
  898
+							>
  899
+						</File>
  900
+						<File
  901
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\ButtonTestLayer.h"
  902
+							>
  903
+						</File>
  904
+						<File
  905
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\ButtonTestLayerLoader.cpp"
  906
+							>
  907
+						</File>
  908
+						<File
  909
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\ButtonTestLayerLoader.h"
  910
+							>
  911
+						</File>
  912
+						<File
897 913
 							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\CocosBuilderTest.cpp"
898 914
 							>
899 915
 						</File>
@@ -902,11 +918,35 @@
902 918
 							>
903 919
 						</File>
904 920
 						<File
905  
-							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder.cpp"
  921
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilderLayer.cpp"
  922
+							>
  923
+						</File>
  924
+						<File
  925
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilderLayer.h"
  926
+							>
  927
+						</File>
  928
+						<File
  929
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilderLayerLoader.cpp"
  930
+							>
  931
+						</File>
  932
+						<File
  933
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilderLayerLoader.h"
  934
+							>
  935
+						</File>
  936
+						<File
  937
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\TestHeaderLayer.cpp"
  938
+							>
  939
+						</File>
  940
+						<File
  941
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\TestHeaderLayer.h"
  942
+							>
  943
+						</File>
  944
+						<File
  945
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\TestHeaderLayerLoader.cpp"
906 946
 							>
907 947
 						</File>
908 948
 						<File
909  
-							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder.h"
  949
+							RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\TestHeaderLayerLoader.h"
910 950
 							>
911 951
 						</File>
912 952
 					</Filter>
16  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp
@@ -149,42 +149,42 @@ bool CCControlButtonTest_Event::init()
149 149
     return false;
150 150
 }
151 151
 
152  
-void CCControlButtonTest_Event::touchDownAction(CCObject *sender)
  152
+void CCControlButtonTest_Event::touchDownAction(CCObject *senderz, CCControlEvent controlEvent)
153 153
 {
154 154
     m_pDisplayValueLabel->setString(CCString::createWithFormat("Touch Down")->getCString());
155 155
 }
156 156
 
157  
-void CCControlButtonTest_Event::touchDragInsideAction(CCObject *sender)
  157
+void CCControlButtonTest_Event::touchDragInsideAction(CCObject *sender, CCControlEvent controlEvent)
158 158
 {
159 159
     m_pDisplayValueLabel->setString(CCString::createWithFormat("Drag Inside")->getCString());
160 160
 }
161 161
 
162  
-void CCControlButtonTest_Event::touchDragOutsideAction(CCObject *sender)
  162
+void CCControlButtonTest_Event::touchDragOutsideAction(CCObject *sender, CCControlEvent controlEvent)
163 163
 {
164 164
     m_pDisplayValueLabel->setString(CCString::createWithFormat("Drag Outside")->getCString());
165 165
 }
166 166
 
167  
-void CCControlButtonTest_Event::touchDragEnterAction(CCObject *sender)
  167
+void CCControlButtonTest_Event::touchDragEnterAction(CCObject *sender, CCControlEvent controlEvent)
168 168
 {
169 169
     m_pDisplayValueLabel->setString(CCString::createWithFormat("Drag Enter")->getCString());
170 170
 }
171 171
 
172  
-void CCControlButtonTest_Event::touchDragExitAction(CCObject *sender)
  172
+void CCControlButtonTest_Event::touchDragExitAction(CCObject *sender, CCControlEvent controlEvent)
173 173
 {
174 174
     m_pDisplayValueLabel->setString(CCString::createWithFormat("Drag Exit")->getCString());
175 175
 }
176 176
 
177  
-void CCControlButtonTest_Event::touchUpInsideAction(CCObject *sender)
  177
+void CCControlButtonTest_Event::touchUpInsideAction(CCObject *sender, CCControlEvent controlEvent)
178 178
 {
179 179
     m_pDisplayValueLabel->setString(CCString::createWithFormat("Touch Up Inside.")->getCString());
180 180
 }
181 181
 
182  
-void CCControlButtonTest_Event::touchUpOutsideAction(CCObject *sender)
  182
+void CCControlButtonTest_Event::touchUpOutsideAction(CCObject *sender, CCControlEvent controlEvent)
183 183
 {
184 184
     m_pDisplayValueLabel->setString(CCString::createWithFormat("Touch Up Outside.")->getCString());
185 185
 }
186 186
 
187  
-void CCControlButtonTest_Event::touchCancelAction(CCObject *sender)
  187
+void CCControlButtonTest_Event::touchCancelAction(CCObject *sender, CCControlEvent controlEvent)
188 188
 {
189 189
     m_pDisplayValueLabel->setString(CCString::createWithFormat("Touch Cancel")->getCString());
190 190
 }
16  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.h
@@ -44,14 +44,14 @@ class CCControlButtonTest_Event : public CCControlScene
44 44
     CCControlButtonTest_Event();
45 45
     ~CCControlButtonTest_Event();
46 46
     bool init();
47  
-    void touchDownAction(CCObject *sender);
48  
-    void touchDragInsideAction(CCObject *sender);
49  
-    void touchDragOutsideAction(CCObject *sender);
50  
-    void touchDragEnterAction(CCObject *sender);
51  
-    void touchDragExitAction(CCObject *sender);
52  
-    void touchUpInsideAction(CCObject *sender);
53  
-    void touchUpOutsideAction(CCObject *sender);
54  
-    void touchCancelAction(CCObject *sender);
  47
+    void touchDownAction(CCObject *sender, CCControlEvent controlEvent);
  48
+    void touchDragInsideAction(CCObject *sender, CCControlEvent controlEvent);
  49
+    void touchDragOutsideAction(CCObject *sender, CCControlEvent controlEvent);
  50
+    void touchDragEnterAction(CCObject *sender, CCControlEvent controlEvent);
  51
+    void touchDragExitAction(CCObject *sender, CCControlEvent controlEvent);
  52
+    void touchUpInsideAction(CCObject *sender, CCControlEvent controlEvent);
  53
+    void touchUpOutsideAction(CCObject *sender, CCControlEvent controlEvent);
  54
+    void touchCancelAction(CCObject *sender, CCControlEvent controlEvent);
55 55
 protected:
56 56
     CC_SYNTHESIZE_RETAIN(CCLabelTTF *, m_pDisplayValueLabel, DisplayValueLabel)
57 57
     CONTROL_SCENE_CREATE_FUNC(CCControlButtonTest_Event)
4  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlColourPicker/CCControlColourPickerTest.cpp
@@ -75,7 +75,7 @@ bool CCControlColourPickerTest::init()
75 75
         layer->setAnchorPoint(ccp (0.5f, 0.5f));
76 76
 
77 77
         // Update the color text
78  
-        colourValueChanged(colourPicker);
  78
+        colourValueChanged(colourPicker, CCControlEventValueChanged);
79 79
         return true;
80 80
     }
81 81
     return false;
@@ -87,7 +87,7 @@ CCControlColourPickerTest::~CCControlColourPickerTest()
87 87
     CC_SAFE_RELEASE(m_pColorLabel);
88 88
 }
89 89
 
90  
-void CCControlColourPickerTest::colourValueChanged(CCObject *sender)
  90
+void CCControlColourPickerTest::colourValueChanged(CCObject *sender, CCControlEvent controlEvent)
91 91
 {
92 92
     CCControlColourPicker* pPicker = (CCControlColourPicker*)sender;
93 93
     m_pColorLabel->setString(CCString::createWithFormat("#%02X%02X%02X",pPicker->getColorValue().r, pPicker->getColorValue().g, pPicker->getColorValue().b)->getCString());
2  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlColourPicker/CCControlColourPickerTest.h
@@ -32,7 +32,7 @@ class CCControlColourPickerTest : public CCControlScene
32 32
     virtual ~CCControlColourPickerTest();
33 33
     bool init();
34 34
     /** Callback for the change value. */
35  
-    void colourValueChanged(CCObject *sender);
  35
+    void colourValueChanged(CCObject *sender, CCControlEvent controlEvent);
36 36
 
37 37
     CC_SYNTHESIZE_RETAIN(CCLabelTTF*, m_pColorLabel, ColorLabel)
38 38
 
2  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.cpp
@@ -65,7 +65,7 @@ bool CCControlSliderTest::init()
65 65
     return false;
66 66
 }
67 67
 
68  
-void CCControlSliderTest::valueChanged(CCObject *sender)
  68
+void CCControlSliderTest::valueChanged(CCObject *sender, CCControlEvent controlEvent)
69 69
 {
70 70
     CCControlSlider* pSlider = (CCControlSlider*)sender;
71 71
     // Change value of label.
2  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.h
@@ -31,7 +31,7 @@ class CCControlSliderTest : public CCControlScene
31 31
     CCControlSliderTest();
32 32
     virtual ~CCControlSliderTest();
33 33
     bool init();
34  
-    void valueChanged(CCObject *sender);
  34
+    void valueChanged(CCObject *sender, CCControlEvent controlEvent);
35 35
 protected:
36 36
     CCLabelTTF* m_pDisplayValueLabel;
37 37
     CONTROL_SCENE_CREATE_FUNC(CCControlSliderTest)
4  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.cpp
@@ -78,13 +78,13 @@ bool CCControlSwitchTest::init()
78 78
         layer->setAnchorPoint(ccp (0.5f, 0.5f));
79 79
         
80 80
         // Update the value label
81  
-        valueChanged(switchControl);
  81
+        valueChanged(switchControl, CCControlEventValueChanged);
82 82
         return true;
83 83
     }
84 84
     return false;
85 85
 }
86 86
 
87  
-void CCControlSwitchTest::valueChanged(CCObject* sender)
  87
+void CCControlSwitchTest::valueChanged(CCObject* sender, CCControlEvent controlEvent)
88 88
 {
89 89
     CCControlSwitch* pSwitch = (CCControlSwitch*)sender;
90 90
     if (pSwitch->getIsOn())
2  tests/tests/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.h
@@ -32,7 +32,7 @@ class CCControlSwitchTest : public CCControlScene
32 32
     virtual ~CCControlSwitchTest();
33 33
     bool init();
34 34
     /** Callback for the change value. */
35  
-    void valueChanged(CCObject* sender);
  35
+    void valueChanged(CCObject* sender, CCControlEvent controlEvent);
36 36
     CCLabelTTF *m_pDisplayValueLabel;
37 37
     CONTROL_SCENE_CREATE_FUNC(CCControlSwitchTest)
38 38
 };
4  tests/tests/SchedulerTest/SchedulerTest.cpp
@@ -874,7 +874,7 @@ CCControlSlider* SchedulerTimeScale::sliderCtl()
874 874
     return slider;
875 875
 }
876 876
 
877  
-void SchedulerTimeScale::sliderAction(CCObject* pSender)
  877
+void SchedulerTimeScale::sliderAction(CCObject* pSender, CCControlEvent controlEvent)
878 878
 {
879 879
     CCControlSlider* pSliderCtl = (CCControlSlider*)pSender;
880 880
     float scale;
@@ -966,7 +966,7 @@ CCControlSlider *TwoSchedulers::sliderCtl()
966 966
     return slider;
967 967
 }
968 968
 
969  
-void TwoSchedulers::sliderAction(CCObject* sender)
  969
+void TwoSchedulers::sliderAction(CCObject* sender, CCControlEvent controlEvent)
970 970
 {
971 971
     float scale;
972 972
 
4  tests/tests/SchedulerTest/SchedulerTest.h
@@ -223,7 +223,7 @@ class SchedulerTimeScale : public SchedulerTestLayer
223 223
     virtual std::string title();
224 224
     virtual std::string subtitle();
225 225
     CCControlSlider* sliderCtl();
226  
-    void sliderAction(CCObject* pSender);
  226
+    void sliderAction(CCObject* pSender, CCControlEvent controlEvent);
227 227
     CCControlSlider* m_pSliderCtl;
228 228
 };
229 229
 
@@ -236,7 +236,7 @@ class TwoSchedulers : public SchedulerTestLayer
236 236
     virtual std::string subtitle();
237 237
     void onEnter();
238 238
     CCControlSlider* sliderCtl();
239  
-    void sliderAction(CCObject* sender);
  239
+    void sliderAction(CCObject* sender, CCControlEvent controlEvent);
240 240
     CCScheduler *sched1;
241 241
     CCScheduler *sched2;
242 242
     CCActionManager *actionManager1;
2  tests/tests/ShaderTest/ShaderTest.cpp
@@ -611,7 +611,7 @@ bool ShaderBlur::init()
611 611
     return false;
612 612
 }
613 613
 
614  
-void ShaderBlur::sliderAction(CCObject* sender)
  614
+void ShaderBlur::sliderAction(CCObject* sender, CCControlEvent controlEvent)
615 615
 {
616 616
     CCControlSlider* pSlider = (CCControlSlider*)sender;
617 617
     m_pBlurSprite->setBlurSize(pSlider->getValue());
2  tests/tests/ShaderTest/ShaderTest.h
@@ -89,7 +89,7 @@ class ShaderBlur : public ShaderTestDemo
89 89
     virtual std::string subtitle();
90 90
     virtual bool init();
91 91
     CCControlSlider* createSliderCtl();
92  
-    void sliderAction(CCObject* sender);
  92
+    void sliderAction(CCObject* sender, CCControlEvent controlEvent);
93 93
 protected:
94 94
     SpriteBlur* m_pBlurSprite;
95 95
     CCControlSlider* m_pSliderCtl;

0 notes on commit a45ea80

Please sign in to comment.
Something went wrong with that request. Please try again.