框架keyDown事件机制微调,重构框架主循环和控件相关代码
可以用键盘和手柄控制光标(手柄不完善) 整理代码和部分语言文件细节
This commit is contained in:
@@ -124,8 +124,6 @@ function scene.keyDown(key)
|
||||
inputBox:clear()
|
||||
SFX.play('hold')
|
||||
end
|
||||
elseif key=='backspace'then
|
||||
WIDGET.keyPressed("backspace")
|
||||
elseif key=='escape'then
|
||||
if inputBox:hasText()then
|
||||
scene.keyDown('delete')
|
||||
@@ -143,7 +141,7 @@ function scene.keyDown(key)
|
||||
if not WIDGET.isFocus(inputBox)then
|
||||
WIDGET.focus(inputBox)
|
||||
end
|
||||
WIDGET.keyPressed(key)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user