50% done only graph left
This commit is contained in:
parent
8cd3f36e15
commit
30ca0407e6
|
@ -50,6 +50,7 @@ local danBadgeImage = gfx.CreateSkinImage("dan/inf.png", 0);
|
||||||
|
|
||||||
local badgeLines = gfx.CreateSkinImage("result/badge_lines.png", 0);
|
local badgeLines = gfx.CreateSkinImage("result/badge_lines.png", 0);
|
||||||
local badgeGrade = gfx.CreateSkinImage("result/badge_gradient.png", 0);
|
local badgeGrade = gfx.CreateSkinImage("result/badge_gradient.png", 0);
|
||||||
|
local timming = gfx.CreateSkinImage("result/timing.png", 0);
|
||||||
|
|
||||||
local gradeImages = {
|
local gradeImages = {
|
||||||
S = gfx.CreateSkinImage("common/grades/S.png", 0),
|
S = gfx.CreateSkinImage("common/grades/S.png", 0),
|
||||||
|
@ -140,6 +141,9 @@ local badgeLinesAnimOffsetX = 0;
|
||||||
local rightPanelX = 0;
|
local rightPanelX = 0;
|
||||||
local rightPanelY = 910;
|
local rightPanelY = 910;
|
||||||
|
|
||||||
|
local timmingX = 575;
|
||||||
|
local timmingY = 1472;
|
||||||
|
|
||||||
local bottomPanelX = 0;
|
local bottomPanelX = 0;
|
||||||
local bottomPanelY = 1170;
|
local bottomPanelY = 1170;
|
||||||
|
|
||||||
|
@ -189,13 +193,14 @@ function drawTimingBar(y, value, max, type)
|
||||||
|
|
||||||
if type == 'crit' then
|
if type == 'crit' then
|
||||||
gfx.FillColor(255, 255, 84, 255);
|
gfx.FillColor(255, 255, 84, 255);
|
||||||
|
gfx.Rect(rightPanelX + 696, rightPanelY + y, 293 * (value / max), 8);
|
||||||
elseif type == 'early' then
|
elseif type == 'early' then
|
||||||
gfx.FillColor(255, 16, 94, 255);
|
gfx.FillColor(255, 16, 94, 255);
|
||||||
|
gfx.Rect(rightPanelX + 696, rightPanelY + y, 293 * (value / max), 8);
|
||||||
elseif type == 'late' then
|
elseif type == 'late' then
|
||||||
gfx.FillColor(16, 225, 255, 255);
|
gfx.FillColor(16, 225, 255, 255);
|
||||||
|
gfx.Rect(rightPanelX + 696, rightPanelY + y, 293 * (value / max), 8);
|
||||||
end
|
end
|
||||||
|
|
||||||
gfx.Rect(rightPanelX + 696, rightPanelY + y, 293 * (value / max), 8);
|
|
||||||
gfx.Fill();
|
gfx.Fill();
|
||||||
gfx.ClosePath();
|
gfx.ClosePath();
|
||||||
end
|
end
|
||||||
|
@ -258,7 +263,6 @@ end
|
||||||
local drawRightPanel = function()
|
local drawRightPanel = function()
|
||||||
gfx.BeginPath();
|
gfx.BeginPath();
|
||||||
local tw, th = gfx.ImageSize(rightPanelImage);
|
local tw, th = gfx.ImageSize(rightPanelImage);
|
||||||
|
|
||||||
gfx.ImageRect(rightPanelX, rightPanelY, tw, th, rightPanelImage, 1, 0);
|
gfx.ImageRect(rightPanelX, rightPanelY, tw, th, rightPanelImage, 1, 0);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -269,7 +273,6 @@ local drawRightPanelContent = function()
|
||||||
if highScore then highScoreScore = highScore.score end
|
if highScore then highScoreScore = highScore.score end
|
||||||
|
|
||||||
local highScoreDelta = result.score - highScoreScore
|
local highScoreDelta = result.score - highScoreScore
|
||||||
|
|
||||||
-- Draw clear badge
|
-- Draw clear badge
|
||||||
local badgeData = clearBadgeImages[result.badge + 1] or clearBadgeImages[1]
|
local badgeData = clearBadgeImages[result.badge + 1] or clearBadgeImages[1]
|
||||||
if (result.autoplay) then
|
if (result.autoplay) then
|
||||||
|
@ -326,8 +329,58 @@ local drawRightPanelContent = function()
|
||||||
gfx.ImageRect(rightPanelX + 722, rightPanelY + 273, 211, 40,
|
gfx.ImageRect(rightPanelX + 722, rightPanelY + 273, 211, 40,
|
||||||
gaugeTypeBadgeImages[result.gauge_type + 1], 1, 0);
|
gaugeTypeBadgeImages[result.gauge_type + 1], 1, 0);
|
||||||
|
|
||||||
-- Draw gauge %
|
|
||||||
gfx.FontSize(24)
|
|
||||||
|
-- Draw median and mean hit delta
|
||||||
|
local addX = 418.5
|
||||||
|
local leftX = timmingX + addX
|
||||||
|
local rightX = timmingX + addX
|
||||||
|
local baseY = timmingY + 33
|
||||||
|
local detailTextMargin = 25.5
|
||||||
|
|
||||||
|
local tmw, tmh = gfx.ImageSize(timming);
|
||||||
|
gfx.BeginPath()
|
||||||
|
gfx.ImageRect(timmingX, timmingY, tmw/1.1, tmh/1.1, timming, 1, 0);
|
||||||
|
|
||||||
|
local Fillmhd, Fillmihd = result.meanHitDelta, result.medianHitDelta;
|
||||||
|
|
||||||
|
-- result.meanHitDelta up210 down
|
||||||
|
gfx.BeginPath();
|
||||||
|
gfx.FillColor(255, 100, 0, 255);
|
||||||
|
gfx.Rect(timmingX + 210, timmingY + 27.2 , Fillmhd, 12);
|
||||||
|
gfx.Fill();
|
||||||
|
if Fillmhd >= 210 then
|
||||||
|
gfx.Rect(timmingX + 210, timmingY + 27.2 , 210, 12);
|
||||||
|
gfx.Fill();
|
||||||
|
elseif Fillmhd <= -196 then
|
||||||
|
gfx.Rect(timmingX + 210, timmingY + 27.2 , -196, 12);
|
||||||
|
gfx.Fill();
|
||||||
|
end
|
||||||
|
gfx.ClosePath();
|
||||||
|
|
||||||
|
-- result.medianHitDelta
|
||||||
|
gfx.BeginPath();
|
||||||
|
gfx.FillColor(255, 136, 0, 255);
|
||||||
|
gfx.Rect(timmingX + 210, timmingY + 27.2 + detailTextMargin, Fillmihd, 12);
|
||||||
|
gfx.Fill();
|
||||||
|
if Fillmhd >= 210 then
|
||||||
|
gfx.Rect(timmingX + 210, timmingY + 27.2 + detailTextMargin, 210, 12);
|
||||||
|
gfx.Fill();
|
||||||
|
elseif Fillmhd <= -196 then
|
||||||
|
gfx.Rect(timmingX + 210, timmingY + 27.2 + detailTextMargin, -196, 12);
|
||||||
|
gfx.Fill();
|
||||||
|
end
|
||||||
|
gfx.ClosePath();
|
||||||
|
|
||||||
|
gfx.FillColor(255, 255, 255, 255);
|
||||||
|
gfx.FontSize(18)
|
||||||
|
gfx.BeginPath();
|
||||||
|
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT + gfx.TEXT_ALIGN_MIDDLE)
|
||||||
|
gfx.Text(result.medianHitDelta.." ms", rightX, baseY);
|
||||||
|
gfx.Text(math.floor(result.meanHitDelta).." ms", rightX, baseY + detailTextMargin);
|
||||||
|
|
||||||
|
-- Draw gauge %
|
||||||
|
gfx.FontSize(24)
|
||||||
|
|
||||||
if result.gauge == 1 then
|
if result.gauge == 1 then
|
||||||
gfx.Text('100%', rightPanelX + 987,
|
gfx.Text('100%', rightPanelX + 987,
|
||||||
|
@ -343,10 +396,6 @@ local drawRightPanelContent = function()
|
||||||
) * 10
|
) * 10
|
||||||
);
|
);
|
||||||
gfx.Text(decimalPortion .. '%', rightPanelX + 988, rightPanelY + 296);
|
gfx.Text(decimalPortion .. '%', rightPanelX + 988, rightPanelY + 296);
|
||||||
|
|
||||||
|
|
||||||
-- gfx.FontSize(24)
|
|
||||||
-- gfx.Text('%', rightPanelX + 988, rightPanelY + 294);
|
|
||||||
end
|
end
|
||||||
|
|
||||||
gfx.FontSize(24)
|
gfx.FontSize(24)
|
||||||
|
@ -484,19 +533,6 @@ local drawBottomPanelContent = function(deltatime)
|
||||||
gfx.FontSize(22)
|
gfx.FontSize(22)
|
||||||
gfx.Text(irText, bottomPanelX + 80, bottomPanelY + 461);
|
gfx.Text(irText, bottomPanelX + 80, bottomPanelY + 461);
|
||||||
|
|
||||||
-- Draw median and mean hit delta
|
|
||||||
local leftX = bottomPanelX + 600
|
|
||||||
local rightX = bottomPanelX + 1010
|
|
||||||
local baseY = bottomPanelY + 440
|
|
||||||
local detailTextMargin = 25
|
|
||||||
|
|
||||||
gfx.FontSize(20)
|
|
||||||
gfx.Text('Median hit delta', leftX, baseY);
|
|
||||||
gfx.Text('Mean hit delta', leftX, baseY + detailTextMargin);
|
|
||||||
|
|
||||||
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT + gfx.TEXT_ALIGN_MIDDLE)
|
|
||||||
gfx.Text(result.medianHitDelta.." ms", rightX, baseY);
|
|
||||||
gfx.Text(math.floor(result.meanHitDelta).." ms", rightX, baseY + detailTextMargin);
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local drawJacketPanel = function()
|
local drawJacketPanel = function()
|
||||||
|
|
Loading…
Reference in New Issue