diff --git a/scripts/songselect/songwheel.lua b/scripts/songselect/songwheel.lua index 5319a2f..12ee102 100644 --- a/scripts/songselect/songwheel.lua +++ b/scripts/songselect/songwheel.lua @@ -2,6 +2,9 @@ require('common') local Easing = require('common.easings'); local Footer = require('components.footer'); +local HEADER_HEIGHT = 128; +local BAR_ALPHA = 191; + local backgroundImage = gfx.CreateSkinImage("song_select/bg.png", 1) local dataPanelImage = gfx.CreateSkinImage("song_select/data_bg_overlay.png", 1) local dataGlowOverlayImage = gfx.CreateSkinImage("song_select/data_panel/data_glow_overlay.png", 1) @@ -17,6 +20,9 @@ local diffCursorImage = gfx.CreateSkinImage("song_select/level_cursor.png", 1) local searchBgImage = gfx.CreateSkinImage("song_select/search_bg.png", 1) +local headerTitleImage = gfx.CreateSkinImage("song_select/header/title.png", 1) +local headerGlowTitleImage = gfx.CreateSkinImage("song_select/header/title_glow.png", 1) + local defaultJacketImage = gfx.CreateSkinImage("song_select/loading.png", 0) local difficultyLabelImages = { @@ -109,6 +115,9 @@ local transitionAfterscrollTextSongArtist = 0; local transitionAfterscrollDifficultiesAlpha = 0; local transitionAfterscrollJacketBgAlpha = 0; +local animationHeaderGlowScale = 0; +local animationHeaderGlowAlpha = 0; + function resetLayoutInformation() resx, resy = game.GetResolution() desw = 1080 @@ -420,6 +429,20 @@ function drawSearch() gfx.Text(songwheel.searchText, desw-200, 30); end +function drawHeader() + gfx.Save() + gfx.BeginPath(); + gfx.FillColor(0,0,0,BAR_ALPHA); + gfx.Rect(0,0,desw, HEADER_HEIGHT); + gfx.Fill(); + gfx.ClosePath() + + gfx.ImageRect(28, 28, 423*0.85, 80*0.85, headerTitleImage, 1, 0) + gfx.ImageRect(28, 28, 423*0.85, 80*0.85, headerGlowTitleImage, animationHeaderGlowAlpha, 0) + + gfx.Restore() +end + function tickTransitions(deltaTime) if transitionScrollScale < 1 then transitionScrollScale = transitionScrollScale + deltaTime / 0.1 -- transition should last for that time in seconds @@ -496,6 +519,20 @@ function tickTransitions(deltaTime) else transitionAfterscrollJacketBgAlpha = 1; end + + -- HEADER GLOW ANIMATION + if animationHeaderGlowScale < 1 then + animationHeaderGlowScale = animationHeaderGlowScale + deltaTime / 1 -- transition should last for that time in seconds + else + animationHeaderGlowScale = 0 + end + + if animationHeaderGlowScale < 0.5 then + animationHeaderGlowAlpha = animationHeaderGlowScale * 2; + else + animationHeaderGlowAlpha = 1-((animationHeaderGlowScale-0.5) * 2); + end + animationHeaderGlowAlpha = animationHeaderGlowAlpha*0.3 end @@ -517,6 +554,7 @@ render = function (deltaTime) drawSearch(); + drawHeader(); Footer.draw(); diff --git a/textures/song_select/_old_cursor.png b/textures/song_select/_old_cursor.png deleted file mode 100644 index 9cb83cc..0000000 Binary files a/textures/song_select/_old_cursor.png and /dev/null differ diff --git a/textures/song_select/_old_data_bg_overlay.png b/textures/song_select/_old_data_bg_overlay.png deleted file mode 100644 index bca32ad..0000000 Binary files a/textures/song_select/_old_data_bg_overlay.png and /dev/null differ diff --git a/textures/song_select/premium_time.png b/textures/song_select/header/title.png similarity index 100% rename from textures/song_select/premium_time.png rename to textures/song_select/header/title.png diff --git a/textures/song_select/premium_time_white.png b/textures/song_select/header/title_glow.png similarity index 100% rename from textures/song_select/premium_time_white.png rename to textures/song_select/header/title_glow.png