core/menusystem: remove canvas use from menu itself
This commit is contained in:
parent
327448d22f
commit
5c2792c9f4
1 changed files with 1 additions and 13 deletions
|
@ -25,10 +25,6 @@ function Menu:new(menusystem, name, x, y, w, h)
|
||||||
self.sound.asset = nil
|
self.sound.asset = nil
|
||||||
self.sound.active = false
|
self.sound.active = false
|
||||||
|
|
||||||
self.canvas = {}
|
|
||||||
self.canvas.texture = nil
|
|
||||||
self.canvas.needRedraw = true
|
|
||||||
|
|
||||||
self:register()
|
self:register()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -78,14 +74,7 @@ function Menu:destroy()
|
||||||
end
|
end
|
||||||
|
|
||||||
function Menu:draw()
|
function Menu:draw()
|
||||||
if self.canvas.needRedraw == true then
|
-- nothing here
|
||||||
core.screen:cease()
|
|
||||||
self:drawCanvas()
|
|
||||||
self.canvas.needRedraw = false
|
|
||||||
core.screen:apply()
|
|
||||||
end
|
|
||||||
|
|
||||||
love.graphics.draw(self.canvas.texture, self.x, self.y)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Menu:drawCanvas()
|
function Menu:drawCanvas()
|
||||||
|
@ -142,7 +131,6 @@ function Menu:moveCursor(new_selected)
|
||||||
self.widget.selected = new_selected
|
self.widget.selected = new_selected
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.canvas.needRedraw = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Menu:setSound(soundasset)
|
function Menu:setSound(soundasset)
|
||||||
|
|
Loading…
Reference in a new issue