add gauge flags on results screen #4

Merged
Kuenaimaku merged 1 commits from feature/TASK-16-Results-Gauge-Flags into master 2022-03-14 23:43:02 +01:00
1 changed files with 19 additions and 0 deletions
Showing only changes of commit e077c44159 - Show all commits

View File

@ -51,6 +51,10 @@ local danBadgeImage = gfx.CreateSkinImage("dan/inf.png", 0);
local badgeLines = gfx.CreateSkinImage("result/badge_lines.png", 0);
local badgeGrade = gfx.CreateSkinImage("result/badge_gradient.png", 0);
local gaugeTypeMirrorImage = gfx.CreateSkinImage("result/gauge_type_badges/mirror.png", 0);
local gaugeTypeRandomImage = gfx.CreateSkinImage("result/gauge_type_badges/random.png", 0);
local gaugeTypeMirrorRandomImage = gfx.CreateSkinImage("result/gauge_type_badges/random_mirror.png", 0);
local gradeImages = {
S = gfx.CreateSkinImage("common/grades/S.png", 0),
AAA_P = gfx.CreateSkinImage("common/grades/AAA+.png", 0),
@ -401,6 +405,21 @@ local drawRightPanelContent = function()
gfx.Restore()
end
-- Draw the gauge type flags if needed (mirror, random)
if(result.mirror or result.random) then
gfx.BeginPath();
local gaugeTypeFlagPosX = gaugePosX + 10;
local gaugeTypeFlagPosY = gaugePosY - 30;
local flagw, flagh = gfx.ImageSize(gaugeTypeMirrorImage)
if(result.mirror and result.random) then
gfx.ImageRect(gaugeTypeFlagPosX, gaugeTypeFlagPosY, flagw, flagh, gaugeTypeMirrorRandomImage, 1, 0)
elseif(result.mirror) then
gfx.ImageRect(gaugeTypeFlagPosX, gaugeTypeFlagPosY, flagw, flagh, gaugeTypeMirrorImage, 1, 0)
elseif(result.random) then
gfx.ImageRect(gaugeTypeFlagPosX, gaugeTypeFlagPosY, flagw, flagh, gaugeTypeRandomImage, 1, 0)
end
end
-- Draw err/early/critical/late/err texts
gfx.Text(earlyLateBarsStats.earlyErrors, rightPanelX + 683,