fix: only redraw visible elements

This commit is contained in:
Kazhnuz 2022-01-05 21:30:12 +01:00
parent ac63e377f9
commit 783ca58c78

View file

@ -164,7 +164,10 @@ end
-- Draw the menu and its content -- Draw the menu and its content
function Gui:redraw() function Gui:redraw()
for _, element in pairs(self.elements) do for _, element in pairs(self:getVisibleElement(true)) do
element:redraw()
end
for _, element in pairs(self:getVisibleElement(false)) do
element:redraw() element:redraw()
end end
end end