From a97fc8b53ac410316e92f602f905af951b90959f Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 20 Dec 2020 23:28:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AA=97=E5=8F=A3=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E7=BC=A9=E6=94=BE=E5=BE=88=E5=B0=8F=E5=90=8ELOG.print?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/log.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Zframework/log.lua b/Zframework/log.lua index 5583139b..c9072238 100644 --- a/Zframework/log.lua +++ b/Zframework/log.lua @@ -1,5 +1,5 @@ local gc=love.graphics -local int,min=math.floor,math.min +local int,max,min=math.floor,math.max,math.min local ins,rem=table.insert,table.remove local debugMesList={} @@ -25,16 +25,14 @@ function LOG.update() end function LOG.draw() if debugMesList[1]then - gc.push("transform") local k=SCR.w/SCR.w0 - setFont(int(4*k)*5) + setFont(max(int(4*k)*5,5)) for i=1,#debugMesList do local M=debugMesList[i] local t=M.time gc.setColor(M.r,M.g,M.b,M.blink>0 and int(M.blink/3)%2 or min(t/26,1)) gc.print(M.text,10+(20-min(t,20))^1.5/4,25*i*k) end - gc.pop() end end function LOG.print(text,T,C)--text,type/time,color