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()
|
2020-08-28 00:26:12 +02:00
|
|
|
self.scene.assets.fonts["SA2font"]:print(self.title, 160, 12)
|
2021-03-23 13:32:48 +01:00
|
|
|
--love.graphics.rectangle("line", const.X, const.Y, const.WIDTH, const.HEIGHT)
|
2020-08-27 19:05:00 +02:00
|
|
|
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
|
|
|
|
|
2021-04-23 10:21:54 +02:00
|
|
|
function MenuScreenParent:drawOverEverything()
|
|
|
|
end
|
|
|
|
|
2020-08-20 15:39:02 +02:00
|
|
|
return MenuScreenParent
|