aboutsummaryrefslogtreecommitdiff
path: root/src/utils.lua
diff options
context:
space:
mode:
authorne_mene <[email protected]>2026-03-31 23:02:40 +0200
committerne_mene <[email protected]>2026-03-31 23:02:40 +0200
commit0cf536b2ba3854d4ee58c06227c1266870829b6c (patch)
tree791388bff86be24c8f1d8eab112e48e0e798b1f4 /src/utils.lua
parent100063ec501ca94773810c4bb5d55e457b0f3f54 (diff)
speck editor: file buttons
Diffstat (limited to 'src/utils.lua')
-rw-r--r--src/utils.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/utils.lua b/src/utils.lua
index 5b8258c..e20c88a 100644
--- a/src/utils.lua
+++ b/src/utils.lua
@@ -120,7 +120,7 @@ end
function table.deep_copy(datatable)
local tblRes={}
if type(datatable)=="table" then
- for k,v in pairs(datatable) do
+ for k,v in pairs(datatable) do
tblRes[table.deep_copy(k)] = table.deep_copy(v)
end
else
@@ -129,6 +129,11 @@ function table.deep_copy(datatable)
return tblRes
end
+function trunc_filename_to_res(filename)
+ local index = filename:find("res/", 1, true)
+ return filename:sub(index)
+end
+
EASING_FUNCTIONS = {
Lerp = lerp
}