From 025ef02e7158ba9b66d2683eda2219d0dadd8e80 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 16 Nov 2020 11:33:51 +0800 Subject: [PATCH] =?UTF-8?q?debug=E6=A8=A1=E5=BC=8F=E9=BC=A0=E6=A0=87?= =?UTF-8?q?=E5=8D=95=E5=87=BB=E8=BE=93=E5=87=BA=E4=BF=A1=E6=81=AF=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index 21a6ef77..6d5bb8df 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -94,7 +94,10 @@ function love.mousepressed(x,y,k,touch) if touch then return end mouseShow=true mx,my=xOy:inverseTransformPoint(x,y) - if devMode==1 then DBP(mx,my)end + if devMode==1 then + local dx,dy=mx-lastX,my-lastY + DBP(("(%d,%d), D=(%d,%d)~~(%d,%d)(%d,%d)"):format(mx,my,dx,dy,int(mx/10)*10,int(my/10)*10,int(dx/10)*10,int(dy/10)*10)) + end if SCN.swapping then return end if mouseDown[SCN.cur]then mouseDown[SCN.cur](mx,my,k)