mirror of https://github.com/axmolengine/axmol.git
36 lines
699 B
Plaintext
36 lines
699 B
Plaintext
|
|
#include "CCKeypadDelegate.h"
|
|
#include "CCMutableArray.h"
|
|
|
|
namespace cocos2d {
|
|
|
|
typedef enum {
|
|
// the back key clicked msg
|
|
kTypeBackClicked = 1,
|
|
kTypeMenuClicked,
|
|
} ccKeypadMSGType;
|
|
class CCKeypadDispatcher : public CCObject
|
|
{
|
|
|
|
CCKeypadDispatcher();
|
|
|
|
static CCKeypadDispatcher* sharedDispatcher();
|
|
static void purgeSharedDispatcher();
|
|
|
|
void addDelegate(CCKeypadDelegate* pDelegate);
|
|
|
|
void removeDelegate(CCKeypadDelegate* pDelegate);
|
|
|
|
void forceAddDelegate(CCKeypadDelegate* pDelegate);
|
|
|
|
|
|
void forceRemoveDelegate(CCKeypadDelegate* pDelegate);
|
|
|
|
|
|
bool dispatchKeypadMSG(ccKeypadMSGType nMsgType);
|
|
|
|
};
|
|
|
|
} // namespace cocos2d
|
|
|