2010-08-31 17:03:58 +08:00
|
|
|
#ifndef _LAYER_TEST_H_
|
|
|
|
#define _LAYER_TEST_H_
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
////----#include "cocos2d.h"
|
|
|
|
#include "../testBasic.h"
|
2013-06-07 08:12:28 +08:00
|
|
|
#include "../BaseTest.h"
|
2010-08-31 17:03:58 +08:00
|
|
|
|
2013-06-07 08:12:28 +08:00
|
|
|
class LayerTest : public BaseTest
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
std::string m_strTitle;
|
|
|
|
|
|
|
|
public:
|
|
|
|
LayerTest(void);
|
|
|
|
~LayerTest(void);
|
|
|
|
|
|
|
|
virtual std::string title();
|
|
|
|
virtual std::string subtitle();
|
|
|
|
virtual void onEnter();
|
|
|
|
|
|
|
|
void restartCallback(CCObject* pSender);
|
|
|
|
void nextCallback(CCObject* pSender);
|
|
|
|
void backCallback(CCObject* pSender);
|
|
|
|
};
|
|
|
|
|
2013-02-28 16:03:55 +08:00
|
|
|
class LayerTestCascadingOpacityA : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class LayerTestCascadingOpacityB : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class LayerTestCascadingOpacityC : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class LayerTestCascadingColorA : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class LayerTestCascadingColorB : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class LayerTestCascadingColorC : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class LayerTest1 : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
|
|
|
|
void updateSize(CCPoint &touchLocation);
|
2010-08-31 17:03:58 +08:00
|
|
|
|
2012-11-20 18:00:27 +08:00
|
|
|
virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);
|
|
|
|
virtual void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);
|
|
|
|
virtual void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent);
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LayerTest2 : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class LayerTestBlend : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LayerTestBlend();
|
2012-06-08 13:55:28 +08:00
|
|
|
void newBlend(float dt);
|
2012-04-19 14:35:52 +08:00
|
|
|
virtual std::string title();
|
2010-08-31 17:03:58 +08:00
|
|
|
};
|
|
|
|
|
2011-02-23 16:47:25 +08:00
|
|
|
class LayerGradient : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LayerGradient();
|
2011-03-18 09:39:34 +08:00
|
|
|
virtual void ccTouchesMoved(CCSet * touches, CCEvent *event);
|
2011-02-23 16:47:25 +08:00
|
|
|
virtual std::string title();
|
2012-04-19 14:35:52 +08:00
|
|
|
virtual std::string subtitle();
|
|
|
|
void toggleItem(cocos2d::CCObject *sender);
|
2011-02-23 16:47:25 +08:00
|
|
|
};
|
|
|
|
|
2012-06-12 15:14:01 +08:00
|
|
|
class LayerIgnoreAnchorPointPos : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
void onToggle(CCObject* pObject);
|
|
|
|
virtual std::string title();
|
|
|
|
virtual std::string subtitle();
|
|
|
|
};
|
|
|
|
|
|
|
|
class LayerIgnoreAnchorPointRot : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
void onToggle(CCObject* pObject);
|
|
|
|
virtual std::string title();
|
|
|
|
virtual std::string subtitle();
|
|
|
|
};
|
|
|
|
|
|
|
|
class LayerIgnoreAnchorPointScale : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
void onToggle(CCObject* pObject);
|
|
|
|
virtual std::string title();
|
|
|
|
virtual std::string subtitle();
|
|
|
|
};
|
|
|
|
|
2012-11-20 18:00:27 +08:00
|
|
|
class LayerExtendedBlendOpacityTest : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LayerExtendedBlendOpacityTest();
|
|
|
|
virtual std::string title();
|
|
|
|
virtual std::string subtitle();
|
|
|
|
};
|
|
|
|
|
2010-08-31 17:03:58 +08:00
|
|
|
class LayerTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|