+ decimal portion to the gauge % in the results

This commit is contained in:
FajsiEx 2021-08-27 18:37:49 +02:00
parent c0739dd968
commit 58bff25db5
1 changed files with 22 additions and 2 deletions

View File

@ -278,8 +278,28 @@ local drawRightPanelContent = function()
-- Draw gauge %
gfx.FontSize(24)
gfx.Text(math.floor(result.gauge * 100) .. '%', rightPanelX + 987,
if result.gauge == 1 then
gfx.Text('100%', rightPanelX + 987,
rightPanelY + 294);
else
gfx.Text(math.floor(result.gauge * 100) .. '.', rightPanelX + 964, rightPanelY + 294);
gfx.FontSize(18)
local decimalPortion = math.floor(
(
result.gauge * 100 -
math.floor(result.gauge * 100)
) * 10
);
gfx.Text(decimalPortion .. '%', rightPanelX + 988, rightPanelY + 296);
-- gfx.FontSize(24)
-- gfx.Text('%', rightPanelX + 988, rightPanelY + 294);
end
gfx.FontSize(24)
-- Draw gauge fill
local gaugeFillImage = gaugeEffPassFillImage;