mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
content menu moved to xml (no icons yet)
This commit is contained in:
parent
49d57b307b
commit
64820020f8
14 changed files with 91 additions and 172 deletions
|
|
@ -204,7 +204,8 @@ end
|
|||
function gui.template(name, params)
|
||||
local text = file.read(file.find("layouts/templates/"..name..".xml"))
|
||||
for k,v in pairs(params) do
|
||||
text = text:gsub("(%%{"..k.."})", tostring(v))
|
||||
local arg = tostring(v):gsub("'", "\\'"):gsub('"', '\\"')
|
||||
text = text:gsub("(%%{"..k.."})", arg)
|
||||
end
|
||||
text = text:gsub("if%s*=%s*'%%{%w+}'", "if=''")
|
||||
text = text:gsub("if%s*=%s*\"%%{%w+}\"", "if=\"\"")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue