2020-08-20 15:39:02 +02:00
|
|
|
local MenuScreenParent = Object:extend()
|
|
|
|
|
|
|
|
local menu = require "scenes.overworld.screens.menu"
|
2020-08-27 19:05:00 +02:00
|
|
|
local const = require "scenes.overworld.screens.mainmenu.const"
|
2020-08-20 15:39:02 +02:00
|
|
|
|
2020-08-27 19:05:00 +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
|
|
|
|
|
2020-08-27 19:05:00 +02:00
|
|
|
self.title = title or ""
|
|
|
|
|
2020-08-20 15:39:02 +02:00
|
|
|
self.scene:registerScreen(self)
|
2020-08-23 12:06:18 +02:00
|
|
|
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
|
|
|
|
|
2020-08-27 19:05:00 +02:00
|
|
|
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
|
|
|
|
|
2020-08-26 18:38:40 +02:00
|
|
|
function MenuScreenParent:drawBackground()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2020-08-20 15:39:02 +02:00
|
|
|
return MenuScreenParent
|