diff options
| author | ne_mene <[email protected]> | 2026-03-31 23:02:40 +0200 |
|---|---|---|
| committer | ne_mene <[email protected]> | 2026-03-31 23:02:40 +0200 |
| commit | 0cf536b2ba3854d4ee58c06227c1266870829b6c (patch) | |
| tree | 791388bff86be24c8f1d8eab112e48e0e798b1f4 /src/utils.lua | |
| parent | 100063ec501ca94773810c4bb5d55e457b0f3f54 (diff) | |
speck editor: file buttons
Diffstat (limited to 'src/utils.lua')
| -rw-r--r-- | src/utils.lua | 7 |
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 } |
