From 66ed68fbe3228e6fb5fd5f1852b7c8cf0f7a2c00 Mon Sep 17 00:00:00 2001 From: EngineerSmith Date: Sun, 28 Nov 2021 20:02:20 +0000 Subject: [PATCH] Fixed issue with padding not being adding to the quad's position for dynamic atlases --- treeNode.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/treeNode.lua b/treeNode.lua index 42d4c50..aae0acd 100644 --- a/treeNode.lua +++ b/treeNode.lua @@ -69,7 +69,7 @@ treeNode.draw = function(self, quads, width, height, extrude, padding) local iwidth, iheight = img:getDimensions() local extrudeQuad = lg.newQuad(-extrude, -extrude, iwidth+extrude*2, iheight+extrude*2, iwidth, iheight) lg.draw(img, extrudeQuad, self.x + padding, self.y + padding) - quads[self.image.id] = lg.newQuad(self.x+extrude, self.y+extrude, iwidth, iheight, width, height) + quads[self.image.id] = lg.newQuad(self.x+extrude+padding, self.y+extrude+padding, iwidth, iheight, width, height) elseif self[1] --[[ and self[2] ]] then self[1]:draw(quads, width, height, extrude, padding) self[2]:draw(quads, width, height, extrude, padding)