2013-05-31 20:29:32 +08:00
|
|
|
#ifndef _KEYBOARD_TEST_H_
|
|
|
|
#define _KEYBOARD_TEST_H_
|
|
|
|
|
2013-06-12 09:20:18 +08:00
|
|
|
#ifdef KEYBOARD_SUPPORT
|
|
|
|
|
2013-05-31 20:29:32 +08:00
|
|
|
#include "cocos2d.h"
|
|
|
|
#include "../testBasic.h"
|
|
|
|
|
|
|
|
class KeyboardTest : public CCLayer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
KeyboardTest();
|
|
|
|
~KeyboardTest();
|
|
|
|
|
|
|
|
virtual void keyPressed(int keyCode);
|
|
|
|
virtual void keyReleased(int keyCode);
|
|
|
|
|
|
|
|
private:
|
2013-06-15 14:03:30 +08:00
|
|
|
CCLabelTTF* _label;
|
2013-05-31 20:29:32 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class KeyboardTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2013-06-12 09:20:18 +08:00
|
|
|
|
|
|
|
#endif
|