From 0e1e27920910112bff65bb93d5279d72d8940890 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 30 Oct 2021 14:48:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E7=95=8C=E9=9D=A2=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=BE=AE=E8=B0=83=EF=BC=9A=E5=BD=95=E5=83=8F=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E6=97=B6=E5=8D=95=E7=8B=AC=E4=B8=80=E5=A5=97=EF=BC=9B?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E5=90=8D=E6=96=87=E6=9C=AC=E5=A4=AA=E9=95=BF?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E4=BC=9A=E6=A8=AA=E5=90=91=E5=8E=8B?= =?UTF-8?q?=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/game.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/parts/scenes/game.lua b/parts/scenes/game.lua index 3545a8b9..844179ce 100644 --- a/parts/scenes/game.lua +++ b/parts/scenes/game.lua @@ -12,7 +12,7 @@ local setFont,mStr=FONT.set,GC.mStr local noTouch,noKey=false,false local touchMoveLastFrame=false local trigGameRate,gameRate -local modeTextPos +local modeTextPos,modeTextWidK local replaying local repRateStrings={[0]="pause",[.125]="0.125x",[.5]="0.5x",[1]="1x",[2]="2x",[5]="5x"} @@ -23,10 +23,14 @@ local function _updateMenuButtons() WIDGET.active.restart.hide=replaying local pos=(GAME.tasUsed or replaying)and'right'or SETTING.menuPos - if GAME.replaying or pos=='right'then + modeTextWidK=math.min(280/TEXTOBJ.modeName:getWidth(),1) + if GAME.replaying then + WIDGET.active.pause.x=1195 + modeTextPos=1185-TEXTOBJ.modeName:getWidth()*modeTextWidK + elseif pos=='right'then WIDGET.active.restart.x=1125 WIDGET.active.pause.x=1195 - modeTextPos=1100-TEXTOBJ.modeName:getWidth() + modeTextPos=1115-TEXTOBJ.modeName:getWidth()*modeTextWidK elseif pos=='middle'then WIDGET.active.restart.x=360 WIDGET.active.pause.x=860 @@ -34,7 +38,7 @@ local function _updateMenuButtons() elseif pos=='left'then WIDGET.active.restart.x=120 WIDGET.active.pause.x=190 - modeTextPos=1200-TEXTOBJ.modeName:getWidth() + modeTextPos=1200-TEXTOBJ.modeName:getWidth()*modeTextWidK end end local function _updateRepButtons() @@ -357,7 +361,7 @@ function scene.draw() --Mode info gc_setColor(1,1,1,.82) - gc_draw(TEXTOBJ.modeName,modeTextPos,10) + gc_draw(TEXTOBJ.modeName,modeTextPos,10,0,modeTextWidK,1) local M=GAME.curMode if M and M.score and M.records[1]then setFont(15)