【发布时间】:2013-10-23 13:56:25
【问题描述】:
在我的corona 应用程序中,我有一个widget button 来移动图像。我能够找到onPress 方法,但找不到检查按钮是否仍被按下的方法。这样用户就不必一遍又一遍地点击同一个按钮来移动图像...
代码:
function move( event )
local phase = event.phase
if "began" == phase then
define_robo()
image.x=image.x+2;
end
end
local movebtn = widget.newButton
{
width = 50,
height = 50,
defaultFile = "left.png",
overFile = "left.png",
onPress = move,
}
任何帮助都是可观的......
【问题讨论】: