2021-08-09 20:13:53 +02:00
|
|
|
|
|
|
|
|
2021-08-13 20:39:37 +02:00
|
|
|
local resx, resy = game.GetResolution()
|
|
|
|
local desw, desh = 1080,1920;
|
2021-08-09 20:13:53 +02:00
|
|
|
local scale = 1;
|
|
|
|
|
|
|
|
local BAR_ALPHA = 191;
|
|
|
|
|
|
|
|
local FOOTER_HEIGHT = 128
|
2021-08-13 20:39:37 +02:00
|
|
|
local footerY = desh - FOOTER_HEIGHT;
|
2021-08-09 20:13:53 +02:00
|
|
|
|
|
|
|
-- Images
|
|
|
|
local footerRightImage = gfx.CreateSkinImage("components/bars/footer_right.png", 0);
|
|
|
|
|
|
|
|
-- Animation related
|
|
|
|
local entryTransitionScale = 0;
|
|
|
|
local entryTransitionFooterYOffset = 0;
|
|
|
|
|
|
|
|
local legend = {
|
|
|
|
{
|
|
|
|
control = 'START',
|
|
|
|
text = 'Confirm selection'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
control = 'KNOB',
|
|
|
|
text = 'Scroll'
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
local set = function ()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
function resetLayoutInformation()
|
|
|
|
resx, resy = game.GetResolution()
|
|
|
|
desw = 1080
|
|
|
|
desh = 1920
|
|
|
|
scale = resx / desw
|
|
|
|
end
|
|
|
|
|
|
|
|
local drawFooter = function ()
|
|
|
|
gfx.BeginPath();
|
|
|
|
gfx.FillColor(0,0,0,BAR_ALPHA);
|
2021-08-13 20:39:37 +02:00
|
|
|
gfx.Rect(0,footerY,desw, FOOTER_HEIGHT);
|
2021-08-09 20:13:53 +02:00
|
|
|
gfx.Fill();
|
|
|
|
|
|
|
|
|
|
|
|
gfx.BeginPath();
|
|
|
|
gfx.ImageRect(desw-275, footerY-25, 328*0.85, 188*0.85, footerRightImage, 1, 0);
|
2021-08-13 22:59:35 +02:00
|
|
|
|
|
|
|
gfx.BeginPath();
|
|
|
|
gfx.LoadSkinFont("Digital-Serial-Bold.ttf");
|
|
|
|
gfx.FontSize(20)
|
|
|
|
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
|
|
|
|
gfx.FillColor(255, 255, 255, 255);
|
2021-08-14 21:32:55 +02:00
|
|
|
gfx.Text('EXPERIMENTALGEAR 0.1.1 - CLOSED BETA. DO. NOT. LEAK.', 8, 1895);
|
2021-08-09 20:13:53 +02:00
|
|
|
end
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
local progressTransitions = function (deltaTime)
|
|
|
|
entryTransitionScale = entryTransitionScale + deltaTime / 0.3;
|
2021-08-09 20:13:53 +02:00
|
|
|
if (entryTransitionScale > 1) then
|
|
|
|
entryTransitionScale = 1;
|
|
|
|
end
|
|
|
|
|
|
|
|
entryTransitionFooterYOffset = FOOTER_HEIGHT*(1-entryTransitionScale)
|
2021-08-13 20:39:37 +02:00
|
|
|
footerY = desh-FOOTER_HEIGHT+entryTransitionFooterYOffset;
|
2021-08-09 20:13:53 +02:00
|
|
|
end
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
local draw = function (deltaTime, params)
|
|
|
|
if (params) then
|
|
|
|
if params.noEnterTransition then
|
|
|
|
entryTransitionScale = 1;
|
|
|
|
end
|
2021-08-12 16:20:19 +02:00
|
|
|
end
|
|
|
|
|
2021-08-09 20:13:53 +02:00
|
|
|
gfx.Save()
|
|
|
|
resetLayoutInformation()
|
|
|
|
gfx.Scale(scale, scale)
|
|
|
|
|
|
|
|
gfx.LoadSkinFont("NotoSans-Regular.ttf");
|
|
|
|
|
|
|
|
drawFooter();
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
progressTransitions(deltaTime);
|
2021-08-09 20:13:53 +02:00
|
|
|
gfx.Restore()
|
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
|
|
|
set = set,
|
|
|
|
draw = draw
|
|
|
|
};
|