core/menusystem: remove canvas use from menu itself

This commit is contained in:
Kazhnuz 2019-02-11 22:37:20 +01:00
parent 327448d22f
commit 5c2792c9f4

View file

@ -25,10 +25,6 @@ function Menu:new(menusystem, name, x, y, w, h)
self.sound.asset = nil
self.sound.active = false
self.canvas = {}
self.canvas.texture = nil
self.canvas.needRedraw = true
self:register()
end
@ -78,14 +74,7 @@ function Menu:destroy()
end
function Menu:draw()
if self.canvas.needRedraw == true then
core.screen:cease()
self:drawCanvas()
self.canvas.needRedraw = false
core.screen:apply()
end
love.graphics.draw(self.canvas.texture, self.x, self.y)
-- nothing here
end
function Menu:drawCanvas()
@ -142,7 +131,6 @@ function Menu:moveCursor(new_selected)
self.widget.selected = new_selected
end
end
self.canvas.needRedraw = true
end
function Menu:setSound(soundasset)