From b4258d07598ec36e6c28b784944cf48d6195720c Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 2 Sep 2020 17:19:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=B1=9E=E6=80=A7=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E4=BB=A3=E7=A0=81=E9=87=8D=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 7 ++++--- Zframework/widget.lua | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index 2b149ff5..c03b4830 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -184,6 +184,7 @@ function love.touchreleased(id,x,y) sysFX.newRipple(.3,x,y,30) end end + function love.keypressed(i) mouseShow=false if devMode then @@ -205,12 +206,12 @@ function love.keypressed(i) end elseif i=="q"then local W=WIDGET.sel - if W then W:getInfo()end + if W then W:printInfo()end elseif i=="f3"then assert(false,"Techmino:挂了") elseif i=="e"then for k,v in next,_G do - DBP(k,v) + DBP(k,v) end elseif WIDGET.sel then local W=WIDGET.sel @@ -408,7 +409,7 @@ local devColor={ color.lBlue, } local FPS=love.timer.getFPS -love.draw,love.update=nil +love.draw,love.update=nil--remove default draw/update function love.run() local T=love.timer local STEP,GETDelta,WAIT=T.step,T.getDelta,T.sleep diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 73530a45..302dfb3c 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -69,7 +69,7 @@ function button:draw() gc.printf(t,x,y0,w,"center") end end -function button:getInfo() +function button:printInfo() DBP(format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font)) end @@ -119,7 +119,7 @@ function key:draw() gc.printf(t,x,y+h*.5-self.font*.7,w,"center") end end -function key:getInfo() +function key:printInfo() DBP(format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font)) end @@ -176,7 +176,7 @@ function switch:draw() gc.printf(t,x-412-ATV,y+20-self.font*.7,400,"right") end end -function switch:getInfo() +function switch:printInfo() DBP(format("x=%d,y=%d,font=%d",self.x,self.y,self.font)) end @@ -279,7 +279,7 @@ function slider:draw() gc.printf(t,x-312-ATV,y-self.font*.7,300,"right") end end -function slider:getInfo() +function slider:printInfo() DBP(format("x=%d,y=%d,w=%d",self.x,self.y,self.w)) end