mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
The columnlistarea object will only update its children if they are within its boundaries
This commit is contained in:
parent
7c4b3b9804
commit
6cede1d844
@ -73,7 +73,10 @@ function newobject:update(dt)
|
||||
end
|
||||
|
||||
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)
|
||||
if col then
|
||||
v:update(dt)
|
||||
end
|
||||
v:SetClickBounds(self.x, self.y, self.width, self.height)
|
||||
v.y = (v.parent.y + v.staticy) - self.offsety + cheight
|
||||
v.x = (v.parent.x + v.staticx) - self.offsetx
|
||||
@ -133,7 +136,7 @@ function newobject:draw()
|
||||
|
||||
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)
|
||||
if col == true then
|
||||
if col then
|
||||
v:draw()
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user