SCR模块print方法改为info方法

This commit is contained in:
MrZ626
2021-03-07 19:49:08 +08:00
parent cdfe748f08
commit c1e36b0669

View File

@@ -31,12 +31,18 @@ function SCR.resize(w,h)
SCR.safeX,SCR.safeY,SCR.safeW,SCR.safeH=love.window.getSafeArea() SCR.safeX,SCR.safeY,SCR.safeW,SCR.safeH=love.window.getSafeArea()
SCR.xOy:setTransformation(w/2,h/2,nil,SCR.k,nil,SCR.w0/2,SCR.h0/2) SCR.xOy:setTransformation(w/2,h/2,nil,SCR.k,nil,SCR.w0/2,SCR.h0/2)
end end
function SCR.print() function SCR.info()
LOG.print("Screen Info:") return{
for k,v in next,SCR do "Screen info:",
if type(v)=="number"then ("w0,h0 : %d, %d"):format(SCR.w0,SCR.h0),
LOG.print(k..": "..v) ("x,y : %d, %d"):format(SCR.x,SCR.y),
end ("cx,cy : %d, %d"):format(SCR.cx,SCR.cy),
end ("ex,ey : %d, %d"):format(SCR.ex,SCR.ey),
("w,h : %d, %d"):format(SCR.w,SCR.h),
("W,H : %d, %d"):format(SCR.W,SCR.H),
("safeX,safeY : %d, %d"):format(SCR.safeX,SCR.safeY),
("safeW,safeH : %d, %d"):format(SCR.safeW,SCR.safeH),
("k,dpi,rad : %d, %d, %.4f"):format(SCR.k,SCR.dpi,SCR.rad),
}
end end
return SCR return SCR