2014-03-04 16:51:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef __TestCpp__CutomGUIScene__
|
|
|
|
#define __TestCpp__CutomGUIScene__
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
2014-03-06 22:27:57 +08:00
|
|
|
#include "extensions/cocos-ext.h"
|
2014-03-04 16:51:35 +08:00
|
|
|
#include "../../testBasic.h"
|
2014-03-11 17:13:54 +08:00
|
|
|
#include "ui/CocosGUI.h"
|
2014-03-04 16:51:35 +08:00
|
|
|
|
|
|
|
USING_NS_CC;
|
|
|
|
USING_NS_CC_EXT;
|
|
|
|
using namespace cocos2d::ui;
|
|
|
|
|
|
|
|
class CustomGUITestMainLayer : public Layer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
void onTouchesBegan(const std::vector<Touch*>& touches, Event *event);
|
|
|
|
// void onTouchesMoved(const std::vector<Touch*>& touches, Event *event);
|
|
|
|
|
2014-05-09 14:30:39 +08:00
|
|
|
void touchEvent(Ref* pSender, Widget::TouchEventType type);
|
2014-03-04 16:51:35 +08:00
|
|
|
|
|
|
|
private:
|
2014-05-15 01:07:09 +08:00
|
|
|
Vec2 _beginPos;
|
2014-03-04 16:51:35 +08:00
|
|
|
Menu* _itemMenu;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CustomGUITestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual void runThisTest();
|
|
|
|
void BackCallback(Ref* pSender);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* defined(__TestCpp__CutomGUIScene__) */
|