diff --git a/objects/columnlist.lua b/objects/columnlist.lua index adcd055..316a2d2 100644 --- a/objects/columnlist.lua +++ b/objects/columnlist.lua @@ -154,13 +154,14 @@ function newobject:draw() v:draw() end - love.graphics.setStencil(stencilfunc) + love.graphics.stencil(stencilfunc) + love.graphics.setStencilTest(true) for k, v in ipairs(children) do v:draw() end - love.graphics.setStencil() + love.graphics.setStencilTest(false) end diff --git a/objects/internal/columnlist/columnlistarea.lua b/objects/internal/columnlist/columnlistarea.lua index 9c4aeee..005824f 100644 --- a/objects/internal/columnlist/columnlistarea.lua +++ b/objects/internal/columnlist/columnlistarea.lua @@ -132,7 +132,8 @@ function newobject:draw() drawfunc(self) end - love.graphics.setStencil(stencilfunc) + love.graphics.stencil(stencilfunc) + love.graphics.setStencilTest(true) for k, v in ipairs(self.children) do local col = loveframes.util.BoundingBox(self.x, v.x, self.y, v.y, width, v.width, height, v.height) @@ -141,7 +142,7 @@ function newobject:draw() end end - love.graphics.setStencil() + love.graphics.setStencilTest(false) for k, v in ipairs(self.internals) do v:draw() diff --git a/objects/internal/linenumberspanel.lua b/objects/internal/linenumberspanel.lua index c20ae39..7f2c68a 100644 --- a/objects/internal/linenumberspanel.lua +++ b/objects/internal/linenumberspanel.lua @@ -108,7 +108,8 @@ function newobject:draw() -- set the object's draw order self:SetDrawOrder() - love.graphics.setStencil(stencilfunc) + love.graphics.stencil(stencilfunc) + love.graphics.setStencilTest(true) if draw then draw(self) @@ -116,7 +117,7 @@ function newobject:draw() drawfunc(self) end - love.graphics.setStencil() + love.graphics.setStencilTest(false) end diff --git a/objects/internal/multichoice/multichoicelist.lua b/objects/internal/multichoice/multichoicelist.lua index adc7d6f..4f74b6b 100644 --- a/objects/internal/multichoice/multichoicelist.lua +++ b/objects/internal/multichoice/multichoicelist.lua @@ -173,7 +173,8 @@ function newobject:draw() v:draw() end - love.graphics.setStencil(stencilfunc) + love.graphics.stencil(stencilfunc) + love.graphics.setStencilTest(true) for k, v in ipairs(children) do local col = loveframes.util.BoundingBox(self.x, v.x, self.y, v.y, self.width, v.width, self.height, v.height) @@ -182,7 +183,7 @@ function newobject:draw() end end - love.graphics.setStencil() + love.graphics.setStencilTest(false) if not draw then drawoverfunc(self) diff --git a/objects/list.lua b/objects/list.lua index 5bc5c79..aac0ece 100644 --- a/objects/list.lua +++ b/objects/list.lua @@ -163,7 +163,8 @@ function newobject:draw() drawfunc(self) end - love.graphics.setStencil(stencilfunc) + love.graphics.stencil(stencilfunc) + love.graphics.setStencilTest(true) for k, v in ipairs(children) do local col = loveframes.util.BoundingBox(x, v.x, y, v.y, width, v.width, height, v.height) @@ -172,7 +173,7 @@ function newobject:draw() end end - love.graphics.setStencil() + love.graphics.setStencilTest(false) for k, v in ipairs(internals) do v:draw() diff --git a/objects/tabs.lua b/objects/tabs.lua index a4116ae..01e1648 100644 --- a/objects/tabs.lua +++ b/objects/tabs.lua @@ -164,7 +164,8 @@ function newobject:draw() drawfunc(self) end - love.graphics.setStencil(stencilfunc) + love.graphics.stencil(stencilfunc) + love.graphics.setStencilTest(true) for k, v in ipairs(internals) do local col = loveframes.util.BoundingBox(x + self.buttonareax, v.x, self.y, v.y, self.buttonareawidth, v.width, tabheight, v.height) @@ -173,7 +174,7 @@ function newobject:draw() end end - love.graphics.setStencil() + love.graphics.setStencilTest(false) if #self.children > 0 then self.children[self.tab]:draw() diff --git a/objects/textinput.lua b/objects/textinput.lua index 2fe09c1..34c046c 100644 --- a/objects/textinput.lua +++ b/objects/textinput.lua @@ -302,7 +302,8 @@ function newobject:draw() stencilfunc = function() love.graphics.rectangle("fill", x, y, width - 16, height - 16) end end - love.graphics.setStencil(stencilfunc) + love.graphics.stencil(stencilfunc) + love.graphics.setStencilTest(true) if draw then draw(self) @@ -310,7 +311,7 @@ function newobject:draw() drawfunc(self) end - love.graphics.setStencil() + love.graphics.setStencilTest(false) for k, v in ipairs(internals) do v:draw() diff --git a/objects/tree.lua b/objects/tree.lua index 7bc32b3..557ca68 100644 --- a/objects/tree.lua +++ b/objects/tree.lua @@ -193,7 +193,8 @@ function newobject:draw() -- set the object's draw order self:SetDrawOrder() - love.graphics.setStencil(stencilfunc) + love.graphics.stencil(stencilfunc) + love.graphics.setStencilTest(true) if draw then draw(self) @@ -205,7 +206,7 @@ function newobject:draw() v:draw() end - love.graphics.setStencil() + love.graphics.setStencilTest(false) for k, v in ipairs(self.internals) do v:draw()