From 4ea2cb18c75befb1d04faad9d02e699dc3458526 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 27 Oct 2021 01:21:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8=E8=AF=AD=E8=A8=80=E5=8A=A0?= =?UTF-8?q?=E8=BD=BDTEXTOBJ=E6=97=B6=E6=9C=89=E4=B8=AA=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E7=9A=84=E6=96=87=E6=9C=AC=E5=AF=B9=E8=B1=A1=E4=BC=9A=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/gameFuncs.lua | 2 +- parts/scenes/game.lua | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/parts/gameFuncs.lua b/parts/gameFuncs.lua index 53dabba4..3596a538 100644 --- a/parts/gameFuncs.lua +++ b/parts/gameFuncs.lua @@ -34,7 +34,7 @@ function applyLanguage() text=LANG.get(SETTING.locale) WIDGET.setLang(text.WidgetText) for k,v in next,TEXTOBJ do - if text[k]then + if rawget(text,k)then v:set(text[k]) end end diff --git a/parts/scenes/game.lua b/parts/scenes/game.lua index 89207d46..3545a8b9 100644 --- a/parts/scenes/game.lua +++ b/parts/scenes/game.lua @@ -359,12 +359,10 @@ function scene.draw() gc_setColor(1,1,1,.82) gc_draw(TEXTOBJ.modeName,modeTextPos,10) local M=GAME.curMode - if M then - if M.score and M.records[1]then - setFont(15) - gc_setColor(1,1,1,.6) - gc_print(M.scoreDisp(M.records[1]),modeTextPos,45) - end + if M and M.score and M.records[1]then + setFont(15) + gc_setColor(1,1,1,.6) + gc_print(M.scoreDisp(M.records[1]),modeTextPos,45) end --Replaying