+ song panel & + bpm and lanespeed texts to it

This commit is contained in:
FajsiEx 2021-10-12 19:56:18 +02:00
parent 6f1d815293
commit 6a631ea9af
4 changed files with 66 additions and 0 deletions

View File

@ -5,6 +5,7 @@ local Banner = require('gameplay.banner')
local CritLine = require('gameplay.crit_line')
local Console = require('gameplay.console')
local UserPanel = require('gameplay.user_panel')
local SongPanel = require('gameplay.song_panel')
local ScorePanel = require('gameplay.score_panel')
local Gauge = require('gameplay.gauge')
local Chain = require('gameplay.chain')
@ -32,6 +33,7 @@ function render(deltaTime)
Banner.render(deltaTime);
UserPanel.render(deltaTime);
SongPanel.render(deltaTime, gameplay.bpm, gameplay.hispeed);
ScorePanel.render(deltaTime, score, maxChain)
Gauge.render(

View File

@ -0,0 +1,64 @@
local desw = 1080;
local desh = 1920;
local bgLeftImage = gfx.CreateSkinImage("gameplay/song_panel/bg_left.png", 0);
local bgRightImage = gfx.CreateSkinImage("gameplay/song_panel/bg_right.png", 0);
local renderOutlinedText = function (x,y, text, outlineWidth)
gfx.BeginPath();
gfx.FillColor(0,0,0,255);
gfx.Text(text, x-outlineWidth, y+outlineWidth);
gfx.Text(text, x-outlineWidth, y-outlineWidth);
gfx.Text(text, x+outlineWidth, y+outlineWidth);
gfx.Text(text, x+outlineWidth, y-outlineWidth);
gfx.FillColor(255,255,255,255);
gfx.Text(text, x, y);
end
local tickTransitions = function (deltaTime)
end
local render = function (deltaTime, bpm, laneSpeed)
tickTransitions(deltaTime)
local y = 210;
gfx.BeginPath();
gfx.ImageRect(
0,
y,
884*0.85,
374*0.85,
bgLeftImage,
1,
0
);
gfx.BeginPath();
gfx.ImageRect(
200,
y,
1016*0.85,
122*0.85,
bgRightImage,
1,
0
);
gfx.FontSize(30);
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
renderOutlinedText(25,y+247, "BPM", 2);
renderOutlinedText(25,y+281, "LANE-SPEED", 2);
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", laneSpeed), 2);
end
return {
render=render
}

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB