Merge branch 'master' of https://github.com/FajsiEx/exceed
|
@ -116,6 +116,7 @@ local progressTransitions = function ()
|
||||||
end
|
end
|
||||||
|
|
||||||
local draw = function ()
|
local draw = function ()
|
||||||
|
gfx.Save()
|
||||||
resx, resy = game.GetResolution();
|
resx, resy = game.GetResolution();
|
||||||
|
|
||||||
-- Draw top background
|
-- Draw top background
|
||||||
|
@ -125,28 +126,29 @@ local draw = function ()
|
||||||
gfx.Fill();
|
gfx.Fill();
|
||||||
gfx.ClosePath();
|
gfx.ClosePath();
|
||||||
|
|
||||||
-- Draw the 'glow' effect
|
-- -- Draw the 'glow' effect
|
||||||
gfx.LoadSkinFont("digital/digital.ttf");
|
-- gfx.LoadSkinFont("Digital-Serial-Bold.ttf");
|
||||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE);
|
-- gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE);
|
||||||
gfx.FontSize(47);
|
-- gfx.FontSize(47);
|
||||||
gfx.FillColor(128,200,255,190);
|
-- 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.FillColor(255,255,255);
|
||||||
gfx.Text(titleText, resx/2, TOP_BAR_HEIGHT/2);
|
-- gfx.Text(titleText, resx/2, TOP_BAR_HEIGHT/2);
|
||||||
-- Draw the top label lines
|
-- -- Draw the top label lines
|
||||||
drawTopBarLines()
|
-- drawTopBarLines()
|
||||||
gfx.LoadSkinFont("NotoSans-Regular.ttf");
|
gfx.LoadSkinFont("NotoSans-Regular.ttf");
|
||||||
|
|
||||||
drawBottomBar();
|
drawBottomBar();
|
||||||
|
|
||||||
progressTransitions();
|
progressTransitions();
|
||||||
|
gfx.Restore()
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -54,6 +54,15 @@ local difficultyLabelImages = {
|
||||||
gfx.CreateSkinImage("diff/8 vivid.png", 0),
|
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
|
-- ANIMS
|
||||||
local idolAnimation = gfx.LoadSkinAnimation('idol', 1/30, 0, false);
|
local idolAnimation = gfx.LoadSkinAnimation('idol', 1/30, 0, false);
|
||||||
|
|
||||||
|
@ -172,6 +181,8 @@ end
|
||||||
local drawTopBar = function()
|
local drawTopBar = function()
|
||||||
gfx.BeginPath();
|
gfx.BeginPath();
|
||||||
local tw, th = gfx.ImageSize(topBarImage);
|
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,
|
gfx.ImageRect(0, -th * (1 - Easing.outQuad(transitionEnterScale)), desw, th,
|
||||||
topBarImage, 1, 0);
|
topBarImage, 1, 0);
|
||||||
end
|
end
|
||||||
|
@ -193,6 +204,12 @@ local drawRightPanelContent = function()
|
||||||
|
|
||||||
local highScoreDelta = result.score - highScoreScore
|
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
|
-- Draw song name and artist
|
||||||
gfx.FontSize(28)
|
gfx.FontSize(28)
|
||||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
|
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
local Easing = require('common.easings');
|
local Easing = require('common.easings');
|
||||||
|
local Bars = require('components.bars');
|
||||||
|
|
||||||
local backgroundImage = gfx.CreateSkinImage("song_select/bg.png", 1)
|
local backgroundImage = gfx.CreateSkinImage("song_select/bg.png", 1)
|
||||||
local dataPanelImage = gfx.CreateSkinImage("song_select/data_bg_overlay.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];
|
local bestScore = diff.scores[1];
|
||||||
if song and diff then
|
if song and diff then
|
||||||
local jacketImage = getJacketImage(song);
|
local jacketImage = getJacketImage(song);
|
||||||
if jacketImage ~= defaultJacketImage then
|
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
gfx.ImageRect(0+transitionAfterscrollScale*-300, 0, 900, 900, jacketImage or defaultJacketImage, transitionAfterscrollJacketBgAlpha, 0)
|
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.Rect(0,0,900,900);
|
||||||
gfx.Fill();
|
gfx.Fill();
|
||||||
gfx.ClosePath();
|
gfx.ClosePath();
|
||||||
end
|
gfx.BeginPath();
|
||||||
|
|
||||||
gfx.BeginPath()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
gfx.ImageRect(0, 0, desw, desh, dataPanelImage, 1, 0)
|
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
|
-- Draw artist
|
||||||
gfx.GlobalAlpha(transitionAfterscrollTextSongArtist);
|
gfx.GlobalAlpha(transitionAfterscrollTextSongArtist);
|
||||||
gfx.Text(song.artist, 30+(1-transitionAfterscrollTextSongArtist)*20, 997);
|
gfx.Text(song.artist, 30+(1-transitionAfterscrollTextSongArtist)*30, 997);
|
||||||
|
|
||||||
gfx.GlobalAlpha(1);
|
gfx.GlobalAlpha(1);
|
||||||
|
|
||||||
|
@ -466,14 +464,14 @@ function tickTransitions(deltaTime)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Song title alpha and pos
|
-- Song title alpha and pos
|
||||||
if transitionAfterscrollScale < 0.02 then
|
if transitionAfterscrollScale < 0.025 then
|
||||||
transitionAfterscrollTextSongTitle = Easing.outQuad(math.min(1, (transitionAfterscrollScale) / 0.02));
|
transitionAfterscrollTextSongTitle = Easing.outQuad(math.min(1, (transitionAfterscrollScale) / 0.025));
|
||||||
else
|
else
|
||||||
transitionAfterscrollTextSongTitle = 1
|
transitionAfterscrollTextSongTitle = 1
|
||||||
end
|
end
|
||||||
-- Song artist alpha and pos
|
-- Song artist alpha and pos
|
||||||
if transitionAfterscrollScale < 0.03 then
|
if transitionAfterscrollScale < 0.025 then
|
||||||
transitionAfterscrollTextSongArtist = Easing.outQuad(math.min(1, (transitionAfterscrollScale) / 0.03));
|
transitionAfterscrollTextSongArtist = Easing.outQuad(math.min(1, (transitionAfterscrollScale) / 0.025));
|
||||||
else
|
else
|
||||||
transitionAfterscrollTextSongArtist = 1
|
transitionAfterscrollTextSongArtist = 1
|
||||||
end
|
end
|
||||||
|
@ -516,13 +514,15 @@ render = function (deltaTime)
|
||||||
|
|
||||||
drawSearch();
|
drawSearch();
|
||||||
|
|
||||||
|
Bars.draw();
|
||||||
|
|
||||||
|
|
||||||
gfx.BeginPath();
|
gfx.BeginPath();
|
||||||
gfx.FontSize(18)
|
gfx.FontSize(18)
|
||||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
|
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
|
||||||
local debugScrollingUp= "FALSE"
|
local debugScrollingUp= "FALSE"
|
||||||
if scrollingUp then debugScrollingUp = "TRUE" end;
|
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
|
end
|
||||||
|
|
||||||
set_index = function(newIndex)
|
set_index = function(newIndex)
|
||||||
|
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 480 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 483 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 480 KiB After Width: | Height: | Size: 483 KiB |
Before Width: | Height: | Size: 1.7 KiB |