修复窗口强制缩放很小后LOG.print报错
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
local gc=love.graphics
|
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 ins,rem=table.insert,table.remove
|
||||||
|
|
||||||
local debugMesList={}
|
local debugMesList={}
|
||||||
@@ -25,16 +25,14 @@ function LOG.update()
|
|||||||
end
|
end
|
||||||
function LOG.draw()
|
function LOG.draw()
|
||||||
if debugMesList[1]then
|
if debugMesList[1]then
|
||||||
gc.push("transform")
|
|
||||||
local k=SCR.w/SCR.w0
|
local k=SCR.w/SCR.w0
|
||||||
setFont(int(4*k)*5)
|
setFont(max(int(4*k)*5,5))
|
||||||
for i=1,#debugMesList do
|
for i=1,#debugMesList do
|
||||||
local M=debugMesList[i]
|
local M=debugMesList[i]
|
||||||
local t=M.time
|
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.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)
|
gc.print(M.text,10+(20-min(t,20))^1.5/4,25*i*k)
|
||||||
end
|
end
|
||||||
gc.pop()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function LOG.print(text,T,C)--text,type/time,color
|
function LOG.print(text,T,C)--text,type/time,color
|
||||||
|
|||||||
Reference in New Issue
Block a user