diff --git a/scripts/gameplay.lua b/scripts/gameplay.lua index 05a8daf..841e902 100644 --- a/scripts/gameplay.lua +++ b/scripts/gameplay.lua @@ -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 diff --git a/scripts/gameplay/song_panel.lua b/scripts/gameplay/song_panel.lua index 98ecedb..b7f11cc 100644 --- a/scripts/gameplay/song_panel.lua +++ b/scripts/gameplay/song_panel.lua @@ -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 {