This commit is contained in:
gskbladez 2021-08-06 17:34:42 -04:00
commit 025e8d9eea
13 changed files with 51 additions and 32 deletions

View File

@ -116,6 +116,7 @@ local progressTransitions = function ()
end
local draw = function ()
gfx.Save()
resx, resy = game.GetResolution();
-- Draw top background
@ -125,28 +126,29 @@ local draw = function ()
gfx.Fill();
gfx.ClosePath();
-- Draw the 'glow' effect
gfx.LoadSkinFont("digital/digital.ttf");
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE);
gfx.FontSize(47);
gfx.FillColor(128,200,255,190);
-- -- Draw the 'glow' effect
-- gfx.LoadSkinFont("Digital-Serial-Bold.ttf");
-- gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE);
-- gfx.FontSize(47);
-- gfx.FillColor(128,200,255,190);
gfx.Text(titleText, resx/2+1, TOP_BAR_HEIGHT/2+1);
gfx.Text(titleText, resx/2+1, TOP_BAR_HEIGHT/2-1);
gfx.Text(titleText, resx/2-1, TOP_BAR_HEIGHT/2+1);
gfx.Text(titleText, resx/2-1, TOP_BAR_HEIGHT/2+1);
-- gfx.Text(titleText, resx/2+1, TOP_BAR_HEIGHT/2+1);
-- gfx.Text(titleText, resx/2+1, TOP_BAR_HEIGHT/2-1);
-- gfx.Text(titleText, resx/2-1, TOP_BAR_HEIGHT/2+1);
-- gfx.Text(titleText, resx/2-1, TOP_BAR_HEIGHT/2+1);
-- Draw top label
-- -- Draw top label
gfx.FillColor(255,255,255);
gfx.Text(titleText, resx/2, TOP_BAR_HEIGHT/2);
-- Draw the top label lines
drawTopBarLines()
-- gfx.FillColor(255,255,255);
-- gfx.Text(titleText, resx/2, TOP_BAR_HEIGHT/2);
-- -- Draw the top label lines
-- drawTopBarLines()
gfx.LoadSkinFont("NotoSans-Regular.ttf");
drawBottomBar();
progressTransitions();
gfx.Restore()
end
return {

View File

@ -54,6 +54,15 @@ local difficultyLabelImages = {
gfx.CreateSkinImage("diff/8 vivid.png", 0),
}
local clearBadgeImages = {
gfx.CreateSkinImage("result/clears/CRASH.png", 0),
gfx.CreateSkinImage("result/clears/CRASH.png", 0),
gfx.CreateSkinImage("result/clears/COMPLETE.png", 0),
gfx.CreateSkinImage("result/clears/COMPLETE.png", 0),
gfx.CreateSkinImage("result/clears/UC.png", 0),
gfx.CreateSkinImage("result/clears/PUC.png", 0),
}
-- ANIMS
local idolAnimation = gfx.LoadSkinAnimation('idol', 1/30, 0, false);
@ -172,6 +181,8 @@ end
local drawTopBar = function()
gfx.BeginPath();
local tw, th = gfx.ImageSize(topBarImage);
th = (desw/tw)*th; -- recalculate the height of the bar to scale it down
gfx.ImageRect(0, -th * (1 - Easing.outQuad(transitionEnterScale)), desw, th,
topBarImage, 1, 0);
end
@ -193,6 +204,12 @@ local drawRightPanelContent = function()
local highScoreDelta = result.score - highScoreScore
-- Draw clear badge
local badgeImage = clearBadgeImages[result.badge+1] or clearBadgeImages[1]
local tw, th = gfx.ImageSize(badgeImage);
gfx.BeginPath();
gfx.ImageRect(rightPanelX+1140-tw, rightPanelY-10, tw*0.85, th*0.85, badgeImage, 1, 0);
-- Draw song name and artist
gfx.FontSize(28)
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)

View File

@ -1,5 +1,6 @@
local Easing = require('common.easings');
local Bars = require('components.bars');
local backgroundImage = gfx.CreateSkinImage("song_select/bg.png", 1)
local dataPanelImage = gfx.CreateSkinImage("song_select/data_bg_overlay.png", 1)
@ -194,7 +195,6 @@ function drawBackground(deltaTime)
local bestScore = diff.scores[1];
if song and diff then
local jacketImage = getJacketImage(song);
if jacketImage ~= defaultJacketImage then
gfx.BeginPath()
gfx.ImageRect(0+transitionAfterscrollScale*-300, 0, 900, 900, jacketImage or defaultJacketImage, transitionAfterscrollJacketBgAlpha, 0)
@ -204,9 +204,7 @@ function drawBackground(deltaTime)
gfx.Rect(0,0,900,900);
gfx.Fill();
gfx.ClosePath();
end
gfx.BeginPath()
gfx.BeginPath();
end
gfx.ImageRect(0, 0, desw, desh, dataPanelImage, 1, 0)
@ -371,7 +369,7 @@ function drawData() -- Draws the song data on the left panel
-- Draw artist
gfx.GlobalAlpha(transitionAfterscrollTextSongArtist);
gfx.Text(song.artist, 30+(1-transitionAfterscrollTextSongArtist)*20, 997);
gfx.Text(song.artist, 30+(1-transitionAfterscrollTextSongArtist)*30, 997);
gfx.GlobalAlpha(1);
@ -466,14 +464,14 @@ function tickTransitions(deltaTime)
end
-- Song title alpha and pos
if transitionAfterscrollScale < 0.02 then
transitionAfterscrollTextSongTitle = Easing.outQuad(math.min(1, (transitionAfterscrollScale) / 0.02));
if transitionAfterscrollScale < 0.025 then
transitionAfterscrollTextSongTitle = Easing.outQuad(math.min(1, (transitionAfterscrollScale) / 0.025));
else
transitionAfterscrollTextSongTitle = 1
end
-- Song artist alpha and pos
if transitionAfterscrollScale < 0.03 then
transitionAfterscrollTextSongArtist = Easing.outQuad(math.min(1, (transitionAfterscrollScale) / 0.03));
if transitionAfterscrollScale < 0.025 then
transitionAfterscrollTextSongArtist = Easing.outQuad(math.min(1, (transitionAfterscrollScale) / 0.025));
else
transitionAfterscrollTextSongArtist = 1
end
@ -516,13 +514,15 @@ render = function (deltaTime)
drawSearch();
Bars.draw();
gfx.BeginPath();
gfx.FontSize(18)
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
local debugScrollingUp= "FALSE"
if scrollingUp then debugScrollingUp = "TRUE" end;
gfx.Text('DELTA: ' .. deltaTime .. ' // SELECTED_INDEX: ' .. selectedIndex .. ' // SELECTED_DIFF: ' .. selectedDifficulty .. ' // SCROLLING_UP: ' .. debugScrollingUp .. ' // AC_TS: ' .. transitionAfterscrollScale, 8, 8);
gfx.Text('S_I: ' .. selectedIndex .. ' // S_D: ' .. selectedDifficulty .. ' // S_UP: ' .. debugScrollingUp .. ' // AC_TS: ' .. transitionAfterscrollScale, 8, 8);
end
set_index = function(newIndex)

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 KiB

After

Width:  |  Height:  |  Size: 483 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB