+ basic player info to chalresult without volforce

This commit is contained in:
FajsiEx 2021-08-18 19:05:37 +02:00
parent 18c0388543
commit a921a962b8
1 changed files with 28 additions and 1 deletions

View File

@ -15,6 +15,14 @@ local HEADER_HEIGHT = 100
local backgroundImage = gfx.CreateSkinImage("challenge_result/bg.png", 0); local backgroundImage = gfx.CreateSkinImage("challenge_result/bg.png", 0);
local playerInfoOverlayBgImage = gfx.CreateSkinImage("challenge_result/player_info_overlay_bg.png", 0); local playerInfoOverlayBgImage = gfx.CreateSkinImage("challenge_result/player_info_overlay_bg.png", 0);
local headerTitleImage = gfx.CreateSkinImage("challenge_result/header/title.png", 0);
local username = game.GetSkinSetting('username');
local appealCardImage = gfx.CreateSkinImage("appeal_card.png", 0);
local danBadgeImage = gfx.CreateSkinImage("dan/inf.png", 0);
function resetLayoutInformation() function resetLayoutInformation()
resx, resy = game.GetResolution() resx, resy = game.GetResolution()
@ -35,12 +43,31 @@ function drawHeader()
gfx.Fill(); gfx.Fill();
gfx.ClosePath() gfx.ClosePath()
-- gfx.ImageRect(desw/2 - 200, HEADER_HEIGHT/2 - 20, 400, 40, headerTitleImage, 1, 0) gfx.ImageRect(desw/2 - 209, HEADER_HEIGHT/2 - 52, 419, 105, headerTitleImage, 1, 0)
end end
function drawPlayerInfo() function drawPlayerInfo()
-- Draw the info bg
gfx.BeginPath() gfx.BeginPath()
gfx.ImageRect(300, 352, 374*0.85, 222*0.85, playerInfoOverlayBgImage, 1, 0); gfx.ImageRect(300, 352, 374*0.85, 222*0.85, playerInfoOverlayBgImage, 1, 0);
-- Draw appeal card
gfx.BeginPath();
gfx.ImageRect(145, 364, 103*1.25, 132*1.25, appealCardImage, 1, 0);
-- Draw description
gfx.FontSize(28)
gfx.LoadSkinFont('Digital-Serial-Bold.ttf')
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
gfx.Text('Hellooooooo', 310, 370);
-- Draw username
gfx.FontSize(40)
gfx.Text(username, 310, 413);
-- Draw dan badge
gfx.BeginPath();
gfx.ImageRect(311, 490, 107*1.25, 29*1.25, danBadgeImage, 1, 0);
end end
function render(deltaTime) function render(deltaTime)