修复快速设置语言产生大量内存垃圾并在返回主菜单时卡顿 close #118

This commit is contained in:
MrZ626
2021-07-10 23:38:12 +08:00
parent 9c2974e4f0
commit b650999f96
2 changed files with 14 additions and 10 deletions

View File

@@ -34,11 +34,13 @@ function LANG.init(langList,publicText)--Attention, calling this will destory al
LANG.init,LANG.setLangList,LANG.setPublicText=nil
function LANG.set(l)
text=langList[l]
WIDGET.setLang(text.WidgetText)
for k,v in next,drawableText do
if text[k]then
v:set(text[k])
if text~=langList[l]then
text=langList[l]
WIDGET.setLang(text.WidgetText)
for k,v in next,drawableText do
if text[k]then
v:set(text[k])
end
end
end
end