From 57f67749dcf086c5847906964a85c897f860ba6b Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 30 May 2021 16:47:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=B1=8F=E5=B9=95=E5=B7=A6?= =?UTF-8?q?=E4=B8=8A=E8=A7=92=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA=E6=AF=94?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 16 +++++++--------- Zframework/log.lua | 11 +++++------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index 9530d244..b467389c 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -590,22 +590,25 @@ function love.run() gc_draw(ms.isDown(1)and cursor_holdImg or cursorImg,mx,my,nil,nil,nil,8,8) end gc_replaceTransform(SCR.xOy_ul) + LOG.draw() + gc_replaceTransform(SCR.origin) --Draw power info. if SETTING.powerInfo then gc_setColor(1,1,1) gc_draw(infoCanvas,SCR.safeX,0,0,SCR.k) end - --Draw Logs - LOG.draw() - - gc_replaceTransform(SCR.origin) --Draw scene swapping animation if SCN.swapping then gc_setColor(1,1,1) _=SCN.stat _.draw(_.time) end + gc_replaceTransform(SCR.xOy_dm) + --Draw Version string + gc_setColor(.8,.8,.8,.4) + setFont(20) + mStr(VERSION.string,0,-30) gc_replaceTransform(SCR.xOy_dl) --Draw FPS setFont(15) @@ -651,11 +654,6 @@ function love.run() gc_setColor(1,0,0,t3)gc.rectangle('fill',-20,20*i-100,-20,-20) end end - gc_replaceTransform(SCR.xOy_dm) - --Draw Version string - gc_setColor(.8,.8,.8,.4) - setFont(20) - mStr(VERSION.string,0,-30) gc_present() --SPEED UPUPUP! diff --git a/Zframework/log.lua b/Zframework/log.lua index 44247113..fbe17e54 100644 --- a/Zframework/log.lua +++ b/Zframework/log.lua @@ -1,8 +1,8 @@ local gc=love.graphics local gc_setColor,gc_print=gc.setColor,gc.print -local int,max,min=math.floor,math.max,math.min +local int,min=math.floor,math.min local ins,rem=table.insert,table.remove -local SCR,setFont=SCR,setFont +local setFont=setFont local mesList={} local mesHistory={ @@ -27,17 +27,16 @@ function LOG.update() end function LOG.draw() if mesList[1]then - local k=SCR.w/SCR.w0 - setFont(max(int(4*k)*5,5)) + setFont(20) for i=1,#mesList do local M=mesList[i] M.rgba[4]=M.blink>0 and int(M.blink/3)%2 or min(M.time/26,1) gc_setColor(M.rgba) - gc_print(M.text,10+(20-min(M.time,20))^1.5/4,25*i*k) + gc_print(M.text,10+(20-min(M.time,20))^1.5/4,25*i) end end end -function LOG.print(text,T)--text,type/time/color,color +function LOG.print(text,T)--text,type/time local color=COLOR.Z local his,time if T=='message'then