Update the KeyCodeTest in the NewEventDispatcherTest

This commit is contained in:
samuele3hu 2014-06-11 10:15:38 +08:00
Родитель 2252bc271b
Коммит d200dd83a4
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -665,14 +665,12 @@ function LabelKeyboardEventTest:onEnter()
self:addChild(statusLabel)
local function onKeyPressed(keyCode, event)
print("come in keyCode is ",keyCode)
local buf = string.format("Key %d was pressed!",keyCode)
local label = event:getCurrentTarget()
label:setString(buf)
end
local function onKeyReleased(keyCode, event)
print("come in keyCode is ", keyCode)
local buf = string.format("Key %s was released!",keyCode)
local label = event:getCurrentTarget()
label:setString(buf)