整理代码,修复应用语言加载TEXTOBJ时有个特殊的文本对象会弹出警告
This commit is contained in:
@@ -34,7 +34,7 @@ function applyLanguage()
|
|||||||
text=LANG.get(SETTING.locale)
|
text=LANG.get(SETTING.locale)
|
||||||
WIDGET.setLang(text.WidgetText)
|
WIDGET.setLang(text.WidgetText)
|
||||||
for k,v in next,TEXTOBJ do
|
for k,v in next,TEXTOBJ do
|
||||||
if text[k]then
|
if rawget(text,k)then
|
||||||
v:set(text[k])
|
v:set(text[k])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -359,12 +359,10 @@ function scene.draw()
|
|||||||
gc_setColor(1,1,1,.82)
|
gc_setColor(1,1,1,.82)
|
||||||
gc_draw(TEXTOBJ.modeName,modeTextPos,10)
|
gc_draw(TEXTOBJ.modeName,modeTextPos,10)
|
||||||
local M=GAME.curMode
|
local M=GAME.curMode
|
||||||
if M then
|
if M and M.score and M.records[1]then
|
||||||
if M.score and M.records[1]then
|
setFont(15)
|
||||||
setFont(15)
|
gc_setColor(1,1,1,.6)
|
||||||
gc_setColor(1,1,1,.6)
|
gc_print(M.scoreDisp(M.records[1]),modeTextPos,45)
|
||||||
gc_print(M.scoreDisp(M.records[1]),modeTextPos,45)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--Replaying
|
--Replaying
|
||||||
|
|||||||
Reference in New Issue
Block a user