refactor titlescreen directory structure
This commit is contained in:
parent
814553e9a5
commit
a221620125
|
@ -10,8 +10,8 @@ local Page = require "api.page.page"
|
||||||
local CheckUpdatePage = require "titlescreen.pages.boot.checkupdatepage"
|
local CheckUpdatePage = require "titlescreen.pages.boot.checkupdatepage"
|
||||||
|
|
||||||
local ServiceField = require "api.page.servicefield"
|
local ServiceField = require "api.page.servicefield"
|
||||||
local ListField = require "titlescreen.components.listfield"
|
local ListField = require "titlescreen.commmon.listfield"
|
||||||
local SelfTestField = require "titlescreen.components.selftestfield"
|
local SelfTestField = require "titlescreen.boot.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("api.page.page")
|
local Page = require("api.page.page")
|
||||||
local CheckUpdateField = require("titlescreen.components.checkupdatefield")
|
local CheckUpdateField = require("titlescreen.boot.checkupdatefield")
|
||||||
local DialogField = require("titlescreen.components.dialogfield")
|
local DialogField = require("titlescreen.boot.dialogfield")
|
||||||
|
|
||||||
---@class CheckUpdatePage: Page
|
---@class CheckUpdatePage: Page
|
||||||
---@field _focusedField CheckUpdateField
|
---@field _focusedField CheckUpdateField
|
|
@ -3,12 +3,13 @@ require("common.class")
|
||||||
local PageManager = require "api.page.pagemanager"
|
local PageManager = require "api.page.pagemanager"
|
||||||
|
|
||||||
local ServicePage = require("api.page.servicepage")
|
local ServicePage = require("api.page.servicepage")
|
||||||
local InputCheckPage = require("titlescreen.pages.service.inputcheckpage")
|
local InputCheckPage = require("titlescreen.service.inputcheckpage")
|
||||||
local ScreenCheckPage = require("titlescreen.pages.service.screencheckpage")
|
local ScreenCheckPage = require("titlescreen.service.screencheckpage")
|
||||||
local ColorCheckPage = require("titlescreen.pages.service.colorcheckpage")
|
local ColorCheckPage = require("titlescreen.service.colorcheckpage")
|
||||||
local VersionInfoPage = require("titlescreen.pages.service.versioninfopage")
|
local VersionInfoPage = require("titlescreen.service.versioninfopage")
|
||||||
local ServiceLinkField = require("titlescreen.components.servicelinkfield")
|
|
||||||
local ListField = require("titlescreen.components.listfield")
|
local ListField = require("titlescreen.common.listfield")
|
||||||
|
local ServiceLinkField = require("titlescreen.service.servicelinkfield")
|
||||||
|
|
||||||
---@class ServiceMenuPage: ServicePage
|
---@class ServiceMenuPage: ServicePage
|
||||||
local ServiceMenuPage = {
|
local ServiceMenuPage = {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local ServicePage = require("api.page.servicepage")
|
local ServicePage = require("api.page.servicepage")
|
||||||
local ListField = require("titlescreen.components.listfield")
|
local ListField = require("titlescreen.common.listfield")
|
||||||
local ColorGradientField = require("titlescreen.components.colorgradientfield")
|
local ColorGradientField = require("titlescreen.service.colorgradientfield")
|
||||||
|
|
||||||
---@class ColorCheckPage: ServicePage
|
---@class ColorCheckPage: ServicePage
|
||||||
local ColorCheckPage = {
|
local ColorCheckPage = {
|
|
@ -1,8 +1,8 @@
|
||||||
require("common.class")
|
require("common.class")
|
||||||
local ServicePage = require("api.page.servicepage")
|
local ServicePage = require("api.page.servicepage")
|
||||||
local InputButtonField = require("titlescreen.components.inputbuttonfield")
|
local ListField = require("titlescreen.common.listfield")
|
||||||
local InputKnobField = require("titlescreen.components.inputknobfield")
|
local InputButtonField = require("titlescreen.service.inputbuttonfield")
|
||||||
local ListField = require("titlescreen.components.listfield")
|
local InputKnobField = require("titlescreen.service.inputknobfield")
|
||||||
|
|
||||||
---@class InputCheckPage: ServicePage
|
---@class InputCheckPage: ServicePage
|
||||||
local InputCheckPage = {
|
local InputCheckPage = {
|
|
@ -4,8 +4,8 @@ require("common.gameconfig")
|
||||||
local Version = require("common.version")
|
local Version = require("common.version")
|
||||||
local ServicePage = require("api.page.servicepage")
|
local ServicePage = require("api.page.servicepage")
|
||||||
local ServiceField = require("api.page.servicefield")
|
local ServiceField = require("api.page.servicefield")
|
||||||
local UpdateField = require("titlescreen.components.updatefield")
|
local ListField = require("titlescreen.common.listfield")
|
||||||
local ListField = require("titlescreen.components.listfield")
|
local UpdateField = require("titlescreen.service.updatefield")
|
||||||
|
|
||||||
local function getGameLogValue(prefix, str)
|
local function getGameLogValue(prefix, str)
|
||||||
local pattern = prefix .. ":%s*([^\r\n]*)"
|
local pattern = prefix .. ":%s*([^\r\n]*)"
|
|
@ -7,10 +7,10 @@ require "common.class"
|
||||||
local PageManager = require "api.page.pagemanager"
|
local PageManager = require "api.page.pagemanager"
|
||||||
|
|
||||||
local Page = require "api.page.page"
|
local Page = require "api.page.page"
|
||||||
local KShootManiaPage = require "titlescreen.pages.splash.kshootmaniapage"
|
local KShootManiaPage = require "titlescreen.splash.kshootmaniapage"
|
||||||
local USCPage = require "titlescreen.pages.splash.uscpage"
|
local USCPage = require "titlescreen.splash.uscpage"
|
||||||
local TeamExceedPage = require "titlescreen.pages.splash.teamexceedpage"
|
local TeamExceedPage = require "titlescreen.splash.teamexceedpage"
|
||||||
local CreditsPage = require "titlescreen.pages.splash.creditspage"
|
local CreditsPage = require "titlescreen.splash.creditspage"
|
||||||
|
|
||||||
---@class SplashPage : Page
|
---@class SplashPage : Page
|
||||||
---@field pages Page[]
|
---@field pages Page[]
|
||||||
|
|
|
@ -7,45 +7,6 @@ local Image = require "api.image"
|
||||||
|
|
||||||
local Page = require "api.page.page"
|
local Page = require "api.page.page"
|
||||||
|
|
||||||
local splash3BgColor = {255, 255, 255}
|
|
||||||
local splash3Logo = gfx.CreateSkinImage("titlescreen/splash/team-exceed.png", 0)
|
|
||||||
local splash3LogoWidth, splash3LogoHeight = gfx.ImageSize(splash3Logo)
|
|
||||||
|
|
||||||
local function splash3(deltaTime)
|
|
||||||
local splash3LogoXOffset = (Dim.design.width - splash3LogoWidth) / 2
|
|
||||||
local splash3LogoYOffset = (Dim.design.height - splash3LogoHeight) / 2
|
|
||||||
|
|
||||||
calcFade(splash3Duration)
|
|
||||||
|
|
||||||
gfx.BeginPath()
|
|
||||||
gfx.Rect(0, 0, Dim.design.width, Dim.design.height)
|
|
||||||
gfx.FillColor(splash3BgColor[1], splash3BgColor[2], splash3BgColor[3], fadeAlpha)
|
|
||||||
gfx.Fill()
|
|
||||||
|
|
||||||
gfx.BeginPath()
|
|
||||||
gfx.ImageRect(splash3LogoXOffset, splash3LogoYOffset, splash3LogoWidth, splash3LogoHeight, splash3Logo, fadeAlpha / 255, 0)
|
|
||||||
|
|
||||||
gfx.BeginPath()
|
|
||||||
gfx.LoadSkinFont("segoeui.ttf")
|
|
||||||
gfx.FillColor(0, 0, 0, fadeAlpha)
|
|
||||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_BOTTOM)
|
|
||||||
gfx.FontSize(28)
|
|
||||||
|
|
||||||
gfx.Text("Press START to skip...", 10, Dim.design.height - 10)
|
|
||||||
|
|
||||||
if (splashTimer < 0) then
|
|
||||||
splashState = "done"
|
|
||||||
splashTimer = 0
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if splashTimer == 0 then
|
|
||||||
splashTimer = splash3Duration
|
|
||||||
end
|
|
||||||
|
|
||||||
splashTimer = splashTimer - deltaTime
|
|
||||||
end
|
|
||||||
|
|
||||||
---@class TeamExceedPage : Page
|
---@class TeamExceedPage : Page
|
||||||
---@field logo_img Image
|
---@field logo_img Image
|
||||||
---@field _timer number
|
---@field _timer number
|
Loading…
Reference in New Issue