refactor titlescreen directory structure

This commit is contained in:
Hersi 2022-07-12 01:43:14 +02:00
parent 814553e9a5
commit a221620125
23 changed files with 22 additions and 60 deletions

View File

@ -10,8 +10,8 @@ local Page = require "api.page.page"
local CheckUpdatePage = require "titlescreen.pages.boot.checkupdatepage"
local ServiceField = require "api.page.servicefield"
local ListField = require "titlescreen.components.listfield"
local SelfTestField = require "titlescreen.components.selftestfield"
local ListField = require "titlescreen.commmon.listfield"
local SelfTestField = require "titlescreen.boot.selftestfield"
---@class BootPage: Page
local BootPage = {

View File

@ -1,8 +1,8 @@
require("common.class")
local Dim = require("common.dimensions")
local Page = require("api.page.page")
local CheckUpdateField = require("titlescreen.components.checkupdatefield")
local DialogField = require("titlescreen.components.dialogfield")
local CheckUpdateField = require("titlescreen.boot.checkupdatefield")
local DialogField = require("titlescreen.boot.dialogfield")
---@class CheckUpdatePage: Page
---@field _focusedField CheckUpdateField

View File

@ -3,12 +3,13 @@ require("common.class")
local PageManager = require "api.page.pagemanager"
local ServicePage = require("api.page.servicepage")
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.components.servicelinkfield")
local ListField = require("titlescreen.components.listfield")
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 = {

View File

@ -1,7 +1,7 @@
require("common.class")
local ServicePage = require("api.page.servicepage")
local ListField = require("titlescreen.components.listfield")
local ColorGradientField = require("titlescreen.components.colorgradientfield")
local ListField = require("titlescreen.common.listfield")
local ColorGradientField = require("titlescreen.service.colorgradientfield")
---@class ColorCheckPage: ServicePage
local ColorCheckPage = {

View File

@ -1,8 +1,8 @@
require("common.class")
local ServicePage = require("api.page.servicepage")
local InputButtonField = require("titlescreen.components.inputbuttonfield")
local InputKnobField = require("titlescreen.components.inputknobfield")
local ListField = require("titlescreen.components.listfield")
local ListField = require("titlescreen.common.listfield")
local InputButtonField = require("titlescreen.service.inputbuttonfield")
local InputKnobField = require("titlescreen.service.inputknobfield")
---@class InputCheckPage: ServicePage
local InputCheckPage = {

View File

@ -4,8 +4,8 @@ require("common.gameconfig")
local Version = require("common.version")
local ServicePage = require("api.page.servicepage")
local ServiceField = require("api.page.servicefield")
local UpdateField = require("titlescreen.components.updatefield")
local ListField = require("titlescreen.components.listfield")
local ListField = require("titlescreen.common.listfield")
local UpdateField = require("titlescreen.service.updatefield")
local function getGameLogValue(prefix, str)
local pattern = prefix .. ":%s*([^\r\n]*)"

View File

@ -7,10 +7,10 @@ require "common.class"
local PageManager = require "api.page.pagemanager"
local Page = require "api.page.page"
local KShootManiaPage = require "titlescreen.pages.splash.kshootmaniapage"
local USCPage = require "titlescreen.pages.splash.uscpage"
local TeamExceedPage = require "titlescreen.pages.splash.teamexceedpage"
local CreditsPage = require "titlescreen.pages.splash.creditspage"
local KShootManiaPage = require "titlescreen.splash.kshootmaniapage"
local USCPage = require "titlescreen.splash.uscpage"
local TeamExceedPage = require "titlescreen.splash.teamexceedpage"
local CreditsPage = require "titlescreen.splash.creditspage"
---@class SplashPage : Page
---@field pages Page[]

View File

@ -7,45 +7,6 @@ local Image = require "api.image"
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
---@field logo_img Image
---@field _timer number