2012-04-19 14:35:52 +08:00
|
|
|
#ifndef _CONTROLLER_H_
|
|
|
|
#define _CONTROLLER_H_
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
|
|
|
|
2012-06-14 05:19:13 +08:00
|
|
|
USING_NS_CC;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
class TestController : public Layer
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestController();
|
|
|
|
~TestController();
|
|
|
|
|
2014-02-20 10:53:49 +08:00
|
|
|
void menuCallback(Ref * sender);
|
|
|
|
void closeCallback(Ref * sender);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-09-03 18:22:03 +08:00
|
|
|
bool onTouchBegan(Touch* touches, Event *event);
|
|
|
|
void onTouchMoved(Touch* touches, Event *event);
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-10-05 01:07:39 +08:00
|
|
|
void onMouseScroll(Event *event);
|
2014-02-19 16:13:32 +08:00
|
|
|
void addConsoleAutoTest();
|
2014-05-12 21:47:55 +08:00
|
|
|
void autorun();
|
|
|
|
void startAutoRun();
|
2014-05-19 13:46:17 +08:00
|
|
|
void runAllTests(int fd);
|
2014-05-13 17:20:12 +08:00
|
|
|
ssize_t readline(int fd, char* ptr, size_t maxlen);
|
2012-04-19 14:35:52 +08:00
|
|
|
private:
|
2014-05-15 01:07:09 +08:00
|
|
|
Vec2 _beginPos;
|
2013-06-20 14:17:10 +08:00
|
|
|
Menu* _itemMenu;
|
2014-05-19 13:46:17 +08:00
|
|
|
bool _exitThread;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|