From 408377e51bf74ef4f7f835d219e40d45a9dbe29d Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 19 Dec 2020 16:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=97=E5=8F=B7=E6=B3=84?= =?UTF-8?q?=E9=9C=B2=E5=87=BA5N=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/text.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Zframework/text.lua b/Zframework/text.lua index f9b25ce8..10ac2198 100644 --- a/Zframework/text.lua +++ b/Zframework/text.lua @@ -1,5 +1,5 @@ local gc=love.graphics -local rnd,rem=math.random,table.remove +local int,rnd,rem=math.floor,math.random,table.remove local setFont,mStr=setFont,mStr local texts={} @@ -79,7 +79,7 @@ function TEXT.show(text,x,y,font,style,spd,stop) text=text, --String x=x or 0, --X y=y or 0, --Y - font=font or 40, --Font + font=int(font/5)*5 or 40, --Font spd=(spd or 1)/60, --Timing speed(1=last 1 sec) stop=stop, --Stop time(sustained text) draw=textFX[style]or error("unavailable type:"..style), --Draw method @@ -91,7 +91,7 @@ function TEXT.getText(text,x,y,font,style,spd,stop)--Another version of TEXT.sho text=text, x=x or 0, y=y or 0, - font=font or 40, + font=int(font/5)*5 or 40, spd=(spd or 1)/60, stop=stop, draw=textFX[style]or error("unavailable type:"..style),