1
|
void
@H_404_14@ onKeyReleased(EventKeyboard::KeyCode keycode,Event* event);
|
.cpp 注册返回键监听
//
// PrograssScene.cpp
// SJKB
//
// Created by 杜甲 on 14-5-5.
//
//
@H_404_14@#include PrograssScene.h
@H_404_14@#include VisibleRect.h
@H_404_14@bool PrograssScene::init()
@H_404_14@{
CC_BREAK_IF(!Scene::init());
//注册捕捉监听
auto listenerkeyPad = EventListenerKeyboard::create();
_eventDispatcher->addEventListenerWithSceneGraPHPriority(listenerkeyPad,monospace!important; font-size:1em!important; min-height:auto!important; background:none!important">);
_prograssLayer = PrograssLayer::create();
_prograssLayer->setSize(VisibleRect::getVisibleRect().size);
addChild(_prograssLayer);
return
@H_404_14@ bRet;
@H_404_14@}
//捕捉监听
PrograssScene::onKeyReleased(EventKeyboard::KeyCode keycode,cocos2d::Event *event)
@H_404_14@{
{
Director::getInstance()->popScene();
}
{
}
@H_404_14@}
|