调整场景/控件模块
This commit is contained in:
@@ -39,8 +39,9 @@ local SCN={
|
|||||||
|
|
||||||
function SCN.add(name,scene)
|
function SCN.add(name,scene)
|
||||||
scenes[name]=scene
|
scenes[name]=scene
|
||||||
if not scene.widgetList then scene.widgetList={}end
|
if scene.widgetList then
|
||||||
setmetatable(scene.widgetList,WIDGET.indexMeta)
|
setmetatable(scene.widgetList,WIDGET.indexMeta)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function SCN.swapUpdate()
|
function SCN.swapUpdate()
|
||||||
|
|||||||
@@ -837,8 +837,10 @@ function WIDGET.set(list)
|
|||||||
end
|
end
|
||||||
function WIDGET.setLang(widgetText)
|
function WIDGET.setLang(widgetText)
|
||||||
for S,L in next,SCN.scenes do
|
for S,L in next,SCN.scenes do
|
||||||
for _,W in next,L.widgetList do
|
if L.widgetList then
|
||||||
W.text=W.fText or widgetText[S][W.name]
|
for _,W in next,L.widgetList do
|
||||||
|
W.text=W.fText or widgetText[S][W.name]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user