diff --git a/scripts/components/bars.lua b/scripts/components/bars.lua index d7cff0e..01deea4 100644 --- a/scripts/components/bars.lua +++ b/scripts/components/bars.lua @@ -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 { diff --git a/scripts/result.lua b/scripts/result.lua index df6d2fc..f7afb94 100644 --- a/scripts/result.lua +++ b/scripts/result.lua @@ -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) diff --git a/scripts/songselect/songwheel.lua b/scripts/songselect/songwheel.lua index ba641b0..4a2a122 100644 --- a/scripts/songselect/songwheel.lua +++ b/scripts/songselect/songwheel.lua @@ -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,19 +195,16 @@ 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) - - - gfx.BeginPath(); - gfx.FillColor(0,0,0,math.floor(transitionAfterscrollJacketBgAlpha*64)); - gfx.Rect(0,0,900,900); - gfx.Fill(); - gfx.ClosePath(); - end - gfx.BeginPath() + gfx.ImageRect(0+transitionAfterscrollScale*-300, 0, 900, 900, jacketImage or defaultJacketImage, transitionAfterscrollJacketBgAlpha, 0) + + + gfx.BeginPath(); + gfx.FillColor(0,0,0,math.floor(transitionAfterscrollJacketBgAlpha*64)); + gfx.Rect(0,0,900,900); + gfx.Fill(); + gfx.ClosePath(); + 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) diff --git a/textures/result/clears/PERFECT.png b/textures/result/clears/PUC.png similarity index 100% rename from textures/result/clears/PERFECT.png rename to textures/result/clears/PUC.png diff --git a/textures/result/clears/ULTIMATE CHAIN.png b/textures/result/clears/UC.png similarity index 100% rename from textures/result/clears/ULTIMATE CHAIN.png rename to textures/result/clears/UC.png diff --git a/textures/song_select/_old_cursor.png b/textures/song_select/_old_cursor.png new file mode 100644 index 0000000..9cb83cc Binary files /dev/null and b/textures/song_select/_old_cursor.png differ diff --git a/textures/song_select/_old_data_bg_overlay.png b/textures/song_select/_old_data_bg_overlay.png new file mode 100644 index 0000000..bca32ad Binary files /dev/null and b/textures/song_select/_old_data_bg_overlay.png differ diff --git a/textures/song_select/alt cursor.png b/textures/song_select/alt cursor.png deleted file mode 100644 index f4169a3..0000000 Binary files a/textures/song_select/alt cursor.png and /dev/null differ diff --git a/textures/song_select/alt data_bg_overlay.png b/textures/song_select/alt data_bg_overlay.png deleted file mode 100644 index 92c5ba6..0000000 Binary files a/textures/song_select/alt data_bg_overlay.png and /dev/null differ diff --git a/textures/song_select/cursor.png b/textures/song_select/cursor.png index 9cb83cc..f4169a3 100644 Binary files a/textures/song_select/cursor.png and b/textures/song_select/cursor.png differ diff --git a/textures/song_select/cursor_text.png b/textures/song_select/cursor_text.png deleted file mode 100644 index d3eb991..0000000 Binary files a/textures/song_select/cursor_text.png and /dev/null differ diff --git a/textures/song_select/data_bg_overlay.png b/textures/song_select/data_bg_overlay.png index bca32ad..92c5ba6 100644 Binary files a/textures/song_select/data_bg_overlay.png and b/textures/song_select/data_bg_overlay.png differ diff --git a/textures/song_select/score_bg.png b/textures/song_select/score_bg.png deleted file mode 100644 index b1a78af..0000000 Binary files a/textures/song_select/score_bg.png and /dev/null differ