From d1694b69dafc517693fa2142f5a1d310f4f22549 Mon Sep 17 00:00:00 2001 From: FajsiEx Date: Thu, 28 Oct 2021 17:40:15 +0200 Subject: [PATCH] + song title to song panel --- scripts/gameplay.lua | 4 +++- scripts/gameplay/song_panel.lua | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/gameplay.lua b/scripts/gameplay.lua index 841e902..2faad81 100644 --- a/scripts/gameplay.lua +++ b/scripts/gameplay.lua @@ -41,7 +41,9 @@ function render(deltaTime) gameplay.jacketPath, gameplay.difficulty, gameplay.level, - gameplay.progress + gameplay.progress, + gameplay.title, + gameplay.artist ); ScorePanel.render(deltaTime, score, maxChain) diff --git a/scripts/gameplay/song_panel.lua b/scripts/gameplay/song_panel.lua index f6a8900..fc2f83d 100644 --- a/scripts/gameplay/song_panel.lua +++ b/scripts/gameplay/song_panel.lua @@ -36,7 +36,7 @@ local tickTransitions = function (deltaTime) end -local render = function (deltaTime, bpm, laneSpeed, jacketPath, diff, level, progress) +local render = function (deltaTime, bpm, laneSpeed, jacketPath, diff, level, progress, songTitle, songArtist) if (not loadedJacketImage and jacketPath) then loadJacketImage(jacketPath) end @@ -110,6 +110,12 @@ local render = function (deltaTime, bpm, laneSpeed, jacketPath, diff, level, pro 1, 0 ); + + -- Draw song title + + gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE) + gfx.FontSize(22) + gfx.Text(songTitle .. ' / ' .. songArtist, 385, 270); end return {