mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Update stencil calls
This commit is contained in:
parent
4ef34ccc5b
commit
11b49a7554
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user