mirror of https://github.com/axmolengine/axmol.git
Cleaned up CCNodeLoaders by using the Marco instead of having a boilerplate createCCNode method in all the cpp files.
This commit is contained in:
parent
aa83408ba7
commit
227683bfa4
|
@ -67,7 +67,6 @@ extensions/CCBReader/CCLabelTTFLoader.cpp \
|
||||||
extensions/CCBReader/CCLayerLoader.cpp \
|
extensions/CCBReader/CCLayerLoader.cpp \
|
||||||
extensions/CCBReader/CCLayerColorLoader.cpp \
|
extensions/CCBReader/CCLayerColorLoader.cpp \
|
||||||
extensions/CCBReader/CCLayerGradientLoader.cpp \
|
extensions/CCBReader/CCLayerGradientLoader.cpp \
|
||||||
extensions/CCBReader/CCMenuLoader.cpp \
|
|
||||||
extensions/CCBReader/CCMenuItemLoader.cpp \
|
extensions/CCBReader/CCMenuItemLoader.cpp \
|
||||||
extensions/CCBReader/CCMenuItemImageLoader.cpp \
|
extensions/CCBReader/CCMenuItemImageLoader.cpp \
|
||||||
extensions/CCBReader/CCSpriteLoader.cpp \
|
extensions/CCBReader/CCSpriteLoader.cpp \
|
||||||
|
|
|
@ -5,10 +5,6 @@ USING_NS_CC_EXT;
|
||||||
|
|
||||||
#define PROPERTY_CCBFILE "ccbFile"
|
#define PROPERTY_CCBFILE "ccbFile"
|
||||||
|
|
||||||
CCNode * CCBFileLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCNode::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCBFileLoader::onHandlePropTypeCCBFile(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCNode * pCCBFileNode, CCBReader * pCCBReader) {
|
void CCBFileLoader::onHandlePropTypeCCBFile(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCNode * pCCBFileNode, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_CCBFILE) == 0) {
|
if(pPropertyName->compare(PROPERTY_CCBFILE) == 0) {
|
||||||
pNode->addChild(pCCBFileNode);
|
pNode->addChild(pCCBFileNode);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCBFileLoader : public CCNodeLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCBFileLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCBFileLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCNode * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCNode);
|
||||||
|
|
||||||
virtual void onHandlePropTypeCCBFile(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCNode *, CCBReader *);
|
virtual void onHandlePropTypeCCBFile(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCNode *, CCBReader *);
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,10 +22,6 @@ USING_NS_CC_EXT;
|
||||||
#define PROPERTY_BACKGROUNDSPRITEFRAME_HIGHLIGHTED "backgroundSpriteFrame|2"
|
#define PROPERTY_BACKGROUNDSPRITEFRAME_HIGHLIGHTED "backgroundSpriteFrame|2"
|
||||||
#define PROPERTY_BACKGROUNDSPRITEFRAME_DISABLED "backgroundSpriteFrame|3"
|
#define PROPERTY_BACKGROUNDSPRITEFRAME_DISABLED "backgroundSpriteFrame|3"
|
||||||
|
|
||||||
CCControl * CCControlButtonLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCControlButton::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCControlButtonLoader::onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool pCheck, CCBReader * pCCBReader) {
|
void CCControlButtonLoader::onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool pCheck, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_ZOOMONTOUCHDOWN) == 0) {
|
if(pPropertyName->compare(PROPERTY_ZOOMONTOUCHDOWN) == 0) {
|
||||||
((CCControlButton *)pNode)->setZoomOnTouchDown(pCheck);
|
((CCControlButton *)pNode)->setZoomOnTouchDown(pCheck);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCControlButtonLoader : public CCControlLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCControlButtonLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCControlButtonLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCControl * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCControlButton);
|
||||||
|
|
||||||
virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool, CCBReader *);
|
virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool, CCBReader *);
|
||||||
virtual void onHandlePropTypeString(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCString *, CCBReader *);
|
virtual void onHandlePropTypeString(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCString *, CCBReader *);
|
||||||
|
|
|
@ -13,7 +13,7 @@ class CC_DLL CCControlLoader : public CCNodeLoader {
|
||||||
virtual ~CCControlLoader() {};
|
virtual ~CCControlLoader() {};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCControl * createCCNode(CCNode *, CCBReader *) = 0;
|
CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCControl);
|
||||||
|
|
||||||
virtual void onHandlePropTypeBlockCCControl(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, BlockCCControlData *, CCBReader *);
|
virtual void onHandlePropTypeBlockCCControl(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, BlockCCControlData *, CCBReader *);
|
||||||
virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool, CCBReader *);
|
virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool, CCBReader *);
|
||||||
|
|
|
@ -9,10 +9,6 @@ USING_NS_CC_EXT;
|
||||||
#define PROPERTY_FNTFILE "fntFile"
|
#define PROPERTY_FNTFILE "fntFile"
|
||||||
#define PROPERTY_STRING "string"
|
#define PROPERTY_STRING "string"
|
||||||
|
|
||||||
CCLabelBMFont * CCLabelBMFontLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCLabelBMFont::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCLabelBMFontLoader::onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader) {
|
void CCLabelBMFontLoader::onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_COLOR) == 0) {
|
if(pPropertyName->compare(PROPERTY_COLOR) == 0) {
|
||||||
((CCLabelBMFont *)pNode)->setColor(pCCColor3B);
|
((CCLabelBMFont *)pNode)->setColor(pCCColor3B);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCLabelBMFontLoader : public CCNodeLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLabelBMFontLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLabelBMFontLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCLabelBMFont * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCLabelBMFont);
|
||||||
|
|
||||||
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
||||||
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
||||||
|
|
|
@ -13,10 +13,6 @@ USING_NS_CC_EXT;
|
||||||
#define PROPERTY_STRING "string"
|
#define PROPERTY_STRING "string"
|
||||||
#define PROPERTY_DIMENSIONS "dimensions"
|
#define PROPERTY_DIMENSIONS "dimensions"
|
||||||
|
|
||||||
CCLabelTTF * CCLabelTTFLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCLabelTTF::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCLabelTTFLoader::onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader) {
|
void CCLabelTTFLoader::onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_COLOR) == 0) {
|
if(pPropertyName->compare(PROPERTY_COLOR) == 0) {
|
||||||
((CCLabelTTF *)pNode)->setColor(pCCColor3B);
|
((CCLabelTTF *)pNode)->setColor(pCCColor3B);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCLabelTTFLoader : public CCNodeLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLabelTTFLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLabelTTFLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCLabelTTF * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCLabelTTF);
|
||||||
|
|
||||||
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
||||||
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
||||||
|
|
|
@ -7,10 +7,6 @@ USING_NS_CC_EXT;
|
||||||
#define PROPERTY_OPACITY "opacity"
|
#define PROPERTY_OPACITY "opacity"
|
||||||
#define PROPERTY_BLENDFUNC "blendFunc"
|
#define PROPERTY_BLENDFUNC "blendFunc"
|
||||||
|
|
||||||
CCLayerColor * CCLayerColorLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCLayerColor::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCLayerColorLoader::onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader) {
|
void CCLayerColorLoader::onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_COLOR) == 0) {
|
if(pPropertyName->compare(PROPERTY_COLOR) == 0) {
|
||||||
((CCLayerColor *)pNode)->setColor(pCCColor3B);
|
((CCLayerColor *)pNode)->setColor(pCCColor3B);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCLayerColorLoader : public CCLayerLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerColorLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerColorLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCLayerColor * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCLayerColor);
|
||||||
|
|
||||||
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
||||||
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
||||||
|
|
|
@ -10,10 +10,6 @@ USING_NS_CC_EXT;
|
||||||
#define PROPERTY_VECTOR "vector"
|
#define PROPERTY_VECTOR "vector"
|
||||||
#define PROPERTY_BLENDFUNC "blendFunc"
|
#define PROPERTY_BLENDFUNC "blendFunc"
|
||||||
|
|
||||||
CCLayerGradient * CCLayerGradientLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCLayerGradient::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCLayerGradientLoader::onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader) {
|
void CCLayerGradientLoader::onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_STARTCOLOR) == 0) {
|
if(pPropertyName->compare(PROPERTY_STARTCOLOR) == 0) {
|
||||||
((CCLayerGradient *)pNode)->setStartColor(pCCColor3B);
|
((CCLayerGradient *)pNode)->setStartColor(pCCColor3B);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCLayerGradientLoader : public CCLayerLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerGradientLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerGradientLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCLayerGradient * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCLayerGradient);
|
||||||
|
|
||||||
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
||||||
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
||||||
|
|
|
@ -8,10 +8,6 @@ USING_NS_CC_EXT;
|
||||||
#define PROPERTY_MOUSE_ENABLED "isMouseEnabled"
|
#define PROPERTY_MOUSE_ENABLED "isMouseEnabled"
|
||||||
#define PROPERTY_KEYBOARD_ENABLED "isKeyboardEnabled"
|
#define PROPERTY_KEYBOARD_ENABLED "isKeyboardEnabled"
|
||||||
|
|
||||||
CCLayer * CCLayerLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCLayer::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCLayerLoader::onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool pCheck, CCBReader * pCCBReader) {
|
void CCLayerLoader::onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool pCheck, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_TOUCH_ENABLED) == 0) {
|
if(pPropertyName->compare(PROPERTY_TOUCH_ENABLED) == 0) {
|
||||||
((CCLayer *)pNode)->setTouchEnabled(pCheck);
|
((CCLayer *)pNode)->setTouchEnabled(pCheck);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCLayerLoader : public CCNodeLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCLayer * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCLayer);
|
||||||
|
|
||||||
virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool pCheck, CCBReader * pCCBReader);
|
virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool pCheck, CCBReader * pCCBReader);
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,10 +7,6 @@ USING_NS_CC_EXT;
|
||||||
#define PROPERTY_SELECTEDDISPLAYFRAME "selectedSpriteFrame"
|
#define PROPERTY_SELECTEDDISPLAYFRAME "selectedSpriteFrame"
|
||||||
#define PROPERTY_DISABLEDDISPLAYFRAME "disabledSpriteFrame"
|
#define PROPERTY_DISABLEDDISPLAYFRAME "disabledSpriteFrame"
|
||||||
|
|
||||||
CCMenuItemImage * CCMenuItemImageLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCMenuItemImage::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCMenuItemImageLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader) {
|
void CCMenuItemImageLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_NORMALDISPLAYFRAME) == 0) {
|
if(pPropertyName->compare(PROPERTY_NORMALDISPLAYFRAME) == 0) {
|
||||||
if(pCCSpriteFrame != NULL) {
|
if(pCCSpriteFrame != NULL) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCMenuItemImageLoader : public CCMenuItemLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCMenuItemImageLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCMenuItemImageLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCMenuItemImage * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCMenuItemImage);
|
||||||
|
|
||||||
virtual void onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCSpriteFrame *, CCBReader *);
|
virtual void onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCSpriteFrame *, CCBReader *);
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,8 +11,9 @@ class CCBReader;
|
||||||
class CC_DLL CCMenuItemLoader : public CCNodeLoader {
|
class CC_DLL CCMenuItemLoader : public CCNodeLoader {
|
||||||
public:
|
public:
|
||||||
virtual ~CCMenuItemLoader() {};
|
virtual ~CCMenuItemLoader() {};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCMenuItem * createCCNode(CCNode *, CCBReader *) = 0;
|
CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCMenuItem);
|
||||||
|
|
||||||
virtual void onHandlePropTypeBlock(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, BlockData *, CCBReader *);
|
virtual void onHandlePropTypeBlock(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, BlockData *, CCBReader *);
|
||||||
virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool, CCBReader *);
|
virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, bool, CCBReader *);
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
#include "CCMenuLoader.h"
|
|
||||||
|
|
||||||
USING_NS_CC;
|
|
||||||
USING_NS_CC_EXT;
|
|
||||||
|
|
||||||
|
|
||||||
CCMenu * CCMenuLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCMenu::node();
|
|
||||||
}
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCMenuLoader : public CCLayerLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCMenuLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCMenuLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCMenu * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCMenu);
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_CC_EXT_END
|
NS_CC_EXT_END
|
||||||
|
|
|
@ -25,10 +25,6 @@ CCNode * CCNodeLoader::loadCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
||||||
return ccNode;
|
return ccNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
CCNode * CCNodeLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCNode::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCNodeLoader::parseProperties(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader) {
|
void CCNodeLoader::parseProperties(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader) {
|
||||||
int propertyCount = pCCBReader->readInt(false);
|
int propertyCount = pCCBReader->readInt(false);
|
||||||
for(int i = 0; i < propertyCount; i++) {
|
for(int i = 0; i < propertyCount; i++) {
|
||||||
|
|
|
@ -10,6 +10,8 @@ NS_CC_EXT_BEGIN
|
||||||
return T::node(); \
|
return T::node(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createCCNode(cocos2d::CCNode * pParent, cocos2d::extension::CCBReader * pCCBReader) = 0
|
||||||
|
|
||||||
struct BlockData {
|
struct BlockData {
|
||||||
SEL_MenuHandler mSELMenuHandler;
|
SEL_MenuHandler mSELMenuHandler;
|
||||||
CCObject * mTarget;
|
CCObject * mTarget;
|
||||||
|
@ -33,7 +35,7 @@ class CC_DLL CCNodeLoader : public CCObject {
|
||||||
virtual void parseProperties(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader);
|
virtual void parseProperties(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCNode * createCCNode(CCNode * pParent, CCBReader * pCCBReader);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCNode);
|
||||||
|
|
||||||
virtual CCPoint parsePropTypePosition(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader);
|
virtual CCPoint parsePropTypePosition(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader);
|
||||||
virtual CCPoint parsePropTypePoint(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader);
|
virtual CCPoint parsePropTypePoint(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader);
|
||||||
|
|
|
@ -26,10 +26,6 @@ USING_NS_CC_EXT;
|
||||||
#define PROPERTY_ENDRADIUS "endRadius"
|
#define PROPERTY_ENDRADIUS "endRadius"
|
||||||
#define PROPERTY_ROTATEPERSECOND "rotatePerSecond"
|
#define PROPERTY_ROTATEPERSECOND "rotatePerSecond"
|
||||||
|
|
||||||
CCParticleSystemQuad * CCParticleSystemQuadLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCParticleSystemQuad::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCParticleSystemQuadLoader::onHandlePropTypeIntegerLabeled(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, int pIntegerLabeled, CCBReader * pCCBReader) {
|
void CCParticleSystemQuadLoader::onHandlePropTypeIntegerLabeled(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, int pIntegerLabeled, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_EMITERMODE) == 0) {
|
if(pPropertyName->compare(PROPERTY_EMITERMODE) == 0) {
|
||||||
((CCParticleSystemQuad *)pNode)->setEmitterMode(pIntegerLabeled);
|
((CCParticleSystemQuad *)pNode)->setEmitterMode(pIntegerLabeled);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCParticleSystemQuadLoader : public CCNodeLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCParticleSystemQuadLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCParticleSystemQuadLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCParticleSystemQuad * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCParticleSystemQuad);
|
||||||
|
|
||||||
virtual void onHandlePropTypeIntegerLabeled(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, int, CCBReader *);
|
virtual void onHandlePropTypeIntegerLabeled(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, int, CCBReader *);
|
||||||
virtual void onHandlePropTypePoint(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCPoint, CCBReader *);
|
virtual void onHandlePropTypePoint(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCPoint, CCBReader *);
|
||||||
|
|
|
@ -14,10 +14,6 @@ USING_NS_CC_EXT;
|
||||||
#define PROPERTY_INSETRIGHT "insetRight"
|
#define PROPERTY_INSETRIGHT "insetRight"
|
||||||
#define PROPERTY_INSETBOTTOM "insetBottom"
|
#define PROPERTY_INSETBOTTOM "insetBottom"
|
||||||
|
|
||||||
CCScale9Sprite * CCScale9SpriteLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCScale9Sprite::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCScale9SpriteLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader) {
|
void CCScale9SpriteLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_SPRITEFRAME) == 0) {
|
if(pPropertyName->compare(PROPERTY_SPRITEFRAME) == 0) {
|
||||||
((CCScale9Sprite *)pNode)->initWithSpriteFrame(pCCSpriteFrame);
|
((CCScale9Sprite *)pNode)->initWithSpriteFrame(pCCSpriteFrame);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCScale9SpriteLoader : public CCNodeLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCScale9SpriteLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCScale9SpriteLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCScale9Sprite * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCScale9Sprite);
|
||||||
|
|
||||||
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
||||||
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
#include "CCScrollViewLoader.h"
|
#include "CCScrollViewLoader.h"
|
||||||
|
|
||||||
NS_CC_EXT_BEGIN
|
USING_NS_CC;
|
||||||
|
USING_NS_CC_EXT;
|
||||||
CCScrollView * CCScrollViewLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCScrollView::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCScrollViewLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader) {
|
void CCScrollViewLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader) {
|
||||||
|
|
||||||
|
@ -30,5 +27,3 @@ void CCScrollViewLoader::onHandlePropTypeFloat(CCNode * pNode, CCNode * pParent,
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_EXT_END
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCScrollViewLoader : public CCNodeLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCScrollViewLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCScrollViewLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCScrollView * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCScrollView);
|
||||||
|
|
||||||
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
||||||
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
||||||
|
|
|
@ -9,10 +9,6 @@ USING_NS_CC_EXT;
|
||||||
#define PROPERTY_OPACITY "opacity"
|
#define PROPERTY_OPACITY "opacity"
|
||||||
#define PROPERTY_BLENDFUNC "blendFunc"
|
#define PROPERTY_BLENDFUNC "blendFunc"
|
||||||
|
|
||||||
CCSprite * CCSpriteLoader::createCCNode(CCNode * pParent, CCBReader * pCCBReader) {
|
|
||||||
return CCSprite::node();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CCSpriteLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader) {
|
void CCSpriteLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader) {
|
||||||
if(pPropertyName->compare(PROPERTY_DISPLAYFRAME) == 0) {
|
if(pPropertyName->compare(PROPERTY_DISPLAYFRAME) == 0) {
|
||||||
((CCSprite *)pNode)->setDisplayFrame(pCCSpriteFrame);
|
((CCSprite *)pNode)->setDisplayFrame(pCCSpriteFrame);
|
||||||
|
|
|
@ -14,7 +14,7 @@ class CC_DLL CCSpriteLoader : public CCNodeLoader {
|
||||||
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCSpriteLoader, loader);
|
CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCSpriteLoader, loader);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual CCSprite * createCCNode(CCNode *, CCBReader *);
|
CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCSprite);
|
||||||
|
|
||||||
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, ccColor3B, CCBReader *);
|
||||||
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, CCString * pPropertyName, unsigned char, CCBReader *);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
b0bc510824d786752a37f8b48a77a4c418c146b4
|
96920b02a30e4746149c7b1b150ff3f6d9cd4e68
|
Loading…
Reference in New Issue