page management code refactor
This commit is contained in:
parent
badbaabe2b
commit
4feb6a8645
|
@ -1,5 +1,5 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local Field = require("components.pager.field")
|
local Field = require("api.page.field")
|
||||||
|
|
||||||
---@class ContainerField: Field
|
---@class ContainerField: Field
|
||||||
---@field content Field[]
|
---@field content Field[]
|
|
@ -1,5 +1,5 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local Field = require("components.pager.field")
|
local Field = require("api.page.field")
|
||||||
|
|
||||||
---@class LinkField: Field
|
---@class LinkField: Field
|
||||||
---@field link Page
|
---@field link Page
|
|
@ -1,7 +1,7 @@
|
||||||
local Dim = require("common.dimensions")
|
local Dim = require("common.dimensions")
|
||||||
local Wallpaper = require("components.wallpaper")
|
local Wallpaper = require("components.wallpaper")
|
||||||
local BootPage = require("titlescreen.pages.boot.bootpage")
|
local BootPage = require("titlescreen.pages.boot.bootpage")
|
||||||
local PageView = require("components.pager.pageview")
|
local PageView = require("api.page.pageview")
|
||||||
|
|
||||||
local bootpage = BootPage.new()
|
local bootpage = BootPage.new()
|
||||||
local pageview = PageView.new(bootpage)
|
local pageview = PageView.new(bootpage)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local Util = require("common.util")
|
local Util = require("common.util")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
|
|
||||||
---@class CheckUpdateField: ServiceField
|
---@class CheckUpdateField: ServiceField
|
||||||
---@field onUpdateAvailable nil|fun(url: string, version: string)
|
---@field onUpdateAvailable nil|fun(url: string, version: string)
|
|
@ -1,6 +1,6 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local Util = require("common.util")
|
local Util = require("common.util")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
|
|
||||||
---@class ColorGradientField: ServiceField
|
---@class ColorGradientField: ServiceField
|
||||||
local ColorGradientField = {
|
local ColorGradientField = {
|
|
@ -1,5 +1,5 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local ContainerField = require("components.pager.containerfield")
|
local ContainerField = require("api.page.containerfield")
|
||||||
|
|
||||||
---@class DialogField: ContainerField
|
---@class DialogField: ContainerField
|
||||||
---@field _symbolMargin number
|
---@field _symbolMargin number
|
|
@ -1,5 +1,5 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
|
|
||||||
---@class InputButtonField: ServiceField
|
---@class InputButtonField: ServiceField
|
||||||
---@field button integer
|
---@field button integer
|
|
@ -1,6 +1,6 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local Util = require("common.util")
|
local Util = require("common.util")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
|
|
||||||
---@class InputKnobField: ServiceField
|
---@class InputKnobField: ServiceField
|
||||||
---@field knob integer
|
---@field knob integer
|
|
@ -1,6 +1,6 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local ContainerField = require("components.pager.containerfield")
|
local ContainerField = require("api.page.containerfield")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
|
|
||||||
---@class ListField: ContainerField, ServiceField
|
---@class ListField: ContainerField, ServiceField
|
||||||
---@field selectedIndex integer
|
---@field selectedIndex integer
|
|
@ -1,6 +1,6 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local Util = require("common.util")
|
local Util = require("common.util")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
|
|
||||||
---@class SelfTestStatusEnum
|
---@class SelfTestStatusEnum
|
||||||
SelfTestStatusEnum = {
|
SelfTestStatusEnum = {
|
|
@ -1,6 +1,6 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local Dim = require("common.dimensions")
|
local Dim = require("common.dimensions")
|
||||||
local Field = require("components.pager.field")
|
local Field = require("api.page.field")
|
||||||
|
|
||||||
---@class ServiceFieldState
|
---@class ServiceFieldState
|
||||||
ServiceFieldState = {
|
ServiceFieldState = {
|
|
@ -1,6 +1,6 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local LinkField = require("components.pager.linkfield")
|
local LinkField = require("api.page.linkfield")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
|
|
||||||
---@class ServiceLinkField: LinkField, ServiceField
|
---@class ServiceLinkField: LinkField, ServiceField
|
||||||
local ServiceLinkField = {
|
local ServiceLinkField = {
|
|
@ -1,5 +1,5 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
|
|
||||||
---@class UpdateField: ServiceField
|
---@class UpdateField: ServiceField
|
||||||
---@field _timer number
|
---@field _timer number
|
|
@ -2,11 +2,11 @@ require("common.class")
|
||||||
require("common.filereader")
|
require("common.filereader")
|
||||||
local Dim = require("common.dimensions")
|
local Dim = require("common.dimensions")
|
||||||
local Version = require("common.version")
|
local Version = require("common.version")
|
||||||
local Page = require("components.pager.page")
|
local Page = require("api.page.page")
|
||||||
local CheckUpdatePage = require("titlescreen.pages.boot.checkupdatepage")
|
local CheckUpdatePage = require("titlescreen.pages.boot.checkupdatepage")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
local ListField = require("titlescreen.fields.service.listfield")
|
local ListField = require("titlescreen.components.listfield")
|
||||||
local SelfTestField = require("titlescreen.fields.boot.selftestfield")
|
local SelfTestField = require("titlescreen.components.selftestfield")
|
||||||
|
|
||||||
---@class BootPage: Page
|
---@class BootPage: Page
|
||||||
local BootPage = {
|
local BootPage = {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local Dim = require("common.dimensions")
|
local Dim = require("common.dimensions")
|
||||||
local Page = require("components.pager.page")
|
local Page = require("api.page.page")
|
||||||
local CheckUpdateField = require("titlescreen.fields.boot.checkupdatefield")
|
local CheckUpdateField = require("titlescreen.components.checkupdatefield")
|
||||||
local DialogField = require("titlescreen.fields.boot.dialogfield")
|
local DialogField = require("titlescreen.components.dialogfield")
|
||||||
|
|
||||||
---@class CheckUpdatePage: Page
|
---@class CheckUpdatePage: Page
|
||||||
---@field _focusedField CheckUpdateField
|
---@field _focusedField CheckUpdateField
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local ServicePage = require("titlescreen.pages.service.servicepage")
|
local ServicePage = require("titlescreen.pages.service.servicepage")
|
||||||
local ListField = require("titlescreen.fields.service.listfield")
|
local ListField = require("titlescreen.components.listfield")
|
||||||
local ColorGradientField = require("titlescreen.fields.service.colorgradientfield")
|
local ColorGradientField = require("titlescreen.components.colorgradientfield")
|
||||||
|
|
||||||
---@class ColorCheckPage: ServicePage
|
---@class ColorCheckPage: ServicePage
|
||||||
local ColorCheckPage = {
|
local ColorCheckPage = {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local ServicePage = require("titlescreen.pages.service.servicepage")
|
local ServicePage = require("titlescreen.pages.service.servicepage")
|
||||||
local InputButtonField = require("titlescreen.fields.service.inputbuttonfield")
|
local InputButtonField = require("titlescreen.components.inputbuttonfield")
|
||||||
local InputKnobField = require("titlescreen.fields.service.inputknobfield")
|
local InputKnobField = require("titlescreen.components.inputknobfield")
|
||||||
local ListField = require("titlescreen.fields.service.listfield")
|
local ListField = require("titlescreen.components.listfield")
|
||||||
|
|
||||||
---@class InputCheckPage: ServicePage
|
---@class InputCheckPage: ServicePage
|
||||||
local InputCheckPage = {
|
local InputCheckPage = {
|
||||||
|
|
|
@ -4,8 +4,8 @@ local InputCheckPage = require("titlescreen.pages.service.inputcheckpage")
|
||||||
local ScreenCheckPage = require("titlescreen.pages.service.screencheckpage")
|
local ScreenCheckPage = require("titlescreen.pages.service.screencheckpage")
|
||||||
local ColorCheckPage = require("titlescreen.pages.service.colorcheckpage")
|
local ColorCheckPage = require("titlescreen.pages.service.colorcheckpage")
|
||||||
local VersionInfoPage = require("titlescreen.pages.service.versioninfopage")
|
local VersionInfoPage = require("titlescreen.pages.service.versioninfopage")
|
||||||
local ServiceLinkField = require("titlescreen.fields.service.servicelinkfield")
|
local ServiceLinkField = require("titlescreen.components.servicelinkfield")
|
||||||
local ListField = require("titlescreen.fields.service.listfield")
|
local ListField = require("titlescreen.components.listfield")
|
||||||
|
|
||||||
---@class MainMenuPage: ServicePage
|
---@class MainMenuPage: ServicePage
|
||||||
local MainMenuPage = {
|
local MainMenuPage = {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local Dim = require("common.dimensions")
|
local Dim = require("common.dimensions")
|
||||||
local Util = require("common.util")
|
local Util = require("common.util")
|
||||||
local Page = require("components.pager.page")
|
local Page = require("api.page.page")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
|
|
||||||
---@class ServicePage: Page
|
---@class ServicePage: Page
|
||||||
---@field title string|string[]
|
---@field title string|string[]
|
||||||
|
|
|
@ -3,9 +3,9 @@ require("common.filereader")
|
||||||
require("common.gameconfig")
|
require("common.gameconfig")
|
||||||
local Version = require("common.version")
|
local Version = require("common.version")
|
||||||
local ServicePage = require("titlescreen.pages.service.servicepage")
|
local ServicePage = require("titlescreen.pages.service.servicepage")
|
||||||
local ServiceField = require("titlescreen.fields.service.servicefield")
|
local ServiceField = require("titlescreen.components.servicefield")
|
||||||
local UpdateField = require("titlescreen.fields.service.updatefield")
|
local UpdateField = require("titlescreen.components.updatefield")
|
||||||
local ListField = require("titlescreen.fields.service.listfield")
|
local ListField = require("titlescreen.components.listfield")
|
||||||
|
|
||||||
local function getGameLogValue(prefix, str)
|
local function getGameLogValue(prefix, str)
|
||||||
local pattern = prefix .. ":%s*([^\r\n]*)"
|
local pattern = prefix .. ":%s*([^\r\n]*)"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
local Dim = require("common.dimensions")
|
local Dim = require("common.dimensions")
|
||||||
local Wallpaper = require("components.wallpaper")
|
local Wallpaper = require("components.wallpaper")
|
||||||
|
|
||||||
local PageView = require("components.pager.pageview")
|
local PageView = require("api.page.pageview")
|
||||||
local MainMenuPage = require("titlescreen.pages.service.mainmenupage")
|
local MainMenuPage = require("titlescreen.pages.service.mainmenupage")
|
||||||
|
|
||||||
--[[ WIP: REIMPLEMENTATION
|
--[[ WIP: REIMPLEMENTATION
|
||||||
|
|
Loading…
Reference in New Issue