/ score numbers scaling & > use draw_number function for combo instead of whatever that thing was

This commit is contained in:
FajsiEx 2021-08-14 12:03:46 +02:00
parent abf7ffd080
commit c9bd55bfe3
3 changed files with 21 additions and 18 deletions

View File

@ -687,8 +687,8 @@ function draw_score(deltaTime)
gfx.ImageRect(desw - tw + 12, portrait and 50 or 0, tw, th, scoreBack, 1, 0) gfx.ImageRect(desw - tw + 12, portrait and 50 or 0, tw, th, scoreBack, 1, 0)
gfx.FillColor(255, 255, 255) gfx.FillColor(255, 255, 255)
draw_number(desw - 305, portrait and 132 or 64, 1.0, math.floor(score / 10000), 4, scoreNumber, true, 0.40, 1.12) draw_number(desw - 305, portrait and 132 or 64, 1.0, math.floor(score / 10000), 4, scoreNumber, true, 0.38, 1.12)
draw_number(desw - 110, portrait and 137 or 68, 1.0, score, 4, scoreNumber, true, 0.3, 1.12) draw_number(desw - 110, portrait and 137 or 68, 1.0, score, 4, scoreNumber, true, 0.28, 1.12)
-- Draw max combo -- Draw max combo
gfx.FillColor(255, 255, 255) gfx.FillColor(255, 255, 255)
@ -864,23 +864,26 @@ function draw_combo(deltaTime)
gfx.ImageRect(posx - tw / 2 + 10, posy - th / 4 - 210, tw * 0.85, th * 0.85, comboBottom, alpha, 0) gfx.ImageRect(posx - tw / 2 + 10, posy - th / 4 - 210, tw * 0.85, th * 0.85, comboBottom, alpha, 0)
tw, th = gfx.ImageSize(comboCurrent[1]) tw, th = gfx.ImageSize(comboCurrent[1])
posy = posy - th posy = posy - th + 32
local digit = combo % 10 local comboScale = 0.45;
gfx.BeginPath() draw_number(desw/2 - (tw*4*comboScale)/2+(tw*comboScale*1.5)+10, posy - th / 2, 1.0, combo, 4, comboCurrent, true, comboScale, 1.12)
gfx.ImageRect(posx + 70, posy - th / 2, tw * 0.5, th * 0.5, comboCurrent[digit + 1], alpha, 0)
digit = math.floor(combo / 10) % 10 -- local digit = combo % 10
gfx.BeginPath() -- gfx.BeginPath()
gfx.ImageRect(posx, posy - th / 2, tw * 0.5, th * 0.5, comboCurrent[digit + 1], combo >= 10 and alpha or 0.2, 0) -- gfx.ImageRect(posx + 70, posy - th / 2, tw * 0.45, th * 0.45, comboCurrent[digit + 1], alpha, 0)
digit = math.floor(combo / 100) % 10 -- digit = math.floor(combo / 10) % 10
gfx.BeginPath() -- gfx.BeginPath()
gfx.ImageRect(posx - 70, posy - th / 2, tw * 0.5, th * 0.5, comboCurrent[digit + 1], combo >= 100 and alpha or 0.2, 0) -- gfx.ImageRect(posx, posy - th / 2, tw * 0.45, th * 0.45, comboCurrent[digit + 1], combo >= 10 and alpha or 0.2, 0)
digit = math.floor(combo / 1000) % 10 -- digit = math.floor(combo / 100) % 10
gfx.BeginPath() -- gfx.BeginPath()
gfx.ImageRect(posx - 140, posy - th / 2, tw * 0.5, th * 0.5, comboCurrent[digit + 1], combo >= 1000 and alpha or 0.2, 0) -- gfx.ImageRect(posx - 70, posy - th / 2, tw * 0.45, th * 0.45, comboCurrent[digit + 1], combo >= 100 and alpha or 0.2, 0)
-- digit = math.floor(combo / 1000) % 10
-- gfx.BeginPath()
-- gfx.ImageRect(posx - 140, posy - th / 2, tw * 0.5, th * 0.5, comboCurrent[digit + 1], combo >= 1000 and alpha or 0.2, 0)
end end
-- -------------------------------------------------------------------------- -- -- -------------------------------------------------------------------------- --
-- draw_earlate: -- -- draw_earlate: --

View File

@ -224,8 +224,8 @@ local drawRightPanelContent = function()
gfx.Text(result.artist, rightPanelX + 435, rightPanelY + 143); gfx.Text(result.artist, rightPanelX + 435, rightPanelY + 143);
-- Draw score -- Draw score
draw_number(rightPanelX+580, rightPanelY+192, 1.0, math.floor(result.score / 10000), 4, scoreNumber, true, 0.42, 1.12) draw_number(rightPanelX+580, rightPanelY+192, 1.0, math.floor(result.score / 10000), 4, scoreNumber, true, 0.40, 1.12)
draw_number(rightPanelX+768, rightPanelY+202, 1.0, result.score, 4, scoreNumber, true, 0.25, 1.12) draw_number(rightPanelX+775, rightPanelY+200, 1.0, result.score, 4, scoreNumber, true, 0.25, 1.12)
-- If this is the highscore, draw over the glowing best badge -- If this is the highscore, draw over the glowing best badge
if highScoreDelta > 0 then if highScoreDelta > 0 then

View File

@ -370,7 +370,7 @@ function drawData() -- Draws the song data on the left panel
-- Draw best score -- Draw best score
gfx.BeginPath() gfx.BeginPath()
draw_number(100, 793, 1.0, math.floor(bestScore.score / 10000), 4, scoreNumbers, true, 0.3, 1.12) draw_number(100, 793, 1.0, math.floor(bestScore.score / 10000), 4, scoreNumbers, true, 0.3, 1.12)
draw_number(245, 797, 1.0, bestScore.score, 4, scoreNumbers, true, 0.22, 1.12) draw_number(253, 798, 1.0, bestScore.score, 4, scoreNumbers, true, 0.22, 1.12)
-- Draw grade -- Draw grade
local gradeImage = gradeImages.none; local gradeImage = gradeImages.none;