ExperimentalGear/scripts/titlescreen/pages/boot/checkupdatepage.lua

35 lines
983 B
Lua
Raw Normal View History

2022-04-24 01:39:48 +02:00
require("common.class")
local Dim = require("common.dimensions")
local Page = require("components.pager.page")
local CheckUpdateField = require("titlescreen.fields.boot.checkupdatefield")
---@class CheckUpdatePage: Page
local CheckUpdatePage = {
__tostring = function() return "CheckUpdatePage" end,
}
---Create a new CheckUpdatePage instance
---@param o? table # initial parameters
---@return CheckUpdatePage
function CheckUpdatePage:new(o)
local this = Inherit(self, o, Page)
this._checkUpdateField = CheckUpdateField:new{posX = 32, posY = 64, label = "update check"}
this._checkUpdateField.onUpdateAvailable = function(url, version)
end
this:addField(this._checkUpdateField)
return this
end
---@param deltaTime number # frametime in seconds
function CheckUpdatePage:drawBackground(deltaTime)
gfx.BeginPath()
gfx.FillColor(0, 0, 0)
gfx.Rect(0, 0, Dim.design.width, Dim.design.height)
gfx.Fill()
end
return CheckUpdatePage