sonic-bluestreak/sonic-bluestreak.love/scenes/overworld/screens/parent.lua

50 lines
923 B
Lua
Raw Permalink Normal View History

2021-11-25 10:57:13 +01:00
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
function MenuScreenParent:drawOverEverything()
end
return MenuScreenParent