replace tabs with spaces

This commit is contained in:
samuele3hu 2013-09-18 17:09:08 +08:00
parent 1ee7f72276
commit 71b03ecdb9
1 changed files with 23 additions and 23 deletions

View File

@ -394,31 +394,31 @@ static int32_t handle_touch_input(AInputEvent *event) {
*/
static int32_t handle_key_input(AInputEvent *event)
{
if (AKeyEvent_getAction(event) == AKEY_EVENT_ACTION_UP)
{
switch (AKeyEvent_getKeyCode(event))
{
case AKEYCODE_BACK:
{
cocos2d::KeyboardEvent event;
event._keyCode = cocos2d::KeyboardEvent::KeyCode::KEY_BACKSPACE;
if (AKeyEvent_getAction(event) == AKEY_EVENT_ACTION_UP)
{
switch (AKeyEvent_getKeyCode(event))
{
case AKEYCODE_BACK:
{
cocos2d::KeyboardEvent event;
event._keyCode = cocos2d::KeyboardEvent::KeyCode::KEY_BACKSPACE;
event._isPressed = false;
cocos2d::EventDispatcher::getInstance()->dispatchEvent(&event);
}
return 1;
case AKEYCODE_MENU:
{
cocos2d::KeyboardEvent event;
event._keyCode = cocos2d::KeyboardEvent::KeyCode::KEY_MENU;
cocos2d::EventDispatcher::getInstance()->dispatchEvent(&event);
}
return 1;
case AKEYCODE_MENU:
{
cocos2d::KeyboardEvent event;
event._keyCode = cocos2d::KeyboardEvent::KeyCode::KEY_MENU;
event._isPressed = false;
cocos2d::EventDispatcher::getInstance()->dispatchEvent(&event);
}
return 1;
default:
break;
}
}
return 0;
cocos2d::EventDispatcher::getInstance()->dispatchEvent(&event);
}
return 1;
default:
break;
}
}
return 0;
}
/**