2012-04-19 14:35:52 +08:00
|
|
|
#ifndef __PERFORMANCE_TEST_H__
|
|
|
|
#define __PERFORMANCE_TEST_H__
|
|
|
|
|
|
|
|
#include "../testBasic.h"
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
class PerformanceMainLayer : public Layer
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
public:
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onEnter() override;
|
2014-01-15 11:27:57 +08:00
|
|
|
|
|
|
|
bool onTouchBegan(Touch* touches, Event *event);
|
|
|
|
void onTouchMoved(Touch* touches, Event *event);
|
|
|
|
|
|
|
|
void onMouseScroll(Event *event);
|
|
|
|
protected:
|
|
|
|
Point _beginPos;
|
|
|
|
Menu* _itemMenu;
|
2014-02-10 11:42:15 +08:00
|
|
|
|
|
|
|
static Point _CurrentPos;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
class PerformBasicLayer : public Layer
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
PerformBasicLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0);
|
|
|
|
|
2013-09-15 17:49:36 +08:00
|
|
|
virtual void onEnter() override;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2014-02-20 10:53:49 +08:00
|
|
|
virtual void restartCallback(Ref* sender);
|
|
|
|
virtual void nextCallback(Ref* sender);
|
|
|
|
virtual void backCallback(Ref* sender);
|
2012-04-19 14:35:52 +08:00
|
|
|
virtual void showCurrentTest() = 0;
|
|
|
|
|
2014-02-20 10:53:49 +08:00
|
|
|
virtual void toMainLayer(Ref* sender);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
protected:
|
2013-06-15 14:03:30 +08:00
|
|
|
bool _controlMenuVisible;
|
|
|
|
int _maxCases;
|
|
|
|
int _curCase;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class PerformanceTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|