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

47 lines
871 B
Lua
Raw Normal View History

2020-08-20 15:39:02 +02:00
local MenuScreenParent = Object:extend()
local menu = require "scenes.overworld.screens.menu"
local const = require "scenes.overworld.screens.mainmenu.const"
2020-08-20 15:39:02 +02:00
function MenuScreenParent:new(scene, title)
2020-08-20 15:39:02 +02:00
self.scene = scene
self.menusystem = scene.menusystem
self.menuObj = menu
self.title = title or ""
2020-08-20 15:39:02 +02:00
self.scene:registerScreen(self)
self:setMenu()
2020-08-20 15:39:02 +02:00
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, 158, 16)
--love.graphics.rectangle("line", const.X, const.Y, const.WIDTH, const.HEIGHT)
self:draw()
end
2020-08-20 15:39:02 +02:00
function MenuScreenParent:draw()
end
function MenuScreenParent:drawBackground()
end
2020-08-20 15:39:02 +02:00
return MenuScreenParent