2013-10-12 05:35:38 +08:00
|
|
|
#ifndef __MOUSE_TEST_H_
|
|
|
|
#define __MOUSE_TEST_H_
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
|
|
|
#include "../testBasic.h"
|
|
|
|
|
|
|
|
class MouseTest : public Layer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MouseTest();
|
|
|
|
~MouseTest();
|
|
|
|
|
|
|
|
void onMouseDown(Event* event);
|
|
|
|
void onMouseUp(Event* event);
|
|
|
|
void onMouseMove(Event* event);
|
|
|
|
void onMouseScroll(Event* event);
|
|
|
|
|
|
|
|
private:
|
2014-03-26 23:33:58 +08:00
|
|
|
Label* _labelAction;
|
|
|
|
Label* _labelPosition;
|
2013-10-12 05:35:38 +08:00
|
|
|
EventListenerMouse* _mouseListener;
|
|
|
|
};
|
|
|
|
|
|
|
|
class MouseTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|