ExperimentalGear/scripts/titlescreen/boot.lua

34 lines
846 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 = {
__name = "BootScreen"
}
---Create a new BootScreen instance
---@param params? BootScreen
---@return BootScreen
function BootScreen.new(params)
params = params or {}
params.bootpage = params.bootpage or BootPage.new()
return CreateInstance(BootScreen, params, Screen)
end
function BootScreen:init()
Screen.init(self)
self.pageview:replace(self.bootpage)
end
function BootScreen:deactivate()
self.onDeactivation({reason = "deactivation", hint = SplashScreen.__name})
end
return BootScreen