43 lines
1.5 KiB
Lua
43 lines
1.5 KiB
Lua
require("common.class")
|
|
|
|
local PageRegistry = require "api.page.pageregistry"
|
|
|
|
local ServicePage = require("api.page.servicepage")
|
|
local InputCheckPage = require("titlescreen.service.inputcheckpage")
|
|
local ScreenCheckPage = require("titlescreen.service.screencheckpage")
|
|
local ColorCheckPage = require("titlescreen.service.colorcheckpage")
|
|
local VersionInfoPage = require("titlescreen.service.versioninfopage")
|
|
|
|
local ListField = require("titlescreen.common.listfield")
|
|
local ServiceLinkField = require("titlescreen.service.servicelinkfield")
|
|
|
|
---@class ServiceMenuPage: ServicePage
|
|
local ServiceMenuPage = {
|
|
__name = "ServiceMenuPage",
|
|
}
|
|
|
|
---Create a new MainMenuPage instance
|
|
---@param params? MainMenuPage # initial parameters
|
|
---@return ServiceMenuPage
|
|
function ServiceMenuPage.new(params)
|
|
params = params or {}
|
|
|
|
params.title = params.title or "MAIN MENU"
|
|
|
|
local self = CreateInstance(ServiceMenuPage, params, ServicePage)
|
|
|
|
local list = ListField.new()
|
|
list:addField(ServiceLinkField.new{label = "INPUT CHECK", link = PageRegistry:getOrCreatePage(InputCheckPage)})
|
|
list:addField(ServiceLinkField.new{label = "SCREEN CHECK", link = PageRegistry:getOrCreatePage(ScreenCheckPage)})
|
|
list:addField(ServiceLinkField.new{label = "COLOR CHECK", link = PageRegistry:getOrCreatePage(ColorCheckPage)})
|
|
list:addField(ServiceLinkField.new{label = "VERSION INFORMATION", link = PageRegistry:getOrCreatePage(VersionInfoPage)})
|
|
list:refreshFields()
|
|
|
|
self:addField(list)
|
|
self:refreshFields()
|
|
|
|
return self
|
|
end
|
|
|
|
return ServiceMenuPage
|