2021-08-18 17:29:54 +02:00
|
|
|
local Easing = require('common.easings');
|
|
|
|
local Footer = require('components.footer');
|
2021-07-25 20:10:06 +02:00
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
local VolforceWindow = require('components.volforceWindow')
|
2021-07-25 20:10:06 +02:00
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
local resx, resy = game.GetResolution()
|
|
|
|
local desw = 1080
|
|
|
|
local desh = 1920
|
2021-07-25 20:10:06 +02:00
|
|
|
local scale = 1
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
local BAR_ALPHA = 191;
|
|
|
|
local HEADER_HEIGHT = 100
|
2021-07-25 20:10:06 +02:00
|
|
|
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
local backgroundImage = gfx.CreateSkinImage("challenge_result/bg.png", 0);
|
|
|
|
local playerInfoOverlayBgImage = gfx.CreateSkinImage("challenge_result/player_info_overlay_bg.png", 0);
|
2021-07-25 20:10:06 +02:00
|
|
|
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
function resetLayoutInformation()
|
|
|
|
resx, resy = game.GetResolution()
|
|
|
|
desw = 1080
|
|
|
|
desh = 1920
|
|
|
|
scale = resx / desw
|
2021-07-25 20:10:06 +02:00
|
|
|
end
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
function drawBackground()
|
2021-07-25 20:10:06 +02:00
|
|
|
gfx.BeginPath()
|
2021-08-18 17:29:54 +02:00
|
|
|
gfx.ImageRect(0, 0, desw, desh, backgroundImage, 1, 0);
|
2021-07-25 20:10:06 +02:00
|
|
|
end
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
function drawHeader()
|
|
|
|
gfx.BeginPath();
|
|
|
|
gfx.FillColor(0, 0, 0, BAR_ALPHA);
|
|
|
|
gfx.Rect(0, 0, desw, HEADER_HEIGHT);
|
|
|
|
gfx.Fill();
|
|
|
|
gfx.ClosePath()
|
2021-07-25 20:10:06 +02:00
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
-- gfx.ImageRect(desw/2 - 200, HEADER_HEIGHT/2 - 20, 400, 40, headerTitleImage, 1, 0)
|
2021-07-25 20:10:06 +02:00
|
|
|
end
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
function drawPlayerInfo()
|
2021-07-25 20:10:06 +02:00
|
|
|
gfx.BeginPath()
|
2021-08-18 17:29:54 +02:00
|
|
|
gfx.ImageRect(300, 352, 374*0.85, 222*0.85, playerInfoOverlayBgImage, 1, 0);
|
2021-07-25 20:10:06 +02:00
|
|
|
end
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
function render(deltaTime)
|
|
|
|
gfx.ResetTransform();
|
|
|
|
resetLayoutInformation();
|
|
|
|
gfx.Scale(scale,scale);
|
2021-07-25 20:10:06 +02:00
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
drawBackground()
|
2021-07-25 20:10:06 +02:00
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
drawPlayerInfo()
|
2021-07-25 20:10:06 +02:00
|
|
|
|
|
|
|
|
2021-08-18 17:29:54 +02:00
|
|
|
drawHeader()
|
|
|
|
Footer.draw(deltaTime);
|
|
|
|
end
|