Refonte pour utiliser le systeme de GUI #112

Merged
kazhnuz merged 102 commits from feat/gui into master 2022-01-06 19:15:16 +01:00
2 changed files with 8 additions and 4 deletions
Showing only changes of commit 6f6b4e6d74 - Show all commits

View file

@ -19,6 +19,13 @@ function CanvasElement:initCanvas()
self.canvas.padding = 8
end
function CanvasElement:updateElement(dt)
CanvasElement.super.updateElement(self, dt)
if (self.canvas.needRedraw or self.canvas.isAnimated) then
self:redraw()
end
end
function CanvasElement:getCanvasDimensions()
return self:getDimensions()
end

View file

@ -140,11 +140,8 @@ end
-- UPDATE FUNCTIONS
function Menu:updateElement(dt)
Menu.super.updateElement(self, dt)
self.widget:update(dt)
if (self.canvas.needRedraw or self.canvas.isAnimated) then
self:redraw()
end
Menu.super.updateElement(self, dt)
end
-- DRAW FUNCTIONS