+ progress bar in song panel

This commit is contained in:
FajsiEx 2021-10-28 17:21:25 +02:00
parent 084a10bd5a
commit fcc2f5958f
2 changed files with 19 additions and 2 deletions

View File

@ -35,7 +35,14 @@ function render(deltaTime)
Banner.render(deltaTime);
UserPanel.render(deltaTime);
SongPanel.render(deltaTime, gameplay.bpm, gameplay.hispeed, gameplay.jacketPath, gameplay.difficulty, gameplay.level);
SongPanel.render(deltaTime,
gameplay.bpm,
gameplay.hispeed,
gameplay.jacketPath,
gameplay.difficulty,
gameplay.level,
gameplay.progress
);
ScorePanel.render(deltaTime, score, maxChain)
Gauge.render(
@ -64,6 +71,10 @@ end
local outroTimer = 0;
function render_outro(deltaTime, clearState)
if (clearState == 0) then
return true, 0; -- Exit right away if user manually exited gameplay
end
TrackEnd.render(deltaTime);
outroTimer = outroTimer + deltaTime

View File

@ -34,7 +34,7 @@ local tickTransitions = function (deltaTime)
end
local render = function (deltaTime, bpm, laneSpeed, jacketPath, diff, level)
local render = function (deltaTime, bpm, laneSpeed, jacketPath, diff, level, progress)
if (not loadedJacketImage and jacketPath) then
loadJacketImage(jacketPath)
end
@ -91,6 +91,12 @@ local render = function (deltaTime, bpm, laneSpeed, jacketPath, diff, level)
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT + gfx.TEXT_ALIGN_MIDDLE);
renderOutlinedText(260,y+247, string.format("%.0f", bpm), 2);
renderOutlinedText(260,y+281, string.format("%.2f", actualLaneSpeed), 2);
-- Draw progress
gfx.BeginPath()
gfx.FillColor(244, 204, 101)
gfx.Rect(222, 291, 622 * progress, 3)
gfx.Fill()
end
return {