ExperimentalGear/scripts/graphics/headers/modeSelectHeader.lua

34 lines
661 B
Lua
Raw Normal View History

require "common.globals"
2023-08-19 04:48:46 +02:00
local Dim = require "scripts.graphics.dimensions"
local Image = require "scripts.graphics.image"
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}