sonic-radiance/sonic-radiance.love/scenes/overworld/screens/parent.lua
2020-08-29 11:36:59 +02:00

46 lines
869 B
Lua

local MenuScreenParent = Object:extend()
local menu = require "scenes.overworld.screens.menu"
local const = require "scenes.overworld.screens.mainmenu.const"
function MenuScreenParent:new(scene, title)
self.scene = scene
self.menusystem = scene.menusystem
self.menuObj = menu
self.title = title or ""
self.scene:registerScreen(self)
self:setMenu()
end
function MenuScreenParent:update(dt)
end
function MenuScreenParent:setMenu()
end
function MenuScreenParent:quit()
self.scene.menusystem:reset()
self.scene:quitScreen()
end
function MenuScreenParent:drawForeground()
self.scene.assets.fonts["SA2font"]:print(self.title, 160, 12)
love.graphics.rectangle("line", const.X, const.Y, const.WIDTH, const.HEIGHT)
self:draw()
end
function MenuScreenParent:draw()
end
function MenuScreenParent:drawBackground()
end
return MenuScreenParent