mirror of https://github.com/axmolengine/axmol.git
fixed #1324: Added some create methods. Compiling successfully on win32 by vs2008.
This commit is contained in:
parent
3a410c14a1
commit
052d8ea931
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCBFileLoader : public CCNodeLoader {
|
||||
class CC_DLL CCBFileLoader : public CCNodeLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCBFileLoader, loader);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
NS_CC_EXT_BEGIN
|
||||
|
||||
class CCBMemberVariableAssigner {
|
||||
class CC_DLL CCBMemberVariableAssigner {
|
||||
public:
|
||||
virtual bool onAssignCCBMemberVariable(CCObject * pTarget, const char * pMemberVariableName, CCNode * pNode) = 0;
|
||||
};
|
||||
|
|
|
@ -92,12 +92,15 @@ CCNode * CCBReader::readNodeGraphFromFile(const char * pCCBRootPath, const char
|
|||
CCNode * CCBReader::readNodeGraphFromFile(const char * pCCBRootPath, const char * pCCBFileName, CCObject * pOwner, CCSize pRootContainerSize) {
|
||||
this->mCCBRootPath = pCCBRootPath;
|
||||
|
||||
char ccbFullFilePath[strlen(pCCBRootPath) + strlen(pCCBFileName) + 1];
|
||||
char* ccbFullFilePath = (char*)malloc(strlen(pCCBRootPath) + strlen(pCCBFileName) + 1);
|
||||
|
||||
strcpy(ccbFullFilePath, pCCBRootPath);
|
||||
strcat(ccbFullFilePath, pCCBFileName);
|
||||
|
||||
const char * path = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath(ccbFullFilePath);
|
||||
|
||||
CC_SAFE_FREE(ccbFullFilePath);
|
||||
|
||||
unsigned long size = 0;
|
||||
this->mBytes = CCFileUtils::sharedFileUtils()->getFileData(path, "rb", &size);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
NS_CC_EXT_BEGIN
|
||||
|
||||
class CCBSelectorResolver {
|
||||
class CC_DLL CCBSelectorResolver {
|
||||
public:
|
||||
virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuSelector(CCObject * pTarget, const char * pSelectorName) = 0;
|
||||
virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, const char * pSelectorName) = 0;
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCControlButtonLoader : public CCControlLoader {
|
||||
class CC_DLL CCControlButtonLoader : public CCControlLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCControlButtonLoader, loader);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCControlLoader : public CCNodeLoader {
|
||||
class CC_DLL CCControlLoader : public CCNodeLoader {
|
||||
protected:
|
||||
virtual CCControl * createCCNode(CCNode *, CCBReader *) = 0;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCLabelBMFontLoader : public CCNodeLoader {
|
||||
class CC_DLL CCLabelBMFontLoader : public CCNodeLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLabelBMFontLoader, loader);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCLabelTTFLoader : public CCNodeLoader {
|
||||
class CC_DLL CCLabelTTFLoader : public CCNodeLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLabelTTFLoader, loader);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCLayerColorLoader : public CCLayerLoader {
|
||||
class CC_DLL CCLayerColorLoader : public CCLayerLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerColorLoader, loader);
|
||||
protected:
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCLayerGradientLoader : public CCLayerLoader {
|
||||
class CC_DLL CCLayerGradientLoader : public CCLayerLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerGradientLoader, loader);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCLayerLoader : public CCNodeLoader {
|
||||
class CC_DLL CCLayerLoader : public CCNodeLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerLoader, loader);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCMenuItemImageLoader : public CCMenuItemLoader {
|
||||
class CC_DLL CCMenuItemImageLoader : public CCMenuItemLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCMenuItemImageLoader, loader);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCMenuItemLoader : public CCNodeLoader {
|
||||
class CC_DLL CCMenuItemLoader : public CCNodeLoader {
|
||||
protected:
|
||||
virtual CCMenuItem * createCCNode(CCNode *, CCBReader *) = 0;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCMenuLoader : public CCLayerLoader {
|
||||
class CC_DLL CCMenuLoader : public CCLayerLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCMenuLoader, loader);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
NS_CC_EXT_BEGIN
|
||||
|
||||
class CCNodeLoaderListener {
|
||||
class CC_DLL CCNodeLoaderListener {
|
||||
public:
|
||||
virtual void onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader) = 0;
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCParticleSystemQuadLoader : public CCNodeLoader {
|
||||
class CC_DLL CCParticleSystemQuadLoader : public CCNodeLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCParticleSystemQuadLoader, loader);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCScale9SpriteLoader : public CCNodeLoader {
|
||||
class CC_DLL CCScale9SpriteLoader : public CCNodeLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCScale9SpriteLoader, loader);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ NS_CC_EXT_BEGIN
|
|||
/* Forward declaration. */
|
||||
class CCBReader;
|
||||
|
||||
class CCSpriteLoader : public CCNodeLoader {
|
||||
class CC_DLL CCSpriteLoader : public CCNodeLoader {
|
||||
public:
|
||||
STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCSpriteLoader, loader);
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ void CCControlColourPicker::updateHueAndControlPicker()
|
|||
}
|
||||
|
||||
|
||||
void CCControlColourPicker::hueSliderValueChanged(CCObject * sender)
|
||||
void CCControlColourPicker::hueSliderValueChanged(CCObject * sender, CCControlEvent controlEvent)
|
||||
{
|
||||
m_hsv.h = ((CCControlHuePicker*)sender)->getHue();
|
||||
|
||||
|
@ -143,7 +143,7 @@ void CCControlColourPicker::hueSliderValueChanged(CCObject * sender)
|
|||
updateControlPicker();
|
||||
}
|
||||
|
||||
void CCControlColourPicker::colourSliderValueChanged(CCObject * sender)
|
||||
void CCControlColourPicker::colourSliderValueChanged(CCObject * sender, CCControlEvent controlEvent)
|
||||
{
|
||||
m_hsv.s=((CCControlSaturationBrightnessPicker*)sender)->getSaturation();
|
||||
m_hsv.v=((CCControlSaturationBrightnessPicker*)sender)->getBrightness();
|
||||
|
|
|
@ -59,8 +59,8 @@ public:
|
|||
|
||||
virtual bool init();
|
||||
//virtual ~CCControlColourPicker();
|
||||
void hueSliderValueChanged(CCObject * sender);
|
||||
void colourSliderValueChanged(CCObject * sender);
|
||||
void hueSliderValueChanged(CCObject * sender, CCControlEvent controlEvent);
|
||||
void colourSliderValueChanged(CCObject * sender, CCControlEvent controlEvent);
|
||||
|
||||
protected:
|
||||
void updateControlPicker();
|
||||
|
|
|
@ -718,6 +718,10 @@ void CCLabelBMFont::purgeCachedData()
|
|||
FNTConfigRemoveCache();
|
||||
}
|
||||
|
||||
CCLabelBMFont * CCLabelBMFont::node()
{
return CCLabelBMFont::create();
}
|
||||
|
||||
CCLabelBMFont * CCLabelBMFont::create()
{
CCLabelBMFont * pRet = new CCLabelBMFont();
if (pRet && pRet->init())
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
|
||||
|
||||
CCLabelBMFont *CCLabelBMFont::labelWithString(const char *str, const char *fntFile, float width/* = kCCLabelAutomaticWidth*/, CCTextAlignment alignment/* = kCCTextAlignmentLeft*/, CCPoint imageOffset/* = CCPointZero*/)
|
||||
{
|
||||
return CCLabelBMFont::create(str, fntFile, width, alignment, imageOffset);
|
||||
|
|
|
@ -201,9 +201,14 @@ public:
|
|||
static CCLabelBMFont * create(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero);
|
||||
|
||||
/** Creates an label.
|
||||
@warning: This interface will be deprecated in future.
|
||||
*/
|
||||
static CCLabelBMFont * node();
|
||||
|
||||
/** Creates an label.
|
||||
*/
|
||||
static CCLabelBMFont * create();
|
||||
|
||||
bool init();
|
||||
/** init a bitmap font altas with an initial string and the FNT file */
|
||||
bool initWithString(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero);
|
||||
|
|
|
@ -54,6 +54,11 @@ CCLabelTTF::~CCLabelTTF()
|
|||
}
|
||||
|
||||
CCLabelTTF * CCLabelTTF::node()
|
||||
{
|
||||
return CCLabelTTF::create();
|
||||
}
|
||||
|
||||
CCLabelTTF * CCLabelTTF::create()
|
||||
{
|
||||
CCLabelTTF * pRet = new CCLabelTTF();
|
||||
if (pRet && pRet->init())
|
||||
|
|
|
@ -90,6 +90,10 @@ public:
|
|||
*/
|
||||
static CCLabelTTF * node();
|
||||
|
||||
/** Creates an label.
|
||||
*/
|
||||
static CCLabelTTF * create();
|
||||
|
||||
/** changes the string to render
|
||||
* @warning Changing the string is as expensive as creating a new CCLabelTTF. To obtain better performance use CCLabelAtlas
|
||||
*/
|
||||
|
|
|
@ -252,8 +252,9 @@ public:
|
|||
|
||||
virtual void setIsOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);}
|
||||
virtual bool getIsOpacityModifyRGB(void) { return false;}
|
||||
LAYER_CREATE_FUNC(CCLayerColor);
|
||||
|
||||
//@warning: This interface will be deprecated in future.
|
||||
LAYER_CREATE_FUNC(CCLayerColor)
|
||||
LAYER_NODE_FUNC(CCLayerColor)
|
||||
protected:
|
||||
virtual void updateColor();
|
||||
};
|
||||
|
@ -317,7 +318,9 @@ public:
|
|||
*/
|
||||
CC_PROPERTY(bool, m_bCompressedInterpolation, IsCompressedInterpolation)
|
||||
|
||||
LAYER_CREATE_FUNC(CCLayerGradient);
|
||||
// @warning: This interface will be deprecated in future.
|
||||
LAYER_NODE_FUNC(CCLayerGradient)
|
||||
LAYER_CREATE_FUNC(CCLayerGradient)
|
||||
protected:
|
||||
virtual void updateColor();
|
||||
};
|
||||
|
@ -372,7 +375,10 @@ public:
|
|||
*/
|
||||
void switchToAndReleaseMe(unsigned int n);
|
||||
|
||||
LAYER_CREATE_FUNC(CCLayerMultiplex);
|
||||
//@warning: This interface will be deprecated in future.
|
||||
LAYER_NODE_FUNC(CCLayerMultiplex)
|
||||
|
||||
LAYER_CREATE_FUNC(CCLayerMultiplex)
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -693,8 +693,12 @@ void CCMenuItemSprite::updateImagesVisibility()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
CCMenuItemImage* CCMenuItemImage::node()
|
||||
{
|
||||
return CCMenuItemImage::create();
|
||||
}
|
||||
|
||||
CCMenuItemImage* CCMenuItemImage::create()
|
||||
{
|
||||
CCMenuItemImage *pRet = new CCMenuItemImage();
|
||||
if (pRet && pRet->init())
|
||||
|
|
|
@ -339,8 +339,13 @@ public:
|
|||
/** sets the sprite frame for the disabled image */
|
||||
void setDisabledSpriteFrame(CCSpriteFrame* frame);
|
||||
/** Creates an CCMenuItemImage.
|
||||
@warning: This interface will be deprecated in future.
|
||||
*/
|
||||
static CCMenuItemImage* node();
|
||||
|
||||
/** Creates an CCMenuItemImage.
|
||||
*/
|
||||
static CCMenuItemImage* create();
|
||||
};
|
||||
|
||||
/** @brief A CCMenuItemToggle
|
||||
|
|
|
@ -569,7 +569,12 @@ void CCParticleSystemQuad::setBatchNode(CCParticleBatchNode * batchNode)
|
|||
}
|
||||
}
|
||||
|
||||
CCParticleSystemQuad * CCParticleSystemQuad::node() {
|
||||
CCParticleSystemQuad * CCParticleSystemQuad::node()
|
||||
{
|
||||
return CCParticleSystemQuad::create();
|
||||
}
|
||||
|
||||
CCParticleSystemQuad * CCParticleSystemQuad::create() {
|
||||
CCParticleSystemQuad *pParticleSystemQuad = new CCParticleSystemQuad();
|
||||
if (pParticleSystemQuad && pParticleSystemQuad->init())
|
||||
{
|
||||
|
|
|
@ -101,7 +101,10 @@ public:
|
|||
*/
|
||||
void listenBackToForeground(CCObject *obj);
|
||||
|
||||
//@warning: This interface will be deprecated in future.
|
||||
static CCParticleSystemQuad * node();
|
||||
|
||||
static CCParticleSystemQuad * create();
|
||||
private:
|
||||
#if CC_TEXTURE_ATLAS_USE_VAO
|
||||
void setupVBOandVAO();
|
||||
|
|
|
@ -1239,11 +1239,19 @@
|
|||
Name="CCBReader"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCBCustomClass.cpp"
|
||||
RelativePath="..\extensions\CCBReader\CCBFileLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCBCustomClass.h"
|
||||
RelativePath="..\extensions\CCBReader\CCBFileLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCBMemberVariableAssigner.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCBReader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -1251,7 +1259,131 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCBReader_v2.cpp"
|
||||
RelativePath="..\extensions\CCBReader\CCBSelectorResolver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCControlButtonLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCControlButtonLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCControlLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCControlLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCLabelBMFontLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCLabelBMFontLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCLabelTTFLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCLabelTTFLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCLayerColorLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCLayerColorLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCLayerGradientLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCLayerGradientLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCLayerLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCLayerLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCMenuItemImageLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCMenuItemImageLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCMenuItemLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCMenuItemLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCMenuLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCMenuLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCNodeLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCNodeLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCNodeLoaderLibrary.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCNodeLoaderLibrary.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCNodeLoaderListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCParticleSystemQuadLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCParticleSystemQuadLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCScale9SpriteLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCScale9SpriteLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCSpriteLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\extensions\CCBReader\CCSpriteLoader.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
|
|
@ -893,6 +893,22 @@
|
|||
<Filter
|
||||
Name="CocosBuilderTest"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\ButtonTestLayer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\ButtonTestLayer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\ButtonTestLayerLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\ButtonTestLayerLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\CocosBuilderTest.cpp"
|
||||
>
|
||||
|
@ -902,11 +918,35 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder.cpp"
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilderLayer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder.h"
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilderLayer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilderLayerLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\HelloCocosBuilderLayerLoader.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\TestHeaderLayer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\TestHeaderLayer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\TestHeaderLayerLoader.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ExtensionsTest\CocosBuilderTest\TestHeaderLayerLoader.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
|
|
@ -149,42 +149,42 @@ bool CCControlButtonTest_Event::init()
|
|||
return false;
|
||||
}
|
||||
|
||||
void CCControlButtonTest_Event::touchDownAction(CCObject *sender)
|
||||
void CCControlButtonTest_Event::touchDownAction(CCObject *senderz, CCControlEvent controlEvent)
|
||||
{
|
||||
m_pDisplayValueLabel->setString(CCString::createWithFormat("Touch Down")->getCString());
|
||||
}
|
||||
|
||||
void CCControlButtonTest_Event::touchDragInsideAction(CCObject *sender)
|
||||
void CCControlButtonTest_Event::touchDragInsideAction(CCObject *sender, CCControlEvent controlEvent)
|
||||
{
|
||||
m_pDisplayValueLabel->setString(CCString::createWithFormat("Drag Inside")->getCString());
|
||||
}
|
||||
|
||||
void CCControlButtonTest_Event::touchDragOutsideAction(CCObject *sender)
|
||||
void CCControlButtonTest_Event::touchDragOutsideAction(CCObject *sender, CCControlEvent controlEvent)
|
||||
{
|
||||
m_pDisplayValueLabel->setString(CCString::createWithFormat("Drag Outside")->getCString());
|
||||
}
|
||||
|
||||
void CCControlButtonTest_Event::touchDragEnterAction(CCObject *sender)
|
||||
void CCControlButtonTest_Event::touchDragEnterAction(CCObject *sender, CCControlEvent controlEvent)
|
||||
{
|
||||
m_pDisplayValueLabel->setString(CCString::createWithFormat("Drag Enter")->getCString());
|
||||
}
|
||||
|
||||
void CCControlButtonTest_Event::touchDragExitAction(CCObject *sender)
|
||||
void CCControlButtonTest_Event::touchDragExitAction(CCObject *sender, CCControlEvent controlEvent)
|
||||
{
|
||||
m_pDisplayValueLabel->setString(CCString::createWithFormat("Drag Exit")->getCString());
|
||||
}
|
||||
|
||||
void CCControlButtonTest_Event::touchUpInsideAction(CCObject *sender)
|
||||
void CCControlButtonTest_Event::touchUpInsideAction(CCObject *sender, CCControlEvent controlEvent)
|
||||
{
|
||||
m_pDisplayValueLabel->setString(CCString::createWithFormat("Touch Up Inside.")->getCString());
|
||||
}
|
||||
|
||||
void CCControlButtonTest_Event::touchUpOutsideAction(CCObject *sender)
|
||||
void CCControlButtonTest_Event::touchUpOutsideAction(CCObject *sender, CCControlEvent controlEvent)
|
||||
{
|
||||
m_pDisplayValueLabel->setString(CCString::createWithFormat("Touch Up Outside.")->getCString());
|
||||
}
|
||||
|
||||
void CCControlButtonTest_Event::touchCancelAction(CCObject *sender)
|
||||
void CCControlButtonTest_Event::touchCancelAction(CCObject *sender, CCControlEvent controlEvent)
|
||||
{
|
||||
m_pDisplayValueLabel->setString(CCString::createWithFormat("Touch Cancel")->getCString());
|
||||
}
|
||||
|
|
|
@ -44,14 +44,14 @@ public:
|
|||
CCControlButtonTest_Event();
|
||||
~CCControlButtonTest_Event();
|
||||
bool init();
|
||||
void touchDownAction(CCObject *sender);
|
||||
void touchDragInsideAction(CCObject *sender);
|
||||
void touchDragOutsideAction(CCObject *sender);
|
||||
void touchDragEnterAction(CCObject *sender);
|
||||
void touchDragExitAction(CCObject *sender);
|
||||
void touchUpInsideAction(CCObject *sender);
|
||||
void touchUpOutsideAction(CCObject *sender);
|
||||
void touchCancelAction(CCObject *sender);
|
||||
void touchDownAction(CCObject *sender, CCControlEvent controlEvent);
|
||||
void touchDragInsideAction(CCObject *sender, CCControlEvent controlEvent);
|
||||
void touchDragOutsideAction(CCObject *sender, CCControlEvent controlEvent);
|
||||
void touchDragEnterAction(CCObject *sender, CCControlEvent controlEvent);
|
||||
void touchDragExitAction(CCObject *sender, CCControlEvent controlEvent);
|
||||
void touchUpInsideAction(CCObject *sender, CCControlEvent controlEvent);
|
||||
void touchUpOutsideAction(CCObject *sender, CCControlEvent controlEvent);
|
||||
void touchCancelAction(CCObject *sender, CCControlEvent controlEvent);
|
||||
protected:
|
||||
CC_SYNTHESIZE_RETAIN(CCLabelTTF *, m_pDisplayValueLabel, DisplayValueLabel)
|
||||
CONTROL_SCENE_CREATE_FUNC(CCControlButtonTest_Event)
|
||||
|
|
|
@ -75,7 +75,7 @@ bool CCControlColourPickerTest::init()
|
|||
layer->setAnchorPoint(ccp (0.5f, 0.5f));
|
||||
|
||||
// Update the color text
|
||||
colourValueChanged(colourPicker);
|
||||
colourValueChanged(colourPicker, CCControlEventValueChanged);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -87,7 +87,7 @@ CCControlColourPickerTest::~CCControlColourPickerTest()
|
|||
CC_SAFE_RELEASE(m_pColorLabel);
|
||||
}
|
||||
|
||||
void CCControlColourPickerTest::colourValueChanged(CCObject *sender)
|
||||
void CCControlColourPickerTest::colourValueChanged(CCObject *sender, CCControlEvent controlEvent)
|
||||
{
|
||||
CCControlColourPicker* pPicker = (CCControlColourPicker*)sender;
|
||||
m_pColorLabel->setString(CCString::createWithFormat("#%02X%02X%02X",pPicker->getColorValue().r, pPicker->getColorValue().g, pPicker->getColorValue().b)->getCString());
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
virtual ~CCControlColourPickerTest();
|
||||
bool init();
|
||||
/** Callback for the change value. */
|
||||
void colourValueChanged(CCObject *sender);
|
||||
void colourValueChanged(CCObject *sender, CCControlEvent controlEvent);
|
||||
|
||||
CC_SYNTHESIZE_RETAIN(CCLabelTTF*, m_pColorLabel, ColorLabel)
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ bool CCControlSliderTest::init()
|
|||
return false;
|
||||
}
|
||||
|
||||
void CCControlSliderTest::valueChanged(CCObject *sender)
|
||||
void CCControlSliderTest::valueChanged(CCObject *sender, CCControlEvent controlEvent)
|
||||
{
|
||||
CCControlSlider* pSlider = (CCControlSlider*)sender;
|
||||
// Change value of label.
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
CCControlSliderTest();
|
||||
virtual ~CCControlSliderTest();
|
||||
bool init();
|
||||
void valueChanged(CCObject *sender);
|
||||
void valueChanged(CCObject *sender, CCControlEvent controlEvent);
|
||||
protected:
|
||||
CCLabelTTF* m_pDisplayValueLabel;
|
||||
CONTROL_SCENE_CREATE_FUNC(CCControlSliderTest)
|
||||
|
|
|
@ -78,13 +78,13 @@ bool CCControlSwitchTest::init()
|
|||
layer->setAnchorPoint(ccp (0.5f, 0.5f));
|
||||
|
||||
// Update the value label
|
||||
valueChanged(switchControl);
|
||||
valueChanged(switchControl, CCControlEventValueChanged);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void CCControlSwitchTest::valueChanged(CCObject* sender)
|
||||
void CCControlSwitchTest::valueChanged(CCObject* sender, CCControlEvent controlEvent)
|
||||
{
|
||||
CCControlSwitch* pSwitch = (CCControlSwitch*)sender;
|
||||
if (pSwitch->getIsOn())
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
virtual ~CCControlSwitchTest();
|
||||
bool init();
|
||||
/** Callback for the change value. */
|
||||
void valueChanged(CCObject* sender);
|
||||
void valueChanged(CCObject* sender, CCControlEvent controlEvent);
|
||||
CCLabelTTF *m_pDisplayValueLabel;
|
||||
CONTROL_SCENE_CREATE_FUNC(CCControlSwitchTest)
|
||||
};
|
||||
|
|
|
@ -874,7 +874,7 @@ CCControlSlider* SchedulerTimeScale::sliderCtl()
|
|||
return slider;
|
||||
}
|
||||
|
||||
void SchedulerTimeScale::sliderAction(CCObject* pSender)
|
||||
void SchedulerTimeScale::sliderAction(CCObject* pSender, CCControlEvent controlEvent)
|
||||
{
|
||||
CCControlSlider* pSliderCtl = (CCControlSlider*)pSender;
|
||||
float scale;
|
||||
|
@ -966,7 +966,7 @@ CCControlSlider *TwoSchedulers::sliderCtl()
|
|||
return slider;
|
||||
}
|
||||
|
||||
void TwoSchedulers::sliderAction(CCObject* sender)
|
||||
void TwoSchedulers::sliderAction(CCObject* sender, CCControlEvent controlEvent)
|
||||
{
|
||||
float scale;
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ public:
|
|||
virtual std::string title();
|
||||
virtual std::string subtitle();
|
||||
CCControlSlider* sliderCtl();
|
||||
void sliderAction(CCObject* pSender);
|
||||
void sliderAction(CCObject* pSender, CCControlEvent controlEvent);
|
||||
CCControlSlider* m_pSliderCtl;
|
||||
};
|
||||
|
||||
|
@ -236,7 +236,7 @@ public:
|
|||
virtual std::string subtitle();
|
||||
void onEnter();
|
||||
CCControlSlider* sliderCtl();
|
||||
void sliderAction(CCObject* sender);
|
||||
void sliderAction(CCObject* sender, CCControlEvent controlEvent);
|
||||
CCScheduler *sched1;
|
||||
CCScheduler *sched2;
|
||||
CCActionManager *actionManager1;
|
||||
|
|
|
@ -611,7 +611,7 @@ bool ShaderBlur::init()
|
|||
return false;
|
||||
}
|
||||
|
||||
void ShaderBlur::sliderAction(CCObject* sender)
|
||||
void ShaderBlur::sliderAction(CCObject* sender, CCControlEvent controlEvent)
|
||||
{
|
||||
CCControlSlider* pSlider = (CCControlSlider*)sender;
|
||||
m_pBlurSprite->setBlurSize(pSlider->getValue());
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
virtual std::string subtitle();
|
||||
virtual bool init();
|
||||
CCControlSlider* createSliderCtl();
|
||||
void sliderAction(CCObject* sender);
|
||||
void sliderAction(CCObject* sender, CCControlEvent controlEvent);
|
||||
protected:
|
||||
SpriteBlur* m_pBlurSprite;
|
||||
CCControlSlider* m_pSliderCtl;
|
||||
|
|
Loading…
Reference in New Issue