⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compat-5.1.lua

📁 cegui界面库
💻 LUA
字号:
if string.find(_VERSION, "5%.0") then
	return
end

-- "loadfile"
local function pp_dofile(path)

	local loaded = false
	local getfile = function()

		if loaded then
			return
		else
			local file,err = io.open(path)
			if not file then
				error("error loading file "..path..": "..err)
			end
			local ret = file:read("*a")
			file:close()

			ret = string.gsub(ret, "%.%.%.%s*%)", "...) local arg = {n=select('#', ...), ...};")

			loaded = true
			return ret
		end
	end

	local f = load(getfile, path)
	return f()
end

old_dofile = dofile
dofile = pp_dofile


-- string.gsub
--[[
local ogsub = string.gsub
local function compgsub(a,b,c,d)
  if type(c) == "function" then
    local oc = c
    c = function (...) return oc(...) or '' end
  end
  return ogsub(a,b,c,d)
end
string.repl = ogsub
--]]

--string.gsub = compgsub




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -