优化小程序refl的ui和触屏控制
This commit is contained in:
@@ -69,6 +69,7 @@ function scene.keyDown(key)
|
|||||||
end
|
end
|
||||||
function scene.touchDown(x,y)
|
function scene.touchDown(x,y)
|
||||||
scene.keyDown(
|
scene.keyDown(
|
||||||
|
state==0 and "space"or
|
||||||
x<640 and
|
x<640 and
|
||||||
(y<360 and"q"or"a")or
|
(y<360 and"q"or"a")or
|
||||||
(y<360 and"p"or"l")
|
(y<360 and"p"or"l")
|
||||||
@@ -109,10 +110,9 @@ function scene.draw()
|
|||||||
gc.setColor(1,1,1,.9)
|
gc.setColor(1,1,1,.9)
|
||||||
gc.line(640,0,640,720)
|
gc.line(640,0,640,720)
|
||||||
gc.setColor(1,1,1,.3)
|
gc.setColor(1,1,1,.3)
|
||||||
gc.line(0,360,1280,360)
|
gc.line(500,360,780,360)
|
||||||
|
|
||||||
--Help
|
--Help
|
||||||
gc.setColor(1,1,1)
|
|
||||||
setFont(100)
|
setFont(100)
|
||||||
mStr("Q",80,100)
|
mStr("Q",80,100)
|
||||||
mStr("A",80,480)
|
mStr("A",80,480)
|
||||||
@@ -150,4 +150,8 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scene.widgetList={
|
||||||
|
WIDGET.newKey{name="back",x=640,y=675,w=150,h=50,font=35,code=backScene},
|
||||||
|
}
|
||||||
|
|
||||||
return scene
|
return scene
|
||||||
Reference in New Issue
Block a user