Allow full render tree invalidation
This commit is contained in:
parent
349ce2bc34
commit
24d60850e8
@ -165,7 +165,7 @@ function Element:isVisible()
|
|||||||
return self.visible
|
return self.visible
|
||||||
end
|
end
|
||||||
|
|
||||||
function Element:setDirty()
|
function Element:setDirty(fullInvalidate)
|
||||||
self.dirty = true
|
self.dirty = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -66,6 +66,15 @@ function List:isHorizontal()
|
|||||||
return not self:isVertical()
|
return not self:isVertical()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function List:setDirty(fullInvalidate)
|
||||||
|
Element.setDirty(self, fullInvalidate)
|
||||||
|
if fullInvalidate then
|
||||||
|
for _,child in self.children do
|
||||||
|
child:setDirty(fullInvalidate)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function List:draw()
|
function List:draw()
|
||||||
local dirty = Element.draw(self)
|
local dirty = Element.draw(self)
|
||||||
if dirty then
|
if dirty then
|
||||||
|
@ -37,6 +37,13 @@ function Padding:draw()
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Padding:setDirty(fullInvalidate)
|
||||||
|
Element.setDirty(self, fullInvalidate)
|
||||||
|
if fullInvalidate then
|
||||||
|
self.element:setDirty(fullInvalidate)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function Padding:getPaddingLeft()
|
function Padding:getPaddingLeft()
|
||||||
return self.left
|
return self.left
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user