76 lines
2.1 KiB
Lua
76 lines
2.1 KiB
Lua
local ____exports = __module.env
|
|||
|
|
____exports.UI_LAYER_ZORDER = {
|
||
|
|
background = 0,
|
||
|
|
normal = 100,
|
||
|
|
popup = 200,
|
||
|
|
tips = 300,
|
||
|
|
system = 400
|
||
|
|
}
|
||
|
|
---
|
||
|
|
-- @module_data
|
||
|
|
local configByCtor = {}
|
||
|
|
---
|
||
|
|
-- @module_data
|
||
|
|
local configByName = {}
|
||
|
|
--- 显式 UI 窗口注册表(替代源端
|
||
|
|
--
|
||
|
|
-- @UIConfig 装饰器,符合 ts2lua-unreal 编译期白名单规则)。
|
||
|
|
function ____exports.RegisterUIConfig(ctor, input)
|
||
|
|
local ____input_name_2 = input.name
|
||
|
|
local ____input_assetKey_3 = input.assetKey
|
||
|
|
local ____input_singleton_0 = input.singleton
|
||
|
|
if ____input_singleton_0 == nil then
|
||
|
|
____input_singleton_0 = true
|
||
|
|
end
|
||
|
|
local ____temp_4 = input.layer or "normal"
|
||
|
|
local ____temp_5 = input.type or "normal"
|
||
|
|
local ____temp_6 = input.cacheTag or "no_cache"
|
||
|
|
local ____input_blockWorldClick_1 = input.blockWorldClick
|
||
|
|
if ____input_blockWorldClick_1 == nil then
|
||
|
|
____input_blockWorldClick_1 = true
|
||
|
|
end
|
||
|
|
local item = {
|
||
|
|
name = ____input_name_2,
|
||
|
|
assetKey = ____input_assetKey_3,
|
||
|
|
singleton = ____input_singleton_0,
|
||
|
|
layer = ____temp_4,
|
||
|
|
type = ____temp_5,
|
||
|
|
cacheTag = ____temp_6,
|
||
|
|
blockWorldClick = ____input_blockWorldClick_1,
|
||
|
|
ctor = ctor
|
||
|
|
}
|
||
|
|
configByCtor[ctor] = item
|
||
|
|
configByName[item.name] = item
|
||
|
|
return item
|
||
|
|
end
|
||
|
|
function ____exports.GetUIConfig(ctor)
|
||
|
|
return configByCtor[ctor]
|
||
|
|
end
|
||
|
|
function ____exports.GetUIConfigByName(name)
|
||
|
|
return configByName[name]
|
||
|
|
end
|
||
|
|
function __module.StashData(env, to)
|
||
|
|
local ____has = to.__has__
|
||
|
|
if not ____has then
|
||
|
|
____has = {}
|
||
|
|
to.__has__ = ____has
|
||
|
|
end
|
||
|
|
to.configByCtor = configByCtor
|
||
|
|
____has.configByCtor = true
|
||
|
|
to.configByName = configByName
|
||
|
|
____has.configByName = true
|
||
|
|
end
|
||
|
|
function __module.RestoreData(env, from)
|
||
|
|
local ____has = from.__has__
|
||
|
|
if not ____has then
|
||
|
|
return
|
||
|
|
end
|
||
|
|
if ____has.configByCtor then
|
||
|
|
configByCtor = from.configByCtor
|
||
|
|
end
|
||
|
|
if ____has.configByName then
|
||
|
|
configByName = from.configByName
|
||
|
|
end
|
||
|
|
end
|
||
|
|
function __module.UpdateImports()
|
||
|
|
end
|