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