33 lines
818 B
Lua
33 lines
818 B
Lua
require "common.globals"
|
|
require "common.class"
|
|
local Screen = require "titlescreen.screen"
|
|
local BootPage = require "titlescreen.pages.boot.bootpage"
|
|
local PageView = require "api.page.pageview"
|
|
local SplashScreen = require "titlescreen.splash"
|
|
|
|
---@class BootScreen : Screen
|
|
---@field bootpage BootPage
|
|
local BootScreen = {
|
|
__tostring = function() return "BootScreen" end
|
|
}
|
|
|
|
---Create a new BootScreen instance
|
|
---@param o? BootScreen
|
|
---@return BootScreen
|
|
function BootScreen.new(o)
|
|
o = o or {}
|
|
|
|
o.bootpage = o.bootpage or BootPage.new()
|
|
|
|
return CreateInstance(BootScreen, o, Screen)
|
|
end
|
|
|
|
function BootScreen:init()
|
|
self.pageview:replace(self.bootpage)
|
|
end
|
|
|
|
function BootScreen:deactivate()
|
|
self.onDeactivation({reason = "deactivation", hint = tostring(SplashScreen)})
|
|
end
|
|
|
|
return BootScreen |