30 lines
745 B
Lua
30 lines
745 B
Lua
XCode = {}
|
||
|
||
local XCodeKeyMap = nil
|
||
|
||
local mt = {
|
||
__index = function(t, k)
|
||
local code = XCodeKeyMap[k]
|
||
if code then
|
||
t[k] = code
|
||
XCodeKeyMap[k] = nil
|
||
else
|
||
XLog.Error("XCode Key:" .. tostring(k) .. "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>XCodeText.tab<61><62><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD>ϸ<EFBFBD>Key<65>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ã<EFBFBD>XCode.cs<63>ж<EFBFBD><D0B6>壩")
|
||
end
|
||
return code
|
||
end
|
||
}
|
||
setmetatable(XCode, mt)
|
||
|
||
function XCode.Init()
|
||
if XCodeKeyMap then
|
||
return
|
||
end
|
||
XCodeKeyMap = {}
|
||
|
||
local TABLE_CODE_TEXT = "Share/Text/CodeText.tab"
|
||
local codeTextTemplates = XTableManager.ReadByStringKey(TABLE_CODE_TEXT, XTable.XTableCodeText, "Key")
|
||
for k, v in pairs(codeTextTemplates) do
|
||
XCodeKeyMap[k] = v.Id
|
||
end
|
||
end
|