From 16e7dd71f1aec0a68a673d281e653ee162ab9c5a Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 9 May 2021 21:29:50 +0800 Subject: [PATCH] =?UTF-8?q?test=E5=9C=BA=E6=99=AF=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/test.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/parts/scenes/test.lua b/parts/scenes/test.lua index edeb680a..949d3447 100644 --- a/parts/scenes/test.lua +++ b/parts/scenes/test.lua @@ -32,14 +32,19 @@ end function scene.keyUp(key) push{COLOR.H,"[keyUp] <"..key..">"} end +function scene.mouseClick(x,y) + SYSFX.newRipple(.5,x,y,50) + push("[mouseClick]") +end function scene.mouseDown(x,y,k) + SYSFX.newShade(.5,x-10,y-10,20,20) push(("[mouseDown] <%d: %d, %d>"):format(k,x,y)) end function scene.mouseMove(x,y) - SYSFX.newShade(.5,x-3,y-3,7,7) + SYSFX.newShade(.5,x-3,y-3,6,6) end function scene.mouseUp(x,y,k) - SYSFX.newRectRipple(1,x-10,y-10,21,21) + SYSFX.newRectRipple(1,x-10,y-10,20,20) push{COLOR.H,"[mouseUp] <"..k..">"} end function scene.touchClick(x,y) @@ -47,14 +52,14 @@ function scene.touchClick(x,y) push("[touchClick]") end function scene.touchDown(x,y) - SYSFX.newRipple(.5,x,y,50) + SYSFX.newShade(.5,x-10,y-10,20,20) push(("[touchDown] <%d, %d>"):format(x,y)) end function scene.touchMove(x,y) - SYSFX.newRipple(.5,x,y,50) + SYSFX.newShade(.5,x-3,y-3,6,6) end function scene.touchUp(x,y) - SYSFX.newRipple(.5,x,y,50) + SYSFX.newRectRipple(1,x-10,y-10,20,20) push{COLOR.H,"[touchUp]"} end function scene.wheelMoved(dx,dy)