зеркало из https://github.com/microsoft/cocos2d-x.git
Update the KeyCodeTest in the NewEventDispatcherTest
This commit is contained in:
Родитель
2252bc271b
Коммит
d200dd83a4
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче