mirror of https://github.com/axmolengine/axmol.git
49 lines
1002 B
C++
49 lines
1002 B
C++
#ifndef __PERFORMANCE_TEST_H__
|
|
#define __PERFORMANCE_TEST_H__
|
|
|
|
#include "../testBasic.h"
|
|
|
|
class PerformanceMainLayer : public Layer
|
|
{
|
|
public:
|
|
virtual void onEnter() override;
|
|
|
|
bool onTouchBegan(Touch* touches, Event *event);
|
|
void onTouchMoved(Touch* touches, Event *event);
|
|
|
|
void onMouseScroll(Event *event);
|
|
protected:
|
|
Vec2 _beginPos;
|
|
Menu* _itemMenu;
|
|
|
|
static Vec2 _CurrentPos;
|
|
};
|
|
|
|
class PerformBasicLayer : public Layer
|
|
{
|
|
public:
|
|
PerformBasicLayer(bool bControlMenuVisible, int nMaxCases = 0, int nCurCase = 0);
|
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void restartCallback(Ref* sender);
|
|
virtual void nextCallback(Ref* sender);
|
|
virtual void backCallback(Ref* sender);
|
|
virtual void showCurrentTest() = 0;
|
|
|
|
virtual void toMainLayer(Ref* sender);
|
|
|
|
protected:
|
|
bool _controlMenuVisible;
|
|
int _maxCases;
|
|
int _curCase;
|
|
};
|
|
|
|
class PerformanceTestScene : public TestScene
|
|
{
|
|
public:
|
|
virtual void runThisTest();
|
|
};
|
|
|
|
#endif
|