]> git.lizzy.rs Git - xdecor.git/blobdiff - handlers/nodeboxes.lua
Add some helpers (just in case)
[xdecor.git] / handlers / nodeboxes.lua
index 9f0953fc916769ca02dfde07533a38f414fe4179..214281444e6f250419e64f25d0cbc99c65b900bf 100644 (file)
@@ -18,10 +18,10 @@ xdecor.nodebox = {
        null = { type = "fixed", fixed = { 0, 0, 0, 0, 0, 0 } }
 }
 
-xdecor.pixelnodebox = function(size, boxes)
+xdecor.pixelbox = function(size, boxes)
        local fixed = {}
        for _, box in pairs(boxes) do
-               local x, y, z, w, h, l = unpack(box)
+               local x, y, z, w, h, l = unpack(box) -- `unpack` has been changed to `table.unpack` in newest Lua versions.
                fixed[#fixed+1] = {
                        (x / size) - 0.5,
                        (y / size) - 0.5,