2022-04-28 00:21:10 +02:00
|
|
|
require "common.globals"
|
2023-08-19 04:48:46 +02:00
|
|
|
local Dim = require "scripts.graphics.dimensions"
|
|
|
|
local Image = require "scripts.graphics.image"
|
2022-04-28 00:21:10 +02:00
|
|
|
|
|
|
|
local BAR_ALPHA = 191
|
|
|
|
local HEADER_HEIGHT = 100
|
|
|
|
|
|
|
|
local titleImage = Image.new("titlescreen/title.png")
|
|
|
|
titleImage.centered = true
|
|
|
|
titleImage:setPosition(Dim.design.width / 2, HEADER_HEIGHT / 2)
|
|
|
|
|
|
|
|
local function drawHeader()
|
|
|
|
gfx.BeginPath()
|
|
|
|
gfx.FillColor(0, 0, 0, BAR_ALPHA)
|
|
|
|
gfx.Rect(0, 0, Dim.design.width, HEADER_HEIGHT)
|
|
|
|
gfx.Fill()
|
|
|
|
|
|
|
|
titleImage:render()
|
|
|
|
end
|
|
|
|
|
|
|
|
local function draw()
|
|
|
|
gfx.Save()
|
|
|
|
|
|
|
|
gfx.ResetTransform()
|
|
|
|
|
|
|
|
Dim.transformToScreenSpace()
|
|
|
|
|
|
|
|
drawHeader()
|
|
|
|
|
|
|
|
gfx.Restore()
|
|
|
|
end
|
|
|
|
|
2023-08-19 04:48:46 +02:00
|
|
|
return {draw = draw}
|