mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-26 05:14:21 +00:00
commit
de1a5f6b77
@ -129,6 +129,10 @@ function newobject:draw()
|
|||||||
-- set the object's draw order
|
-- set the object's draw order
|
||||||
self:SetDrawOrder()
|
self:SetDrawOrder()
|
||||||
|
|
||||||
|
love.graphics.setStencilMode("replace", "always", 1) -- start stencil
|
||||||
|
stencilfunc()
|
||||||
|
love.graphics.setStencilMode("keep", "greater", 0)
|
||||||
|
|
||||||
local drawfunc = self.Draw or self.drawfunc
|
local drawfunc = self.Draw or self.drawfunc
|
||||||
if drawfunc then
|
if drawfunc then
|
||||||
drawfunc(self)
|
drawfunc(self)
|
||||||
@ -141,9 +145,6 @@ function newobject:draw()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.stencil(stencilfunc)
|
|
||||||
love.graphics.setStencilTest("greater", 0)
|
|
||||||
|
|
||||||
local children = self.children
|
local children = self.children
|
||||||
if children then
|
if children then
|
||||||
for k, v in ipairs(children) do
|
for k, v in ipairs(children) do
|
||||||
@ -155,7 +156,7 @@ function newobject:draw()
|
|||||||
if drawfunc then
|
if drawfunc then
|
||||||
drawfunc(self)
|
drawfunc(self)
|
||||||
end
|
end
|
||||||
love.graphics.setStencilTest()
|
love.graphics.setStencilMode()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -124,8 +124,9 @@ function newobject:draw()
|
|||||||
drawfunc(self)
|
drawfunc(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.stencil(stencilfunc)
|
love.graphics.setStencilMode("replace", "always", 1) -- start stencil
|
||||||
love.graphics.setStencilTest("greater", 0)
|
stencilfunc()
|
||||||
|
love.graphics.setStencilMode("keep","greater", 0)
|
||||||
|
|
||||||
local children = self.children
|
local children = self.children
|
||||||
if children then
|
if children then
|
||||||
@ -137,7 +138,7 @@ function newobject:draw()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.setStencilTest()
|
love.graphics.setStencilMode()
|
||||||
|
|
||||||
drawfunc = self.DrawOver or self.drawoverfunc
|
drawfunc = self.DrawOver or self.drawoverfunc
|
||||||
if drawfunc then
|
if drawfunc then
|
||||||
|
@ -98,15 +98,16 @@ function newobject:draw()
|
|||||||
|
|
||||||
self:SetDrawOrder()
|
self:SetDrawOrder()
|
||||||
|
|
||||||
love.graphics.stencil(stencilfunc)
|
love.graphics.setStencilMode("replace", "always", 1) -- start stencil
|
||||||
love.graphics.setStencilTest("greater", 0)
|
stencilfunc()
|
||||||
|
love.graphics.setStencilMode("keep", "greater", 0)
|
||||||
|
|
||||||
local drawfunc = self.Draw or self.drawfunc
|
local drawfunc = self.Draw or self.drawfunc
|
||||||
if drawfunc then
|
if drawfunc then
|
||||||
drawfunc(self)
|
drawfunc(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.setStencilTest()
|
love.graphics.setStencilMode("keep", "greater", 0)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -144,8 +144,9 @@ function newobject:draw()
|
|||||||
drawfunc(self)
|
drawfunc(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.stencil(stencilfunc)
|
love.graphics.setStencilMode("replace", "always", 1) -- start stencil
|
||||||
love.graphics.setStencilTest("greater", 0)
|
stencilfunc()
|
||||||
|
love.graphics.setStencilMode("keep", "greater", 0)
|
||||||
|
|
||||||
local internals = self.internals
|
local internals = self.internals
|
||||||
if internals then
|
if internals then
|
||||||
@ -157,7 +158,7 @@ function newobject:draw()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.setStencilTest()
|
love.graphics.setStencilMode()
|
||||||
|
|
||||||
local children = self.children
|
local children = self.children
|
||||||
if #children > 0 then
|
if #children > 0 then
|
||||||
|
@ -287,16 +287,15 @@ function newobject:draw()
|
|||||||
stencilfunc = function() love.graphics.rectangle("fill", x, y, width - 16, height - 16) end
|
stencilfunc = function() love.graphics.rectangle("fill", x, y, width - 16, height - 16) end
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.stencil(stencilfunc)
|
love.graphics.setStencilMode("replace", "always", 1) -- start stencil
|
||||||
love.graphics.setStencilTest("greater", 0)
|
stencilfunc()
|
||||||
|
love.graphics.setStencilMode("keep", "greater", 0)
|
||||||
|
|
||||||
local drawfunc = self.Draw or self.drawfunc
|
local drawfunc = self.Draw or self.drawfunc
|
||||||
if drawfunc then
|
if drawfunc then
|
||||||
drawfunc(self)
|
drawfunc(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.setStencilTest()
|
|
||||||
|
|
||||||
local internals = self.internals
|
local internals = self.internals
|
||||||
if internals then
|
if internals then
|
||||||
for k, v in ipairs(internals) do
|
for k, v in ipairs(internals) do
|
||||||
@ -304,6 +303,8 @@ function newobject:draw()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
love.graphics.setStencilMode()
|
||||||
|
|
||||||
drawfunc = self.DrawOver or self.drawoverfunc
|
drawfunc = self.DrawOver or self.drawoverfunc
|
||||||
if drawfunc then
|
if drawfunc then
|
||||||
drawfunc(self)
|
drawfunc(self)
|
||||||
|
@ -180,8 +180,9 @@ function newobject:draw()
|
|||||||
|
|
||||||
self:SetDrawOrder()
|
self:SetDrawOrder()
|
||||||
|
|
||||||
love.graphics.stencil(stencilfunc)
|
love.graphics.setStencilMode("replace", "always", 1) -- start stencil
|
||||||
love.graphics.setStencilTest("greater", 0)
|
stencilfunc()
|
||||||
|
love.graphics.setStencilMode("keep", "greater", 0)
|
||||||
|
|
||||||
local drawfunc = self.Draw or self.drawfunc
|
local drawfunc = self.Draw or self.drawfunc
|
||||||
if drawfunc then
|
if drawfunc then
|
||||||
@ -195,7 +196,7 @@ function newobject:draw()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.setStencilTest()
|
love.graphics.setStencilMode()
|
||||||
|
|
||||||
local internals = self.internals
|
local internals = self.internals
|
||||||
if internals then
|
if internals then
|
||||||
|
Loading…
Reference in New Issue
Block a user